From 196d8170118fc5d5f380b7e18359cd846c0d864f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 17 Dec 2020 15:42:17 +0000 Subject: [PATCH 01/16] latest upstream (1.4.7) Also include fix for test failure on i686 and s390 https://github.com/facebook/zstd/pull/2432 --- .gitignore | 1 + alignment.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ lib-make.patch | 20 -------------------- pzstd.1.patch | 8 ++++---- sources | 2 +- zstd.spec | 10 ++++++---- 6 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 alignment.patch delete mode 100644 lib-make.patch diff --git a/.gitignore b/.gitignore index a3f7f64..29fccf5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /zstd-1.4.2.tar.gz /zstd-1.4.4.tar.gz /zstd-1.4.5.tar.gz +/zstd-1.4.7.tar.gz diff --git a/alignment.patch b/alignment.patch new file mode 100644 index 0000000..39f5137 --- /dev/null +++ b/alignment.patch @@ -0,0 +1,44 @@ +From ae85676d44baee3d12168a5c929347b3836f2cf2 Mon Sep 17 00:00:00 2001 +From: Nick Terrell +Date: Thu, 17 Dec 2020 14:27:53 -0800 +Subject: [PATCH] Fix alignment of scratchBuffer in HUF_compressWeights() + +The scratch buffer must be 4-byte aligned. This causes test failures in +32-bit systems, where the stack isn't aligned. + +Fixes Issue #2428. +--- + lib/common/fse.h | 5 +++-- + lib/compress/huf_compress.c | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/lib/common/fse.h b/lib/common/fse.h +index 83a07847a..dd5fc44e8 100644 +--- a/lib/common/fse.h ++++ b/lib/common/fse.h +@@ -335,9 +335,10 @@ size_t FSE_buildCTable_rle (FSE_CTable* ct, unsigned char symbolValue); + + /* FSE_buildCTable_wksp() : + * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). +- * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog)`. ++ * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`. + */ +-#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * (maxSymbolValue + 2) + (1ull << tableLog)) ++#define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (maxSymbolValue + 2 + (1ull << (tableLog - 2))) ++#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)) + size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); + + #define FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) (sizeof(short) * (maxSymbolValue + 1) + (1ULL << maxTableLog) + 8) +diff --git a/lib/compress/huf_compress.c b/lib/compress/huf_compress.c +index abbcc3192..00c593d7e 100644 +--- a/lib/compress/huf_compress.c ++++ b/lib/compress/huf_compress.c +@@ -69,7 +69,7 @@ static size_t HUF_compressWeights (void* dst, size_t dstSize, const void* weight + U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; + + FSE_CTable CTable[FSE_CTABLE_SIZE_U32(MAX_FSE_TABLELOG_FOR_HUFF_HEADER, HUF_TABLELOG_MAX)]; +- BYTE scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; ++ U32 scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; + + unsigned count[HUF_TABLELOG_MAX+1]; + S16 norm[HUF_TABLELOG_MAX+1]; diff --git a/lib-make.patch b/lib-make.patch deleted file mode 100644 index 2bbe9cf..0000000 --- a/lib-make.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur zstd-1.4.5.orig/lib/Makefile zstd-1.4.5/lib/Makefile ---- zstd-1.4.5.orig/lib/Makefile 2020-05-22 05:04:00.000000000 +0000 -+++ zstd-1.4.5/lib/Makefile 2020-05-25 14:11:28.947300726 +0000 -@@ -220,13 +220,14 @@ - .PHONY: lib - lib : libzstd.a libzstd - --.PHONY: lib-mt -+# note : do not define lib-mt or lib-release as .PHONY -+# make does not consider implicit pattern rule for .PHONY target -+ - %-mt : CPPFLAGS += -DZSTD_MULTITHREAD - %-mt : LDFLAGS += -pthread - %-mt : % - @echo multi-threading build completed - --.PHONY: lib-release - %-release : DEBUGFLAGS := - %-release : % - @echo release build completed diff --git a/pzstd.1.patch b/pzstd.1.patch index d6d0ee7..f86e8d8 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,7 +1,7 @@ -diff -Naur zstd-1.4.5.orig/programs/zstd.1 zstd-1.4.5/programs/zstd.1 ---- zstd-1.4.5.orig/programs/zstd.1 2020-05-22 05:04:00.000000000 +0000 -+++ zstd-1.4.5/programs/zstd.1 2020-05-22 13:01:37.443798417 +0000 -@@ -202,6 +202,14 @@ +diff -Naur zstd-1.4.7.orig/programs/zstd.1 zstd-1.4.7/programs/zstd.1 +--- zstd-1.4.7.orig/programs/zstd.1 2020-12-16 23:00:18.000000000 +0000 ++++ zstd-1.4.7/programs/zstd.1 2020-12-17 15:15:22.586152398 +0000 +@@ -208,6 +208,14 @@ . .IP "\(bu" 4 \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files diff --git a/sources b/sources index 0271367..111ae64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.5.tar.gz) = 417b813ade6c8436690bd9d6da34a9f87f50e7378752b72e63066befbee496392a4b72896fa56688d814f461871ab31d3c6637497ff2ed7a282d58513631a38b +SHA512 (zstd-1.4.7.tar.gz) = 43b2292e6518123bebfe0623ec8d7f832850ad1f4fd5b845328665330dd104574a27debd5530c204bf44d0d36737b3e57e07097e5ac6e8bb3bae4e9eeb0f2e0c diff --git a/zstd.spec b/zstd.spec index 24159a8..22c5c13 100644 --- a/zstd.spec +++ b/zstd.spec @@ -12,8 +12,8 @@ %endif Name: zstd -Version: 1.4.5 -Release: 3%{?dist} +Version: 1.4.7 +Release: 1%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -21,7 +21,7 @@ URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: pzstd.1.patch -Patch2: lib-make.patch +Patch2: alignment.patch BuildRequires: gcc gtest-devel %if %{with pzstd} @@ -111,7 +111,6 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %license COPYING LICENSE %files -n lib%{name}-devel -%{_includedir}/zbuff.h %{_includedir}/zdict.h %{_includedir}/zstd.h %{_includedir}/zstd_errors.h @@ -124,6 +123,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Thu Dec 17 2020 Pádraig Brady - 1.4.7-1 +- Latest upstream + * Mon May 25 2020 Pádraig Brady - 1.4.5-3 - Build shared library with correct compiler flags From 66c011b413857fdd6a9cf320c285c1302bb20992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 5 Mar 2021 12:53:58 +0000 Subject: [PATCH 02/16] latest upstream (1.4.9) --- .gitignore | 1 + alignment.patch | 44 -------------------------------------------- sources | 2 +- zstd.spec | 7 ++++--- 4 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 alignment.patch diff --git a/.gitignore b/.gitignore index 29fccf5..219786f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /zstd-1.4.4.tar.gz /zstd-1.4.5.tar.gz /zstd-1.4.7.tar.gz +/zstd-1.4.9.tar.gz diff --git a/alignment.patch b/alignment.patch deleted file mode 100644 index 39f5137..0000000 --- a/alignment.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ae85676d44baee3d12168a5c929347b3836f2cf2 Mon Sep 17 00:00:00 2001 -From: Nick Terrell -Date: Thu, 17 Dec 2020 14:27:53 -0800 -Subject: [PATCH] Fix alignment of scratchBuffer in HUF_compressWeights() - -The scratch buffer must be 4-byte aligned. This causes test failures in -32-bit systems, where the stack isn't aligned. - -Fixes Issue #2428. ---- - lib/common/fse.h | 5 +++-- - lib/compress/huf_compress.c | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/lib/common/fse.h b/lib/common/fse.h -index 83a07847a..dd5fc44e8 100644 ---- a/lib/common/fse.h -+++ b/lib/common/fse.h -@@ -335,9 +335,10 @@ size_t FSE_buildCTable_rle (FSE_CTable* ct, unsigned char symbolValue); - - /* FSE_buildCTable_wksp() : - * Same as FSE_buildCTable(), but using an externally allocated scratch buffer (`workSpace`). -- * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog)`. -+ * `wkspSize` must be >= `FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)` of `unsigned`. - */ --#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * (maxSymbolValue + 2) + (1ull << tableLog)) -+#define FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog) (maxSymbolValue + 2 + (1ull << (tableLog - 2))) -+#define FSE_BUILD_CTABLE_WORKSPACE_SIZE(maxSymbolValue, tableLog) (sizeof(unsigned) * FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(maxSymbolValue, tableLog)) - size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize); - - #define FSE_BUILD_DTABLE_WKSP_SIZE(maxTableLog, maxSymbolValue) (sizeof(short) * (maxSymbolValue + 1) + (1ULL << maxTableLog) + 8) -diff --git a/lib/compress/huf_compress.c b/lib/compress/huf_compress.c -index abbcc3192..00c593d7e 100644 ---- a/lib/compress/huf_compress.c -+++ b/lib/compress/huf_compress.c -@@ -69,7 +69,7 @@ static size_t HUF_compressWeights (void* dst, size_t dstSize, const void* weight - U32 tableLog = MAX_FSE_TABLELOG_FOR_HUFF_HEADER; - - FSE_CTable CTable[FSE_CTABLE_SIZE_U32(MAX_FSE_TABLELOG_FOR_HUFF_HEADER, HUF_TABLELOG_MAX)]; -- BYTE scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; -+ U32 scratchBuffer[FSE_BUILD_CTABLE_WORKSPACE_SIZE_U32(HUF_TABLELOG_MAX, MAX_FSE_TABLELOG_FOR_HUFF_HEADER)]; - - unsigned count[HUF_TABLELOG_MAX+1]; - S16 norm[HUF_TABLELOG_MAX+1]; diff --git a/sources b/sources index 111ae64..5aa4a51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.7.tar.gz) = 43b2292e6518123bebfe0623ec8d7f832850ad1f4fd5b845328665330dd104574a27debd5530c204bf44d0d36737b3e57e07097e5ac6e8bb3bae4e9eeb0f2e0c +SHA512 (zstd-1.4.9.tar.gz) = 10d325c844be43f801c798158c6f1d1ab57401abf1e783e04f6b9e4ac0ba53cf487204fa3244370b1ade239d5f3a784bf1829e206c4ba61fdd9c2f4e9502b238 diff --git a/zstd.spec b/zstd.spec index 22c5c13..f50a255 100644 --- a/zstd.spec +++ b/zstd.spec @@ -12,7 +12,7 @@ %endif Name: zstd -Version: 1.4.7 +Version: 1.4.9 Release: 1%{?dist} Summary: Zstd compression library @@ -21,7 +21,6 @@ URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: pzstd.1.patch -Patch2: alignment.patch BuildRequires: gcc gtest-devel %if %{with pzstd} @@ -58,7 +57,6 @@ find -name .gitignore -delete %if %{with pzstd} %patch1 -p1 %endif -%patch2 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -123,6 +121,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Fri Mar 05 2021 Pádraig Brady - 1.4.9-1 +- Latest upstream + * Thu Dec 17 2020 Pádraig Brady - 1.4.7-1 - Latest upstream From bd5bfb5d255e56373e9567722edcc5225cd914ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun, 16 May 2021 17:59:19 +0100 Subject: [PATCH 03/16] latest upstream (1.5.0) --- .gitignore | 1 + sources | 2 +- zstd.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 219786f..2f51990 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /zstd-1.4.5.tar.gz /zstd-1.4.7.tar.gz /zstd-1.4.9.tar.gz +/zstd-1.5.0.tar.gz diff --git a/sources b/sources index 5aa4a51..c2fe8e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.9.tar.gz) = 10d325c844be43f801c798158c6f1d1ab57401abf1e783e04f6b9e4ac0ba53cf487204fa3244370b1ade239d5f3a784bf1829e206c4ba61fdd9c2f4e9502b238 +SHA512 (zstd-1.5.0.tar.gz) = b322fc1b89a556827b7fece2fb0f34c83bf65bb85b2468c791d6d9178a65c81e21f4171b7533cbf12bc1dfb2fd323d3e8c34d86167b157645c27f65186eec659 diff --git a/zstd.spec b/zstd.spec index f50a255..efe36dc 100644 --- a/zstd.spec +++ b/zstd.spec @@ -12,7 +12,7 @@ %endif Name: zstd -Version: 1.4.9 +Version: 1.5.0 Release: 1%{?dist} Summary: Zstd compression library @@ -121,6 +121,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Sun May 16 2021 Pádraig Brady - 1.5.0-1 +- Latest upstream + * Fri Mar 05 2021 Pádraig Brady - 1.4.9-1 - Latest upstream From f9fafbbc383160225331fe762751d756946218bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 23 Dec 2021 00:21:18 +0000 Subject: [PATCH 04/16] latest upstream (1.5.1) --- .gitignore | 1 + pzstd.1.patch | 16 ++++++++-------- sources | 2 +- zstd.spec | 5 ++++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 2f51990..9a46aab 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /zstd-1.4.7.tar.gz /zstd-1.4.9.tar.gz /zstd-1.5.0.tar.gz +/zstd-1.5.1.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index f86e8d8..d4e3a1f 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,9 +1,9 @@ -diff -Naur zstd-1.4.7.orig/programs/zstd.1 zstd-1.4.7/programs/zstd.1 ---- zstd-1.4.7.orig/programs/zstd.1 2020-12-16 23:00:18.000000000 +0000 -+++ zstd-1.4.7/programs/zstd.1 2020-12-17 15:15:22.586152398 +0000 -@@ -208,6 +208,14 @@ - . - .IP "\(bu" 4 +diff -Naur zstd-1.5.1.orig/programs/zstd.1 zstd-1.5.1/programs/zstd.1 +--- zstd-1.5.1.orig/programs/zstd.1 2021-12-20 22:49:18.000000000 +0000 ++++ zstd-1.5.1/programs/zstd.1 2021-12-22 16:49:17.160850340 +0000 +@@ -146,6 +146,14 @@ + \fB\-\-show\-default\-cparams\fR: Shows the default compression parameters that will be used for a particular src file\. If the provided src file is not a regular file (eg\. named pipe), the cli will just output the default parameters\. That is, the parameters that are used when the src size is unknown\. + .IP "\[ci]" 4 \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files + +.SH Parallel Zstd OPTIONS @@ -13,6 +13,6 @@ diff -Naur zstd-1.4.7.orig/programs/zstd.1 zstd-1.4.7/programs/zstd.1 + number of threads to use for (de)compression (default:4) + + - . .IP "" 0 - . + .SS "Restricted usage of Environment Variables" + Using environment variables to set parameters has security implications\. Therefore, this avenue is intentionally restricted\. Only \fBZSTD_CLEVEL\fR and \fBZSTD_NBTHREADS\fR are currently supported\. They set the compression level and number of threads to use during compression, respectively\. diff --git a/sources b/sources index c2fe8e6..8d53d3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.0.tar.gz) = b322fc1b89a556827b7fece2fb0f34c83bf65bb85b2468c791d6d9178a65c81e21f4171b7533cbf12bc1dfb2fd323d3e8c34d86167b157645c27f65186eec659 +SHA512 (zstd-1.5.1.tar.gz) = 00c7f5f6f6a2b51557f3ede56026d54d8e023c85f9824496f4522524ce8ced495e88d56452e3510df6ec1bf53e659b2633cdcc84d016bcdbfdcc76e142d3620f diff --git a/zstd.spec b/zstd.spec index efe36dc..706be07 100644 --- a/zstd.spec +++ b/zstd.spec @@ -12,7 +12,7 @@ %endif Name: zstd -Version: 1.5.0 +Version: 1.5.1 Release: 1%{?dist} Summary: Zstd compression library @@ -121,6 +121,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Wed Dec 22 2021 Pádraig Brady - 1.5.1-1 +- Latest upstream + * Sun May 16 2021 Pádraig Brady - 1.5.0-1 - Latest upstream From 1da1913cc1eb7a4aedcba5060d881312a13b4aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 28 Dec 2021 17:37:11 +0100 Subject: [PATCH 05/16] Disable amd64 assembly on non-intel architectures All builds would include an .S file which contains a pre-processor directive that makes the file effectively empty on non-amd64 architectures. Objects built from assembly get an executable stack by default. The file has a stanza to make the stack non-executable, but on non-amd64 architectures this stanza is skipped together with the rest of the file. Nevertheless, it seems that even the empty file causes an executable stack to be created. To avoid the issue, do a build with the assembler file explicitly skipped. --- zstd.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index 706be07..7ee8fc6 100644 --- a/zstd.spec +++ b/zstd.spec @@ -4,10 +4,12 @@ %else %ifarch %{ix86} x86_64 %bcond_without pzstd +%bcond_without asm %else # aarch64 and armv7hl at least currently segfault # in ThreadPool test for the pzstd util %bcond_with pzstd +%bcond_with asm %endif %endif @@ -26,6 +28,7 @@ BuildRequires: gcc gtest-devel %if %{with pzstd} BuildRequires: gcc-c++ %endif +BuildRequires: execstack %description Zstd, short for Zstandard, is a fast lossless compression algorithm, @@ -62,14 +65,16 @@ find -name .gitignore -delete export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" for dir in lib programs; do - %make_build -C "$dir" + %make_build -C "$dir" %{!?with_asm:ZSTD_NO_ASM=1} done %if %{with pzstd} export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" -%make_build -C contrib/pzstd +%make_build -C contrib/pzstd %{!?with_asm:ZSTD_NO_ASM=1} %endif %check +execstack lib/libzstd.so.1 + export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" make -C tests test-zstd @@ -121,6 +126,10 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek - 1.5.1-1 +- Disable amd64 assembly on non-intel architectures (#2035802): + this should avoid the issue where an executable stack is created. + * Wed Dec 22 2021 Pádraig Brady - 1.5.1-1 - Latest upstream From 25138c24231ea4a704ddab6383c37e1b1535e6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 28 Dec 2021 17:39:12 +0100 Subject: [PATCH 06/16] Bump release --- zstd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index 7ee8fc6..a3c2fbc 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,7 +15,7 @@ Name: zstd Version: 1.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -126,7 +126,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog -* Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek - 1.5.1-1 +* Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek - 1.5.1-2 - Disable amd64 assembly on non-intel architectures (#2035802): this should avoid the issue where an executable stack is created. From 8cf83587426460bcfe226ed31c1f3fe2e5b8cd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 29 Dec 2021 02:55:53 +0000 Subject: [PATCH 07/16] use prelink rather than execstack required on <= f22 (even though execstack package available in epel) --- zstd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zstd.spec b/zstd.spec index a3c2fbc..6fd0891 100644 --- a/zstd.spec +++ b/zstd.spec @@ -28,7 +28,7 @@ BuildRequires: gcc gtest-devel %if %{with pzstd} BuildRequires: gcc-c++ %endif -BuildRequires: execstack +BuildRequires: prelink %description Zstd, short for Zstandard, is a fast lossless compression algorithm, From 57da3a54e2dc9902bee221c86c1143eb321aa9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 29 Dec 2021 21:06:39 +0000 Subject: [PATCH 08/16] avoid executable stack on i686 also --- zstd.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zstd.spec b/zstd.spec index 6fd0891..137cdee 100644 --- a/zstd.spec +++ b/zstd.spec @@ -4,18 +4,25 @@ %else %ifarch %{ix86} x86_64 %bcond_without pzstd -%bcond_without asm %else # aarch64 and armv7hl at least currently segfault # in ThreadPool test for the pzstd util %bcond_with pzstd -%bcond_with asm %endif %endif +%ifarch x86_64 +%bcond_without asm +%else +# Disable asm to ensure non excutable stack +# used on archs where asm not actually used +# https://github.com/facebook/zstd/issues/2963 +%bcond_with asm +%endif + Name: zstd Version: 1.5.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -126,6 +133,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Wed Dec 29 2021 Pádraig Brady - 1.5.1-3 +- Avoid executable stack on i686 also. + * Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek - 1.5.1-2 - Disable amd64 assembly on non-intel architectures (#2035802): this should avoid the issue where an executable stack is created. From 97ac0835588048f08b3fbbc73d6f1716ceeab0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 29 Dec 2021 23:54:06 +0000 Subject: [PATCH 09/16] remove informational execstack call prelink or execstack packages are not generally available. prelink seems missing on ppc64le at least. --- zstd.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/zstd.spec b/zstd.spec index 137cdee..b1dd4c8 100644 --- a/zstd.spec +++ b/zstd.spec @@ -35,7 +35,6 @@ BuildRequires: gcc gtest-devel %if %{with pzstd} BuildRequires: gcc-c++ %endif -BuildRequires: prelink %description Zstd, short for Zstandard, is a fast lossless compression algorithm, @@ -80,8 +79,6 @@ export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" %endif %check -execstack lib/libzstd.so.1 - export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" make -C tests test-zstd From baf5c1f41afb3240d028a0ea84cf6d67b102982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 3 Jan 2022 16:05:48 +0000 Subject: [PATCH 10/16] fix prefix in generated pkgconfig file This is now generated at build, rather than install time Addresses https://bugzilla.redhat.com/2036667 --- zstd.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zstd.spec b/zstd.spec index b1dd4c8..e406d3c 100644 --- a/zstd.spec +++ b/zstd.spec @@ -22,7 +22,7 @@ Name: zstd Version: 1.5.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -70,6 +70,8 @@ find -name .gitignore -delete %build export CFLAGS="$RPM_OPT_FLAGS" export LDFLAGS="$RPM_LD_FLAGS" +export PREFIX="%{_prefix}" +export LIBDIR="%{_libdir}" for dir in lib programs; do %make_build -C "$dir" %{!?with_asm:ZSTD_NO_ASM=1} done @@ -130,6 +132,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Mon Jan 03 2022 Pádraig Brady - 1.5.1-4 +- Use correct prefix for pkgconfig. + * Wed Dec 29 2021 Pádraig Brady - 1.5.1-3 - Avoid executable stack on i686 also. From ab7f0275c7bfe66081b592c781c9c45a2fc7dd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 22 Jan 2022 16:22:20 +0000 Subject: [PATCH 11/16] latest upstream (1.5.2) --- .gitignore | 1 + pzstd.1.patch | 17 ++++++++--------- sources | 2 +- zstd.spec | 15 ++++++--------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 9a46aab..f474108 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /zstd-1.4.9.tar.gz /zstd-1.5.0.tar.gz /zstd-1.5.1.tar.gz +/zstd-1.5.2.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index d4e3a1f..30243d4 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,9 +1,9 @@ -diff -Naur zstd-1.5.1.orig/programs/zstd.1 zstd-1.5.1/programs/zstd.1 ---- zstd-1.5.1.orig/programs/zstd.1 2021-12-20 22:49:18.000000000 +0000 -+++ zstd-1.5.1/programs/zstd.1 2021-12-22 16:49:17.160850340 +0000 -@@ -146,6 +146,14 @@ - \fB\-\-show\-default\-cparams\fR: Shows the default compression parameters that will be used for a particular src file\. If the provided src file is not a regular file (eg\. named pipe), the cli will just output the default parameters\. That is, the parameters that are used when the src size is unknown\. - .IP "\[ci]" 4 +diff -Naur zstd-1.5.2.orig/programs/zstd.1 zstd-1.5.2/programs/zstd.1 +--- zstd-1.5.2.orig/programs/zstd.1 2022-01-20 21:17:18.000000000 +0000 ++++ zstd-1.5.2/programs/zstd.1 2022-01-22 17:40:54.130314058 +0000 +@@ -214,6 +214,13 @@ + . + .IP "\(bu" 4 \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files + +.SH Parallel Zstd OPTIONS @@ -12,7 +12,6 @@ diff -Naur zstd-1.5.1.orig/programs/zstd.1 zstd-1.5.1/programs/zstd.1 +.BR \-p ", " --processes + number of threads to use for (de)compression (default:4) + -+ + . .IP "" 0 - .SS "Restricted usage of Environment Variables" - Using environment variables to set parameters has security implications\. Therefore, this avenue is intentionally restricted\. Only \fBZSTD_CLEVEL\fR and \fBZSTD_NBTHREADS\fR are currently supported\. They set the compression level and number of threads to use during compression, respectively\. + . diff --git a/sources b/sources index 8d53d3a..964fe72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.1.tar.gz) = 00c7f5f6f6a2b51557f3ede56026d54d8e023c85f9824496f4522524ce8ced495e88d56452e3510df6ec1bf53e659b2633cdcc84d016bcdbfdcc76e142d3620f +SHA512 (zstd-1.5.2.tar.gz) = 96dbd2eb6623e3564a0fd36489b61bc3cb27758a584fdc9f064f3985d2e8b5605d7022890d00a6d15464d3cd0707d7e75d8cf6210323782d0af406b90a6d6784 diff --git a/zstd.spec b/zstd.spec index e406d3c..9b829c7 100644 --- a/zstd.spec +++ b/zstd.spec @@ -11,18 +11,12 @@ %endif %endif -%ifarch x86_64 +# Support disabling ASM implementations %bcond_without asm -%else -# Disable asm to ensure non excutable stack -# used on archs where asm not actually used -# https://github.com/facebook/zstd/issues/2963 -%bcond_with asm -%endif Name: zstd -Version: 1.5.1 -Release: 4%{?dist} +Version: 1.5.2 +Release: 1%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -132,6 +126,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Sat Jan 22 2022 Pádraig Brady - 1.5.2-1 +- Latest upstream + * Mon Jan 03 2022 Pádraig Brady - 1.5.1-4 - Use correct prefix for pkgconfig. From eb0f7b0f31e54d1a663318d28094ba62d879bce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 13 Feb 2023 12:41:06 +0000 Subject: [PATCH 12/16] latest upstream (1.5.4) --- .gitignore | 1 + pzstd.1.patch | 16 ++++++++-------- sources | 2 +- zstd.spec | 5 ++++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f474108..ed3ca1e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /zstd-1.5.0.tar.gz /zstd-1.5.1.tar.gz /zstd-1.5.2.tar.gz +/zstd-1.5.4.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index 30243d4..e6016c7 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,9 +1,9 @@ -diff -Naur zstd-1.5.2.orig/programs/zstd.1 zstd-1.5.2/programs/zstd.1 ---- zstd-1.5.2.orig/programs/zstd.1 2022-01-20 21:17:18.000000000 +0000 -+++ zstd-1.5.2/programs/zstd.1 2022-01-22 17:40:54.130314058 +0000 -@@ -214,6 +214,13 @@ - . - .IP "\(bu" 4 +diff -Naur zstd-1.5.4/programs/zstd.1 zstd-1.5.4.new/programs/zstd.1 +--- zstd-1.5.4/programs/zstd.1 2023-02-10 00:41:50.000000000 +0000 ++++ zstd-1.5.4.new/programs/zstd.1 2023-02-13 12:44:01.575160149 +0000 +@@ -162,6 +162,13 @@ + \fB\-\-show\-default\-cparams\fR: shows the default compression parameters that will be used for a particular input file, based on the provided compression level and the input size\. If the provided file is not a regular file (e\.g\. a pipe), this flag will output the parameters used for inputs of unknown size\. + .IP "\[ci]" 4 \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files + +.SH Parallel Zstd OPTIONS @@ -12,6 +12,6 @@ diff -Naur zstd-1.5.2.orig/programs/zstd.1 zstd-1.5.2/programs/zstd.1 +.BR \-p ", " --processes + number of threads to use for (de)compression (default:4) + - . .IP "" 0 - . + .SS "gzip Operation Modifiers" + When invoked via a \fBgzip\fR symlink, \fBzstd\fR will support further options that intend to mimic the \fBgzip\fR behavior: diff --git a/sources b/sources index 964fe72..1350cae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.2.tar.gz) = 96dbd2eb6623e3564a0fd36489b61bc3cb27758a584fdc9f064f3985d2e8b5605d7022890d00a6d15464d3cd0707d7e75d8cf6210323782d0af406b90a6d6784 +SHA512 (zstd-1.5.4.tar.gz) = 2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394 diff --git a/zstd.spec b/zstd.spec index 9b829c7..6160468 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,7 +15,7 @@ %bcond_without asm Name: zstd -Version: 1.5.2 +Version: 1.5.4 Release: 1%{?dist} Summary: Zstd compression library @@ -126,6 +126,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Mon Feb 13 2023 Pádraig Brady - 1.5.4-1 +- Latest upstream + * Sat Jan 22 2022 Pádraig Brady - 1.5.2-1 - Latest upstream From 4340c9dc17236f248486f2fba404a2e44fe1d709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 5 Apr 2023 13:24:11 +0100 Subject: [PATCH 13/16] latest upstream (1.5.5) --- .gitignore | 1 + sources | 2 +- zstd.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ed3ca1e..dfa152b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /zstd-1.5.1.tar.gz /zstd-1.5.2.tar.gz /zstd-1.5.4.tar.gz +/zstd-1.5.5.tar.gz diff --git a/sources b/sources index 1350cae..076932c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.4.tar.gz) = 2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394 +SHA512 (zstd-1.5.5.tar.gz) = 99109ec0e07fa65c2101c9cb36be56b672bbd0ee69d265f924718e61f9192ae8385c8d9e4d0c318be9edfa6d849fd3d60e5f164fa120961449429ea3c5dab6b6 diff --git a/zstd.spec b/zstd.spec index 6160468..1521aa7 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,7 +15,7 @@ %bcond_without asm Name: zstd -Version: 1.5.4 +Version: 1.5.5 Release: 1%{?dist} Summary: Zstd compression library @@ -126,6 +126,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Wed Apr 05 2023 Pádraig Brady - 1.5.5-1 +- Latest upstream + * Mon Feb 13 2023 Pádraig Brady - 1.5.4-1 - Latest upstream From 25f1667fec4ee0ffd3d1dfa04324fe00f68c4478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 29 Mar 2024 11:40:02 +0000 Subject: [PATCH 14/16] latest upstream (1.5.6) Also remove the pzstd patch to the man page as zstd has inbuilt parallelism support now (and associated options). --- .gitignore | 1 + pzstd.1.patch | 17 ----------------- sources | 2 +- zstd.spec | 10 ++++------ 4 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 pzstd.1.patch diff --git a/.gitignore b/.gitignore index dfa152b..a140781 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /zstd-1.5.2.tar.gz /zstd-1.5.4.tar.gz /zstd-1.5.5.tar.gz +/zstd-1.5.6.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch deleted file mode 100644 index e6016c7..0000000 --- a/pzstd.1.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur zstd-1.5.4/programs/zstd.1 zstd-1.5.4.new/programs/zstd.1 ---- zstd-1.5.4/programs/zstd.1 2023-02-10 00:41:50.000000000 +0000 -+++ zstd-1.5.4.new/programs/zstd.1 2023-02-13 12:44:01.575160149 +0000 -@@ -162,6 +162,13 @@ - \fB\-\-show\-default\-cparams\fR: shows the default compression parameters that will be used for a particular input file, based on the provided compression level and the input size\. If the provided file is not a regular file (e\.g\. a pipe), this flag will output the parameters used for inputs of unknown size\. - .IP "\[ci]" 4 - \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files -+ -+.SH Parallel Zstd OPTIONS -+Additional options for the pzstd utility -+.TP -+.BR \-p ", " --processes -+ number of threads to use for (de)compression (default:4) -+ - .IP "" 0 - .SS "gzip Operation Modifiers" - When invoked via a \fBgzip\fR symlink, \fBzstd\fR will support further options that intend to mimic the \fBgzip\fR behavior: diff --git a/sources b/sources index 076932c..bb186a9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.5.tar.gz) = 99109ec0e07fa65c2101c9cb36be56b672bbd0ee69d265f924718e61f9192ae8385c8d9e4d0c318be9edfa6d849fd3d60e5f164fa120961449429ea3c5dab6b6 +SHA512 (zstd-1.5.6.tar.gz) = 54a578f2484da0520a6e9a24f501b9540a3fe3806785d6bc9db79fc095b7c142a7c121387c7eecd460ca71446603584ef1ba4d29a33ca90873338c9ffbd04f14 diff --git a/zstd.spec b/zstd.spec index 1521aa7..c5acc21 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,7 +15,7 @@ %bcond_without asm Name: zstd -Version: 1.5.5 +Version: 1.5.6 Release: 1%{?dist} Summary: Zstd compression library @@ -23,8 +23,6 @@ License: BSD and GPLv2 URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: pzstd.1.patch - BuildRequires: gcc gtest-devel %if %{with pzstd} BuildRequires: gcc-c++ @@ -57,9 +55,6 @@ Static variant of the Zstd library. %prep %setup -q find -name .gitignore -delete -%if %{with pzstd} -%patch1 -p1 -%endif %build export CFLAGS="$RPM_OPT_FLAGS" @@ -126,6 +121,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Fri Mar 29 2024 Pádraig Brady - 1.5.6-1 +- latest upstream + * Wed Apr 05 2023 Pádraig Brady - 1.5.5-1 - Latest upstream From 3f32227f241c0cf7117f2994fab55c906c85f191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 30 Mar 2024 10:46:17 +0000 Subject: [PATCH 15/16] fix pzstd compilation on epel7 Revert to -std=c++11 as -std=c++14 not supported --- pzstd-std.patch | 18 ++++++++++++++++++ zstd.spec | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 pzstd-std.patch diff --git a/pzstd-std.patch b/pzstd-std.patch new file mode 100644 index 0000000..8463ac5 --- /dev/null +++ b/pzstd-std.patch @@ -0,0 +1,18 @@ +Revert cd4dba74de from upstream which is incompat with epel7 gcc +diff -Naur zstd-1.5.6.orig/contrib/pzstd/Makefile zstd-1.5.6/contrib/pzstd/Makefile +--- zstd-1.5.6.orig/contrib/pzstd/Makefile 2024-03-21 22:05:51.000000000 +0000 ++++ zstd-1.5.6/contrib/pzstd/Makefile 2024-03-30 10:43:39.147189306 +0000 +@@ -37,8 +37,11 @@ + PZSTD_INC = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I. + GTEST_INC = -isystem googletest/googletest/include + +-# Set the minimum required by gtest +-PZSTD_CXX_STD := -std=c++14 ++# If default C++ version is older than C++11, explicitly set C++11, which is the ++# minimum required by the code. ++ifeq ($(shell echo "\043if __cplusplus < 201103L\n\043error\n\043endif" | $(CXX) -x c++ -Werror -c - -o /dev/null 2>/dev/null && echo 1 || echo 0),0) ++PZSTD_CXX_STD := -std=c++11 ++endif + + PZSTD_CPPFLAGS = $(PZSTD_INC) + PZSTD_CCXXFLAGS = diff --git a/zstd.spec b/zstd.spec index c5acc21..7712f47 100644 --- a/zstd.spec +++ b/zstd.spec @@ -23,6 +23,8 @@ License: BSD and GPLv2 URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch1: pzstd-std.patch + BuildRequires: gcc gtest-devel %if %{with pzstd} BuildRequires: gcc-c++ @@ -55,6 +57,9 @@ Static variant of the Zstd library. %prep %setup -q find -name .gitignore -delete +%if %{with pzstd} +%patch1 -p1 +%endif %build export CFLAGS="$RPM_OPT_FLAGS" From 666021d271c47ce71e7c029b764c8001306017e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 30 Mar 2024 11:54:46 +0000 Subject: [PATCH 16/16] revert update to 1.5.6 rpm (4.11) is complaining about: extracting debug info from /builddir/build/BUILDROOT/zstd-1.5.6-1.el7.x86_64/usr/lib64/libzstd.so.1.5.6 /usr/lib/rpm/debugedit: canonicalization unexpectedly shrank by one character This was only addressed in rpm >= 4.13, so lets avoid the double slash hunt as described in: https://bugzilla.redhat.com/show_bug.cgi?id=304121 We can address if a newer zstd is explicitly requested for centos 7 --- .gitignore | 1 - pzstd-std.patch | 18 ------------------ pzstd.1.patch | 17 +++++++++++++++++ sources | 2 +- zstd.spec | 7 ++----- 5 files changed, 20 insertions(+), 25 deletions(-) delete mode 100644 pzstd-std.patch create mode 100644 pzstd.1.patch diff --git a/.gitignore b/.gitignore index a140781..dfa152b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,3 @@ /zstd-1.5.2.tar.gz /zstd-1.5.4.tar.gz /zstd-1.5.5.tar.gz -/zstd-1.5.6.tar.gz diff --git a/pzstd-std.patch b/pzstd-std.patch deleted file mode 100644 index 8463ac5..0000000 --- a/pzstd-std.patch +++ /dev/null @@ -1,18 +0,0 @@ -Revert cd4dba74de from upstream which is incompat with epel7 gcc -diff -Naur zstd-1.5.6.orig/contrib/pzstd/Makefile zstd-1.5.6/contrib/pzstd/Makefile ---- zstd-1.5.6.orig/contrib/pzstd/Makefile 2024-03-21 22:05:51.000000000 +0000 -+++ zstd-1.5.6/contrib/pzstd/Makefile 2024-03-30 10:43:39.147189306 +0000 -@@ -37,8 +37,11 @@ - PZSTD_INC = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I. - GTEST_INC = -isystem googletest/googletest/include - --# Set the minimum required by gtest --PZSTD_CXX_STD := -std=c++14 -+# If default C++ version is older than C++11, explicitly set C++11, which is the -+# minimum required by the code. -+ifeq ($(shell echo "\043if __cplusplus < 201103L\n\043error\n\043endif" | $(CXX) -x c++ -Werror -c - -o /dev/null 2>/dev/null && echo 1 || echo 0),0) -+PZSTD_CXX_STD := -std=c++11 -+endif - - PZSTD_CPPFLAGS = $(PZSTD_INC) - PZSTD_CCXXFLAGS = diff --git a/pzstd.1.patch b/pzstd.1.patch new file mode 100644 index 0000000..e6016c7 --- /dev/null +++ b/pzstd.1.patch @@ -0,0 +1,17 @@ +diff -Naur zstd-1.5.4/programs/zstd.1 zstd-1.5.4.new/programs/zstd.1 +--- zstd-1.5.4/programs/zstd.1 2023-02-10 00:41:50.000000000 +0000 ++++ zstd-1.5.4.new/programs/zstd.1 2023-02-13 12:44:01.575160149 +0000 +@@ -162,6 +162,13 @@ + \fB\-\-show\-default\-cparams\fR: shows the default compression parameters that will be used for a particular input file, based on the provided compression level and the input size\. If the provided file is not a regular file (e\.g\. a pipe), this flag will output the parameters used for inputs of unknown size\. + .IP "\[ci]" 4 + \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files ++ ++.SH Parallel Zstd OPTIONS ++Additional options for the pzstd utility ++.TP ++.BR \-p ", " --processes ++ number of threads to use for (de)compression (default:4) ++ + .IP "" 0 + .SS "gzip Operation Modifiers" + When invoked via a \fBgzip\fR symlink, \fBzstd\fR will support further options that intend to mimic the \fBgzip\fR behavior: diff --git a/sources b/sources index bb186a9..076932c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.5.6.tar.gz) = 54a578f2484da0520a6e9a24f501b9540a3fe3806785d6bc9db79fc095b7c142a7c121387c7eecd460ca71446603584ef1ba4d29a33ca90873338c9ffbd04f14 +SHA512 (zstd-1.5.5.tar.gz) = 99109ec0e07fa65c2101c9cb36be56b672bbd0ee69d265f924718e61f9192ae8385c8d9e4d0c318be9edfa6d849fd3d60e5f164fa120961449429ea3c5dab6b6 diff --git a/zstd.spec b/zstd.spec index 7712f47..1521aa7 100644 --- a/zstd.spec +++ b/zstd.spec @@ -15,7 +15,7 @@ %bcond_without asm Name: zstd -Version: 1.5.6 +Version: 1.5.5 Release: 1%{?dist} Summary: Zstd compression library @@ -23,7 +23,7 @@ License: BSD and GPLv2 URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: pzstd-std.patch +Patch1: pzstd.1.patch BuildRequires: gcc gtest-devel %if %{with pzstd} @@ -126,9 +126,6 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog -* Fri Mar 29 2024 Pádraig Brady - 1.5.6-1 -- latest upstream - * Wed Apr 05 2023 Pádraig Brady - 1.5.5-1 - Latest upstream