From f911255567692ea8f92ca429b236566883d07124ab482f17f5b60e43ed4398be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojtek=20Dziewi=C4=99cki?= Date: Thu, 31 Jan 2013 16:49:11 +0000 Subject: [PATCH] - Add support for xz and lzma (bnc#799561 - zgrep silently fails on LZMA compressed files) OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=22 --- gzip.changes | 6 ++++++ gzip.spec | 5 ++++- xz_lzma.patch | 30 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 xz_lzma.patch diff --git a/gzip.changes b/gzip.changes index 7a3136e..1ea413b 100644 --- a/gzip.changes +++ b/gzip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 29 12:28:39 UTC 2013 - vdziewiecki@suse.com + +- Add support for xz and lzma (bnc#799561 - zgrep silently fails on + LZMA compressed files) + ------------------------------------------------------------------- Tue Oct 16 10:48:48 UTC 2012 - vcizek@suse.com diff --git a/gzip.spec b/gzip.spec index 10769c6..7fcc4ff 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ # # spec file for package gzip # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ Patch2: zmore.diff Patch3: non-exec-stack.diff Patch4: http://rsync.samba.org/ftp/unpacked/rsync/patches/gzip-rsyncable.diff Patch6: zdiff.diff +# PATCH FIX OPENSUSE BNC#799561 - zgrep silently fails on LZMA compressed files +Patch7: xz_lzma.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -47,6 +49,7 @@ times. %patch3 %patch4 -p1 %patch6 +%patch7 -p1 %build CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer \ diff --git a/xz_lzma.patch b/xz_lzma.patch new file mode 100644 index 0000000..2170ffa --- /dev/null +++ b/xz_lzma.patch @@ -0,0 +1,30 @@ +Index: gzip-1.5/zgrep.1 +=================================================================== +--- gzip-1.5.orig/zgrep.1 ++++ gzip-1.5/zgrep.1 +@@ -10,7 +10,7 @@ zgrep \- search possibly compressed file + .I Zgrep + invokes + .I grep +-on compressed or gzipped files. ++on compressed, xz'ed, lzma'ed, bzip2'ed or gzipped files. + All options specified are passed directly to + .IR grep . + If no file is specified, then the standard input is decompressed +Index: gzip-1.5/zgrep.in +=================================================================== +--- gzip-1.5.orig/zgrep.in ++++ gzip-1.5/zgrep.in +@@ -178,6 +178,12 @@ do + *.bz2) + uncompress=bzip2 + ;; ++ *.xz) ++ uncompress=xz ++ ;; ++ *.lzma) ++ uncompress=lzma ++ ;; + *) + uncompress=gzip + ;;