Fix: wrong skip value in gzexe; enable make check
Related: 1690825
This commit is contained in:
parent
f1591ea411
commit
0cf888ad48
75
gzexe.patch
Normal file
75
gzexe.patch
Normal file
@ -0,0 +1,75 @@
|
||||
From 21cd963565a43dabd59516bd4cca5c76a614f255 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Martisko <jamartis@redhat.com>
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 <<EOF > 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
|
||||
|
14
gzip.spec
14
gzip.spec
@ -1,7 +1,7 @@
|
||||
Summary: The GNU data compression program
|
||||
Name: gzip
|
||||
Version: 1.9
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
# info pages are under GFDL license
|
||||
License: GPLv3+ and GFDL
|
||||
Source0: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz
|
||||
@ -12,6 +12,7 @@ Source100: colorzgrep.csh
|
||||
Source101: colorzgrep.sh
|
||||
|
||||
Patch1: gnulib.patch
|
||||
Patch2: gzexe.patch
|
||||
|
||||
# Fixed in upstream code.
|
||||
# http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378
|
||||
@ -20,7 +21,7 @@ URL: http://www.gzip.org/
|
||||
# zless) of another tools, because gzip "extends" the tools by its
|
||||
# wrappers much more than it "requires" them.
|
||||
Requires: coreutils
|
||||
BuildRequires: texinfo, gcc
|
||||
BuildRequires: texinfo, gcc, autoconf, automake, less
|
||||
Conflicts: filesystem < 3
|
||||
Provides: /bin/gunzip
|
||||
Provides: /bin/gzip
|
||||
@ -39,7 +40,9 @@ very commonly used data compression program.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .gnulib
|
||||
%patch2 -p1 -b .gzexe
|
||||
cp %{SOURCE1} .
|
||||
autoreconf
|
||||
|
||||
%build
|
||||
export DEFS="NO_ASM"
|
||||
@ -49,6 +52,7 @@ export CPP="%{__cpp}"
|
||||
export CXX="%{__cxx}"
|
||||
%configure
|
||||
make
|
||||
make check
|
||||
#make gzip.info
|
||||
|
||||
%install
|
||||
@ -78,6 +82,12 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir}
|
||||
%{profiledir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Mar 26 2019 Jakub Martisko <jamartis@redhat.com> - 1.9-9
|
||||
- Fix wrong skip size in gzexe
|
||||
- Add new test dealing with the ^^ (needs autoreconf)
|
||||
- Enable make check (needs less)
|
||||
Related: 1690825
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user