[packages/rpm] - file returns "XZ compressed data" for .xz archives, so let grep recognize it properly

baggins baggins at pld-linux.org
Tue Sep 18 23:51:55 CEST 2012


commit 96a34522f115a3e45ece4be18787f85fc59e1ae7
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Sep 18 23:50:53 2012 +0200

    - file returns "XZ compressed data" for .xz archives, so let grep
      recognize it properly

 rpm-file-magic-can-be-mixed-case.patch | 20 ++++++++++++++++++++
 rpm.spec                               |  2 ++
 2 files changed, 22 insertions(+)
---
diff --git a/rpm.spec b/rpm.spec
index b876446..3e10844 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -125,6 +125,7 @@ Patch45:	%{name}-pattern_Release.patch
 Patch46:	%{name}-fix-___build_pre-macro.patch
 Patch47:	%{name}-missing-patch-file-fails-build.patch
 Patch48:	%{name}-remove-misleading-missing-patch-message.patch
+Patch49:	%{name}-file-magic-can-be-mixed-case.patch
 
 # Patches imported from Mandriva
 
@@ -794,6 +795,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch46 -p1
 %patch47 -p1
 %patch48 -p1
+%patch49 -p1
 
 %patch1000 -p1
 %patch1001 -p1
diff --git a/rpm-file-magic-can-be-mixed-case.patch b/rpm-file-magic-can-be-mixed-case.patch
new file mode 100644
index 0000000..9536124
--- /dev/null
+++ b/rpm-file-magic-can-be-mixed-case.patch
@@ -0,0 +1,20 @@
+--- rpm-5.4.10/scripts/rpm2cpio~	2009-03-19 02:01:24.000000000 +0100
++++ rpm-5.4.10/scripts/rpm2cpio	2012-09-18 23:49:28.261438724 +0200
+@@ -25,13 +25,13 @@
+ EXTRACTOR="dd if=$pkg ibs=$o skip=1"
+ 
+ COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
+-if echo $COMPRESSION |grep -q gzip; then
++if echo $COMPRESSION |grep -qi gzip; then
+ 	DECOMPRESSOR=gunzip
+-elif echo $COMPRESSION |grep -q bzip2; then
++elif echo $COMPRESSION |grep -qi bzip2; then
+ 	DECOMPRESSOR=bunzip2
+-elif echo $COMPRESSION |grep -q xz; then
++elif echo $COMPRESSION |grep -qi xz; then
+ 	DECOMPRESSOR=unxz
+-elif echo $COMPRESSION |grep -q cpio; then
++elif echo $COMPRESSION |grep -qi cpio; then
+ 	DECOMPRESSOR=cat
+ else
+ 	# Most versions of file don't support LZMA, therefore we assume
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list