From c76b6a7f0079d59637e75b226ed8b43b6bc705a0 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 9 May 2019 14:38:10 +0200 Subject: [PATCH] - support xz payload in rpm2cpio --- rpm-rpm2cpio-xz.patch | 15 +++++++++++++++ rpm.spec | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 rpm-rpm2cpio-xz.patch diff --git a/rpm-rpm2cpio-xz.patch b/rpm-rpm2cpio-xz.patch new file mode 100644 index 0000000..5731907 --- /dev/null +++ b/rpm-rpm2cpio-xz.patch @@ -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 ;; diff --git a/rpm.spec b/rpm.spec index f582a33..6bddf66 100644 --- 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 -- 2.46.0