[packages/rpm] Fix rpm 4.6 compatibility mode. Release 10.

megabajt megabajt at pld-linux.org
Tue Feb 3 00:23:59 CET 2015


commit 1c02955fc82edcc932cfd1e90f21a012dd3dde0e
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Tue Feb 3 00:07:35 2015 +0100

    Fix rpm 4.6 compatibility mode. Release 10.
    
    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 | 12 ++++++++++++
 rpm.spec            |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index b2f2a3f..ea4df58 100644
--- 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
diff --git a/rpm-rpmtdnext.patch b/rpm-rpmtdnext.patch
new file mode 100644
index 0000000..5b7d486
--- /dev/null
+++ b/rpm-rpmtdnext.patch
@@ -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;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/1c02955fc82edcc932cfd1e90f21a012dd3dde0e



More information about the pld-cvs-commit mailing list