From 88ae7a2a118a1a3c5efa59857a4100533444c25a Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Mon, 18 Jan 2021 00:58:41 +0000 Subject: [PATCH 01/22] Spec file cleanup --- gzip.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gzip.spec b/gzip.spec index 963dd72..98dde7f 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,10 +1,10 @@ -Summary: The GNU data compression program +Summary: GNU data compression program Name: gzip Version: 1.10 Release: 3%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL -Source0: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz +Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz Source1: https://www.gnu.org/licenses/fdl-1.3.txt # downstream solution for coloured z*grep (#1034839) @@ -16,7 +16,7 @@ Patch2: gzexe.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 -URL: http://www.gzip.org/ +URL: https://www.gzip.org/ # Requires should not be added for gzip wrappers (eg. zdiff, zgrep, # zless) of another tools, because gzip "extends" the tools by its # wrappers much more than it "requires" them. @@ -57,7 +57,6 @@ make check #make gzip.info %install -rm -rf ${RPM_BUILD_ROOT} %makeinstall gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/gzip.info* @@ -65,7 +64,7 @@ gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/gzip.info* # we don't ship it, so let's remove it from ${RPM_BUILD_ROOT} rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir # uncompress is a part of ncompress package -rm -f ${RPM_BUILD_ROOT}/%{_bindir}/uncompress +rm -f ${RPM_BUILD_ROOT}%{_bindir}/uncompress # coloured z*grep (#1034839) %global profiledir %{_sysconfdir}/profile.d @@ -75,7 +74,6 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %files %doc NEWS README AUTHORS ChangeLog THANKS TODO -%{!?_licensedir:%global license %%doc} %license COPYING fdl-1.3.txt %{_bindir}/* %{_mandir}/*/* From de64edeca287ec7cb972a42eeb56313e6b824fbe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 07:28:07 +0000 Subject: [PATCH 02/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 91a7c28..e2669ab 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.10 -Release: 4%{?dist} +Release: 5%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -81,6 +81,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 1.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jan 26 2021 Fedora Release Engineering - 1.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 3ed6b7def3d3dff36e5ba9b520f4a7ecc9daf105 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 21 Oct 2021 16:49:45 +0200 Subject: [PATCH 03/22] Rebase to gzip 1.11 Resolves: rhbz#2001025 --- .gitignore | 1 + gzexe.patch | 75 ----------------------------------------------------- gzip.spec | 12 ++++++--- sources | 2 +- 4 files changed, 10 insertions(+), 80 deletions(-) delete mode 100644 gzexe.patch diff --git a/.gitignore b/.gitignore index 634ee42..8545301 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ gzip-1.4.tar.xz /gzip-1.8.tar.xz /gzip-1.9.tar.xz /gzip-1.10.tar.xz +/gzip-1.11.tar.xz diff --git a/gzexe.patch b/gzexe.patch deleted file mode 100644 index e48fa2d..0000000 --- a/gzexe.patch +++ /dev/null @@ -1,75 +0,0 @@ -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 e2669ab..361006c 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip -Version: 1.10 -Release: 5%{?dist} +Version: 1.11 +Release: 1%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -12,7 +12,6 @@ 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 @@ -41,7 +40,6 @@ very commonly used data compression program. %prep %setup -q #%patch1 -p1 -b .gnulib -%patch2 -p1 -b .gzexe cp %{SOURCE1} . autoreconf @@ -53,6 +51,7 @@ export CPP="%{__cpp}" export CXX="%{__cxx}" %configure make +%check make check #make gzip.info @@ -81,6 +80,11 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Oct 21 2021 Jakub Martisko - 1.11-1 +- Rebase to gzip 1.11 +- Run the tests in the check section instead of the build section +Resolve: rhbz#2001025 + * Thu Jul 22 2021 Fedora Release Engineering - 1.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 3b27769..824ab64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gzip-1.10.tar.xz) = e6ba9e3906cdb6a6235b213515093d02afa1722686f73eddacbacae628542b586b449829783b6a1701e9b9e0c4d4dfa6845904d3b6b010f5cf21aec4997c9299 +SHA512 (gzip-1.11.tar.xz) = af297c173297d588722f4d0f140a2ae4d3ea3861464191772fb2e11e47be43644b5ae01ed63f0051d6eb4751666284de53e14c4dd9f0c1d25f61cf676fbf11f3 From e8954127bb9853df6a6b5a73579794991e48b7c9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 12:10:32 +0000 Subject: [PATCH 04/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 361006c..31d2864 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.11 -Release: 1%{?dist} +Release: 2%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -80,6 +80,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 1.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Oct 21 2021 Jakub Martisko - 1.11-1 - Rebase to gzip 1.11 - Run the tests in the check section instead of the build section From 2f8bac725fc509abff5300c27215f9521f098c2a Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mon, 11 Apr 2022 15:13:21 +0200 Subject: [PATCH 05/22] Rebase to gzip 1.12 --- .gitignore | 1 + gzip.spec | 9 +++++++-- sources | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8545301..653a7cc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ gzip-1.4.tar.xz /gzip-1.9.tar.xz /gzip-1.10.tar.xz /gzip-1.11.tar.xz +/gzip-1.12.tar.xz diff --git a/gzip.spec b/gzip.spec index 31d2864..0c22ab4 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip -Version: 1.11 -Release: 2%{?dist} +Version: 1.12 +Release: 1%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -80,6 +80,11 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Mon Apr 11 2022 Jakub Martisko - 1.12-1 +- Rebase to gzip 1.12 +Resolves: rhbz#2073133 +Resolves: CVE-2022-1271 + * Thu Jan 20 2022 Fedora Release Engineering - 1.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 824ab64..3aad54d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gzip-1.11.tar.xz) = af297c173297d588722f4d0f140a2ae4d3ea3861464191772fb2e11e47be43644b5ae01ed63f0051d6eb4751666284de53e14c4dd9f0c1d25f61cf676fbf11f3 +SHA512 (gzip-1.12.tar.xz) = 116326fe991828227de150336a0c016f4fe932dfbb728a16b4a84965256d9929574a4f5cfaf3cf6bb4154972ef0d110f26ab472c93e62ec9a5fd7a5d65abea24 From 64c81e538d44f33e4c71403b05aa454eb276b3c6 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 14 Apr 2022 16:30:06 +0200 Subject: [PATCH 06/22] zgrep: fix an arbitrary-file-write vulnerability Resolves: CVE-2022-1271 --- cve-2022-1271-part1.patch | 43 ++++++++++++++++++++++ cve-2022-1271-part2.patch | 77 +++++++++++++++++++++++++++++++++++++++ cve-2022-1271-part3.patch | 46 +++++++++++++++++++++++ gzip.spec | 12 +++++- 4 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 cve-2022-1271-part1.patch create mode 100644 cve-2022-1271-part2.patch create mode 100644 cve-2022-1271-part3.patch diff --git a/cve-2022-1271-part1.patch b/cve-2022-1271-part1.patch new file mode 100644 index 0000000..2544012 --- /dev/null +++ b/cve-2022-1271-part1.patch @@ -0,0 +1,43 @@ +From dc9740df61e575e8c3148b7bd3c147a81ea00c7c Mon Sep 17 00:00:00 2001 +From: Lasse Collin +Date: Mon, 4 Apr 2022 23:52:49 -0700 +Subject: zgrep: avoid exploit via multi-newline file names + +* zgrep.in: The issue with the old code is that with multiple +newlines, the N-command will read the second line of input, +then the s-commands will be skipped because it's not the end +of the file yet, then a new sed cycle starts and the pattern +space is printed and emptied. So only the last line or two get +escaped. This patch makes sed read all lines into the pattern +space and then do the escaping. + +This vulnerability was discovered by: +cleemy desu wayo working with Trend Micro Zero Day Initiative +--- + zgrep.in | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/zgrep.in b/zgrep.in +index 345dae3..bdf7da2 100644 +--- a/zgrep.in ++++ b/zgrep.in +@@ -222,9 +222,13 @@ do + '* | *'&'* | *'\'* | *'|'*) + i=$(printf '%s\n' "$i" | + sed ' +- $!N +- $s/[&\|]/\\&/g +- $s/\n/\\n/g ++ :start ++ $!{ ++ N ++ b start ++ } ++ s/[&\|]/\\&/g ++ s/\n/\\n/g + ');; + esac + sed_script="s|^|$i:|" +-- +cgit v1.1 + diff --git a/cve-2022-1271-part2.patch b/cve-2022-1271-part2.patch new file mode 100644 index 0000000..fa7dc9b --- /dev/null +++ b/cve-2022-1271-part2.patch @@ -0,0 +1,77 @@ +From d74a30d45c6834c8e9f87115197370fe86656d81 Mon Sep 17 00:00:00 2001 +From: Jim Meyering +Date: Mon, 4 Apr 2022 23:52:49 -0700 +Subject: zgrep: add NEWS and tests for this exploitable bug + +* tests/zgrep-abuse: New file, based on PoC by cleemy desu wayo. +* tests/Makefile.am (TESTS): Add it. +* NEWS: Mention the exploit. +The bug appears to have been present since the beginning. +--- + tests/Makefile.am | 1 + + tests/zgrep-abuse | 41 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 45 insertions(+) + create mode 100755 tests/zgrep-abuse + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d09672e..5f148d6 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -36,6 +36,7 @@ TESTS = \ + z-suffix \ + zdiff \ + zgrep-f \ ++ zgrep-abuse \ + zgrep-context \ + zgrep-signal \ + znew-k +diff --git a/tests/zgrep-abuse b/tests/zgrep-abuse +new file mode 100755 +index 0000000..3e8a8f9 +--- /dev/null ++++ b/tests/zgrep-abuse +@@ -0,0 +1,41 @@ ++#!/bin/sh ++# Show how zgrep applied to a crafted file name may overwrite ++# a selected file with chosen content. Fixed in gzip-1.12. ++ ++# Copyright (C) 2022 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++# limit so don't run it by default. ++ ++. "${srcdir=.}/init.sh"; path_prepend_ .. ++ ++: > z || framework_failure_ ++echo test |gzip > 'z| ++p ++1s|.*|chosen-content| ++1w hacked ++etouch .\x2fhacked2 ++d ++# ++#' || framework_failure_ ++ ++fail=0 ++ ++zgrep test z* > /dev/null ++ ++# Before the fix, each of these would be created. ++test -f hacked && fail=1 ++test -f hacked2 && fail=1 ++ ++Exit $fail +-- +cgit v1.1 + diff --git a/cve-2022-1271-part3.patch b/cve-2022-1271-part3.patch new file mode 100644 index 0000000..3509464 --- /dev/null +++ b/cve-2022-1271-part3.patch @@ -0,0 +1,46 @@ +From c99f320d5c0fd98fe88d9cea5407eb7ad9d50e8a Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Mon, 4 Apr 2022 23:52:49 -0700 +Subject: zgrep: port to POSIX sed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* zgrep.in (res): When escaping the file name do not rely on GNU +sed’s extension to POSIX with respect to s/.../\n/. Instead, use +features that should also work with AIX and/or Solaris sed. This is +simpler anyway, and would have prevented the recently-fixed bug. +--- + zgrep.in | 15 ++++----------- + 1 file changed, 4 insertions(+), 11 deletions(-) + +diff --git a/zgrep.in b/zgrep.in +index bdf7da2..6a16dd1 100644 +--- a/zgrep.in ++++ b/zgrep.in +@@ -220,18 +220,11 @@ do + case $i in + (*' + '* | *'&'* | *'\'* | *'|'*) +- i=$(printf '%s\n' "$i" | +- sed ' +- :start +- $!{ +- N +- b start +- } +- s/[&\|]/\\&/g +- s/\n/\\n/g +- ');; ++ icolon=$(printf '%s\n' "$i:" | ++ sed -e 's/[&\|]/\\&/g' -e '$!s/$/\\/');; ++ (*) icolon="$i:";; + esac +- sed_script="s|^|$i:|" ++ sed_script="s|^|$icolon|" + + # Fail if grep or sed fails. + r=$( +-- +cgit v1.1 + diff --git a/gzip.spec b/gzip.spec index c632740..ff78a92 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: The GNU data compression program Name: gzip Version: 1.10 -Release: 4%{?dist} +Release: 5%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -13,6 +13,9 @@ Source101: colorzgrep.sh Patch1: gnulib.patch Patch2: gzexe.patch +Patch3: cve-2022-1271-part1.patch +Patch4: cve-2022-1271-part2.patch +Patch5: cve-2022-1271-part3.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 @@ -42,6 +45,9 @@ very commonly used data compression program. %setup -q #%patch1 -p1 -b .gnulib %patch2 -p1 -b .gzexe +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 cp %{SOURCE1} . autoreconf @@ -83,6 +89,10 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Wed Apr 13 2022 Jakub Martisko - 1.10-5 +- fix an arbitrary-file-write vulnerability in zgrep +Resolves: CVE-2022-1271 + * Tue Jan 26 2021 Fedora Release Engineering - 1.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From dc86972464e08aa2a8be10122dac999053487dc7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 13:27:31 +0000 Subject: [PATCH 07/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 0c22ab4..64131fa 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 1%{?dist} +Release: 2%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -80,6 +80,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Apr 11 2022 Jakub Martisko - 1.12-1 - Rebase to gzip 1.12 Resolves: rhbz#2073133 From 65fabc4c3c60416842e926618b4e9244d1d280fe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 11:57:50 +0000 Subject: [PATCH 08/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 64131fa..9ebd657 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 2%{?dist} +Release: 3%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -80,6 +80,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 1.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 06a2222faa84b8a13bd4b9541dad440b198c607d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 13 Apr 2023 14:36:38 +0200 Subject: [PATCH 09/22] migrate to SPDX license format --- gzip.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gzip.spec b/gzip.spec index 9ebd657..3c5c566 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,9 +1,9 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 3%{?dist} +Release: 4%{?dist} # info pages are under GFDL license -License: GPLv3+ and GFDL +License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz Source1: https://www.gnu.org/licenses/fdl-1.3.txt @@ -80,6 +80,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Apr 13 2023 Lukáš Zaoral - 1.12-4 +- migrate to SPDX license format + * Thu Jan 19 2023 Fedora Release Engineering - 1.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 1b5c09a0f2742df8330da02feb9d575ac8b35739 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Tue, 27 Jun 2023 17:15:15 +0200 Subject: [PATCH 10/22] initialize testsuite from /tests/gzip --- .fmf/version | 1 + plans/all.fmf | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/all.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/all.fmf b/plans/all.fmf new file mode 100644 index 0000000..d5b1643 --- /dev/null +++ b/plans/all.fmf @@ -0,0 +1,6 @@ +summary: Basic smoke test +discover: + how: fmf + url: https://src.fedoraproject.org/tests/gzip.git +execute: + how: tmt From 9a8ea3ff146926fda8e971e72aa681aefad83544 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 28 Jun 2023 09:33:10 +0200 Subject: [PATCH 11/22] Remove the tests folder Using the test suite from rhel instead --- tests/.gitignore | 2 -- tests/test-simple | 11 ----------- tests/test_simple.yml | 32 -------------------------------- tests/tests.yml | 1 - 4 files changed, 46 deletions(-) delete mode 100644 tests/.gitignore delete mode 100644 tests/test-simple delete mode 100644 tests/test_simple.yml delete mode 100644 tests/tests.yml diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index 8793994..0000000 --- a/tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.swp -*.retry diff --git a/tests/test-simple b/tests/test-simple deleted file mode 100644 index 278d622..0000000 --- a/tests/test-simple +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -ex - -# exercise installed gzip/gunzip programs -echo "Bla" > bla.file -cp bla.file bla.file.orig -gzip bla.file -gunzip bla.file.gz -cmp bla.file bla.file.orig -echo "hi" -rm bla.file bla.file.orig diff --git a/tests/test_simple.yml b/tests/test_simple.yml deleted file mode 100644 index 37fdd70..0000000 --- a/tests/test_simple.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- hosts: localhost - vars: - - artifacts: ./artifacts - tags: - - atomic - - classic - - container - remote_user: root - tasks: - - name: Create the folder where we will store the tests - action: file state=directory path={{ item }} - owner=root group=root - with_items: - - /usr/local/bin - - - name: Install the test files - copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }} - mode=0755 - with_items: - - {file: test-simple, dest: test-simple } - - - block: - - name: Execute the tests - shell: exec > /tmp/test.log && /usr/local/bin/test-simple 2>&1 - - - always: - - name: Pull out the logs - fetch: - dest: "{{ artifacts }}/" - src: "/tmp/test.log" - flat: yes diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 8a6aab3..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1 +0,0 @@ -- include: test_simple.yml From f90cc164955f6de92b6d8884c64cc5311bf8393e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 06:04:56 +0000 Subject: [PATCH 12/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 3c5c566..66ab5b7 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 4%{?dist} +Release: 5%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -80,6 +80,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 1.12-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Apr 13 2023 Lukáš Zaoral - 1.12-4 - migrate to SPDX license format From 6aab49deb09b9f279624f26693b20bb63d804258 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Wed, 2 Aug 2023 10:23:56 +0200 Subject: [PATCH 13/22] Enable the s390x optimizations Resolves: rhbz#2175699 --- gzip.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 66ab5b7..1066029 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 5%{?dist} +Release: 6%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -49,7 +49,12 @@ export CPPFLAGS="-DHAVE_LSTAT" export CC="%{__cc}" export CPP="%{__cpp}" export CXX="%{__cxx}" +%ifarch s390x +export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e" +%configure --enable-dfltcc +%else %configure +%endif make %check make check @@ -80,6 +85,10 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Wed Aug 02 2023 Jakub Martisko - 1.12-6 +- Enbale the s390x optimizations +Resolves: rhbz#2175699 + * Thu Jul 20 2023 Fedora Release Engineering - 1.12-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 893709343d1dbbb340277fd917c872f3a7c76c3e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 21:55:09 +0000 Subject: [PATCH 14/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 1066029..e9c83c5 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 6%{?dist} +Release: 7%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -85,6 +85,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 1.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Aug 02 2023 Jakub Martisko - 1.12-6 - Enbale the s390x optimizations Resolves: rhbz#2175699 From d37308f13235ab9db544257740db8e0a0cb9bd34 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 21:28:45 +0000 Subject: [PATCH 15/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index e9c83c5..df7212b 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.12 -Release: 7%{?dist} +Release: 8%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -85,6 +85,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 1.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 3407b65673d7248b71716005159a3b84051d8544 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 1 Feb 2024 11:17:39 +0100 Subject: [PATCH 16/22] Update to gzip-1.13 --- .gitignore | 1 + gzip.spec | 13 ++++++++++--- sources | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 653a7cc..d53c255 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ gzip-1.4.tar.xz /gzip-1.10.tar.xz /gzip-1.11.tar.xz /gzip-1.12.tar.xz +/gzip-1.13.tar.xz diff --git a/gzip.spec b/gzip.spec index df7212b..0573681 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip -Version: 1.12 -Release: 8%{?dist} +Version: 1.13 +Release: 1%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -50,7 +50,8 @@ export CC="%{__cc}" export CPP="%{__cpp}" export CXX="%{__cxx}" %ifarch s390x -export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e" +export CFLAGS="$RPM_OPT_FLAGS -Dalignas=_Alignas -DDFLTCC_LEVEL_MASK=0x7e" +#use this in the next realease after gzip 1.13 export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e" %configure --enable-dfltcc %else %configure @@ -85,6 +86,12 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Feb 01 2024 Jakub Martisko - 1.13-1 +- Rebase to gzip 1.13 +- There's a bug on s390x: https://lists.gnu.org/archive/html/bug-gzip/2023-10/msg00000.html +- Revert the s390x build options in the next release +Resolves: rhbz#2232890 + * Wed Jan 24 2024 Fedora Release Engineering - 1.12-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 3aad54d..5d79e70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gzip-1.12.tar.xz) = 116326fe991828227de150336a0c016f4fe932dfbb728a16b4a84965256d9929574a4f5cfaf3cf6bb4154972ef0d110f26ab472c93e62ec9a5fd7a5d65abea24 +SHA512 (gzip-1.13.tar.xz) = e3d4d4aa4b2e53fdad980620307257c91dfbbc40bcec9baa8d4e85e8327f55e2ece552c9baf209df7b66a07103ab92d4954ac53c86c57fbde5e1dd461143f94c From 25143454f9cdaf927fd52b442605e966c8976c4b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 09:03:01 +0000 Subject: [PATCH 17/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 0573681..1d55de7 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.13 -Release: 1%{?dist} +Release: 2%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -86,6 +86,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 1.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Feb 01 2024 Jakub Martisko - 1.13-1 - Rebase to gzip 1.13 - There's a bug on s390x: https://lists.gnu.org/archive/html/bug-gzip/2023-10/msg00000.html From 4285f8ea22845a13f46c845a064bf4aaaa72d85e Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Mon, 2 Dec 2024 15:55:27 +0100 Subject: [PATCH 18/22] Spec: minor cleanup (unused patch) --- gzip.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/gzip.spec b/gzip.spec index 1d55de7..7239246 100644 --- a/gzip.spec +++ b/gzip.spec @@ -11,7 +11,6 @@ Source1: https://www.gnu.org/licenses/fdl-1.3.txt Source100: colorzgrep.csh Source101: colorzgrep.sh -Patch1: gnulib.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 @@ -39,7 +38,6 @@ very commonly used data compression program. %prep %setup -q -#%patch1 -p1 -b .gnulib cp %{SOURCE1} . autoreconf From 04e0cd154d08617070c7de1f7b07ae2d4c3794b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 05:42:45 +0000 Subject: [PATCH 19/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index 7239246..aad6147 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.13 -Release: 2%{?dist} +Release: 3%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -84,6 +84,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 1.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 1.13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 5ba0f55bf5a1b664353550b5590f751837bc1011 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 16:52:47 +0000 Subject: [PATCH 20/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- gzip.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.spec b/gzip.spec index aad6147..26b18ca 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip Version: 1.13 -Release: 3%{?dist} +Release: 4%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -84,6 +84,9 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.13-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 1.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 61b4e3dd1e0a36d9e0f7ad477ac62752b6e454f6 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 14 Aug 2025 16:31:51 +0200 Subject: [PATCH 21/22] Rebase to gzip 1.14 - There are some issues when the s390x optimizations are turned on - the hufts test fails - This will need some further investigation, for the time, I've disabled the optimizations --- gzip.spec | 20 ++++++++++++++++---- s390_errno.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 s390_errno.patch diff --git a/gzip.spec b/gzip.spec index 26b18ca..3247385 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,7 +1,7 @@ Summary: GNU data compression program Name: gzip -Version: 1.13 -Release: 4%{?dist} +Version: 1.14 +Release: 1%{?dist} # info pages are under GFDL license License: GPL-3.0-or-later AND GFDL-1.3-only Source0: https://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz @@ -11,6 +11,7 @@ Source1: https://www.gnu.org/licenses/fdl-1.3.txt Source100: colorzgrep.csh Source101: colorzgrep.sh +Patch1: s390_errno.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 @@ -38,6 +39,8 @@ very commonly used data compression program. %prep %setup -q +%patch 1 -p1 + cp %{SOURCE1} . autoreconf @@ -48,9 +51,13 @@ export CC="%{__cc}" export CPP="%{__cpp}" export CXX="%{__cxx}" %ifarch s390x -export CFLAGS="$RPM_OPT_FLAGS -Dalignas=_Alignas -DDFLTCC_LEVEL_MASK=0x7e" + +#When the otpimizations are enabled, the huft test fails as of F44/gzip1.14 +#export CFLAGS="$RPM_OPT_FLAGS -Dalignas=_Alignas -DDFLTCC_LEVEL_MASK=0x7e" #use this in the next realease after gzip 1.13 export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e" -%configure --enable-dfltcc +#%configure --enable-dfltcc + +%configure %else %configure %endif @@ -84,6 +91,11 @@ install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir} %{profiledir}/* %changelog +* Thu Aug 14 2025 Jakub Martisko - 1.14-1 +- Rebase to gzip 1.14 +- There are some issues when the s390x optimizations are turned on - the hufts test fails +- This will need some further investigation, for the time, I've disabled the optimizations + * Thu Jul 24 2025 Fedora Release Engineering - 1.13-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/s390_errno.patch b/s390_errno.patch new file mode 100644 index 0000000..73ba47f --- /dev/null +++ b/s390_errno.patch @@ -0,0 +1,26 @@ +From c76affb4551630ff661ac1c1ee99353a17eb16e1 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Fri, 30 May 2025 12:31:04 -0700 +Subject: gzip: fix s390x build failure + +Problem reported by Jakub Martisko . +* dfltcc.c: Include errno.h. +--- + dfltcc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dfltcc.c b/dfltcc.c +index 9f86581..8307a97 100644 +--- a/dfltcc.c ++++ b/dfltcc.c +@@ -17,6 +17,7 @@ + + #include + ++#include + #include + + #ifdef HAVE_SYS_SDT_H +-- +cgit v1.2.3 + From 176a9b412f80c1d19b07f24133d044231645b5b2 Mon Sep 17 00:00:00 2001 From: Jakub Martisko Date: Thu, 14 Aug 2025 16:53:00 +0200 Subject: [PATCH 22/22] updated sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d53c255..ad68e32 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ gzip-1.4.tar.xz /gzip-1.11.tar.xz /gzip-1.12.tar.xz /gzip-1.13.tar.xz +/gzip-1.14.tar.xz diff --git a/sources b/sources index 5d79e70..6561239 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gzip-1.13.tar.xz) = e3d4d4aa4b2e53fdad980620307257c91dfbbc40bcec9baa8d4e85e8327f55e2ece552c9baf209df7b66a07103ab92d4954ac53c86c57fbde5e1dd461143f94c +SHA512 (gzip-1.14.tar.xz) = 82aef53188b3e69b51b7ddab5b8c44a11a5b73c0039b22a315a0c7d244694feab0146748add4265901eb1b4c0cee8a9eb69594995f098830d964091af97079c5