From 4fb16e5212ddf2d7303d44624306737f4481245c Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 16 Feb 2017 12:33:06 +0200 Subject: [PATCH] Update to rpm 4.13.0.1 --- rpm-4.13.0-gdbindex.patch | 25 ---------- rpm-4.13.0-signaturesize.patch | 48 ------------------- ...-transfiletriggerpostun-invalid-read.patch | 40 ---------------- rpm.spec | 10 ++-- 4 files changed, 5 insertions(+), 118 deletions(-) delete mode 100644 rpm-4.13.0-gdbindex.patch delete mode 100644 rpm-4.13.0-signaturesize.patch delete mode 100644 rpm-4.13.x-transfiletriggerpostun-invalid-read.patch diff --git a/rpm-4.13.0-gdbindex.patch b/rpm-4.13.0-gdbindex.patch deleted file mode 100644 index 01ee34a..0000000 --- a/rpm-4.13.0-gdbindex.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit de7a1e279f8a21fe3494daeb27801db74e8420c5 -Author: Panu Matilainen -Date: Tue Jan 17 12:21:48 2017 +0200 - - Resurrect GDB index generation (RhBug:1410907) - - Commit 54d30ac4a344770571e56c60281a9130b61c1788 broke GDB index - generation due to a leftover "[". In git master this got fixed in - commit 67d3df338875ad5d9601e360bfdbd4289f271bc1 but we don't want - that on 4.13.x because there are behavior changes involved, so - fixing this specifically on the 4.13.x branch. - -diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh -index a70ef3c..4293261 100644 ---- a/scripts/find-debuginfo.sh -+++ b/scripts/find-debuginfo.sh -@@ -312,7 +312,7 @@ while read nlinks inum f; do - $strict && exit 2 - fi - -- [ type gdb-add-index >/dev/null 2>&1 && gdb-add-index "$f" > /dev/null 2>&1 -+ type gdb-add-index >/dev/null 2>&1 && gdb-add-index "$f" > /dev/null 2>&1 - - # A binary already copied into /usr/lib/debug doesn't get stripped, - # just has its file names collected and adjusted. diff --git a/rpm-4.13.0-signaturesize.patch b/rpm-4.13.0-signaturesize.patch deleted file mode 100644 index 05b24ee..0000000 --- a/rpm-4.13.0-signaturesize.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit 61b41cd3d9f2003cbfd7c987f35fc6aedddd2a73 -Author: Panu Matilainen -Date: Fri Jan 13 10:48:43 2017 +0200 - - Make the signature header size constant between 32- and 64-bit tags - - Since commit 68bddc353a7ea87ea00ad957858cd509e845e84c we're initially - creating the signature header with estimated values, and if you're - unlucky enough to have the estimated and actual size on the different - sides of UINT32_MAX boundary, the resulting package will have the main - header off by eight bytes, making it unreadable by rpm (RhBug:1405570) - - Always reserve a little bit of space in the signature header so we - we can maintain the overall size constant regardless of whether 32- or - 64-bit tags were used by using a smaller "padding" with 64bit tags. - - (cherry picked from commit e51644e0ee2d33c02c06560f87ea6aecb9991673) - -diff --git a/lib/signature.c b/lib/signature.c -index 9784c7b..1b9fe34 100644 ---- a/lib/signature.c -+++ b/lib/signature.c -@@ -304,7 +304,8 @@ rpmRC rpmGenerateSignature(char *SHA1, uint8_t *MD5, rpm_loff_t size, - struct rpmtd_s td; - rpmRC rc = RPMRC_OK; - char *reservedSpace; -- int spaceSize = 0; -+ int spaceSize = 32; /* always reserve a bit of space */ -+ int gpgSize = rpmExpandNumeric("%{__gpg_reserved_space}"); - - /* Prepare signature */ - sig = rpmNewSignature(); -@@ -349,9 +350,14 @@ rpmRC rpmGenerateSignature(char *SHA1, uint8_t *MD5, rpm_loff_t size, - td.tag = RPMSIGTAG_LONGSIZE; - td.data = &s; - headerPut(sig, &td, HEADERPUT_DEFAULT); -+ -+ /* adjust for the size difference between 64- and 32bit tags */ -+ spaceSize -= 8; - } - -- spaceSize = rpmExpandNumeric("%{__gpg_reserved_space}"); -+ if (gpgSize > 0) -+ spaceSize += gpgSize; -+ - if(spaceSize > 0) { - reservedSpace = xcalloc(spaceSize, sizeof(char)); - rpmtdReset(&td); diff --git a/rpm-4.13.x-transfiletriggerpostun-invalid-read.patch b/rpm-4.13.x-transfiletriggerpostun-invalid-read.patch deleted file mode 100644 index e770664..0000000 --- a/rpm-4.13.x-transfiletriggerpostun-invalid-read.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f6521c50f6836374a0f7995f8f393aaf36e178ea Mon Sep 17 00:00:00 2001 -Message-Id: -From: Panu Matilainen -Date: Mon, 7 Nov 2016 13:38:39 +0200 -Subject: [PATCH] Fix %transfiletriggerpostun undeterministic behavior - (RhBug:1284645) - -Keys from rpmdbIndexIteratorNext() are not necessarily \0-terminated, -buyer beware. - -Sometimes you get lucky, but in particular when built as PIE (such as -by default in Fedora) this falls over consistently. -In Fedora this has been hidden by the fact that test suite has been -disabled because its been so broken with fakechroot until recently, -and without PIE the testsuite regularly passes. Valgrind does -complain though. ---- - lib/rpmtriggers.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lib/rpmtriggers.c b/lib/rpmtriggers.c -index a8612c0..ca22a6b 100644 ---- a/lib/rpmtriggers.c -+++ b/lib/rpmtriggers.c -@@ -114,8 +114,11 @@ void rpmtriggersPrepPostUnTransFileTrigs(rpmts ts, rpmte te) - - /* Iterate over file triggers in rpmdb */ - while ((rpmdbIndexIteratorNext(ii, &key, &keylen)) == 0) { -+ char pfx[keylen + 1]; -+ memcpy(pfx, key, keylen); -+ pfx[keylen] = '\0'; - /* Check if file trigger matches any file in this te */ -- rpmfi fi = rpmfilesFindPrefix(files, key); -+ rpmfi fi = rpmfilesFindPrefix(files, pfx); - if (rpmfiFC(fi) > 0) { - /* If yes then store it */ - rpmdbAppendIterator(mi, rpmdbIndexIteratorPkgOffsets(ii), --- -2.7.4 - diff --git a/rpm.spec b/rpm.spec index 6970a55..6067093 100644 --- a/rpm.spec +++ b/rpm.spec @@ -17,7 +17,7 @@ %define rpmhome /usr/lib/rpm -%global rpmver 4.13.0 +%global rpmver 4.13.0.1 #global snapver rc2 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(v=%{version}; echo ${v%.*}.x)} @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}12%{?dist} +Release: %{?snapver:0.%{snapver}.}1%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -52,9 +52,6 @@ Patch4: rpm-4.8.1-use-gpg2.patch Patch5: rpm-4.12.0-rpm2cpio-hack.patch # Patches already upstream: -Patch100: rpm-4.13.x-transfiletriggerpostun-invalid-read.patch -Patch101: rpm-4.13.0-signaturesize.patch -Patch102: rpm-4.13.0-gdbindex.patch Patch133: rpm-4.13.x-pythondistdeps.patch Patch134: rpm-4.13.x-pythondistdeps-Makefile.patch @@ -569,6 +566,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Thu Feb 16 2017 Panu Matilainen - 4.13.0.1-1 +- Update to 4.13.0.1 ((http://rpm.org/wiki/Releases/4.13.0) + * Tue Feb 14 2017 Florian Festi - 4.13.0-12 - Fix Python byte compilation for Python3 only packages (#1411588)