- cherry-pick new weakdeps tags from upstream
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=318
This commit is contained in:
parent
1c3374116c
commit
147e9e9032
@ -23,7 +23,7 @@
|
||||
+ if (fc->skipReq)
|
||||
+ return 0;
|
||||
+
|
||||
+ rpmfcHelper(fc, nsdep, "supplements", &fc->supplements, RPMSENSE_FIND_REQUIRES|RPMSENSE_STRONG|RPMSENSE_MISSINGOK, RPMTAG_ENHANCESNAME);
|
||||
+ rpmfcHelper(fc, nsdep, "supplements", &fc->supplements, RPMSENSE_FIND_REQUIRES, RPMTAG_SUPPLEMENTNAME);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -65,7 +65,7 @@
|
||||
rpmdsFree(ds);
|
||||
break;
|
||||
+ case 'S':
|
||||
+ ds = rpmdsSingle(RPMTAG_ENHANCESNAME, N, EVR, Flags);
|
||||
+ ds = rpmdsSingle(RPMTAG_SUPPLEMENTNAME, N, EVR, Flags);
|
||||
+ dix = rpmdsFind(fc->supplements, ds);
|
||||
+ ds = rpmdsFree(ds);
|
||||
+ break;
|
||||
@ -82,9 +82,9 @@
|
||||
+ while (rpmdsNext(pi) >= 0) {
|
||||
+ rpmsenseFlags flags = rpmdsFlags(pi);
|
||||
+
|
||||
+ headerPutString(pkg->header, RPMTAG_ENHANCESNAME, rpmdsN(pi));
|
||||
+ headerPutString(pkg->header, RPMTAG_ENHANCESVERSION, rpmdsEVR(pi));
|
||||
+ headerPutUint32(pkg->header, RPMTAG_ENHANCESFLAGS, &flags, 1);
|
||||
+ headerPutString(pkg->header, RPMTAG_SUPPLEMENTNAME, rpmdsN(pi));
|
||||
+ headerPutString(pkg->header, RPMTAG_SUPPLEMENTVERSION, rpmdsEVR(pi));
|
||||
+ headerPutUint32(pkg->header, RPMTAG_SUPPLEMENTFLAGS, &flags, 1);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
593
newweakdeps.diff
Normal file
593
newweakdeps.diff
Normal file
@ -0,0 +1,593 @@
|
||||
--- ./build/files.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/files.c 2014-02-20 14:47:48.107802710 +0000
|
||||
@@ -1642,6 +1642,7 @@ static rpmRC readFilesManifest(rpmSpec s
|
||||
char *fn, buf[BUFSIZ];
|
||||
FILE *fd = NULL;
|
||||
rpmRC rc = RPMRC_FAIL;
|
||||
+ unsigned int nlines = 0;
|
||||
|
||||
if (*path == '/') {
|
||||
fn = rpmGetPath(path, NULL);
|
||||
@@ -1657,14 +1658,19 @@ static rpmRC readFilesManifest(rpmSpec s
|
||||
}
|
||||
|
||||
while (fgets(buf, sizeof(buf), fd)) {
|
||||
- handleComments(buf);
|
||||
+ if (handleComments(buf))
|
||||
+ continue;
|
||||
if (expandMacros(spec, spec->macros, buf, sizeof(buf))) {
|
||||
rpmlog(RPMLOG_ERR, _("line: %s\n"), buf);
|
||||
goto exit;
|
||||
}
|
||||
argvAdd(&(pkg->fileList), buf);
|
||||
+ nlines++;
|
||||
}
|
||||
|
||||
+ if (nlines == 0)
|
||||
+ rpmlog(RPMLOG_WARNING, _("Empty %%files file %s\n"), fn);
|
||||
+
|
||||
if (ferror(fd))
|
||||
rpmlog(RPMLOG_ERR, _("Error reading %%files file %s: %m\n"), fn);
|
||||
else
|
||||
--- ./build/pack.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/pack.c 2014-02-20 14:47:48.107802710 +0000
|
||||
@@ -228,8 +228,10 @@ static rpmTagVal depevrtags[] = {
|
||||
RPMTAG_CONFLICTVERSION,
|
||||
RPMTAG_ORDERVERSION,
|
||||
RPMTAG_TRIGGERVERSION,
|
||||
- RPMTAG_SUGGESTSVERSION,
|
||||
- RPMTAG_ENHANCESVERSION,
|
||||
+ RPMTAG_SUGGESTVERSION,
|
||||
+ RPMTAG_ENHANCEVERSION,
|
||||
+ RPMTAG_RECOMMENDVERSION,
|
||||
+ RPMTAG_SUPPLEMENTVERSION,
|
||||
0
|
||||
};
|
||||
|
||||
--- ./build/parsePreamble.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/parsePreamble.c 2014-02-20 14:47:48.108802710 +0000
|
||||
@@ -785,6 +785,10 @@ static rpmRC handlePreambleTag(rpmSpec s
|
||||
}
|
||||
/* fallthrough */
|
||||
case RPMTAG_PREREQ:
|
||||
+ case RPMTAG_RECOMMENDFLAGS:
|
||||
+ case RPMTAG_SUGGESTFLAGS:
|
||||
+ case RPMTAG_SUPPLEMENTFLAGS:
|
||||
+ case RPMTAG_ENHANCEFLAGS:
|
||||
case RPMTAG_CONFLICTFLAGS:
|
||||
case RPMTAG_OBSOLETEFLAGS:
|
||||
case RPMTAG_PROVIDEFLAGS:
|
||||
@@ -886,6 +890,10 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
|
||||
{RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
|
||||
{RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
|
||||
+ {RPMTAG_RECOMMENDFLAGS, 0, 0, LEN_AND_STR("recommends")},
|
||||
+ {RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")},
|
||||
+ {RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")},
|
||||
+ {RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")},
|
||||
{RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
|
||||
{RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
|
||||
{RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
|
||||
--- ./build/parseReqs.c.orig 2014-02-05 13:06:21.000000000 +0000
|
||||
+++ ./build/parseReqs.c 2014-02-20 14:47:48.108802710 +0000
|
||||
@@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
|
||||
nametag = RPMTAG_REQUIRENAME;
|
||||
tagflags |= RPMSENSE_ANY;
|
||||
break;
|
||||
+ case RPMTAG_RECOMMENDFLAGS:
|
||||
+ nametag = RPMTAG_RECOMMENDNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_SUGGESTFLAGS:
|
||||
+ nametag = RPMTAG_SUGGESTNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_SUPPLEMENTFLAGS:
|
||||
+ nametag = RPMTAG_SUPPLEMENTNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_ENHANCEFLAGS:
|
||||
+ nametag = RPMTAG_ENHANCENAME;
|
||||
+ break;
|
||||
case RPMTAG_PROVIDEFLAGS:
|
||||
nametag = RPMTAG_PROVIDENAME;
|
||||
break;
|
||||
--- ./build/parseSpec.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/parseSpec.c 2014-02-20 14:47:48.108802710 +0000
|
||||
@@ -102,11 +102,14 @@ static int matchTok(const char *token, c
|
||||
return rc;
|
||||
}
|
||||
|
||||
-void handleComments(char *s)
|
||||
+int handleComments(char *s)
|
||||
{
|
||||
SKIPSPACE(s);
|
||||
- if (*s == '#')
|
||||
+ if (*s == '#') {
|
||||
*s = '\0';
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Push a file to spec's file stack, return the newly pushed entry */
|
||||
--- ./build/reqprov.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/reqprov.c 2014-02-20 14:47:48.108802710 +0000
|
||||
@@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal ta
|
||||
extra = Flags & RPMSENSE_TRIGGER;
|
||||
dsp = &pkg->triggers;
|
||||
break;
|
||||
+ case RPMTAG_RECOMMENDNAME:
|
||||
+ versiontag = RPMTAG_RECOMMENDVERSION;
|
||||
+ flagtag = RPMTAG_RECOMMENDFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->recommends;
|
||||
+ break;
|
||||
+ case RPMTAG_SUGGESTNAME:
|
||||
+ versiontag = RPMTAG_SUGGESTVERSION;
|
||||
+ flagtag = RPMTAG_SUGGESTFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->suggests;
|
||||
+ break;
|
||||
+ case RPMTAG_SUPPLEMENTNAME:
|
||||
+ versiontag = RPMTAG_SUPPLEMENTVERSION;
|
||||
+ flagtag = RPMTAG_SUPPLEMENTFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->supplements;
|
||||
+ break;
|
||||
+ case RPMTAG_ENHANCENAME:
|
||||
+ versiontag = RPMTAG_ENHANCEVERSION;
|
||||
+ flagtag = RPMTAG_ENHANCEFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->enhances;
|
||||
+ break;
|
||||
case RPMTAG_REQUIRENAME:
|
||||
default:
|
||||
tagN = RPMTAG_REQUIRENAME;
|
||||
--- ./build/rpmbuild_internal.h.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/rpmbuild_internal.h 2014-02-20 14:47:48.109802710 +0000
|
||||
@@ -93,6 +93,10 @@ struct Package_s {
|
||||
rpmds ds; /*!< Requires: N = EVR */
|
||||
rpmds requires;
|
||||
rpmds provides;
|
||||
+ rpmds recommends;
|
||||
+ rpmds suggests;
|
||||
+ rpmds supplements;
|
||||
+ rpmds enhances;
|
||||
rpmds conflicts;
|
||||
rpmds obsoletes;
|
||||
rpmds triggers;
|
||||
--- ./build/rpmbuild_misc.h.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/rpmbuild_misc.h 2014-02-20 14:47:48.109802710 +0000
|
||||
@@ -12,9 +12,10 @@ extern "C" {
|
||||
/** \ingroup rpmbuild
|
||||
* Truncate comment lines.
|
||||
* @param s skip white space, truncate line at '#'
|
||||
+ * @return 1 on comment lines, 0 otherwise
|
||||
*/
|
||||
RPM_GNUC_INTERNAL
|
||||
-void handleComments(char * s);
|
||||
+int handleComments(char * s);
|
||||
|
||||
/** \ingroup rpmstring
|
||||
*/
|
||||
--- ./build/spec.c.orig 2014-02-05 13:04:01.000000000 +0000
|
||||
+++ ./build/spec.c 2014-02-20 14:47:48.109802710 +0000
|
||||
@@ -137,6 +137,11 @@ static Package freePackage(Package pkg)
|
||||
pkg->ds = rpmdsFree(pkg->ds);
|
||||
pkg->requires = rpmdsFree(pkg->requires);
|
||||
pkg->provides = rpmdsFree(pkg->provides);
|
||||
+ pkg->recommends = rpmdsFree(pkg->recommends);
|
||||
+ pkg->suggests = rpmdsFree(pkg->suggests);
|
||||
+ pkg->supplements = rpmdsFree(pkg->supplements);
|
||||
+ pkg->enhances = rpmdsFree(pkg->enhances);
|
||||
+
|
||||
pkg->conflicts = rpmdsFree(pkg->conflicts);
|
||||
pkg->obsoletes = rpmdsFree(pkg->obsoletes);
|
||||
pkg->triggers = rpmdsFree(pkg->triggers);
|
||||
--- ./lib/rpmds.c.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./lib/rpmds.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -54,6 +54,22 @@ static int dsType(rpmTagVal tag,
|
||||
t = "Requires";
|
||||
evr = RPMTAG_REQUIREVERSION;
|
||||
f = RPMTAG_REQUIREFLAGS;
|
||||
+ } else if (tag == RPMTAG_SUPPLEMENTNAME) {
|
||||
+ t = "Supplements";
|
||||
+ evr = RPMTAG_SUPPLEMENTVERSION;
|
||||
+ f = RPMTAG_SUPPLEMENTFLAGS;
|
||||
+ } else if (tag == RPMTAG_ENHANCENAME) {
|
||||
+ t = "Enhances";
|
||||
+ evr = RPMTAG_ENHANCEVERSION;
|
||||
+ f = RPMTAG_ENHANCEFLAGS;
|
||||
+ } else if (tag == RPMTAG_RECOMMENDNAME) {
|
||||
+ t = "Recommends";
|
||||
+ evr = RPMTAG_RECOMMENDVERSION;
|
||||
+ f = RPMTAG_RECOMMENDFLAGS;
|
||||
+ } else if (tag == RPMTAG_SUGGESTNAME) {
|
||||
+ t = "Suggests";
|
||||
+ evr = RPMTAG_SUGGESTVERSION;
|
||||
+ f = RPMTAG_SUGGESTFLAGS;
|
||||
} else if (tag == RPMTAG_CONFLICTNAME) {
|
||||
t = "Conflicts";
|
||||
evr = RPMTAG_CONFLICTVERSION;
|
||||
--- ./lib/rpmtag.h.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./lib/rpmtag.h 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -217,14 +217,14 @@ typedef enum rpmTag_e {
|
||||
RPMTAG_PRETRANSPROG = 1153, /* s[] */
|
||||
RPMTAG_POSTTRANSPROG = 1154, /* s[] */
|
||||
RPMTAG_DISTTAG = 1155, /* s */
|
||||
- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */
|
||||
-#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */
|
||||
- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */
|
||||
- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */
|
||||
- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */
|
||||
-#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */
|
||||
- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */
|
||||
- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */
|
||||
+ RPMTAG_OLDSUGGESTSNAME = 1156, /* s[] (unimplemented) */
|
||||
+#define RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */
|
||||
+ RPMTAG_OLDSUGGESTSVERSION = 1157, /* s[] (unimplemented) */
|
||||
+ RPMTAG_OLDSUGGESTSFLAGS = 1158, /* i[] (unimplemented) */
|
||||
+ RPMTAG_OLDENHANCESNAME = 1159, /* s[] (unimplemented) */
|
||||
+#define RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */
|
||||
+ RPMTAG_OLDENHANCESVERSION = 1160, /* s[] (unimplemented) */
|
||||
+ RPMTAG_OLDENHANCESFLAGS = 1161, /* i[] (unimplemented) */
|
||||
RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
|
||||
RPMTAG_CVSID = 1163, /* s (unimplemented) */
|
||||
#define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
|
||||
@@ -261,6 +261,7 @@ typedef enum rpmTag_e {
|
||||
RPMTAG_BUILDOBSOLETES = 1194, /* internal (unimplemented) */
|
||||
RPMTAG_DBINSTANCE = 1195, /* i extension */
|
||||
RPMTAG_NVRA = 1196, /* s extension */
|
||||
+
|
||||
/* tags 1997-4999 reserved */
|
||||
RPMTAG_FILENAMES = 5000, /* s[] extension */
|
||||
RPMTAG_FILEPROVIDE = 5001, /* s[] extension */
|
||||
@@ -307,6 +308,26 @@ typedef enum rpmTag_e {
|
||||
RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */
|
||||
RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */
|
||||
RPMTAG_FILENLINKS = 5045, /* i[] extension */
|
||||
+ RPMTAG_RECOMMENDNAME = 5046, /* s[] */
|
||||
+#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */
|
||||
+ RPMTAG_RECOMMENDVERSION = 5047, /* s[] */
|
||||
+ RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */
|
||||
+ RPMTAG_SUGGESTNAME = 5049, /* s[] */
|
||||
+#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */
|
||||
+ RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */
|
||||
+ RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */
|
||||
+ RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */
|
||||
+#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */
|
||||
+ RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */
|
||||
+ RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */
|
||||
+ RPMTAG_ENHANCENAME = 5055, /* s[] */
|
||||
+#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */
|
||||
+ RPMTAG_ENHANCEVERSION = 5056, /* s[] */
|
||||
+ RPMTAG_ENHANCEFLAGS = 5057, /* i[] */
|
||||
+ RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */
|
||||
+ RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */
|
||||
+ RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */
|
||||
+ RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */
|
||||
|
||||
RPMTAG_FIRSTFREE_TAG /*!< internal */
|
||||
} rpmTag;
|
||||
--- ./lib/tagexts.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./lib/tagexts.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpm
|
||||
return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
|
||||
}
|
||||
|
||||
+static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
+{
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
|
||||
+}
|
||||
+
|
||||
+static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
+{
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
|
||||
+}
|
||||
+
|
||||
+static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
+{
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
|
||||
+}
|
||||
+
|
||||
+static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
+{
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
|
||||
+}
|
||||
+
|
||||
static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME);
|
||||
@@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmH
|
||||
{ RPMTAG_EPOCHNUM, epochnumTag },
|
||||
{ RPMTAG_INSTFILENAMES, instfilenamesTag },
|
||||
{ RPMTAG_REQUIRENEVRS, requirenevrsTag },
|
||||
+ { RPMTAG_RECOMMENDNEVRS, recommendnevrsTag},
|
||||
+ { RPMTAG_SUGGESTNEVRS, suggestnevrsTag},
|
||||
+ { RPMTAG_SUPPLEMENTNEVRS, supplementnevrsTag},
|
||||
+ { RPMTAG_ENHANCENEVRS, enhancenevrsTag},
|
||||
{ RPMTAG_PROVIDENEVRS, providenevrsTag },
|
||||
{ RPMTAG_OBSOLETENEVRS, obsoletenevrsTag },
|
||||
{ RPMTAG_CONFLICTNEVRS, conflictnevrsTag },
|
||||
--- ./python/Makefile.am.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./python/Makefile.am 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -6,16 +6,16 @@ AM_CPPFLAGS = -I$(top_builddir)/include/
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/python
|
||||
AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@
|
||||
|
||||
-pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la
|
||||
+pkgpyexec_LTLIBRARIES = _rpm.la _rpmb.la _rpms.la
|
||||
pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py
|
||||
|
||||
-_rpmmodule_la_LDFLAGS = -module -avoid-version -shared
|
||||
-_rpmmodule_la_LIBADD = \
|
||||
+_rpm_la_LDFLAGS = -module -avoid-version -shared
|
||||
+_rpm_la_LIBADD = \
|
||||
$(top_builddir)/lib/librpm.la \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
@WITH_PYTHON_LIB@
|
||||
|
||||
-_rpmmodule_la_SOURCES = rpmmodule.c rpmsystem-py.h \
|
||||
+_rpm_la_SOURCES = rpmmodule.c rpmsystem-py.h \
|
||||
header-py.c header-py.h \
|
||||
rpmds-py.c rpmds-py.h \
|
||||
rpmfd-py.c rpmfd-py.h \
|
||||
@@ -30,22 +30,22 @@ _rpmmodule_la_SOURCES = rpmmodule.c rpms
|
||||
rpmte-py.c rpmte-py.h \
|
||||
rpmts-py.c rpmts-py.h
|
||||
|
||||
-_rpmbmodule_la_LDFLAGS = -module -avoid-version -shared
|
||||
-_rpmbmodule_la_LIBADD = \
|
||||
+_rpmb_la_LDFLAGS = -module -avoid-version -shared
|
||||
+_rpmb_la_LIBADD = \
|
||||
$(top_builddir)/build/librpmbuild.la \
|
||||
$(top_builddir)/lib/librpm.la \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
@WITH_PYTHON_LIB@
|
||||
|
||||
-_rpmbmodule_la_SOURCES = rpmbmodule.c rpmsystem-py.h \
|
||||
+_rpmb_la_SOURCES = rpmbmodule.c rpmsystem-py.h \
|
||||
spec-py.c spec-py.h
|
||||
|
||||
-_rpmsmodule_la_LDFLAGS = -module -avoid-version -shared
|
||||
-_rpmsmodule_la_LIBADD = \
|
||||
+_rpms_la_LDFLAGS = -module -avoid-version -shared
|
||||
+_rpms_la_LIBADD = \
|
||||
$(top_builddir)/sign/librpmsign.la \
|
||||
$(top_builddir)/lib/librpm.la \
|
||||
$(top_builddir)/rpmio/librpmio.la \
|
||||
@WITH_PYTHON_LIB@
|
||||
|
||||
-_rpmsmodule_la_SOURCES = rpmsmodule.c rpmsystem-py.h
|
||||
+_rpms_la_SOURCES = rpmsmodule.c rpmsystem-py.h
|
||||
|
||||
--- ./python/rpmbmodule.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./python/rpmbmodule.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -66,8 +66,8 @@ static struct PyModuleDef moduledef = {
|
||||
NULL /* m_free */
|
||||
};
|
||||
|
||||
-PyObject * PyInit__rpm(void); /* XXX eliminate gcc warning */
|
||||
-PyObject * PyInit__rpm(void)
|
||||
+PyObject * PyInit__rpmb(void); /* XXX eliminate gcc warning */
|
||||
+PyObject * PyInit__rpmb(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
--- ./python/rpmii-py.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./python/rpmii-py.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -88,7 +88,9 @@ static PyNumberMethods rpmii_as_number =
|
||||
0, /* nb_add */
|
||||
0, /* nb_subtract */
|
||||
0, /* nb_multiply */
|
||||
+#if PY_MAJOR_VERSION < 3
|
||||
0, /* nb_divide */
|
||||
+#endif
|
||||
0, /* nb_remainder */
|
||||
0, /* nb_divmod */
|
||||
0, /* nb_power */
|
||||
--- ./python/rpmmi-py.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./python/rpmmi-py.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -149,7 +149,9 @@ static PyNumberMethods rpmmi_as_number =
|
||||
0, /* nb_add */
|
||||
0, /* nb_subtract */
|
||||
0, /* nb_multiply */
|
||||
+#if PY_MAJOR_VERSION < 3
|
||||
0, /* nb_divide */
|
||||
+#endif
|
||||
0, /* nb_remainder */
|
||||
0, /* nb_divmod */
|
||||
0, /* nb_power */
|
||||
--- ./python/rpmsmodule.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./python/rpmsmodule.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -59,15 +59,15 @@ static struct PyModuleDef moduledef = {
|
||||
"_rpms", /* m_name */
|
||||
rpms__doc__, /* m_doc */
|
||||
0, /* m_size */
|
||||
- NULL, /* m_methods */
|
||||
+ modMethods, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL /* m_free */
|
||||
};
|
||||
|
||||
-PyObject * PyInit__rpm(void); /* XXX eliminate gcc warning */
|
||||
-PyObject * PyInit__rpm(void)
|
||||
+PyObject * PyInit__rpms(void); /* XXX eliminate gcc warning */
|
||||
+PyObject * PyInit__rpms(void)
|
||||
{
|
||||
PyObject *m;
|
||||
|
||||
--- ./python/rpmsystem-py.h.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./python/rpmsystem-py.h 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -48,6 +48,7 @@ typedef Py_ssize_t (*lenfunc)(PyObject *
|
||||
#define PyInt_FromLong PyLong_FromLong
|
||||
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
|
||||
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
|
||||
+#define PyInt_AsSsize_t PyLong_AsSsize_t
|
||||
#endif
|
||||
|
||||
#endif /* H_SYSTEM_PYTHON */
|
||||
--- ./rpmio/digest.c.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./rpmio/digest.c 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
-#define DIGESTS_MAX 11
|
||||
+#define DIGESTS_MAX 12
|
||||
struct rpmDigestBundle_s {
|
||||
int index_min; /*!< Smallest index of active digest */
|
||||
int index_max; /*!< Largest index of active digest */
|
||||
--- ./rpmpopt.in.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./rpmpopt.in 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -67,6 +67,19 @@ rpm alias --requires --qf \
|
||||
--POPTdesc=$"list capabilities required by package(s)"
|
||||
rpm alias -R --requires
|
||||
|
||||
+rpm alias --recommends --qf \
|
||||
+ "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
|
||||
+ --POPTdesc=$"list capabilities recommended by package(s)"
|
||||
+rpm alias --suggests --qf \
|
||||
+ "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
|
||||
+ --POPTdesc=$"list capabilities suggested by package(s)"
|
||||
+rpm alias --supplements --qf \
|
||||
+ "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
|
||||
+ --POPTdesc=$"list capabilities supplemented by package(s)"
|
||||
+rpm alias --enhances --qf \
|
||||
+ "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
|
||||
+ --POPTdesc=$"list capabilities enhanced by package(s)"
|
||||
+
|
||||
rpm alias --info --qf '\
|
||||
Name : %{NAME}\n\
|
||||
%|EPOCH?{Epoch : %{EPOCH}\n}|\
|
||||
--- ./tests/data/SPECS/deptest.spec.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./tests/data/SPECS/deptest.spec 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -10,6 +10,10 @@ BuildArch: noarch
|
||||
%{?provs:Provides: %{provs}}
|
||||
%{?cfls:Conflicts: %{cfls}}
|
||||
%{?obs:Obsoletes: %{obs}}
|
||||
+%{?recs:Recommends: %{recs}}
|
||||
+%{?sugs:Suggests: %{sugs}}
|
||||
+%{?sups:Supplements: %{sups}}
|
||||
+%{?ens:Enhances: %{ens}}
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
--- ./tests/rpmbuild.at.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./tests/rpmbuild.at 2014-02-20 14:47:48.110802710 +0000
|
||||
@@ -185,3 +185,31 @@ lrwxrwxrwx /opt/globtest/linkgood
|
||||
],
|
||||
[])
|
||||
AT_CLEANUP
|
||||
+
|
||||
+# ------------------------------
|
||||
+# Check if weak and reverse requires can be built
|
||||
+AT_SETUP([Weak and reverse requires])
|
||||
+AT_KEYWORDS([build])
|
||||
+AT_CHECK([
|
||||
+
|
||||
+runroot rpmbuild -bb --quiet \
|
||||
+ --define "pkg weakdeps" \
|
||||
+ --define "recs foo > 1.2.3" \
|
||||
+ --define "sugs bar >= 0.1.2" \
|
||||
+ --define "sups baz" \
|
||||
+ --define "ens zap = 3" \
|
||||
+ /data/SPECS/deptest.spec
|
||||
+
|
||||
+runroot rpm -qp --recommends /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
|
||||
+runroot rpm -qp --suggests /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
|
||||
+runroot rpm -qp --supplements /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
|
||||
+runroot rpm -qp --enhances /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
|
||||
+],
|
||||
+[0],
|
||||
+[foo > 1.2.3
|
||||
+bar >= 0.1.2
|
||||
+baz
|
||||
+zap = 3
|
||||
+],
|
||||
+[ignore])
|
||||
+AT_CLEANUP
|
||||
--- ./tests/rpmdb.at.orig 2014-02-05 13:04:02.000000000 +0000
|
||||
+++ ./tests/rpmdb.at 2014-02-20 14:47:48.111802710 +0000
|
||||
@@ -103,7 +103,7 @@ AT_CLEANUP
|
||||
|
||||
# ------------------------------
|
||||
# reinstall a noarch package (with no files)
|
||||
-AT_SETUP([rpm -U --replacepkgs])
|
||||
+AT_SETUP([rpm -U --replacepkgs 1])
|
||||
AT_KEYWORDS([rpmdb install])
|
||||
|
||||
AT_CHECK([
|
||||
@@ -124,6 +124,28 @@ runroot rpm -i "${tpkg}" &&
|
||||
AT_CLEANUP
|
||||
|
||||
# ------------------------------
|
||||
+# reinstall a package with different file policies
|
||||
+AT_SETUP([rpm -U --replacepkgs 2])
|
||||
+AT_KEYWORDS([rpmdb install])
|
||||
+
|
||||
+AT_CHECK([
|
||||
+AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
|
||||
+RPMDB_CLEAR
|
||||
+RPMDB_INIT
|
||||
+
|
||||
+tpkg="/data/RPMS/hello-2.0-1.i686.rpm"
|
||||
+
|
||||
+runroot rpm -U --nodeps --ignorearch "${tpkg}" &&
|
||||
+ runroot rpm -U --nodeps --ignorearch --nodocs --replacepkgs "${tpkg}" &&
|
||||
+ runroot rpm -e hello
|
||||
+test -d "${RPMTEST}"/usr/share/doc/hello-2.0
|
||||
+],
|
||||
+[1],
|
||||
+[],
|
||||
+[])
|
||||
+
|
||||
+AT_CLEANUP
|
||||
+# ------------------------------
|
||||
# install a package into a local rpmdb
|
||||
# * Shall only work with relocation
|
||||
# * Use --ignorearch because we don't know the arch
|
||||
--- ./tests/rpmgeneral.at.orig 2012-11-07 12:55:24.000000000 +0000
|
||||
+++ ./tests/rpmgeneral.at 2014-02-20 14:47:48.111802710 +0000
|
||||
@@ -79,6 +79,11 @@ DISTTAG
|
||||
DISTURL
|
||||
DSAHEADER
|
||||
E
|
||||
+ENHANCEFLAGS
|
||||
+ENHANCENAME
|
||||
+ENHANCENEVRS
|
||||
+ENHANCES
|
||||
+ENHANCEVERSION
|
||||
EPOCH
|
||||
EPOCHNUM
|
||||
EVR
|
||||
@@ -199,6 +204,11 @@ PROVIDES
|
||||
PROVIDEVERSION
|
||||
PUBKEYS
|
||||
R
|
||||
+RECOMMENDFLAGS
|
||||
+RECOMMENDNAME
|
||||
+RECOMMENDNEVRS
|
||||
+RECOMMENDS
|
||||
+RECOMMENDVERSION
|
||||
RECONTEXTS
|
||||
RELEASE
|
||||
REMOVETID
|
||||
@@ -219,7 +229,17 @@ SOURCE
|
||||
SOURCEPACKAGE
|
||||
SOURCEPKGID
|
||||
SOURCERPM
|
||||
+SUGGESTFLAGS
|
||||
+SUGGESTNAME
|
||||
+SUGGESTNEVRS
|
||||
+SUGGESTS
|
||||
+SUGGESTVERSION
|
||||
SUMMARY
|
||||
+SUPPLEMENTFLAGS
|
||||
+SUPPLEMENTNAME
|
||||
+SUPPLEMENTNEVRS
|
||||
+SUPPLEMENTS
|
||||
+SUPPLEMENTVERSION
|
||||
TRIGGERCONDS
|
||||
TRIGGERFLAGS
|
||||
TRIGGERINDEX
|
@ -1,17 +1,15 @@
|
||||
Not deprecated for SUSE builds.
|
||||
|
||||
--- ./build/parsePreamble.c.orig 2011-05-11 15:59:08.000000000 +0000
|
||||
+++ ./build/parsePreamble.c 2011-05-11 16:35:47.000000000 +0000
|
||||
@@ -891,7 +891,7 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_ICON, 0, 0, LEN_AND_STR("icon")},
|
||||
{RPMTAG_PROVIDEFLAGS, 0, 0, LEN_AND_STR("provides")},
|
||||
{RPMTAG_REQUIREFLAGS, 2, 0, LEN_AND_STR("requires")},
|
||||
--- ./build/parsePreamble.c.orig 2014-02-20 14:51:56.798802270 +0000
|
||||
+++ ./build/parsePreamble.c 2014-02-20 14:53:27.617802110 +0000
|
||||
@@ -895,7 +895,7 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_SUGGESTFLAGS, 0, 0, LEN_AND_STR("suggests")},
|
||||
{RPMTAG_SUPPLEMENTFLAGS, 0, 0, LEN_AND_STR("supplements")},
|
||||
{RPMTAG_ENHANCEFLAGS, 0, 0, LEN_AND_STR("enhances")},
|
||||
- {RPMTAG_PREREQ, 2, 1, LEN_AND_STR("prereq")},
|
||||
+ {RPMTAG_PREREQ, 2, 0, LEN_AND_STR("prereq")},
|
||||
{RPMTAG_CONFLICTFLAGS, 0, 0, LEN_AND_STR("conflicts")},
|
||||
{RPMTAG_OBSOLETEFLAGS, 0, 0, LEN_AND_STR("obsoletes")},
|
||||
{RPMTAG_PREFIXES, 0, 0, LEN_AND_STR("prefixes")},
|
||||
@@ -900,7 +900,7 @@ static struct PreambleRec_s const preamb
|
||||
@@ -904,7 +904,7 @@ static struct PreambleRec_s const preamb
|
||||
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarchitectures")},
|
||||
{RPMTAG_BUILDARCHS, 0, 0, LEN_AND_STR("buildarch")},
|
||||
{RPMTAG_BUILDCONFLICTS, 0, 0, LEN_AND_STR("buildconflicts")},
|
||||
|
@ -60,8 +60,6 @@ mkdir -p %{buildroot}%{_prefix}/lib
|
||||
find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm
|
||||
pushd %{buildroot}/%{_libdir}/python3*/site-packages/rpm
|
||||
rm -f _rpm*.la _rpm*.a
|
||||
# python3 no longer looks at "XXXmodule.so"
|
||||
for i in _rpm*module.so ; do mv $i ${i%module.so}.so; done
|
||||
python3 %{_libdir}/python3*/py_compile.py *.py
|
||||
python3 -O %{_libdir}/python3*/py_compile.py *.py
|
||||
popd
|
||||
|
@ -61,7 +61,7 @@ mkdir -p %{buildroot}%{_prefix}/lib
|
||||
%make_install
|
||||
find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm
|
||||
pushd %{buildroot}/%py_sitedir/rpm
|
||||
rm -f _rpmmodule.a _rpmmodule.la
|
||||
rm -f _rpm*.a _rpm*.la
|
||||
python %py_libdir/py_compile.py *.py
|
||||
python -O %py_libdir/py_compile.py *.py
|
||||
popd
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 20 16:24:24 CET 2014 - mls@suse.de
|
||||
|
||||
- cherry-pick new weakdeps tags from upstream
|
||||
new patch: newweakdeps.diff
|
||||
dropped: weakdeps.diff
|
||||
- add weakdepscompat.diff to support querying the old tags
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 20 15:37:49 CET 2014 - mls@suse.de
|
||||
|
||||
|
9
rpm.spec
9
rpm.spec
@ -62,6 +62,7 @@ Source12: baselibs.conf
|
||||
Patch1: beecrypt-4.1.2.diff
|
||||
Patch2: db.diff
|
||||
# quilt patches start here
|
||||
Patch10: newweakdeps.diff
|
||||
Patch11: debugedit.diff
|
||||
Patch13: ignore-auxv.diff
|
||||
Patch12: localetag.diff
|
||||
@ -73,7 +74,6 @@ Patch18: refreshtestarch.diff
|
||||
Patch19: rpmrctests.diff
|
||||
Patch20: waitlock.diff
|
||||
Patch21: suspendlock.diff
|
||||
Patch22: weakdeps.diff
|
||||
Patch23: autodeps.diff
|
||||
Patch24: brp.diff
|
||||
Patch25: brpcompress.diff
|
||||
@ -134,6 +134,7 @@ Patch80: psm-errno.diff
|
||||
Patch82: noposttrans.diff
|
||||
Patch85: brp-compress-no-img.patch
|
||||
Patch92: find-lang-python.patch
|
||||
Patch93: weakdepscompat.diff
|
||||
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
||||
Patch68000: m68k.patch
|
||||
Patch68001: debugedit-m68k.patch
|
||||
@ -215,15 +216,15 @@ ln -s beecrypt-4.1.2 beecrypt
|
||||
chmod -R u+w db/*
|
||||
rm -f rpmdb/db.h
|
||||
%patch -P 1 -P 2
|
||||
%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
|
||||
%patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
|
||||
%patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19
|
||||
%patch -P 20 -P 21 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29
|
||||
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
|
||||
%patch -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
||||
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
|
||||
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
||||
%patch -P 80 -P 82 -P 85
|
||||
%patch -P 92
|
||||
%patch -P 92 -P 93
|
||||
|
||||
%ifarch aarch64 ppc64le
|
||||
%patch6464
|
||||
|
315
weakdeps.diff
315
weakdeps.diff
@ -1,315 +0,0 @@
|
||||
Add support for weak dependencies:
|
||||
|
||||
A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them.
|
||||
|
||||
This is different to upstream, which uses RPMSENSE_MISSINGOK
|
||||
and RPMTAG_REQUIRES/RPMTAG_PROVIDES instead. I chose different
|
||||
tags because I wanted to be compatible. The point is that
|
||||
applications that don't know about the new MISSINGOK semantics
|
||||
will mis-interpret the provides/requires otherwise, which
|
||||
I deemed too risky.
|
||||
|
||||
B) use RPMSENSE_STRONG to support a "strong" version, "Recommends"
|
||||
instead of "Suggests" and "Supplements" instead of "Enhances".
|
||||
|
||||
Needs extcond.diff for query operations.
|
||||
|
||||
--- build/parsePreamble.c
|
||||
+++ build/parsePreamble.c
|
||||
@@ -341,6 +341,8 @@
|
||||
{ "verify", RPMSENSE_SCRIPT_VERIFY },
|
||||
{ "pretrans", RPMSENSE_PRETRANS },
|
||||
{ "posttrans", RPMSENSE_POSTTRANS },
|
||||
+ { "hint", RPMSENSE_MISSINGOK },
|
||||
+ { "strong", RPMSENSE_STRONG },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -795,6 +797,18 @@
|
||||
if (parseRCPOT(spec, spec->sourcePackage, field, tag, 0, tagflags))
|
||||
goto exit;
|
||||
break;
|
||||
+ case RPMTAG_SUGGESTSFLAGS:
|
||||
+ case RPMTAG_ENHANCESFLAGS:
|
||||
+ case RPMTAG_BUILDSUGGESTS:
|
||||
+ case RPMTAG_BUILDENHANCES:
|
||||
+ tagflags = RPMSENSE_MISSINGOK;
|
||||
+ if (macro && (!strcmp(macro, "recommends") || !strcmp(macro, "buildrecommends")))
|
||||
+ tagflags |= RPMSENSE_STRONG;
|
||||
+ if (macro && (!strcmp(macro, "supplements") || !strcmp(macro, "buildsupplements")))
|
||||
+ tagflags |= RPMSENSE_STRONG;
|
||||
+ if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags)))
|
||||
+ return rc;
|
||||
+ break;
|
||||
case RPMTAG_EXCLUDEARCH:
|
||||
case RPMTAG_EXCLUSIVEARCH:
|
||||
case RPMTAG_EXCLUDEOS:
|
||||
@@ -903,6 +917,14 @@
|
||||
{RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")},
|
||||
{RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")},
|
||||
{RPMTAG_ORDERFLAGS, 2, 0, LEN_AND_STR("orderwithrequires")},
|
||||
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("recommends")},
|
||||
+ {RPMTAG_SUGGESTSFLAGS, 0, 0, LEN_AND_STR("suggests")},
|
||||
+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("supplements")},
|
||||
+ {RPMTAG_ENHANCESFLAGS, 0, 0, LEN_AND_STR("enhances")},
|
||||
+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildrecommends")},
|
||||
+ {RPMTAG_BUILDSUGGESTS, 0, 0, LEN_AND_STR("buildsuggests")},
|
||||
+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildsupplements")},
|
||||
+ {RPMTAG_BUILDENHANCES, 0, 0, LEN_AND_STR("buildenhances")},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
--- build/parseReqs.c
|
||||
+++ build/parseReqs.c
|
||||
@@ -92,6 +92,18 @@
|
||||
case RPMTAG_BUILDCONFLICTS:
|
||||
nametag = RPMTAG_CONFLICTNAME;
|
||||
break;
|
||||
+ case RPMTAG_SUGGESTSFLAGS:
|
||||
+ nametag = RPMTAG_SUGGESTSNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_ENHANCESFLAGS:
|
||||
+ nametag = RPMTAG_ENHANCESNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_BUILDSUGGESTS:
|
||||
+ nametag = RPMTAG_SUGGESTSNAME;
|
||||
+ break;
|
||||
+ case RPMTAG_BUILDENHANCES:
|
||||
+ nametag = RPMTAG_ENHANCESNAME;
|
||||
+ break;
|
||||
}
|
||||
|
||||
for (r = field; *r != '\0'; r = re) {
|
||||
--- build/reqprov.c
|
||||
+++ build/reqprov.c
|
||||
@@ -81,6 +81,18 @@
|
||||
extra = Flags & RPMSENSE_TRIGGER;
|
||||
dsp = &pkg->triggers;
|
||||
break;
|
||||
+ case RPMTAG_SUGGESTSNAME:
|
||||
+ versiontag = RPMTAG_SUGGESTSVERSION;
|
||||
+ flagtag = RPMTAG_SUGGESTSFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->suggests;
|
||||
+ break;
|
||||
+ case RPMTAG_ENHANCESNAME:
|
||||
+ versiontag = RPMTAG_ENHANCESVERSION;
|
||||
+ flagtag = RPMTAG_ENHANCESFLAGS;
|
||||
+ extra = Flags & _ALL_REQUIRES_MASK;
|
||||
+ dsp = &pkg->enhances;
|
||||
+ break;
|
||||
case RPMTAG_REQUIRENAME:
|
||||
default:
|
||||
tagN = RPMTAG_REQUIRENAME;
|
||||
--- build/rpmbuild_internal.h
|
||||
+++ build/rpmbuild_internal.h
|
||||
@@ -97,6 +97,8 @@
|
||||
rpmds obsoletes;
|
||||
rpmds triggers;
|
||||
rpmds order;
|
||||
+ rpmds suggests;
|
||||
+ rpmds enhances;
|
||||
rpmfi cpioList;
|
||||
rpm_loff_t cpioArchiveSize;
|
||||
|
||||
--- build/rpmfc.c
|
||||
+++ build/rpmfc.c
|
||||
@@ -1087,6 +1087,12 @@
|
||||
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
|
||||
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
|
||||
0, -1 },
|
||||
+ { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL },
|
||||
+ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS,
|
||||
+ RPMSENSE_STRONG, RPMSENSE_STRONG },
|
||||
+ { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL },
|
||||
+ RPMTAG_ENHANCESNAME, RPMTAG_ENHANCESVERSION, RPMTAG_ENHANCESFLAGS,
|
||||
+ RPMSENSE_STRONG, 0 },
|
||||
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -1163,6 +1169,14 @@
|
||||
continue;
|
||||
tagflags = RPMSENSE_FIND_REQUIRES;
|
||||
break;
|
||||
+ case RPMTAG_ENHANCESFLAGS:
|
||||
+ if (!pkg->autoProv)
|
||||
+ continue;
|
||||
+ failnonzero = 0;
|
||||
+ tagflags = RPMSENSE_FIND_REQUIRES | RPMSENSE_MISSINGOK;
|
||||
+ if (strcmp(dm->msg, "Supplements") == 0)
|
||||
+ tagflags |= RPMSENSE_STRONG;
|
||||
+ break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
--- build/spec.c
|
||||
+++ build/spec.c
|
||||
@@ -141,6 +141,8 @@
|
||||
pkg->obsoletes = rpmdsFree(pkg->obsoletes);
|
||||
pkg->triggers = rpmdsFree(pkg->triggers);
|
||||
pkg->order = rpmdsFree(pkg->order);
|
||||
+ pkg->suggests = rpmdsFree(pkg->suggests);
|
||||
+ pkg->enhances = rpmdsFree(pkg->enhances);
|
||||
pkg->fileList = argvFree(pkg->fileList);
|
||||
pkg->fileFile = argvFree(pkg->fileFile);
|
||||
pkg->policyList = argvFree(pkg->policyList);
|
||||
--- lib/formats.c
|
||||
+++ lib/formats.c
|
||||
@@ -486,6 +486,19 @@
|
||||
return val;
|
||||
}
|
||||
|
||||
+static char * depflag_strongFormat(rpmtd td)
|
||||
+{
|
||||
+ char * val = NULL;
|
||||
+
|
||||
+ if (rpmtdClass(td) != RPM_NUMERIC_CLASS) {
|
||||
+ val = xstrdup(_("(not a number)"));
|
||||
+ } else {
|
||||
+ uint64_t anint = rpmtdGetNumber(td);
|
||||
+ val = xstrdup(anint & RPMSENSE_STRONG ? "strong" : "");
|
||||
+ }
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Return tag container array size.
|
||||
* @param td tag data container
|
||||
@@ -591,6 +604,7 @@
|
||||
{ RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat },
|
||||
{ RPMTD_FORMAT_EXPAND, "expand", expandFormat },
|
||||
{ RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat },
|
||||
+ { RPMTD_FORMAT_DEPFLAG_STRONG, "depflag_strong", depflag_strongFormat },
|
||||
{ -1, NULL, NULL }
|
||||
};
|
||||
|
||||
--- lib/rpmds.c
|
||||
+++ lib/rpmds.c
|
||||
@@ -70,6 +70,14 @@
|
||||
t = "Trigger";
|
||||
evr = RPMTAG_TRIGGERVERSION;
|
||||
f = RPMTAG_TRIGGERFLAGS;
|
||||
+ } else if (tag == RPMTAG_ENHANCESNAME) {
|
||||
+ t = "Enhances";
|
||||
+ evr = RPMTAG_ENHANCESVERSION;
|
||||
+ f = RPMTAG_ENHANCESFLAGS;
|
||||
+ } else if (tag == RPMTAG_SUGGESTSNAME) {
|
||||
+ t = "Suggests";
|
||||
+ evr = RPMTAG_SUGGESTSVERSION;
|
||||
+ f = RPMTAG_SUGGESTSFLAGS;
|
||||
} else {
|
||||
rc = 1;
|
||||
}
|
||||
--- lib/rpmds.h
|
||||
+++ lib/rpmds.h
|
||||
@@ -48,7 +48,7 @@
|
||||
RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */
|
||||
RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */
|
||||
RPMSENSE_KEYRING = (1 << 26),
|
||||
- /* bit 27 unused */
|
||||
+ RPMSENSE_STRONG = (1 << 27),
|
||||
RPMSENSE_CONFIG = (1 << 28)
|
||||
};
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
RPMSENSE_FIND_REQUIRES | \
|
||||
RPMSENSE_RPMLIB | \
|
||||
RPMSENSE_KEYRING | \
|
||||
+ RPMSENSE_STRONG | \
|
||||
RPMSENSE_PRETRANS | \
|
||||
RPMSENSE_POSTTRANS | \
|
||||
RPMSENSE_PREREQ | \
|
||||
--- lib/rpmtag.h
|
||||
+++ lib/rpmtag.h
|
||||
@@ -217,14 +217,14 @@
|
||||
RPMTAG_PRETRANSPROG = 1153, /* s[] */
|
||||
RPMTAG_POSTTRANSPROG = 1154, /* s[] */
|
||||
RPMTAG_DISTTAG = 1155, /* s */
|
||||
- RPMTAG_SUGGESTSNAME = 1156, /* s[] extension (unimplemented) */
|
||||
-#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] (unimplemented) */
|
||||
- RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension (unimplemented) */
|
||||
- RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension (unimplemented) */
|
||||
- RPMTAG_ENHANCESNAME = 1159, /* s[] extension placeholder (unimplemented) */
|
||||
-#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] (unimplemented) */
|
||||
- RPMTAG_ENHANCESVERSION = 1160, /* s[] extension placeholder (unimplemented) */
|
||||
- RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension placeholder (unimplemented) */
|
||||
+ RPMTAG_SUGGESTSNAME = 1156, /* s[] extension */
|
||||
+#define RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME /* s[] */
|
||||
+ RPMTAG_SUGGESTSVERSION = 1157, /* s[] extension */
|
||||
+ RPMTAG_SUGGESTSFLAGS = 1158, /* i[] extension */
|
||||
+ RPMTAG_ENHANCESNAME = 1159, /* s[] extension */
|
||||
+#define RPMTAG_ENHANCES RPMTAG_ENHANCESNAME /* s[] */
|
||||
+ RPMTAG_ENHANCESVERSION = 1160, /* s[] extension */
|
||||
+ RPMTAG_ENHANCESFLAGS = 1161, /* i[] extension */
|
||||
RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */
|
||||
RPMTAG_CVSID = 1163, /* s (unimplemented) */
|
||||
#define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */
|
||||
--- lib/rpmtd.h
|
||||
+++ lib/rpmtd.h
|
||||
@@ -228,6 +228,7 @@
|
||||
RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */
|
||||
RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string types) */
|
||||
RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */
|
||||
+ RPMTD_FORMAT_DEPFLAG_STRONG = 20, /* strong dependency (int types) */
|
||||
} rpmtdFormats;
|
||||
|
||||
/** \ingroup rpmtd
|
||||
--- python/rpmmodule.c
|
||||
+++ python/rpmmodule.c
|
||||
@@ -393,6 +393,7 @@
|
||||
REGISTER_ENUM(RPMSENSE_RPMLIB);
|
||||
REGISTER_ENUM(RPMSENSE_TRIGGERPREIN);
|
||||
REGISTER_ENUM(RPMSENSE_KEYRING);
|
||||
+ REGISTER_ENUM(RPMSENSE_STRONG);
|
||||
REGISTER_ENUM(RPMSENSE_CONFIG);
|
||||
|
||||
REGISTER_ENUM(RPMTRANS_FLAG_TEST);
|
||||
--- rpmpopt.in
|
||||
+++ rpmpopt.in
|
||||
@@ -67,6 +67,22 @@
|
||||
--POPTdesc=$"list capabilities required by package(s)"
|
||||
rpm alias -R --requires
|
||||
|
||||
+rpm alias --suggests --qf \
|
||||
+ "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
|
||||
+ --POPTdesc=$"list capabilities this package suggests"
|
||||
+
|
||||
+rpm alias --recommends --qf \
|
||||
+ "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" \
|
||||
+ --POPTdesc=$"list capabilities this package recommends"
|
||||
+
|
||||
+rpm alias --enhances --qf \
|
||||
+ "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
|
||||
+ --POPTdesc=$"list capabilities this package enhances"
|
||||
+
|
||||
+rpm alias --supplements --qf \
|
||||
+ "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" \
|
||||
+ --POPTdesc=$"list capabilities this package supplements"
|
||||
+
|
||||
rpm alias --info --qf '\
|
||||
Name : %{NAME}\n\
|
||||
%|EPOCH?{Epoch : %{EPOCH}\n}|\
|
||||
--- tests/rpmgeneral.at
|
||||
+++ tests/rpmgeneral.at
|
||||
@@ -79,6 +79,10 @@
|
||||
DISTURL
|
||||
DSAHEADER
|
||||
E
|
||||
+ENHANCES
|
||||
+ENHANCESFLAGS
|
||||
+ENHANCESNAME
|
||||
+ENHANCESVERSION
|
||||
EPOCH
|
||||
EPOCHNUM
|
||||
EVR
|
||||
@@ -219,6 +223,10 @@
|
||||
SOURCEPACKAGE
|
||||
SOURCEPKGID
|
||||
SOURCERPM
|
||||
+SUGGESTS
|
||||
+SUGGESTSFLAGS
|
||||
+SUGGESTSNAME
|
||||
+SUGGESTSVERSION
|
||||
SUMMARY
|
||||
TRIGGERCONDS
|
||||
TRIGGERFLAGS
|
128
weakdepscompat.diff
Normal file
128
weakdepscompat.diff
Normal file
@ -0,0 +1,128 @@
|
||||
--- ./build/parsePreamble.c.orig 2014-02-20 15:35:51.192797607 +0000
|
||||
+++ ./build/parsePreamble.c 2014-02-20 15:36:00.468797591 +0000
|
||||
@@ -343,6 +343,7 @@ static struct tokenBits_s const installS
|
||||
{ "verify", RPMSENSE_SCRIPT_VERIFY },
|
||||
{ "pretrans", RPMSENSE_PRETRANS },
|
||||
{ "posttrans", RPMSENSE_POSTTRANS },
|
||||
+ { "hint", RPMSENSE_MISSINGOK },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
--- ./build/rpmfc.c.orig 2014-02-20 15:35:51.204797607 +0000
|
||||
+++ ./build/rpmfc.c 2014-02-20 15:36:00.468797591 +0000
|
||||
@@ -1156,6 +1156,12 @@ static struct DepMsg_s depMsgs[] = {
|
||||
{ "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL },
|
||||
RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS,
|
||||
0, -1 },
|
||||
+ { "Enhances", { "%{?__find_enhances}", NULL, NULL, NULL },
|
||||
+ RPMTAG_ENHANCENAME, RPMTAG_ENHANCEVERSION, RPMTAG_ENHANCEFLAGS,
|
||||
+ 0, -1 },
|
||||
+ { "Supplements", { "%{?__find_supplements}", NULL, NULL, NULL },
|
||||
+ RPMTAG_SUPPLEMENTNAME, RPMTAG_SUPPLEMENTVERSION, RPMTAG_SUPPLEMENTFLAGS,
|
||||
+ 0, -1 },
|
||||
{ NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -1231,6 +1237,16 @@ static rpmRC rpmfcGenerateDependsHelper(
|
||||
if (!pkg->autoReq)
|
||||
continue;
|
||||
tagflags = RPMSENSE_FIND_REQUIRES;
|
||||
+ break;
|
||||
+ case RPMTAG_ENHANCENAME:
|
||||
+ if (!pkg->autoReq)
|
||||
+ continue;
|
||||
+ tagflags = RPMSENSE_FIND_REQUIRES;
|
||||
+ break;
|
||||
+ case RPMTAG_SUPPLEMENTNAME:
|
||||
+ if (!pkg->autoReq)
|
||||
+ continue;
|
||||
+ tagflags = RPMSENSE_FIND_REQUIRES;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
--- ./lib/rpmds.c.orig 2014-02-20 15:35:51.126797608 +0000
|
||||
+++ ./lib/rpmds.c 2014-02-20 15:35:56.508797598 +0000
|
||||
@@ -86,6 +86,14 @@ static int dsType(rpmTagVal tag,
|
||||
t = "Trigger";
|
||||
evr = RPMTAG_TRIGGERVERSION;
|
||||
f = RPMTAG_TRIGGERFLAGS;
|
||||
+ } else if (tag == RPMTAG_OLDSUGGESTSNAME) {
|
||||
+ t = "Oldsuggests";
|
||||
+ evr = RPMTAG_OLDSUGGESTSVERSION;
|
||||
+ f = RPMTAG_OLDSUGGESTSFLAGS;
|
||||
+ } else if (tag == RPMTAG_OLDSUGGESTSNAME) {
|
||||
+ t = "Oldenhances";
|
||||
+ evr = RPMTAG_OLDENHANCESVERSION;
|
||||
+ f = RPMTAG_OLDENHANCESTSFLAGS;
|
||||
} else {
|
||||
rc = 1;
|
||||
}
|
||||
--- ./lib/tagexts.c.orig 2014-02-20 15:35:51.131797608 +0000
|
||||
+++ ./lib/tagexts.c 2014-02-20 15:36:27.137797544 +0000
|
||||
@@ -906,6 +906,35 @@ static int depnevrsTag(Header h, rpmtd t
|
||||
return (ndeps > 0);
|
||||
}
|
||||
|
||||
+#define RPMSENSE_STRONG (1 << 27)
|
||||
+
|
||||
+static int depnevrsTagFiltered(Header h, rpmtd td, headerGetFlags hgflags,
|
||||
+ rpmTagVal tag, int strong)
|
||||
+{
|
||||
+ rpmds ds = rpmdsNew(h, tag, 0);
|
||||
+ int ndeps = rpmdsCount(ds);
|
||||
+
|
||||
+ if (ndeps > 0) {
|
||||
+ char **deps = xmalloc(sizeof(*deps) * ndeps);
|
||||
+ int i;
|
||||
+ ndeps = 0;
|
||||
+ while ((i = rpmdsNext(ds)) >= 0) {
|
||||
+ if ((rpmdsFlags(ds) & RPMSENSE_STRONG) != strong)
|
||||
+ continue;
|
||||
+ ndeps = i + 1;
|
||||
+ deps[i] = rpmdsNewDNEVR(NULL, ds);
|
||||
+ }
|
||||
+ if (ndeps) {
|
||||
+ td->data = deps;
|
||||
+ td->type = RPM_STRING_ARRAY_TYPE;
|
||||
+ td->count = ndeps;
|
||||
+ td->flags |= (RPMTD_ALLOCED | RPMTD_PTR_ALLOCED);
|
||||
+ }
|
||||
+ }
|
||||
+ rpmdsFree(ds);
|
||||
+ return (ndeps > 0);
|
||||
+}
|
||||
+
|
||||
static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
|
||||
@@ -913,22 +942,26 @@ static int requirenevrsTag(Header h, rpm
|
||||
|
||||
static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
- return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME) ||
|
||||
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDSUGGESTSNAME, RPMSENSE_STRONG);
|
||||
}
|
||||
|
||||
static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
- return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME) ||
|
||||
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDSUGGESTSNAME, 0);
|
||||
}
|
||||
|
||||
static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
- return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME) ||
|
||||
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDENHANCESSNAME, RPMSENSE_STRONG);
|
||||
}
|
||||
|
||||
static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
||||
{
|
||||
- return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
|
||||
+ return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME) ||
|
||||
+ depnevrsTagFiltered(h, td, hgflags, RPMTAG_OLDENHANCESSNAME, 0);
|
||||
}
|
||||
|
||||
static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
|
Loading…
Reference in New Issue
Block a user