]> git.pld-linux.org Git - packages/rpm.git/commitdiff
Fix rpm 4.6 compatibility mode. Release 10. auto/th/rpm-5.4.15-10
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Mon, 2 Feb 2015 23:07:35 +0000 (00:07 +0100)
committerMarcin Banasiak <marcin.banasiak@gmail.com>
Mon, 2 Feb 2015 23:07:35 +0000 (00:07 +0100)
Added patch with a hack that changes behaviour of headerGet() in rpm 4.6
compatibility mode in order to set the correct value of iteration index.
RPM 5 implementation of headerGet() sets it to 0 whereas rpmtdNext() expects
it to be -1 initially.

rpm-rpmtdnext.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-rpmtdnext.patch b/rpm-rpmtdnext.patch
new file mode 100644 (file)
index 0000000..5b7d486
--- /dev/null
@@ -0,0 +1,12 @@
+--- rpm-5.4.15/lib/rpm46compat.h.rpmtdnext     2015-02-02 21:41:55.016116655 +0100
++++ rpm-5.4.15/lib/rpm46compat.h       2015-02-02 21:47:06.407763121 +0100
+@@ -223,6 +223,9 @@ static inline int headerGet_RPMorg(Heade
+       rflags &= ~HEADERGET_NOI18NSTRING;
+     rc = headerGet(h, (HE_t)he, rflags);
++    
++    /* XXX: Hack. headerGet() sets he->ix to 0 whereas rpmtdNext expects it to be -1 initially */
++    he->ix = -1;
+     return rc;
+ }
index b2f2a3f8cc17e66bd8cecb5605a849b35ddb9c8b..ea4df58f5250498b630863497d8f907e057305d6 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.15
-Release:       9
+Release:       10
 License:       LGPL v2.1
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
@@ -174,6 +174,7 @@ Patch84:    x32.patch
 Patch85:       rpm-CVE-2013-6435.patch
 Patch86:       rpm-CVE-2014-8118.patch
 Patch87:       %{name}-file-output-for-ELF.patch
+Patch88:       %{name}-rpmtdnext.patch
 
 # Patches imported from Mandriva
 
@@ -954,6 +955,7 @@ cd -
 %patch85 -p1
 %patch86 -p1
 %patch87 -p1
+%patch88 -p1
 
 %patch1000 -p1
 %patch1001 -p1
This page took 0.13135 seconds and 4 git commands to generate.