SHA256
3
0
forked from pool/rpm

Accepting request 223820 from Base:System

fix bug in weakdepscompa.diff patch

OBS-URL: https://build.opensuse.org/request/show/223820
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=222
This commit is contained in:
Tomáš Chvátal 2014-02-28 15:22:17 +00:00 committed by Git OBS Bridge
commit 2fec8364b6
27 changed files with 894 additions and 1416 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20f81d1ea9e4c64dddba197d8717f9e2d082814c806f722280d3ea34854c728a
size 3206

View File

@ -1,66 +0,0 @@
From fd6498712cdda8ecd9f1d89462300164dbe563bc Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Wed, 2 Oct 2013 15:11:33 +0200
Subject: [PATCH 3/3] Add support for automatic appdata() provides
Appdata files contain application information used by the AppStream
project. We generate two provides: appdata() to support enumeration
of all application packages and appdata(filenname) to make it easy
to link installed packages with appdata files.
---
fileattrs/Makefile.am | 5 +++--
fileattrs/appdata.attr | 2 ++
scripts/Makefile.am | 2 +-
scripts/appdata.prov | 18 ++++++++++++++++++
4 files changed, 24 insertions(+), 3 deletions(-)
create mode 100644 fileattrs/appdata.attr
create mode 100755 scripts/appdata.prov
--- ./fileattrs/Makefile.am.orig 2013-10-02 16:21:01.966355169 +0000
+++ ./fileattrs/Makefile.am 2013-10-02 16:19:10.317355367 +0000
@@ -7,6 +7,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs
fattrs_DATA = \
desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \
pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \
- debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr \
+ appdata.attr
EXTRA_DIST = $(fattrs_DATA)
--- ./fileattrs/appdata.attr.orig 2013-10-02 16:18:42.750355416 +0000
+++ ./fileattrs/appdata.attr 2013-10-02 16:18:42.750355416 +0000
@@ -0,0 +1,2 @@
+%__appdata_provides %{_rpmconfigdir}/appdata.prov
+%__appdata_path ^%{_datadir}/appdata/.*\\.appdata\\.xml$
--- ./scripts/Makefile.am.orig 2013-10-02 16:18:21.679355453 +0000
+++ ./scripts/Makefile.am 2013-10-02 16:18:42.750355416 +0000
@@ -19,7 +19,7 @@ EXTRA_DIST = \
find-php-provides find-php-requires \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
- pkgconfigdeps.sh libtooldeps.sh \
+ pkgconfigdeps.sh libtooldeps.sh appdata.prov \
fontconfig.prov desktop-file.prov script.req \
sysvinitdeps.sh \
macros.perl macros.php macros.python
--- ./scripts/appdata.prov.orig 2013-10-02 16:18:42.750355416 +0000
+++ ./scripts/appdata.prov 2013-10-02 16:18:42.750355416 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Transform appdata xml file into RPM appdata(filename) provides
+#
+# Author: Michael Schroeder <mls@suse.de>
+# Based on other provides scripts from RPM
+
+OLD_IFS="$IFS"
+while read instfile ; do
+ case "$instfile" in
+ *.appdata.xml)
+ echo "appdata()"
+ echo "appdata(${instfile##*/appdata/})"
+ ;;
+ esac
+done
+IFS=$OLD_IFS
+

View File

@ -1,32 +0,0 @@
From 56699101dec027590cca137a5d268fbc88799121 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Wed, 2 Oct 2013 15:02:18 +0200
Subject: [PATCH 2/3] Add application() and application(filename) provides for
desktop files.
Gnome software center needs to know what package to deinstall if it
needs to deinstall a desktop application. Looking up provides it much
cheaper than looking up which package owns a file.
We also add an empty application() provides to make it easy to
enumerate all packages containing desktop applications.
---
scripts/desktop-file.prov | 2 ++
1 file changed, 2 insertions(+)
diff --git scripts/desktop-file.prov scripts/desktop-file.prov
index 5b159ae..aa20277 100755
--- scripts/desktop-file.prov
+++ scripts/desktop-file.prov
@@ -9,6 +9,8 @@ OLD_IFS="$IFS"
while read instfile ; do
case "$instfile" in
*.desktop)
+ echo "application()"
+ echo "application(${instfile##*/applications/})"
if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
if ! grep -q '^Exec=' "$instfile"; then continue; fi
mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
--
1.8.1.4

View File

