[packages/rpm/dev-5.4.17] - enable extension-based-compression-detection in prep (rpm is misdetecting plain .tar as lzma) - re

qboosh qboosh at pld-linux.org
Thu Sep 13 17:24:58 CEST 2018


commit f25633723e26964d85da782bc33a019484e617e3
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Aug 19 13:43:07 2018 +0200

    - enable extension-based-compression-detection in prep (rpm is misdetecting plain .tar as lzma)
    - rel 0.13

 extension-based-compression-detection.patch | 29 +++++++++++++++++++++++++++++
 rpm.spec                                    |  4 +++-
 2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 7e14101..1684e85 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -58,7 +58,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	5.4.17
-Release:	0.12
+Release:	0.13
 License:	LGPL v2.1
 Group:		Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.17-0.20160512.src.rpm
@@ -188,6 +188,7 @@ Patch91:	py-disable-fetch.patch
 Patch92:	fast_python_deps.patch
 Patch93:	python2_explicit.patch
 Patch97:	glibc.patch
+Patch98:	extension-based-compression-detection.patch
 
 # Patches imported from Mandriva
 
@@ -1018,6 +1019,7 @@ cd -
 %patch92 -p1
 %patch93 -p1
 %patch97 -p1
+%patch98 -p1
 
 %patch1050 -p1
 
diff --git a/extension-based-compression-detection.patch b/extension-based-compression-detection.patch
new file mode 100644
index 0000000..112b161
--- /dev/null
+++ b/extension-based-compression-detection.patch
@@ -0,0 +1,29 @@
+--- rpm-5.4.15/rpmio/macro.c~	2018-08-19 13:11:28.000000000 +0200
++++ rpm-5.4.15/rpmio/macro.c	2018-08-19 13:18:39.102655981 +0200
+@@ -3122,7 +3122,7 @@
+     ssize_t nb;
+     int rc = -1;
+     unsigned char magic[13];
+-#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
++#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
+     size_t file_len;
+ #endif
+ 
+@@ -3139,7 +3139,7 @@
+ 	return 0;
+ #endif
+ 
+-#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
++#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
+     file_len = strlen(file);
+     if ((file_len > 4 && strcasecmp(file+file_len-4, ".tbz") == 0)
+      || (file_len > 4 && strcasecmp(file+file_len-4, ".bz2") == 0)) {
+@@ -3208,7 +3208,7 @@
+      &&	magic[2] == 'Z' && magic[3] == 'O')	/* lzop */
+ 	*compressed = COMPRESSED_LZOP;
+     else
+-#if !defined(RPM_VENDOR_OPENPKG) && !defined(RPM_VENDOR_FEDORA) && !defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
++#if !defined(RPM_VENDOR_OPENPKG) && !defined(RPM_VENDOR_FEDORA) && !defined(RPM_VENDOR_MANDRIVA) && !defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
+     /* XXX Ick, LZMA has no magic. See http://lkml.org/lkml/2005/6/13/285 */
+     if (magic[ 9] == (unsigned char) 0x00 && magic[10] == (unsigned char) 0x00 &&
+ 	magic[11] == (unsigned char) 0x00 && magic[12] == (unsigned char) 0x00)	/* lzmash */
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list