From bd361cdcd34caa06d633dae613f23d69af4d417a Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 16 Aug 2022 19:48:20 +0200 Subject: [PATCH] - added ksh patch (compatibility with pre-mksh ksh-originated shells) --- xz-ksh.patch | 12 ++++++++++++ xz.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 xz-ksh.patch diff --git a/xz-ksh.patch b/xz-ksh.patch new file mode 100644 index 0000000..a53d7a9 --- /dev/null +++ b/xz-ksh.patch @@ -0,0 +1,12 @@ +Be graceful to some ksh-originated shells (only mksh >= 40b seems to have a fix for RH BZ#49691) +--- xz-5.2.6/src/scripts/xzgrep.in.orig 2022-08-12 12:48:29.000000000 +0200 ++++ xz-5.2.6/src/scripts/xzgrep.in 2022-08-16 19:01:35.106707142 +0200 +@@ -209,7 +209,7 @@ for i; do + # which prints "binary file matches" to stderr instead of stdout. + # + # If reading from stdin, let grep use whatever name it prefers for +- # stdin. With GNU grep it's a locale-specific translated string. ++ # stdin. With GNU grep it is a locale-specific translated string. + if test "x$i" = "x-"; then + eval "$grep -H" + else diff --git a/xz.spec b/xz.spec index 4fbdbbf..694ff90 100644 --- a/xz.spec +++ b/xz.spec @@ -26,6 +26,7 @@ Source0: https://tukaani.org/xz/%{name}-%{version}.tar.bz2 # Source0-md5: 2138d1c1ccd9cc4c972fd89cff0bb2b4 Patch0: %{name}-parallel.patch Patch1: %{name}-memlimit.patch +Patch2: %{name}-ksh.patch URL: https://tukaani.org/xz/ %{?with_asm:BuildRequires: gcc >= 5:3.4} BuildRequires: rpm >= 4.4.9-56 @@ -118,6 +119,7 @@ Biblioteka statyczna LZMA. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %configure \ @@ -129,6 +131,7 @@ Biblioteka statyczna LZMA. %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{/etc/env.d,/%{_lib}} + %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -- 2.44.0