From b8d9c27b39365c766c8214427fc2fec023102a64 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mar 27 2019 12:55:49 +0000 Subject: Fix: wrong skip value in gzexe; enable make check Related: 1690825 --- diff --git a/gzexe.patch b/gzexe.patch new file mode 100644 index 0000000..e48fa2d --- /dev/null +++ b/gzexe.patch @@ -0,0 +1,75 @@ +From 21cd963565a43dabd59516bd4cca5c76a614f255 Mon Sep 17 00:00:00 2001 +From: Jakub Martisko +Date: Tue, 26 Mar 2019 12:29:30 +0100 +Subject: [PATCH] Fix: the value of the skip variable in the gzexe + +--- + gzexe.in | 4 ++-- + tests/Makefile.am | 1 + + tests/gzexe | 20 ++++++++++++++++++++ + 3 files changed, 23 insertions(+), 2 deletions(-) + create mode 100755 tests/gzexe + +diff --git a/gzexe.in b/gzexe.in +index 6c61183..cffa84e 100644 +--- a/gzexe.in ++++ b/gzexe.in +@@ -145,7 +145,7 @@ for i do + if test $decomp -eq 0; then + (cat <<'EOF' && + #!/bin/sh +-skip=44 ++skip=49 + + tab=' ' + nl=' +@@ -201,7 +201,7 @@ EOF + + else + # decompression +- skip=44 ++ skip=49 + skip_line=`sed -e 1d -e 2q "$file"` + case $skip_line in + skip=[0-9] | skip=[0-9][0-9] | skip=[0-9][0-9][0-9]) +diff --git a/tests/Makefile.am b/tests/Makefile.am +index ebdce5b..4dfbccf 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -15,6 +15,7 @@ + # along with this program. If not, see . + + TESTS = \ ++ gzexe \ + gzip-env \ + helin-segv \ + help-version \ +diff --git a/tests/gzexe b/tests/gzexe +new file mode 100755 +index 0000000..45f71c7 +--- /dev/null ++++ b/tests/gzexe +@@ -0,0 +1,20 @@ ++#!/bin/sh ++#Try running simple shell script compressed by gzexe ++ ++. "${srcdir=.}/init.sh"; path_prepend_ .. ++ ++cat < foo || framework_failure_ ++#!/bin/sh ++echo "Hello World!" ++EOF ++ ++echo "Hello World!" > exp || framework_failure_ ++ ++fail=0 ++gzexe foo || fail=1 ++/bin/sh foo > out 2> err || fail=1 ++ ++compare exp out || fail=1 ++test -s err && fail=1 ++ ++Exit $fail +-- +2.21.0 + diff --git a/gzip.spec b/gzip.spec index 3e46383..eeab795 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: The GNU data compression program Name: gzip Version: 1.9 -Release: 3%{?dist} +Release: 4%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Group: Applications/File @@ -12,6 +12,8 @@ Source1: https://www.gnu.org/licenses/fdl-1.3.txt Source100: colorzgrep.csh Source101: colorzgrep.sh +Patch2: gzexe.patch + # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 URL: http://www.gzip.org/ @@ -20,7 +22,7 @@ URL: http://www.gzip.org/ # wrappers much more than it "requires" them. Requires: /sbin/install-info Requires: coreutils -BuildRequires: texinfo +BuildRequires: texinfo, gcc, autoconf, automake, less Conflicts: filesystem < 3 Provides: /bin/gunzip Provides: /bin/gzip @@ -38,7 +40,9 @@ very commonly used data compression program. %prep %setup -q +%patch2 -p1 -b .gzexe cp %{SOURCE1} . +autoreconf %build export DEFS="NO_ASM" @@ -49,6 +53,7 @@ export CXX="%{__cxx}" %configure make +make check #make gzip.info %install @@ -91,6 +96,12 @@ fi %{profiledir}/* %changelog +* Tue Mar 26 2019 Jakub Martisko - 1.9-4 +- Fix wrong skip size in gzexe +- Add new test dealing with the ^^ (needs autoreconf) +- Enable make check (needs less) + Resolves: 1690825 + * Fri Feb 09 2018 Igor Gnatenko - 1.9-3 - Escape macros in %%changelog