From a9156ed867fa31f160e67fab6c8ff4479907a05d3093b3a4c279d57aa89e01ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 20 Feb 2014 13:18:41 +0000 Subject: [PATCH] update to rpm-4.11.2 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=315 --- appdata_provides.diff | 66 ---- application_provides.diff | 32 -- beedigest.diff | 551 ------------------------------ debug_gdb_scripts.diff | 11 - fileattrs.diff | 51 +-- findsupplements.diff | 31 +- getauxval.diff | 76 ----- ignore-auxv.diff | 14 +- ignore_poolstr_dummy_entries.diff | 11 - initscriptsprov.diff | 20 +- ppc64le.diff | 93 ----- python3-rpm.spec | 2 +- rpm-4.11.2.tar.bz2 | 3 + rpm-python.spec | 2 +- rpm.changes | 9 + rpm.spec | 18 +- rpmrc.diff | 42 +-- safeugid.diff | 38 +-- selfconflicts.diff | 67 ---- strpoolrehash.diff | 47 --- 20 files changed, 112 insertions(+), 1072 deletions(-) delete mode 100644 appdata_provides.diff delete mode 100644 application_provides.diff delete mode 100644 beedigest.diff delete mode 100644 debug_gdb_scripts.diff delete mode 100644 getauxval.diff delete mode 100644 ignore_poolstr_dummy_entries.diff delete mode 100644 ppc64le.diff create mode 100644 rpm-4.11.2.tar.bz2 delete mode 100644 selfconflicts.diff delete mode 100644 strpoolrehash.diff diff --git a/appdata_provides.diff b/appdata_provides.diff deleted file mode 100644 index 4dd3023..0000000 --- a/appdata_provides.diff +++ /dev/null @@ -1,66 +0,0 @@ -From fd6498712cdda8ecd9f1d89462300164dbe563bc Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -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 -+# 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 -+ diff --git a/application_provides.diff b/application_provides.diff deleted file mode 100644 index 1c81bad..0000000 --- a/application_provides.diff +++ /dev/null @@ -1,32 +0,0 @@ -From 56699101dec027590cca137a5d268fbc88799121 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -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 - diff --git a/beedigest.diff b/beedigest.diff deleted file mode 100644 index 36c6aa6..0000000 --- a/beedigest.diff +++ /dev/null @@ -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? */ diff --git a/debug_gdb_scripts.diff b/debug_gdb_scripts.diff deleted file mode 100644 index a389588..0000000 --- a/debug_gdb_scripts.diff +++ /dev/null @@ -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 } - }; - diff --git a/fileattrs.diff b/fileattrs.diff index 6cfb0c5..ffadc36 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -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/ diff --git a/findsupplements.diff b/findsupplements.diff index 2f0f4db..9b7f6e9 100644 --- a/findsupplements.diff +++ b/findsupplements.diff @@ -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); } +/** @@ -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,7 +60,7 @@ 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; @@ -73,7 +72,7 @@ Add support for supplements to the internal dependency generator. } if (dix < 0) -@@ -1341,6 +1370,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec +@@ -1380,6 +1410,18 @@ rpmRC rpmfcGenerateDepends(const rpmSpec } } @@ -92,8 +91,8 @@ Add support for supplements to the internal dependency generator. /* 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); diff --git a/getauxval.diff b/getauxval.diff deleted file mode 100644 index 66f8cc4..0000000 --- a/getauxval.diff +++ /dev/null @@ -1,76 +0,0 @@ -commit 60835b20180c1be351ff95fa8c8d930afada0e4c -Author: Kirill A. Shutemov -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 -Signed-off-by: Panu Matilainen - ---- 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 -+#endif -+ - #include /* RPM_MACTABLE*, Rc-prototypes */ - #include - #include -@@ -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) { diff --git a/ignore-auxv.diff b/ignore-auxv.diff index 1b9940c..6728aa0 100644 --- a/ignore-auxv.diff +++ b/ignore-auxv.diff @@ -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 diff --git a/ignore_poolstr_dummy_entries.diff b/ignore_poolstr_dummy_entries.diff deleted file mode 100644 index 0a90ab5..0000000 --- a/ignore_poolstr_dummy_entries.diff +++ /dev/null @@ -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); diff --git a/initscriptsprov.diff b/initscriptsprov.diff index c77bdb1..fe013a2 100644 --- a/initscriptsprov.diff +++ b/initscriptsprov.diff @@ -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 + diff --git a/ppc64le.diff b/ppc64le.diff deleted file mode 100644 index aa123d8..0000000 --- a/ppc64le.diff +++ /dev/null @@ -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 diff --git a/python3-rpm.spec b/python3-rpm.spec index dad39a0..a7f2aa2 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -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+ diff --git a/rpm-4.11.2.tar.bz2 b/rpm-4.11.2.tar.bz2 new file mode 100644 index 0000000..d209b23 --- /dev/null +++ b/rpm-4.11.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4 +size 3988837 diff --git a/rpm-python.spec b/rpm-python.spec index c7a231c..73757f6 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -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 diff --git a/rpm.changes b/rpm.changes index f0d0686..9317b6e 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +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 diff --git a/rpm.spec b/rpm.spec index 7f9229f..88647f3 100644 --- a/rpm.spec +++ b/rpm.spec @@ -47,7 +47,7 @@ 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 @@ -132,19 +132,8 @@ 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 Patch6464: auto-config-update-aarch64-ppc64le.diff Patch68000: m68k.patch @@ -234,14 +223,15 @@ rm -f rpmdb/db.h %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 %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} diff --git a/rpmrc.diff b/rpmrc.diff index e5a1b4c..d590527 100644 --- a/rpmrc.diff +++ b/rpmrc.diff @@ -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 diff --git a/safeugid.diff b/safeugid.diff index 859dd02..1e5a511 100644 --- a/safeugid.diff +++ b/safeugid.diff @@ -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); diff --git a/selfconflicts.diff b/selfconflicts.diff deleted file mode 100644 index 08088d6..0000000 --- a/selfconflicts.diff +++ /dev/null @@ -1,67 +0,0 @@ -From fae0eef24582dd9e071be8e884ff0851d4b57437 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -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 - diff --git a/strpoolrehash.diff b/strpoolrehash.diff deleted file mode 100644 index 27d8678..0000000 --- a/strpoolrehash.diff +++ /dev/null @@ -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);