@ -1,551 +0,0 @@
--- rpmio/digest.h.orig 2013-08-27 14:26:38.260872601 +0000
+++ rpmio/digest.h 2013-08-27 14:26:47.404872585 +0000
@@ -5,8 +5,7 @@
typedef struct pgpDigAlg_s * pgpDigAlg;
-typedef int (*setmpifunc)(pgpDigAlg digp,
- int num, const uint8_t *p, const uint8_t *pend);
+typedef int (*setmpifunc)(pgpDigAlg digp, int num, const uint8_t *p);
typedef int (*verifyfunc)(pgpDigAlg pgpkey, pgpDigAlg pgpsig,
uint8_t *hash, size_t hashlen, int hash_algo);
typedef void (*freefunc)(pgpDigAlg digp);
--- rpmio/digest_beecrypt.c.orig 2013-08-27 14:26:38.260872601 +0000
+++ rpmio/digest_beecrypt.c 2013-08-29 15:45:42.754558355 +0000
@@ -198,66 +198,6 @@ int rpmDigestFinal(DIGEST_CTX ctx, void
return 0;
}
-/**************************** helpers ************************************/
-
-static inline char * pgpHexCvt(char *t, const byte *s, int nbytes)
-{
- static char hex[] = "0123456789abcdef";
- while (nbytes-- > 0) {
- unsigned int i;
- i = *s++;
- *t++ = hex[ (i >> 4) & 0xf ];
- *t++ = hex[ (i ) & 0xf ];
- }
- *t = '\0';
- return t;
-}
-
-static const char * pgpMpiHex(const byte *p, const byte *pend)
-{
- static char prbuf[2048];
- char *t = prbuf;
- int nbytes = pgpMpiLen(p) - 2;
- if (nbytes > 1024 || nbytes > pend - (p + 2))
- return NULL;
- t = pgpHexCvt(t, p+2, nbytes);
- return prbuf;
-}
-
-static int pgpHexSet(int lbits, mpnumber * mpn, const byte * p, const byte * pend)
-{
- unsigned int mbits = pgpMpiBits(p);
- unsigned int nbits;
- unsigned int nbytes;
- char *t;
- unsigned int ix;
-
- nbits = (lbits > mbits ? lbits : mbits);
- nbytes = ((nbits + 7) >> 3);
- t = xmalloc(2*nbytes+1);
- ix = 2 * ((nbits - mbits) >> 3);
-
- if (ix > 0) memset(t, (int)'0', ix);
- strcpy(t+ix, pgpMpiHex(p, pend));
- (void) mpnsethex(mpn, t);
- t = _free(t);
- return 0;
-}
-
-static void pgpFreeSigRSADSA(pgpDigAlg sa)
-{
- if (sa->data)
- free(sa->data);
- sa->data = 0;
-}
-
-static void pgpFreeKeyRSADSA(pgpDigAlg sa)
-{
- if (sa->data)
- free(sa->data);
- sa->data = 0;
-}
-
/****************************** RSA **************************************/
@@ -267,45 +207,73 @@ struct pgpDigSigRSA_s {
struct pgpDigKeyRSA_s {
rsapk rsa_pk;
+ int nbytes;
};
-static int pgpSetSigMpiRSA(pgpDigAlg pgpsig, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetSigMpiRSA(pgpDigAlg pgpsig, int num, const uint8_t *p)
{
struct pgpDigSigRSA_s *sig = pgpsig->data;
+ int mlen = pgpMpiLen(p) - 2;
int rc = 1;
+ if (!sig)
+ sig = pgpsig->data = xcalloc(1, sizeof(*sig));
+
switch (num) {
case 0:
- sig = pgpsig->data = xcalloc(1, sizeof(*sig));
- (void) mpnsethex(&sig->c, pgpMpiHex(p, pend));
- rc = 0;
+ if (!mpnsetbin(&sig->c, p + 2, mlen))
+ rc = 0;
break;
}
return rc;
}
-static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
struct pgpDigKeyRSA_s *key = pgpkey->data;
+ int mlen = pgpMpiLen(p) - 2;
int rc = 1;
if (!key)
key = pgpkey->data = xcalloc(1, sizeof(*key));
+
switch (num) {
case 0:
- (void) mpbsethex(&key->rsa_pk.n, pgpMpiHex(p, pend));
- rc = 0;
+ key->nbytes = mlen;
+ if (!mpbsetbin(&key->rsa_pk.n, p + 2, mlen))
+ rc = 0;
break;
case 1:
- (void) mpnsethex(&key->rsa_pk.e, pgpMpiHex(p, pend));
- rc = 0;
+ if (!mpnsetbin(&key->rsa_pk.e, p + 2, mlen))
+ rc = 0;
break;
}
return rc;
}
+static int pkcs1pad(mpnumber *rsahm, int nbytes, const char *prefix, uint8_t *hash, size_t hashlen)
+{
+ int datalen = strlen(prefix) / 2 + hashlen;
+ byte *buf, *bp;
+ int rc = 1;
+
+ if (nbytes < 4 + datalen)
+ return 1;
+ buf = xmalloc(nbytes);
+ memset(buf, 0xff, nbytes);
+ buf[0] = 0x00;
+ buf[1] = 0x01;
+ bp = buf + nbytes - datalen;
+ bp[-1] = 0;
+ for (; *prefix; prefix += 2)
+ *bp++ = (rnibble(prefix[0]) << 4) | rnibble(prefix[1]);
+ memcpy(bp, hash, hashlen);
+ if (!mpnsetbin(rsahm, buf, nbytes))
+ rc = 0;
+ buf = _free(buf);
+ return rc;
+}
+
static int pgpVerifySigRSA(pgpDigAlg pgpkey, pgpDigAlg pgpsig, uint8_t *hash, size_t hashlen, int hash_algo)
{
struct pgpDigKeyRSA_s *key = pgpkey->data;
@@ -340,28 +308,10 @@ static int pgpVerifySigRSA(pgpDigAlg pgp
return 1;
}
- /* Generate RSA modulus parameter. */
- { unsigned int nbits = MP_WORDS_TO_BITS(sig->c.size);
- unsigned int nb = (nbits + 7) >> 3;
- byte *buf, *bp;
+ memset(&rsahm, 0, sizeof(rsahm));
+ if (pkcs1pad(&rsahm, key->nbytes, prefix, hash, hashlen) != 0)
+ return 1;
- if (nb < 3)
- return 1;
- buf = xmalloc(nb);
- memset(buf, 0xff, nb);
- buf[0] = 0x00;
- buf[1] = 0x01;
- bp = buf + nb - strlen(prefix)/2 - hashlen - 1;
- if (bp < buf)
- return 1;
- *bp++ = 0;
- for (; *prefix; prefix += 2)
- *bp++ = (rnibble(prefix[0]) << 4) | rnibble(prefix[1]);
- memcpy(bp, hash, hashlen);
- mpnzero(&rsahm);
- (void) mpnsetbin(&rsahm, buf, nb);
- buf = _free(buf);
- }
#if HAVE_BEECRYPT_API_H
rc = rsavrfy(&key->rsa_pk.n, &key->rsa_pk.e, &sig->c, &rsahm) == 1 ? 0 : 1;
#else
@@ -371,6 +321,25 @@ static int pgpVerifySigRSA(pgpDigAlg pgp
return rc;
}
+static void pgpFreeSigRSA(pgpDigAlg pgpsig)
+{
+ struct pgpDigSigRSA_s *sig = pgpsig->data;
+ if (sig) {
+ mpnfree(&sig->c);
+ pgpsig->data = _free(sig);
+ }
+}
+
+static void pgpFreeKeyRSA(pgpDigAlg pgpkey)
+{
+ struct pgpDigKeyRSA_s *key = pgpkey->data;
+ if (key) {
+ mpbfree(&key->rsa_pk.n);
+ mpnfree(&key->rsa_pk.e);
+ pgpkey->data = _free(key);
+ }
+}
+
/****************************** DSA **************************************/
@@ -384,30 +353,35 @@ struct pgpDigKeyDSA_s {
mpbarrett q;
mpnumber g;
mpnumber y;
+ int qbytes;
};
-static int pgpSetSigMpiDSA(pgpDigAlg pgpsig, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetSigMpiDSA(pgpDigAlg pgpsig, int num, const uint8_t *p)
{
struct pgpDigSigDSA_s *sig = pgpsig->data;
+ int mlen = pgpMpiLen(p) - 2;
int rc = 1;
+ if (!sig)
+ sig = pgpsig->data = xcalloc(1, sizeof(*sig));
+
switch (num) {
case 0:
- sig = pgpsig->data = xcalloc(1, sizeof(*sig));
- rc = pgpHexSet(160, &sig->r, p, pend);
+ if (!mpnsetbin(&sig->r, p + 2, mlen))
+ rc = 0;
break;
case 1:
- rc = pgpHexSet(160, &sig->s, p, pend);
+ if (!mpnsetbin(&sig->s, p + 2, mlen))
+ rc = 0;
break;
}
return rc;
}
-static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
struct pgpDigKeyDSA_s *key = pgpkey->data;
+ int mlen = pgpMpiLen(p) - 2;
int rc = 1;
if (!key)
@@ -415,20 +389,21 @@ static int pgpSetKeyMpiDSA(pgpDigAlg pgp
switch (num) {
case 0:
- mpbsethex(&key->p, pgpMpiHex(p, pend));
- rc = 0;
+ if (!mpbsetbin(&key->p, p + 2, mlen))
+ rc = 0;
break;
case 1:
- mpbsethex(&key->q, pgpMpiHex(p, pend));
- rc = 0;
+ key->qbytes = mlen;
+ if (!mpbsetbin(&key->q, p + 2, mlen))
+ rc = 0;
break;
case 2:
- mpnsethex(&key->g, pgpMpiHex(p, pend));
- rc = 0;
+ if (!mpnsetbin(&key->g, p + 2, mlen))
+ rc = 0;
break;
case 3:
- mpnsethex(&key->y, pgpMpiHex(p, pend));
- rc = 0;
+ if (!mpnsetbin(&key->y, p + 2, mlen))
+ rc = 0;
break;
}
return rc;
@@ -441,17 +416,41 @@ static int pgpVerifySigDSA(pgpDigAlg pgp
mpnumber hm;
int rc = 1;
- if (sig && key) {
+ if (sig && key && hashlen >= key->qbytes) {
mpnzero(&hm);
- mpnsetbin(&hm, hash, hashlen);
+ mpnsetbin(&hm, hash, key->qbytes);
rc = dsavrfy(&key->p, &key->q, &key->g, &hm, &key->y, &sig->r, &sig->s) == 1 ? 0 : 1;
mpnfree(&hm);
}
return rc;
}
-static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static void pgpFreeSigDSA(pgpDigAlg pgpsig)
+{
+ struct pgpDigSigDSA_s *sig = pgpsig->data;
+ if (sig) {
+ mpnfree(&sig->r);
+ mpnfree(&sig->s);
+ pgpsig->data = _free(sig);
+ }
+}
+
+static void pgpFreeKeyDSA(pgpDigAlg pgpkey)
+{
+ struct pgpDigKeyDSA_s *key = pgpkey->data;
+ if (key) {
+ mpbfree(&key->p);
+ mpbfree(&key->q);
+ mpnfree(&key->g);
+ mpnfree(&key->y);
+ pgpkey->data = _free(key);
+ }
+}
+
+
+/****************************** NULL **************************************/
+
+static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
return 1;
}
@@ -469,12 +468,12 @@ pgpDigAlg pgpPubkeyNew(int algo)
switch (algo) {
case PGPPUBKEYALGO_RSA:
ka->setmpi = pgpSetKeyMpiRSA;
- ka->free = pgpFreeKeyRSADSA;
+ ka->free = pgpFreeKeyRSA;
ka->mpis = 2;
break;
case PGPPUBKEYALGO_DSA:
ka->setmpi = pgpSetKeyMpiDSA;
- ka->free = pgpFreeKeyRSADSA;
+ ka->free = pgpFreeKeyDSA;
ka->mpis = 4;
break;
default:
@@ -495,13 +494,13 @@ pgpDigAlg pgpSignatureNew(int algo)
switch (algo) {
case PGPPUBKEYALGO_RSA:
sa->setmpi = pgpSetSigMpiRSA;
- sa->free = pgpFreeSigRSADSA;
+ sa->free = pgpFreeSigRSA;
sa->verify = pgpVerifySigRSA;
sa->mpis = 1;
break;
case PGPPUBKEYALGO_DSA:
sa->setmpi = pgpSetSigMpiDSA;
- sa->free = pgpFreeSigRSADSA;
+ sa->free = pgpFreeSigDSA;
sa->verify = pgpVerifySigDSA;
sa->mpis = 2;
break;
--- rpmio/digest_nss.c.orig 2013-08-27 14:26:38.260872601 +0000
+++ rpmio/digest_nss.c 2013-08-27 14:26:47.405872585 +0000
@@ -224,8 +224,7 @@ static SECOidTag getHashAlg(unsigned int
return SEC_OID_UNKNOWN;
}
-static int pgpMpiSet(unsigned int lbits, uint8_t *dest,
- const uint8_t * p, const uint8_t * pend)
+static int pgpMpiSet(unsigned int lbits, uint8_t *dest, const uint8_t * p)
{
unsigned int mbits = pgpMpiBits(p);
unsigned int nbits;
@@ -233,9 +232,6 @@ static int pgpMpiSet(unsigned int lbits,
uint8_t *t = dest;
unsigned int ix;
- if ((p + ((mbits+7) >> 3)) > pend)
- return 1;
-
if (mbits > lbits)
return 1;
@@ -250,14 +246,10 @@ static int pgpMpiSet(unsigned int lbits,
return 0;
}
-static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item,
- const uint8_t *p, const uint8_t *pend)
+static SECItem *pgpMpiItem(PRArenaPool *arena, SECItem *item, const uint8_t *p)
{
size_t nbytes = pgpMpiLen(p)-2;
- if (p + nbytes + 2 > pend)
- return NULL;
-
if (item == NULL) {
if ((item=SECITEM_AllocItem(arena, item, nbytes)) == NULL)
return item;
@@ -313,8 +305,7 @@ static SECKEYPublicKey *pgpNewPublicKey(
#define DSA1_Q_BITS DSA_Q_BITS
#endif
-static int pgpSetSigMpiDSA(pgpDigAlg pgpsig, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetSigMpiDSA(pgpDigAlg pgpsig, int num, const uint8_t *p)
{
SECItem *sig = pgpsig->data;
int lbits = DSA1_Q_BITS;
@@ -325,11 +316,11 @@ static int pgpSetSigMpiDSA(pgpDigAlg pgp
sig = pgpsig->data = SECITEM_AllocItem(NULL, NULL, DSA1_SIGNATURE_LEN);
if (sig) {
memset(sig->data, 0, DSA1_SIGNATURE_LEN);
- rc = pgpMpiSet(lbits, sig->data, p, pend);
+ rc = pgpMpiSet(lbits, sig->data, p);
}
break;
case 1:
- if (sig && pgpMpiSet(lbits, sig->data+DSA1_SUBPRIME_LEN, p, pend) == 0) {
+ if (sig && pgpMpiSet(lbits, sig->data+DSA1_SUBPRIME_LEN, p) == 0) {
SECItem *signew = SECITEM_AllocItem(NULL, NULL, 0);
if (signew && DSAU_EncodeDerSig(signew, sig) == SECSuccess) {
SECITEM_FreeItem(sig, PR_TRUE);
@@ -343,8 +334,7 @@ static int pgpSetSigMpiDSA(pgpDigAlg pgp
return rc;
}
-static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetKeyMpiDSA(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
SECItem *mpi = NULL;
SECKEYPublicKey *key = pgpkey->data;
@@ -355,16 +345,16 @@ static int pgpSetKeyMpiDSA(pgpDigAlg pgp
if (key) {
switch (num) {
case 0:
- mpi = pgpMpiItem(key->arena, &key->u.dsa.params.prime, p, pend);
+ mpi = pgpMpiItem(key->arena, &key->u.dsa.params.prime, p);
break;
case 1:
- mpi = pgpMpiItem(key->arena, &key->u.dsa.params.subPrime, p, pend);
+ mpi = pgpMpiItem(key->arena, &key->u.dsa.params.subPrime, p);
break;
case 2:
- mpi = pgpMpiItem(key->arena, &key->u.dsa.params.base, p, pend);
+ mpi = pgpMpiItem(key->arena, &key->u.dsa.params.base, p);
break;
case 3:
- mpi = pgpMpiItem(key->arena, &key->u.dsa.publicValue, p, pend);
+ mpi = pgpMpiItem(key->arena, &key->u.dsa.publicValue, p);
break;
}
}
@@ -389,21 +379,19 @@ static int pgpVerifySigDSA(pgpDigAlg pgp
return (rc != SECSuccess);
}
-static int pgpSetSigMpiRSA(pgpDigAlg pgpsig, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetSigMpiRSA(pgpDigAlg pgpsig, int num, const uint8_t *p)
{
SECItem *sigitem = NULL;
if (num == 0) {
- sigitem = pgpMpiItem(NULL, pgpsig->data, p, pend);
+ sigitem = pgpMpiItem(NULL, pgpsig->data, p);
if (sigitem)
pgpsig->data = sigitem;
}
return (sigitem == NULL);
}
-static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetKeyMpiRSA(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
SECItem *kitem = NULL;
SECKEYPublicKey *key = pgpkey->data;
@@ -414,10 +402,10 @@ static int pgpSetKeyMpiRSA(pgpDigAlg pgp
if (key) {
switch (num) {
case 0:
- kitem = pgpMpiItem(key->arena, &key->u.rsa.modulus, p, pend);
+ kitem = pgpMpiItem(key->arena, &key->u.rsa.modulus, p);
break;
case 1:
- kitem = pgpMpiItem(key->arena, &key->u.rsa.publicExponent, p, pend);
+ kitem = pgpMpiItem(key->arena, &key->u.rsa.publicExponent, p);
break;
}
}
@@ -472,8 +460,7 @@ static void pgpFreeKeyRSADSA(pgpDigAlg k
ka->data = NULL;
}
-static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num,
- const uint8_t *p, const uint8_t *pend)
+static int pgpSetMpiNULL(pgpDigAlg pgpkey, int num, const uint8_t *p)
{
return 1;
}
--- rpmio/rpmpgp.c.orig 2013-08-27 14:26:38.260872601 +0000
+++ rpmio/rpmpgp.c 2013-08-29 15:48:33.394558053 +0000
@@ -499,11 +499,15 @@ static int pgpPrtSigParams(pgpTag tag, u
int i;
pgpDigAlg sigalg = pgpSignatureNew(pubkey_algo);
- for (i = 0; p < pend && i < sigalg->mpis; i++, p += pgpMpiLen(p)) {
+ for (i = 0; i < sigalg->mpis && p + 2 <= pend; i++) {
+ int mpil = pgpMpiLen(p);
+ if (p + mpil > pend)
+ break;
if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) {
- if (sigalg->setmpi(sigalg, i, p, pend))
+ if (sigalg->setmpi(sigalg, i, p))
break;
}
+ p += mpil;
}
/* Does the size and number of MPI's match our expectations? */
@@ -650,9 +654,13 @@ static int pgpPrtPubkeyParams(uint8_t pu
int i;
pgpDigAlg keyalg = pgpPubkeyNew(pubkey_algo);
- for (i = 0; p < pend && i < keyalg->mpis; i++, p += pgpMpiLen(p)) {
- if (keyalg->setmpi(keyalg, i, p, pend))
+ for (i = 0; i < keyalg->mpis && p + 2 <= pend; i++) {
+ int mpil = pgpMpiLen(p);
+ if (p + mpil > pend)
+ break;
+ if (keyalg->setmpi(keyalg, i, p))
break;
+ p += mpil;
}
/* Does the size and number of MPI's match our expectations? */

19
checksepwarn.diff Normal file
View File

@ -0,0 +1,19 @@
--- ./build/parseReqs.c.orig 2014-02-21 12:25:51.259664860 +0000
+++ ./build/parseReqs.c 2014-02-21 12:28:07.545664619 +0000
@@ -178,8 +178,14 @@ rpmRC parseRCPOT(rpmSpec spec, Package p
if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}~")) goto exit;
/* While ':' and '-' are valid, only one of each is valid. */
- if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg))
- goto exit;
+ if (checkSep(EVR, '-', &emsg) || checkSep(EVR, ':', &emsg)) {
+ if (tagflags & (RPMSENSE_FIND_REQUIRES|RPMSENSE_FIND_PROVIDES)) {
+ rpmlog(RPMLOG_WARNING, "%s: %s\n", emsg, r);
+ } else {
+ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"), spec->lineNum, emsg, spec->line);
+ }
+ emsg = _free(emsg);
+ }
re = ve; /* ==> next token after EVR string starts here */
} else

View File

@ -1,11 +0,0 @@
--- tools/debugedit.c.orig 2013-08-01 13:32:47.885854357 +0000
+++ tools/debugedit.c 2013-08-01 13:33:37.028854270 +0000
@@ -270,7 +270,7 @@ static struct
{ ".debug_ranges", NULL, NULL, 0, 0, 0 },
{ ".debug_types", NULL, NULL, 0, 0, 0 },
{ ".debug_macro", NULL, NULL, 0, 0, 0 },
- { ".debug_gdb_script", NULL, NULL, 0, 0, 0 },
+ { ".debug_gdb_scripts", NULL, NULL, 0, 0, 0 },
{ NULL, NULL, NULL, 0, 0, 0 }
};

View File

@ -1,21 +1,20 @@
--- ./fileattrs/Makefile.am.orig 2012-03-20 08:07:25.000000000 +0000
+++ ./fileattrs/Makefile.am 2012-06-01 13:39:16.000000000 +0000
@@ -6,6 +6,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs
--- ./fileattrs/Makefile.am.orig 2014-02-20 12:54:01.473814793 +0000
+++ ./fileattrs/Makefile.am 2014-02-20 12:55:37.318814624 +0000
@@ -7,6 +7,6 @@ fattrsdir = $(rpmconfigdir)/fileattrs
fattrs_DATA = \
desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \
- pkgconfig.attr python.attr ocaml.attr script.attr mono.attr
+ pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \
+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
- mono.attr
+ mono.attr debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
EXTRA_DIST = $(fattrs_DATA)
--- ./fileattrs/debuginfo.attr.orig 2012-06-01 13:39:16.000000000 +0000
+++ ./fileattrs/debuginfo.attr 2012-06-01 13:39:16.000000000 +0000
--- ./fileattrs/debuginfo.attr.orig 2014-02-20 12:54:01.473814793 +0000
+++ ./fileattrs/debuginfo.attr 2014-02-20 12:54:01.473814793 +0000
@@ -0,0 +1,2 @@
+%__debuginfo_provides %{_rpmconfigdir}/debuginfo.prov
+%__debuginfo_path ^/usr/lib/debug/
--- ./fileattrs/elf.attr.orig 2012-03-20 08:07:25.000000000 +0000
+++ ./fileattrs/elf.attr 2012-06-01 13:40:16.000000000 +0000
--- ./fileattrs/elf.attr.orig 2012-11-07 12:55:24.000000000 +0000
+++ ./fileattrs/elf.attr 2014-02-20 12:54:01.474814793 +0000
@@ -1,4 +1,5 @@
%__elf_provides %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
%__elf_requires %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
@ -23,43 +22,45 @@
+%__elf_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*executable
%__elf_flags exeonly
+%__elf_exclude_path ^/usr/lib/debug/
--- ./fileattrs/elflib.attr.orig 2012-06-01 13:39:16.000000000 +0000
+++ ./fileattrs/elflib.attr 2012-06-01 13:39:16.000000000 +0000
--- ./fileattrs/elflib.attr.orig 2014-02-20 12:54:01.474814793 +0000
+++ ./fileattrs/elflib.attr 2014-02-20 12:54:01.474814793 +0000
@@ -0,0 +1,4 @@
+%__elflib_provides %{_rpmconfigdir}/elfdeps --assume-exec --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object
+%__elflib_exclude_path ^/usr/lib/debug/
--- ./fileattrs/firmware.attr.orig 2012-06-01 13:39:16.000000000 +0000
+++ ./fileattrs/firmware.attr 2012-06-01 13:39:16.000000000 +0000
--- ./fileattrs/firmware.attr.orig 2014-02-20 12:54:01.474814793 +0000
+++ ./fileattrs/firmware.attr 2014-02-20 12:54:01.474814793 +0000
@@ -0,0 +1,2 @@
+%__firmware_provides %{_rpmconfigdir}/firmware.prov
+%__firmware_path /lib/firmware/
--- ./fileattrs/ksyms.attr.orig 2012-06-01 13:39:16.000000000 +0000
+++ ./fileattrs/ksyms.attr 2012-06-01 13:39:16.000000000 +0000
--- ./fileattrs/ksyms.attr.orig 2014-02-20 12:54:01.474814793 +0000
+++ ./fileattrs/ksyms.attr 2014-02-20 12:54:01.474814793 +0000
@@ -0,0 +1,4 @@
+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name
+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name
+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name
+%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$
--- ./fileattrs/perl.attr.orig 2012-03-20 08:07:25.000000000 +0000
+++ ./fileattrs/perl.attr 2012-06-01 13:39:16.000000000 +0000
--- ./fileattrs/perl.attr.orig 2012-11-07 12:55:24.000000000 +0000
+++ ./fileattrs/perl.attr 2014-02-20 12:54:01.474814793 +0000
@@ -1,3 +1,4 @@
-%__perl_requires %{_rpmconfigdir}/perl.req
+# disabled for now
+#%__perl_requires %{_rpmconfigdir}/perl.req
%__perl_magic ^.*[Pp]erl .*$
%__perl_flags exeonly
--- ./fileattrs/perllib.attr.orig 2012-03-20 08:07:25.000000000 +0000
+++ ./fileattrs/perllib.attr 2012-06-01 13:39:16.000000000 +0000
@@ -1,3 +1,4 @@
--- ./fileattrs/perllib.attr.orig 2014-02-05 13:04:01.000000000 +0000
+++ ./fileattrs/perllib.attr 2014-02-20 12:54:01.475814793 +0000
@@ -1,5 +1,6 @@
%__perllib_provides %{_rpmconfigdir}/perl.prov
-%__perllib_requires %{_rpmconfigdir}/perl.req
+#disabled for now
+#%__perllib_requires %{_rpmconfigdir}/perl.req
%__perllib_magic ^Perl[[:digit:]] module source.*
--- ./fileattrs/sysvinit.attr.orig 2012-06-01 13:39:16.000000000 +0000
+++ ./fileattrs/sysvinit.attr 2012-06-01 13:39:16.000000000 +0000
%__perllib_path \\.pm$
%__perllib_flags magic_and_path
--- ./fileattrs/sysvinit.attr.orig 2014-02-20 12:54:01.475814793 +0000
+++ ./fileattrs/sysvinit.attr 2014-02-20 12:54:01.475814793 +0000
@@ -0,0 +1,2 @@
+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides
+%__sysvinit_path ^/etc/init\.d/

View File

@ -1,17 +1,15 @@
Add support for supplements to the internal dependency generator.
--- ./build/rpmfc.c.orig 2013-07-12 12:18:29.000000000 +0000
+++ ./build/rpmfc.c 2013-07-12 12:18:48.000000000 +0000
@@ -58,6 +58,7 @@ struct rpmfc_s {
--- ./build/rpmfc.c.orig 2014-02-20 12:56:59.836814478 +0000
+++ ./build/rpmfc.c 2014-02-20 12:58:18.886814338 +0000
@@ -59,6 +59,7 @@ struct rpmfc_s {
rpmstrPool pool; /*!< general purpose string storage */
rpmds provides; /*!< (no. provides) package provides */
rpmds requires; /*!< (no. requires) package requires */
+ rpmds supplements; /*!< (no. supplements) package supplements */
};
struct rpmfcTokens_s {
@@ -546,6 +547,22 @@ static int rpmfcHelperRequires(rpmfc fc,
return 0;
@@ -583,6 +584,22 @@ static int rpmfcHelperRequires(rpmfc fc,
RPMSENSE_FIND_REQUIRES, RPMTAG_REQUIRENAME);
}
+/**
@ -25,7 +23,7 @@ Add support for supplements to the internal dependency generator.
+ 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;
+}
@ -33,15 +31,16 @@ Add support for supplements to the internal dependency generator.
/* Only used for elf coloring and controlling RPMTAG_FILECLASS inclusion now */
static const struct rpmfcTokens_s rpmfcTokens[] = {
{ "directory", RPMFC_INCLUDE },
@@ -763,6 +780,7 @@ rpmfc rpmfcFree(rpmfc fc)
@@ -800,6 +817,8 @@ rpmfc rpmfcFree(rpmfc fc)
rpmdsFree(fc->provides);
rpmdsFree(fc->requires);
+ rpmdsFree(fc->supplements);
+
rpmstrPoolFree(fc->pool);
memset(fc, 0, sizeof(*fc)); /* trash and burn */
free(fc);
}
@@ -794,6 +812,11 @@ rpmds rpmfcRequires(rpmfc fc)
@@ -833,6 +852,11 @@ rpmds rpmfcRequires(rpmfc fc)
return (fc != NULL ? fc->requires : NULL);
}
@ -53,7 +52,7 @@ Add support for supplements to the internal dependency generator.
rpmRC rpmfcApply(rpmfc fc)
{
const char * s;
@@ -814,6 +837,7 @@ rpmRC rpmfcApply(rpmfc fc)
@@ -853,6 +877,7 @@ rpmRC rpmfcApply(rpmfc fc)
for (ARGV_t fattr = fc->fattrs[fc->ix]; fattr && *fattr; fattr++) {
rpmfcHelperProvides(fc, *fattr);
rpmfcHelperRequires(fc, *fattr);
@ -61,19 +60,19 @@ Add support for supplements to the internal dependency generator.
}
}
/* No more additions after this, freeze pool to minimize memory use */
@@ -858,6 +882,11 @@ rpmRC rpmfcApply(rpmfc fc)
@@ -897,6 +922,11 @@ rpmRC rpmfcApply(rpmfc fc)
dix = rpmdsFind(fc->requires, ds);
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;
}
if (dix < 0)
@@ -1341,6 +1370,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
@@ -1380,6 +1410,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec
}
}
@ -83,17 +82,17 @@ Add support for supplements to the internal dependency generator.
+ 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);
+ }
+ }
+
/* Add dependency dictionary(#dependencies) */
if (rpmtdFromArgi(&td, RPMTAG_DEPENDSDICT, fc->ddictx)) {
headerPut(pkg->header, &td, HEADERPUT_DEFAULT);
--- ./build/rpmfc.h.orig 2012-11-18 08:21:06.000000000 +0000
+++ ./build/rpmfc.h 2013-07-12 12:18:48.000000000 +0000
--- ./build/rpmfc.h.orig 2012-11-07 12:55:24.000000000 +0000
+++ ./build/rpmfc.h 2014-02-20 12:57:04.466814469 +0000
@@ -106,6 +106,13 @@ rpmds rpmfcProvides(rpmfc fc);
*/
rpmds rpmfcRequires(rpmfc fc);

View File

@ -1,76 +0,0 @@
commit 60835b20180c1be351ff95fa8c8d930afada0e4c
Author: Kirill A. Shutemov <kirill@shutemov.name>
Date: Mon Jul 1 03:25:32 2013 +0300
Use getauxval(3) to read auxv data
glibc >= 2.16 provides getauxval(): a reliable way to retrieve a value
from the auxiliary vector. It doesn't rely on /proc filesystem.
Let's switch to it and get rid of /proc dependency.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
--- configure.ac.orig 2013-07-12 12:25:38.000000000 +0000
+++ configure.ac 2013-07-12 12:35:18.000000000 +0000
@@ -518,6 +518,7 @@ dnl Checks for library functions.
AC_CHECK_FUNCS(putenv)
AC_CHECK_FUNCS(mempcpy)
AC_CHECK_FUNCS(fdatasync)
+AC_CHECK_FUNCS(getauxval)
AC_REPLACE_FUNCS(stpcpy stpncpy)
--- lib/rpmrc.c.orig 2013-07-12 12:25:38.000000000 +0000
+++ lib/rpmrc.c 2013-07-12 12:34:34.000000000 +0000
@@ -20,6 +20,10 @@
#define __power_pc() 0
#endif
+#ifdef HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
#include <rpm/rpmlib.h> /* RPM_MACTABLE*, Rc-prototypes */
#include <rpm/rpmmacro.h>
#include <rpm/rpmfileutil.h>
@@ -922,13 +926,19 @@ static int is_geode(void)
#if defined(__linux__) && defined(__powerpc__)
/**
- * Populate rpmat structure with parsed info from /proc/self/auxv
+ * Populate rpmat structure with auxv values
*/
-static void parse_auxv(void)
+static void read_auxv(void)
{
static int oneshot = 1;
if (oneshot) {
+#ifdef HAVE_GETAUXVAL
+ rpmat.platform = (char *) getauxval(AT_PLATFORM);
+ if (!rpmat.platform)
+ rpmat.platform = "";
+ rpmat.hwcap = getauxval(AT_HWCAP);
+#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -953,6 +963,7 @@ static void parse_auxv(void)
}
close(fd);
}
+#endif
oneshot = 0; /* only try once even if it fails */
}
return;
@@ -972,7 +983,7 @@ static void defaultMachine(const char **
#if defined(__linux__) && defined(__powerpc__)
/* Populate rpmat struct with hw info */
- parse_auxv();
+ read_auxv();
#endif
while (!gotDefaults) {

View File

@ -1,6 +1,6 @@
--- lib/rpmrc.c
+++ lib/rpmrc.c
@@ -79,10 +79,12 @@
--- ./lib/rpmrc.c.orig 2014-02-05 13:04:02.000000000 +0000
+++ ./lib/rpmrc.c 2014-02-20 12:37:28.209816551 +0000
@@ -83,10 +83,12 @@ struct rpmOption {
int localize;
};
@ -13,21 +13,21 @@
typedef struct defaultEntry_s {
char * name;
@@ -907,7 +909,7 @@
@@ -914,7 +916,7 @@ static int is_geode(void)
#endif
-#if defined(__linux__)
+#if defined(__linux__) && defined(__powerpc__)
/**
* Populate rpmat structure with parsed info from /proc/self/auxv
* Populate rpmat structure with auxv values
*/
@@ -957,7 +959,7 @@
@@ -971,7 +973,7 @@ static void defaultMachine(const char **
canonEntry canon;
int rc;
-#if defined(__linux__)
+#if defined(__linux__) && defined(__powerpc__)
/* Populate rpmat struct with hw info */
parse_auxv();
read_auxv();
#endif

View File

@ -1,11 +0,0 @@
--- build/rpmfc.c.orig 2013-09-11 17:13:39.165560997 +0000
+++ build/rpmfc.c 2013-09-11 17:13:52.171560974 +0000
@@ -848,6 +848,8 @@ rpmRC rpmfcApply(rpmfc fc)
previx = -1;
for (rpmsid id = 1; id <= nddict; id++) {
s = rpmstrPoolStr(fc->ddict, id);
+ if (!s || !*s)
+ continue;
/* Parse out (file#,deptype,N,EVR,Flags) */
ix = strtol(s, &se, 10);

View File

@ -1,7 +1,5 @@
Index: autodeps/linux.prov
===================================================================
--- autodeps/linux.prov.orig 2011-12-09 15:13:23.686700264 +0100
+++ autodeps/linux.prov 2011-12-09 15:13:23.733698039 +0100
--- ./autodeps/linux.prov.orig 2014-02-20 12:52:34.012814948 +0000
+++ ./autodeps/linux.prov 2014-02-20 12:52:40.088814937 +0000
@@ -101,4 +101,9 @@ fi
[ -x /usr/lib/rpm/gstreamer-provides ] &&
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/gstreamer-provides | sort -u
@ -12,13 +10,11 @@ Index: autodeps/linux.prov
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/sysvinitdeps.sh -P | sort -u
+
exit 0
Index: scripts/Makefile.am
===================================================================
--- scripts/Makefile.am.orig 2011-12-09 15:13:22.917736665 +0100
+++ scripts/Makefile.am 2011-12-09 15:13:23.733698039 +0100
--- ./scripts/Makefile.am.orig 2014-02-20 12:52:33.971814948 +0000
+++ ./scripts/Makefile.am 2014-02-20 12:52:40.089814937 +0000
@@ -21,6 +21,7 @@ EXTRA_DIST = \
ocaml-find-requires.sh ocaml-find-provides.sh \
pkgconfigdeps.sh libtooldeps.sh \
pkgconfigdeps.sh libtooldeps.sh appdata.prov \
fontconfig.prov desktop-file.prov script.req \
+ sysvinitdeps.sh \
macros.perl macros.php macros.python
@ -32,10 +28,8 @@ Index: scripts/Makefile.am
rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg
rpmconfig_DATA = \
Index: scripts/sysvinitdeps.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ scripts/sysvinitdeps.sh 2011-12-09 15:13:23.733698039 +0100
--- ./scripts/sysvinitdeps.sh.orig 2014-02-20 12:52:40.089814937 +0000
+++ ./scripts/sysvinitdeps.sh 2014-02-20 12:52:40.089814937 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+

593
newweakdeps.diff Normal file
View 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

View File

@ -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")},

View File

@ -1,93 +0,0 @@
diff -Nur installplatform.old installplatform
--- installplatform.old 2013-11-06 19:34:36.446381950 +0100
+++ installplatform 2013-11-06 19:38:24.617417000 +0100
@@ -54,12 +54,18 @@
CANONARCH=s390x
CANONCOLOR=3
;;
- ppc64*)
+ ppc64|ppc64p7)
ISANAME=ppc
ISABITS=64
CANONARCH=ppc64
CANONCOLOR=3
;;
+ ppc64le)
+ ISANAME=ppc
+ ISABITS=64
+ CANONARCH=ppc64le
+ CANONCOLOR=3
+ ;;
ppc*)
ISANAME=ppc
ISABITS=32
diff -Nur lib/rpmrc.c.orig lib/rpmrc.c
--- lib/rpmrc.c.orig 2013-11-06 19:34:36.426381894 +0100
+++ lib/rpmrc.c 2013-11-06 19:38:32.713558000 +0100
@@ -1119,6 +1119,7 @@
# endif /* sparc*-linux */
# if defined(__linux__) && defined(__powerpc__)
+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
{
int powerlvl;
if (!rstreq(un.machine, "ppc") &&
@@ -1127,6 +1128,7 @@
strcpy(un.machine, "ppc64p7");
}
}
+# endif /* __ORDER_BIG_ENDIAN__ */
# endif /* ppc64*-linux */
# if defined(__GNUC__) && defined(__alpha__)
diff -Nurrpmrc.in.orig rpmrc.in
--- rpmrc.in 2013-11-06 19:34:36.446381950 +0100
+++ rpmrc.in 2013-11-06 19:41:21.698505000 +0100
@@ -48,6 +48,7 @@
optflags: ppciseries -O2 -g -m32
optflags: ppcpseries -O2 -g -m32
optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
+optflags: ppc64le -O2 -g -fsigned-char
optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
optflags: parisc -O2 -g -mpa-risc-1-0
@@ -99,6 +100,7 @@
archcolor: sparcv9 2
archcolor: ppc 1
archcolor: ppc64 2
+archcolor: ppc64le 2
archcolor: armv3l 1
archcolor: armv4b 1
@@ -201,6 +203,7 @@
arch_canon: s390x: s390x 15
arch_canon: ppc64: ppc64 16
+arch_canon: ppc64le: ppc64le 16
arch_canon: ppc64pseries: ppc64pseries 16
arch_canon: ppc64iseries: ppc64iseries 16
arch_canon: ppc64p7: ppc64p7 16
@@ -288,6 +291,7 @@
buildarchtranslate: ppc64iseries: ppc64
buildarchtranslate: ppc64pseries: ppc64
buildarchtranslate: ppc64p7: ppc64
+buildarchtranslate: ppc64le: ppc64le
buildarchtranslate: powerpc64: ppc64
buildarchtranslate: armv3l: armv3l
@@ -373,6 +377,7 @@
arch_compat: ppc64pseries: ppc64
arch_compat: ppc64iseries: ppc64
arch_compat: ppc64p7: ppc64
+arch_compat: ppc64le: noarch fat
arch_compat: sun4c: sparc
arch_compat: sun4d: sparc
@@ -507,6 +512,7 @@
buildarch_compat: ppc64pseries: ppc64
buildarch_compat: ppc64iseries: ppc64
buildarch_compat: ppc64p7: ppc64
+buildarch_compat: ppc64le: noarch fat
buildarch_compat: mips: noarch
buildarch_compat: mipsel: noarch

View File

@ -17,7 +17,7 @@
Name: python3-rpm
Version: 4.11.1
Version: 4.11.2
Release: 0
Summary: Python Bindings for Manipulating RPM Packages
License: GPL-2.0+
@ -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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bbb0899ffdc997d399c4e96311f9cda5364f1fed5164aaf9db685784499ef8c
size 3778922

3
rpm-4.11.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4
size 3988837

View File

@ -17,7 +17,7 @@
Name: rpm-python
Version: 4.11.1
Version: 4.11.2
Release: 0
#!BuildIgnore: rpmlint-Factory
Summary: Python Bindings for Manipulating RPM Packages
@ -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

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Tue Feb 25 15:19:48 CET 2014 - mls@suse.de
- fix bug in weakdepscompa.diff patch
-------------------------------------------------------------------
Fri Feb 21 13:33:48 CET 2014 - mls@suse.de
- make the 'douple separator' error a warning
new patch: checksepwarn.diff
-------------------------------------------------------------------
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
- drop outdated and non-free RPM-Tips tarball [bnc#849465]
-------------------------------------------------------------------
Thu Feb 20 14:17:58 CET 2014 - mls@suse.de
- update to rpm-4.11.2
* dropped patches: appdata_provides.diff, application_provides.diff,
beedigest.diff, debug_gdb_scripts.diff, getauxval.diff,
ignore_poolstr_dummy_entries.diff, ppc64le.diff,
selfconflicts.diff, strpoolrehash.diff
-------------------------------------------------------------------
Fri Jan 31 09:00:48 UTC 2014 - lnussel@suse.de

View File

@ -47,11 +47,10 @@ PreReq: %fillup_prereq
Summary: The RPM Package Manager
License: GPL-2.0+
Group: System/Packages
Version: 4.11.1
Version: 4.11.2
Release: 0
Source: http://rpm.org/releases/rpm-4.11.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
Source4: rpm-suse_macros
Source5: rpmsort
Source6: symset-table
@ -63,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
@ -74,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
@ -132,20 +131,11 @@ Patch77: langnoc.diff
Patch78: headerchk2.diff
Patch79: helperenv.diff
Patch80: psm-errno.diff
Patch81: getauxval.diff
Patch82: noposttrans.diff
Patch83: debug_gdb_scripts.diff
Patch84: beedigest.diff
Patch85: brp-compress-no-img.patch
Patch86: strpoolrehash.diff
Patch87: ignore_poolstr_dummy_entries.diff
Patch88: selfconflicts.diff
Patch89: application_provides.diff
Patch90: appdata_provides.diff
#upstream commit cf07feda05822377d62b973adc4010c0d7f9eaa0
#upstream commit ef1497b1f81966fed56f008bc8ee8ba42102efd6
Patch91: ppc64le.diff
Patch92: find-lang-python.patch
Patch93: weakdepscompat.diff
Patch94: checksepwarn.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
Patch68000: m68k.patch
Patch68001: debugedit-m68k.patch
@ -227,21 +217,22 @@ 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 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89
%patch -P 90 -P 91 -P 92
%patch -P 80 -P 82 -P 85
%patch -P 92 -P 93 -P 94
%ifarch aarch64 ppc64le
%patch6464
%endif
%patch68000
%patch68001
cp config.guess config.sub db/dist/
cp config.guess config.sub beecrypt/
#chmod 755 scripts/find-supplements{,.ksyms}
@ -249,7 +240,6 @@ cp config.guess config.sub beecrypt/
#chmod 755 scripts/firmware.prov
#chmod 755 scripts/debuginfo.prov
tar -xjvf %{SOURCE1}
tar -xjvf %{SOURCE2}
sed -e 's/@suse_version@/%{?suse_version}%{!?suse_version:0}/' \
-e 's/@sles_version@/%{?sles_version}%{!?sles_version:0}/' \
-e 's/@ul_version@/%{?ul_version}%{!?ul_version:0}/' \
@ -390,7 +380,7 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va
%defattr(-,root,root)
%doc CHANGES.gz COPYING GROUPS
%doc doc/manual
%doc RPM-HOWTO RPM-Tips
%doc RPM-HOWTO
/etc/rpm
/bin/rpm
/usr/bin/*

View File

@ -1,5 +1,5 @@
--- ./rpmrc.in.orig 2013-06-10 15:55:10.000000000 +0000
+++ ./rpmrc.in 2013-07-12 11:56:53.000000000 +0000
--- ./rpmrc.in.orig 2014-02-05 13:04:02.000000000 +0000
+++ ./rpmrc.in 2014-02-20 12:48:24.342815390 +0000
@@ -12,16 +12,16 @@
# "fat" binary with both archs, for Darwin
optflags: fat -O2 -g -arch i386 -arch ppc
@ -26,7 +26,7 @@
optflags: amd64 -O2 -g
optflags: ia32e -O2 -g
@@ -41,16 +41,17 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni
@@ -41,17 +41,18 @@ optflags: sparc64v -O2 -g -m64 -mtune=ni
optflags: m68k -O2 -g -fomit-frame-pointer
@ -37,6 +37,7 @@
-optflags: ppciseries -O2 -g -fsigned-char
-optflags: ppcpseries -O2 -g -fsigned-char
-optflags: ppc64 -O2 -g -fsigned-char
-optflags: ppc64le -O2 -g -fsigned-char
-optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fsigned-char
+optflags: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
+optflags: ppc8260 -O2 -g -m32
@ -45,6 +46,7 @@
+optflags: ppciseries -O2 -g -m32
+optflags: ppcpseries -O2 -g -m32
+optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
+optflags: ppc64le -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
+optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
optflags: parisc -O2 -g -mpa-risc-1-0
@ -52,7 +54,7 @@
optflags: hppa1.0 -O2 -g -mpa-risc-1-0
optflags: hppa1.1 -O2 -g -mpa-risc-1-0
optflags: hppa1.2 -O2 -g -mpa-risc-1-0
@@ -66,7 +67,9 @@ optflags: armv4tl -O2 -g -march=armv4t
@@ -67,7 +68,9 @@ optflags: armv4tl -O2 -g -march=armv4t
optflags: armv5tel -O2 -g -march=armv5te
optflags: armv5tejl -O2 -g -march=armv5te
optflags: armv6l -O2 -g -march=armv6
@ -62,7 +64,7 @@
optflags: atarist -O2 -g -fomit-frame-pointer
optflags: atariste -O2 -g -fomit-frame-pointer
@@ -76,8 +79,8 @@ optflags: atariclone -O2 -g -fomit-frame
@@ -77,8 +80,8 @@ optflags: atariclone -O2 -g -fomit-frame
optflags: milan -O2 -g -fomit-frame-pointer
optflags: hades -O2 -g -fomit-frame-pointer
@ -73,7 +75,7 @@
optflags: sh3 -O2 -g
optflags: sh4 -O2 -g -mieee
@@ -178,7 +181,9 @@ arch_canon: armv4l: armv4l 12
@@ -180,7 +183,9 @@ arch_canon: armv4l: armv4l 12
arch_canon: armv5tel: armv5tel 12
arch_canon: armv5tejl: armv5tejl 12
arch_canon: armv6l: armv6l 12
@ -83,7 +85,7 @@
arch_canon: m68kmint: m68kmint 13
arch_canon: atarist: m68kmint 13
@@ -241,17 +246,17 @@ os_canon: MacOSX: macosx 21
@@ -244,17 +249,17 @@ os_canon: MacOSX: macosx 21
#############################################################
# For a given uname().machine, the default build arch
@ -109,15 +111,7 @@
buildarchtranslate: i486: i386
buildarchtranslate: i386: i386
@@ -281,6 +286,7 @@ buildarchtranslate: ppcpseries: ppc
buildarchtranslate: ppc64iseries: ppc64
buildarchtranslate: ppc64pseries: ppc64
buildarchtranslate: ppc64p7: ppc64
+buildarchtranslate: powerpc64: ppc64
buildarchtranslate: armv3l: armv3l
buildarchtranslate: armv4b: armv4b
@@ -289,7 +295,9 @@ buildarchtranslate: armv4tl: armv4tl
@@ -293,7 +298,9 @@ buildarchtranslate: armv4tl: armv4tl
buildarchtranslate: armv5tel: armv5tel
buildarchtranslate: armv5tejl: armv5tejl
buildarchtranslate: armv6l: armv6l
@ -127,7 +121,7 @@
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
@@ -314,6 +322,15 @@ buildarchtranslate: sh4a: sh4
@@ -318,6 +325,15 @@ buildarchtranslate: sh4a: sh4
buildarchtranslate: aarch64: aarch64
@ -143,7 +137,7 @@
#############################################################
# Architecture compatibility
@@ -370,14 +387,20 @@ arch_compat: mipsel: noarch
@@ -375,14 +391,20 @@ arch_compat: mipsel: noarch
arch_compat: hppa2.0: hppa1.2
arch_compat: hppa1.2: hppa1.1
arch_compat: hppa1.1: hppa1.0
@ -166,7 +160,7 @@
arch_compat: armv4tl: armv4l
arch_compat: armv4l: armv3l
arch_compat: armv3l: noarch
@@ -394,7 +417,7 @@ arch_compat: i370: noarch
@@ -399,7 +421,7 @@ arch_compat: i370: noarch
arch_compat: s390: noarch
arch_compat: s390x: s390 noarch
@ -175,7 +169,13 @@
arch_compat: x86_64: amd64 em64t athlon noarch
arch_compat: amd64: x86_64 em64t athlon noarch
@@ -483,7 +506,9 @@ buildarch_compat: mips: noarch
@@ -484,12 +506,15 @@ buildarch_compat: ppc64le: noarch fat
buildarch_compat: ppc64pseries: ppc64
buildarch_compat: ppc64iseries: ppc64
buildarch_compat: ppc64p7: ppc64
+buildarchtranslate: powerpc64: ppc64
buildarch_compat: mips: noarch
buildarch_compat: mipsel: noarch
buildarch_compat: armv4b: noarch
@ -185,7 +185,7 @@
buildarch_compat: armv6l: armv5tejl
buildarch_compat: armv5tejl: armv5tel
buildarch_compat: armv5tel: armv4tl
@@ -494,7 +519,8 @@ buildarch_compat: armv3l: noarch
@@ -500,7 +525,8 @@ buildarch_compat: armv3l: noarch
buildarch_compat: hppa2.0: hppa1.2
buildarch_compat: hppa1.2: hppa1.1
buildarch_compat: hppa1.1: hppa1.0

View File

@ -1,7 +1,5 @@
Work around glibc/nscd caching problems when doing 'rpm --root'.
--- ./lib/rpmchroot.c.orig 2011-05-12 08:26:10.000000000 +0000
+++ ./lib/rpmchroot.c 2011-05-12 08:28:32.000000000 +0000
--- ./lib/rpmchroot.c.orig 2012-11-07 12:55:24.000000000 +0000
+++ ./lib/rpmchroot.c 2014-02-20 12:50:05.360815211 +0000
@@ -66,6 +66,7 @@ int rpmChrootIn(void)
} else if (rootState.chrootDone == 0) {
if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) {
@ -18,11 +16,11 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
} else {
rpmlog(RPMLOG_ERR, _("Unable to restore root directory: %m\n"));
rc = -1;
--- ./lib/rpmug.c.orig 2011-05-12 08:13:52.000000000 +0000
+++ ./lib/rpmug.c 2011-05-12 08:33:28.000000000 +0000
@@ -35,6 +35,47 @@ const char * rpmugStashStr(const char *s
return ret;
}
--- ./lib/rpmug.c.orig 2014-02-05 13:04:37.000000000 +0000
+++ ./lib/rpmug.c 2014-02-20 12:50:05.361815211 +0000
@@ -10,6 +10,47 @@
#include "lib/rpmug.h"
#include "debug.h"
+#if defined(__GLIBC__)
+
@ -68,7 +66,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
/*
* These really ought to use hash tables. I just made the
* guess that most files would be owned by root or the same person/group
@@ -68,17 +109,28 @@ int rpmugUid(const char * thisUname, uid
@@ -43,17 +84,28 @@ int rpmugUid(const char * thisUname, uid
lastUnameAlloced = thisUnameLen + 10;
lastUname = xrealloc(lastUname, lastUnameAlloced); /* XXX memory leak */
}
@ -104,7 +102,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
*uid = lastUid;
@@ -111,18 +163,29 @@ int rpmugGid(const char * thisGname, gid
@@ -86,18 +138,29 @@ int rpmugGid(const char * thisGname, gid
lastGnameAlloced = thisGnameLen + 10;
lastGname = xrealloc(lastGname, lastGnameAlloced); /* XXX memory leak */
}
@ -141,7 +139,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
*gid = lastGid;
@@ -134,7 +197,7 @@ const char * rpmugUname(uid_t uid)
@@ -109,7 +172,7 @@ const char * rpmugUname(uid_t uid)
{
static uid_t lastUid = (uid_t) -1;
static char * lastUname = NULL;
@ -150,7 +148,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
if (uid == (uid_t) -1) {
lastUid = (uid_t) -1;
@@ -151,9 +214,9 @@ const char * rpmugUname(uid_t uid)
@@ -126,9 +189,9 @@ const char * rpmugUname(uid_t uid)
lastUid = uid;
len = strlen(pwent->pw_name);
@ -163,7 +161,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
strcpy(lastUname, pwent->pw_name);
@@ -165,7 +228,7 @@ const char * rpmugGname(gid_t gid)
@@ -140,7 +203,7 @@ const char * rpmugGname(gid_t gid)
{
static gid_t lastGid = (gid_t) -1;
static char * lastGname = NULL;
@ -172,7 +170,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
if (gid == (gid_t) -1) {
lastGid = (gid_t) -1;
@@ -182,9 +245,9 @@ const char * rpmugGname(gid_t gid)
@@ -157,9 +220,9 @@ const char * rpmugGname(gid_t gid)
lastGid = gid;
len = strlen(grent->gr_name);
@ -185,9 +183,9 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
strcpy(lastGname, grent->gr_name);
@@ -200,3 +263,16 @@ void rpmugFree(void)
@@ -189,3 +252,16 @@ void rpmugFree(void)
rpmugUname(-1);
rpmugGname(-1);
strStash = strCacheFree(strStash);
}
+
+void rpmugChroot(int in)
@ -202,9 +200,9 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
+ inchroot = in;
+#endif
+}
--- ./lib/rpmug.h.orig 2011-05-12 08:13:52.000000000 +0000
+++ ./lib/rpmug.h 2011-05-12 08:26:56.000000000 +0000
@@ -15,4 +15,6 @@ const char * rpmugGname(gid_t gid);
--- ./lib/rpmug.h.orig 2014-02-05 13:04:02.000000000 +0000
+++ ./lib/rpmug.h 2014-02-20 12:50:05.362815211 +0000
@@ -15,4 +15,6 @@ int rpmugInit(void);
void rpmugFree(void);

View File

@ -1,67 +0,0 @@
From fae0eef24582dd9e071be8e884ff0851d4b57437 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Fri, 27 Sep 2013 15:09:20 +0200
Subject: [PATCH] Ignore self-obsoletes and self-conflicts in dependency check
code
We already ignored them when checking against the added package list,
but not when checking against installed packages. Thus, rpm -V reported
them as errors.
---
lib/depends.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git lib/depends.c lib/depends.c
index 3d70e68..3ef27bc 100644
--- lib/depends.c
+++ lib/depends.c
@@ -504,6 +504,12 @@ static int rpmdbProvides(rpmts ts, depCache dcache, rpmds dep)
if (deptag != RPMTAG_OBSOLETENAME && Name[0] == '/') {
mi = rpmtsPrunedIterator(ts, RPMDBI_INSTFILENAMES, Name, prune);
while ((h = rpmdbNextIterator(mi)) != NULL) {
+ /* Ignore self-conflicts */
+ if (deptag == RPMTAG_CONFLICTNAME) {
+ unsigned int instance = headerGetInstance(h);
+ if (instance && instance == rpmdsInstance(dep))
+ continue;
+ }
rpmdsNotify(dep, "(db files)", rc);
break;
}
@@ -527,6 +533,12 @@ static int rpmdbProvides(rpmts ts, depCache dcache, rpmds dep)
int prix = (selfevr) ? -1 : rpmdbGetIteratorFileNum(mi);
int match = rpmdsMatches(tspool, h, prix, dep, selfevr,
_rpmds_nopromote);
+ /* Ignore self-obsoletes and self-conflicts */
+ if (match && (deptag == RPMTAG_OBSOLETENAME || deptag == RPMTAG_CONFLICTNAME)) {
+ unsigned int instance = headerGetInstance(h);
+ if (instance && instance == rpmdsInstance(dep))
+ match = 0;
+ }
if (match) {
rpmdsNotify(dep, "(db provides)", rc);
break;
@@ -672,8 +684,18 @@ static void checkInstDeps(rpmts ts, depCache dcache, rpmte te,
rpmstrPool pool = rpmtsPool(ts);
while ((h = rpmdbNextIterator(mi)) != NULL) {
- char * pkgNEVRA = headerGetAsString(h, RPMTAG_NEVRA);
- rpmds ds = rpmdsNewPool(pool, h, depTag, 0);
+ char * pkgNEVRA;
+ rpmds ds;
+
+ /* Ignore self-obsoletes and self-conflicts */
+ if (depTag == RPMTAG_OBSOLETENAME || depTag == RPMTAG_CONFLICTNAME) {
+ unsigned int instance = headerGetInstance(h);
+ if (instance && instance == rpmteDBInstance(te))
+ continue;
+ }
+
+ pkgNEVRA = headerGetAsString(h, RPMTAG_NEVRA);
+ ds = rpmdsNewPool(pool, h, depTag, 0);
checkDS(ts, dcache, te, pkgNEVRA, ds, dep, 0);
--
1.8.1.4

View File

@ -1,47 +0,0 @@
--- rpmio/rpmstrpool.c.orig 2013-09-11 15:33:48.371571600 +0000
+++ rpmio/rpmstrpool.c 2013-09-11 16:20:56.106566595 +0000
@@ -219,8 +219,17 @@ static void rpmstrPoolRehash(rpmstrPool
pool->hash = poolHashFree(pool->hash);
pool->hash = poolHashCreate(sizehint);
- for (int i = 1; i < pool->offs_size; i++)
- poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
+ for (int i = 1; i <= pool->offs_size; i++) {
+ /* this is a little bit tricky because we have to skip the dummy
+ * entries that are at the end of each chunk */
+ const char * str = rpmstrPoolStr(pool, i);
+ if (str[0] == 0 && i < pool->offs_size) {
+ /* looks like a dummy entry, check if next str is in a different chunk */
+ if (rpmstrPoolStr(pool, i + 1) != str + 1)
+ continue;
+ }
+ poolHashAddEntry(pool, str, i);
+ }
}
rpmstrPool rpmstrPoolCreate(void)
@@ -308,7 +317,8 @@ static rpmsid rpmstrPoolPut(rpmstrPool p
}
chunk_used = pool->offs[pool->offs_size] - pool->chunks[pool->chunks_size];
- if (ssize + 1 > pool->chunk_allocated - chunk_used) {
+ /* +2: extra trailing zero + extra byte */
+ if (ssize + 2 > pool->chunk_allocated - chunk_used) {
/* check size of ->chunks */
pool->chunks_size += 1;
if (pool->chunks_size >= pool->chunks_allocated) {
@@ -318,11 +328,12 @@ static rpmsid rpmstrPoolPut(rpmstrPool p
}
/* Check if string is bigger than chunks */
- if (ssize > pool->chunk_allocated) {
- pool->chunk_allocated = 2 * ssize;
+ if (ssize + 2 > pool->chunk_allocated) {
+ pool->chunk_allocated = 2 * ssize + 2;
}
/* Dummy entry for end of last string*/
+ pool->offs[pool->offs_size][0] = 0;
pool->offs_size += 1;
pool->offs[pool->offs_size] = xcalloc(1, pool->chunk_allocated);

View File

@ -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

127
weakdepscompat.diff Normal file
View File

@ -0,0 +1,127 @@
--- ./build/parsePreamble.c.orig 2014-02-25 14:14:15.892041649 +0000
+++ ./build/parsePreamble.c 2014-02-25 14:14:26.237041631 +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-25 14:14:15.904041649 +0000
+++ ./build/rpmfc.c 2014-02-25 14:14:26.238041631 +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-25 14:14:15.834041649 +0000
+++ ./lib/rpmds.c 2014-02-25 14:14:47.963041593 +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_OLDENHANCESNAME) {
+ t = "Oldenhances";
+ evr = RPMTAG_OLDENHANCESVERSION;
+ f = RPMTAG_OLDENHANCESFLAGS;
} else {
rc = 1;
}
--- ./lib/tagexts.c.orig 2014-02-25 14:14:15.839041649 +0000
+++ ./lib/tagexts.c 2014-02-25 14:18:53.707041158 +0000
@@ -906,6 +906,34 @@ 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);
+ ndeps = 0;
+ while (rpmdsNext(ds) >= 0) {
+ if ((rpmdsFlags(ds) & RPMSENSE_STRONG) == (strong ? RPMSENSE_STRONG : 0))
+ deps[ndeps++] = rpmdsNewDNEVR(NULL, ds);
+ }
+ if (ndeps) {
+ td->data = deps;
+ td->type = RPM_STRING_ARRAY_TYPE;
+ td->count = ndeps;
+ td->flags |= (RPMTD_ALLOCED | RPMTD_PTR_ALLOCED);
+ } else {
+ _free(deps);
+ }
+ }
+ rpmdsFree(ds);
+ return (ndeps > 0);
+}
+
static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
{
return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
@@ -913,22 +941,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, 1);
}
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_OLDENHANCESNAME, 1);
}
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_OLDENHANCESNAME, 0);
}
static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)