From f74b716c4e88f2b30e9e3d3ee00a5472d6902263 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 11 2020 06:11:11 +0000 Subject: import gzip-1.9-11.el8 --- diff --git a/SOURCES/dfltcc-segfault.patch b/SOURCES/dfltcc-segfault.patch new file mode 100644 index 0000000..95a9efd --- /dev/null +++ b/SOURCES/dfltcc-segfault.patch @@ -0,0 +1,67 @@ +--- + dfltcc.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/dfltcc.c b/dfltcc.c +index 86aa56e..3a5b92d 100644 +--- a/dfltcc.c ++++ b/dfltcc.c +@@ -242,10 +242,8 @@ dfltcc_gdht (struct dfltcc_param_v0 *param) + dfltcc (DFLTCC_GDHT, param, NULL, NULL, &next_in, &avail_in, NULL); + } + +-static off_t total_in; +- + static dfltcc_cc +-dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn) ++dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn, off_t *total_in) + { + uch *next_out = outbuf + outcnt; + size_t avail_out = OUTBUFSIZ - outcnt; +@@ -257,7 +255,7 @@ dfltcc_cmpr_xpnd (struct dfltcc_param_v0 *param, int fn) + window); + off_t consumed_in = next_in - (inbuf + inptr); + inptr += consumed_in; +- total_in += consumed_in; ++ *total_in += consumed_in; + outcnt += ((OUTBUFSIZ - outcnt) - avail_out); + return cc; + } +@@ -349,6 +347,7 @@ dfltcc_deflate (int pack_level) + + union aligned_dfltcc_param_v0 ctx_v0; + struct dfltcc_param_v0 *param = init_param (&ctx_v0); ++ off_t total_in = 0; + + /* Compress ifd into ofd in a loop. */ + while (true) +@@ -398,7 +397,8 @@ dfltcc_deflate (int pack_level) + } + + /* Compress inbuf into outbuf. */ +- while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR) == DFLTCC_CC_AGAIN) ++ while (dfltcc_cmpr_xpnd (param, DFLTCC_CMPR, &total_in) ++ == DFLTCC_CC_AGAIN) + ; + + /* Unmask the input data. */ +@@ -427,6 +427,7 @@ dfltcc_inflate (void) + + union aligned_dfltcc_param_v0 ctx_v0; + struct dfltcc_param_v0 *param = init_param (&ctx_v0); ++ off_t total_in = 0; + + /* Decompress ifd into ofd in a loop. */ + while (true) +@@ -446,7 +447,8 @@ dfltcc_inflate (void) + + /* Decompress inbuf into outbuf. */ + dfltcc_cc cc; +- while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND)) == DFLTCC_CC_AGAIN) ++ while ((cc = dfltcc_cmpr_xpnd (param, DFLTCC_XPND, &total_in)) ++ == DFLTCC_CC_AGAIN) + ; + if (cc == DFLTCC_CC_OK) + { +-- +2.25.4 diff --git a/SPECS/gzip.spec b/SPECS/gzip.spec index dadb12e..31194ef 100644 --- a/SPECS/gzip.spec +++ b/SPECS/gzip.spec @@ -1,7 +1,7 @@ Summary: The GNU data compression program Name: gzip Version: 1.9 -Release: 9%{?dist} +Release: 11%{?dist} # info pages are under GFDL license License: GPLv3+ and GFDL Group: Applications/File @@ -21,7 +21,7 @@ Patch4: ibm2.patch #Patch5: ibm3.patch # https://lists.gnu.org/archive/html/bug-gzip/2019-07/msg00000.html Patch6: ibm4.patch - +Patch7: dfltcc-segfault.patch # Fixed in upstream code. # http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/378 @@ -55,6 +55,7 @@ very commonly used data compression program. %patch4 -p1 -b .ibm2 #%patch5 -p1 -b .ibm3 %patch6 -p1 -b .ibm4 +%patch7 -p1 cp %{SOURCE1} . autoreconf @@ -66,7 +67,8 @@ export CPP="%{__cpp}" export CXX="%{__cxx}" %ifarch s390x -%configure --enable-dfltcc +export CFLAGS="$RPM_OPT_FLAGS -DDFLTCC_LEVEL_MASK=0x7e" +%configure --enable-dfltcc %else %configure %endif @@ -115,6 +117,14 @@ fi %{profiledir}/* %changelog +* Thu Oct 22 2020 Jakub Martisko - 1.9-11 +- Enable HW optimizations for modes 1-6 on s390x + Resolves: 1847436 + +* Thu Oct 22 2020 Jakub Martisko - 1.9-10 +- Fix a segfault on some s390x machines when compressing multiple files + Resolves: 1883204 + * Mon Jul 15 2019 Jakub Martisko - 1.9-9 - Another fix for the s390 patch Related: 1730332