]> TLD Linux GIT Repositories - packages/rpm.git/commitdiff
- support xz payload in rpm2cpio
authorMarcin Krol <hawk@tld-linux.org>
Thu, 9 May 2019 12:38:10 +0000 (14:38 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 9 May 2019 12:38:10 +0000 (14:38 +0200)
rpm-rpm2cpio-xz.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-rpm2cpio-xz.patch b/rpm-rpm2cpio-xz.patch
new file mode 100644 (file)
index 0000000..5731907
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ur rpm-4.5.orig/scripts/rpm2cpio rpm-4.5/scripts/rpm2cpio
+--- rpm-4.5.orig/scripts/rpm2cpio      2019-05-09 09:04:23.679000000 +0200
++++ rpm-4.5/scripts/rpm2cpio   2019-05-09 09:22:11.921000000 +0200
+@@ -27,9 +27,11 @@
+       | dd bs=3 count=1 2> /dev/null)
+ gz="$(echo -en '\037\0213')"
++xz="$(echo -en '\0375\0067\0172')"
+ case "$comp" in
+     BZh)      dd if="$pkg" ibs=$o skip=1 2>/dev/null | bunzip2 ;;
+     "$gz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;;
++    "$xz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | unxz ;;
+     # no magic in old lzma format, if unknown we assume that's lzma for now
+     *)        dd if="$pkg" ibs=$o skip=1 2>/dev/null | lzma -dc - ;;
+     #*)        echo "Unrecognized rpm file: $pkg"; return 1 ;;
index f582a336e5d8cd32b1d28f0446e4061d48cca7ee..6bddf669268fe312e3142b8b8bbd802e69174d52 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -42,7 +42,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       4.5
-Release:       85
+Release:       86
 License:       LGPL
 Group:         Base
 Source0:       %{name}-%{version}.tar.gz
@@ -176,6 +176,7 @@ Patch113:   %{name}-rubyprov.patch
 Patch114:      %{name}-ruby-gem-build.patch
 Patch115:      %{name}-glibc.patch
 Patch116:      %{name}-trigger-flags-int-type.patch
+Patch117:      %{name}-rpm2cpio-xz.patch
 URL:           http://rpm5.org/
 BuildRequires: autoconf >= 2.57
 BuildRequires: automake >= 1.4
@@ -819,6 +820,7 @@ install %{SOURCE13} scripts/perl.prov
 %patch114 -p1
 %patch115 -p1
 %patch116 -p1
+%patch117 -p1
 
 mv -f po/{sr,sr@Latn}.po
 rm -rf sqlite zlib popt