From ff994bc47256de9ded2ea5b28fd81caf7c57b870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Thu, 9 Nov 2017 23:48:22 -0800 Subject: [PATCH 01/14] depend on -lrt explicitly for clock_gettime --- zstd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index da326bf..6defe5f 100644 --- a/zstd.spec +++ b/zstd.spec @@ -46,7 +46,7 @@ find -name .gitignore -delete %endif %build -%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags} -lrt" ; export LDFLAGS ;} for dir in lib programs; do CFLAGS="%{optflags}" %make_build -C "$dir" done @@ -55,7 +55,7 @@ CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/p %endif %check -%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags} -lrt" ; export LDFLAGS ;} CFLAGS="%{optflags}" make -C tests test-zstd %if 0%{?with_pzstd} CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test From 0a8443e1b2c802cfc2fa5e3cece7a384844a3825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 10 Nov 2017 00:10:24 -0800 Subject: [PATCH 02/14] unconditionally set -lrt --- zstd.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index 6defe5f..c351205 100644 --- a/zstd.spec +++ b/zstd.spec @@ -46,7 +46,8 @@ find -name .gitignore -delete %endif %build -%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags} -lrt" ; export LDFLAGS ;} +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +export LDFLAGS="$LDFLAGS -lrt" for dir in lib programs; do CFLAGS="%{optflags}" %make_build -C "$dir" done @@ -55,7 +56,8 @@ CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/p %endif %check -%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags} -lrt" ; export LDFLAGS ;} +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +export LDFLAGS="$LDFLAGS -lrt" CFLAGS="%{optflags}" make -C tests test-zstd %if 0%{?with_pzstd} CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test From dd0b03233566a2860792b18fa9b0dcb06debb279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 27 Mar 2018 22:05:46 -0700 Subject: [PATCH 03/14] latest upstream (1.3.4) Cherry-picked from 21908004d06eafd1380e1f4fa3031e6b5fb704be --- .gitignore | 1 + pzstd.1.patch | 10 +++++----- sources | 2 +- zstd.spec | 5 ++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 6dff472..c52bd79 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /zstd-1.3.1.tar.gz /zstd-1.3.2.tar.gz /zstd-1.3.3.tar.gz +/zstd-1.3.4.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index 1f391b4..cfe2e45 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,7 +1,7 @@ -diff -Naur zstd-1.2.0.orig/programs/zstd.1 zstd-1.2.0/programs/zstd.1 ---- zstd-1.2.0.orig/programs/zstd.1 2017-05-04 18:18:24.000000000 +0000 -+++ zstd-1.2.0/programs/zstd.1 2017-05-08 13:26:25.639811525 +0000 -@@ -162,7 +162,14 @@ +diff -Naur -Naru zstd-1.3.4/programs/zstd.1 zstd-1.3.4.new/programs/zstd.1 +--- zstd-1.3.4/programs/zstd.1 2018-03-26 22:19:34.000000000 +0000 ++++ zstd-1.3.4.new/programs/zstd.1 2018-03-28 04:28:27.532777239 +0000 +@@ -177,7 +177,14 @@ .TP \fB\-\-\fR All arguments after \fB\-\-\fR are treated as files @@ -15,5 +15,5 @@ diff -Naur zstd-1.2.0.orig/programs/zstd.1 zstd-1.2.0/programs/zstd.1 + + .SH "DICTIONARY BUILDER" - \fBzstd\fR offers \fIdictionary\fR compression, useful for very small files and messages\. It\'s possible to train \fBzstd\fR with some samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary\. It will improve compression ratio of small files\. Typical gains range from 10% (at 64KB) to x5 better (at <1KB)\. + \fBzstd\fR offers \fIdictionary\fR compression, which greatly improves efficiency on small files and messages\. It\'s possible to train \fBzstd\fR with a set of samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary, using command \fB\-D dictionaryFileName\fR\. Compression of small files similar to the sample set will be greatly improved\. . diff --git a/sources b/sources index 06624ee..a7e15cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.3.3.tar.gz) = 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae +SHA512 (zstd-1.3.4.tar.gz) = d3c8c1dfabd251b03205b64eff97898c1e2ca457191b1f6257450e6d2675451a68aa0bc2220b2c65baa69a6997d98490612779d95b3325320c0a3202810ae554 diff --git a/zstd.spec b/zstd.spec index 60d54ee..e23b44b 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.3.3 +Version: 1.3.4 Release: 1%{?dist} Summary: Zstd compression library @@ -106,6 +106,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Wed Mar 28 2018 Pádraig Brady - 1.3.4-1 +- Latest upstream + * Thu Dec 21 2017 Pádraig Brady - 1.3.3-1 - Latest upstream From 3b1a7e3edd9b83ee06ea8eda87e2177dd3cba72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun, 1 Jul 2018 20:13:26 -0700 Subject: [PATCH 04/14] latest upstream (1.3.5) (cherry picked from commit e74f648564c72fe2bf11c436311570da34f31243) --- .gitignore | 1 + sources | 2 +- zstd.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c52bd79..c09ff90 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /zstd-1.3.2.tar.gz /zstd-1.3.3.tar.gz /zstd-1.3.4.tar.gz +/zstd-1.3.5.tar.gz diff --git a/sources b/sources index a7e15cc..1ce158f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.3.4.tar.gz) = d3c8c1dfabd251b03205b64eff97898c1e2ca457191b1f6257450e6d2675451a68aa0bc2220b2c65baa69a6997d98490612779d95b3325320c0a3202810ae554 +SHA512 (zstd-1.3.5.tar.gz) = a5347b132d6b79e6a7f39a4546cafc5cf85e8d01b765477011008908035789e914b1093e2b2405c75086f05a7bc87e29b69e10252260d747c5c056ce16f91661 diff --git a/zstd.spec b/zstd.spec index e23b44b..5f6707f 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.3.4 +Version: 1.3.5 Release: 1%{?dist} Summary: Zstd compression library @@ -106,6 +106,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Mon Jul 02 2018 Pádraig Brady - 1.3.5.1 +- Latest upstream + * Wed Mar 28 2018 Pádraig Brady - 1.3.4-1 - Latest upstream From 2a1c3e4008be0fec935151d49f629be86310e0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun, 1 Jul 2018 21:39:56 -0700 Subject: [PATCH 05/14] fix zstd -l processing with closed stdin (cherry picked from commit 53ca653abf5b5e550bb5902ad91898e7db00ffed) --- zstd-l-stdin.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++++ zstd.spec | 2 ++ 2 files changed, 72 insertions(+) create mode 100644 zstd-l-stdin.patch diff --git a/zstd-l-stdin.patch b/zstd-l-stdin.patch new file mode 100644 index 0000000..96971e9 --- /dev/null +++ b/zstd-l-stdin.patch @@ -0,0 +1,70 @@ +From 712a9fd9721c314f4b0238577d803b012845f6d2 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Fri, 29 Jun 2018 15:33:44 -0400 +Subject: [PATCH] Allow Invoking `zstd --list` When `stdin` is not a `tty` + +Also now returns an error when no inputs are given. + +New proposed behavior: + +``` +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $? +No files given +1 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $? +Frames Skips Compressed Uncompressed Ratio Check Filename + 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst +0 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Date: Sun, 7 Oct 2018 19:04:25 -0700 Subject: [PATCH 06/14] latest upstream (1.3.6) (cherry-picked from aecbe7d8e7e6909a6c1e057e834419c49dff04cc) --- .gitignore | 1 + sources | 2 +- zstd-l-stdin.patch | 70 ---------------------------------------------- zstd.spec | 7 +++-- 4 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 zstd-l-stdin.patch diff --git a/.gitignore b/.gitignore index c09ff90..1b7b3b9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /zstd-1.3.3.tar.gz /zstd-1.3.4.tar.gz /zstd-1.3.5.tar.gz +/zstd-1.3.6.tar.gz diff --git a/sources b/sources index 1ce158f..a8d02c7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.3.5.tar.gz) = a5347b132d6b79e6a7f39a4546cafc5cf85e8d01b765477011008908035789e914b1093e2b2405c75086f05a7bc87e29b69e10252260d747c5c056ce16f91661 +SHA512 (zstd-1.3.6.tar.gz) = f37c3f45ee7b0367c1fd48f572a1931ea4a664a1f5669c56a0f1883c5c9555c3d8b622c1d8bd8c074d157259b4eda24782670137c354c2e2633ec98b235b5625 diff --git a/zstd-l-stdin.patch b/zstd-l-stdin.patch deleted file mode 100644 index 96971e9..0000000 --- a/zstd-l-stdin.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 712a9fd9721c314f4b0238577d803b012845f6d2 Mon Sep 17 00:00:00 2001 -From: "W. Felix Handte" -Date: Fri, 29 Jun 2018 15:33:44 -0400 -Subject: [PATCH] Allow Invoking `zstd --list` When `stdin` is not a `tty` - -Also now returns an error when no inputs are given. - -New proposed behavior: - -``` -felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $? -No files given -1 -felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $? -Frames Skips Compressed Uncompressed Ratio Check Filename - 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst -0 -felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l - 1.3.6-1 +- Latest upstream + * Mon Jul 02 2018 Pádraig Brady - 1.3.5.1 - Latest upstream From 9036269b65f9c72079cf66baa830f4b703df5186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 1 Jan 2019 06:14:23 -0800 Subject: [PATCH 07/14] latest upstream (1.3.8) --- .gitignore | 1 + sources | 2 +- zstd.spec | 14 +++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1b7b3b9..f497b49 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /zstd-1.3.4.tar.gz /zstd-1.3.5.tar.gz /zstd-1.3.6.tar.gz +/zstd-1.3.8.tar.gz diff --git a/sources b/sources index a8d02c7..64e70e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.3.6.tar.gz) = f37c3f45ee7b0367c1fd48f572a1931ea4a664a1f5669c56a0f1883c5c9555c3d8b622c1d8bd8c074d157259b4eda24782670137c354c2e2633ec98b235b5625 +SHA512 (zstd-1.3.8.tar.gz) = 5c1c0a7a998b814a9edc1466f6d321b0d8ffcf927295fd5499137c9075a8823be03d98f61ea5212d1969f8d52b32e940b1cc10d1507d7702424ea2eea0e79a1b diff --git a/zstd.spec b/zstd.spec index 162df35..6440a1a 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.3.6 +Version: 1.3.8 Release: 1%{?dist} Summary: Zstd compression library @@ -65,9 +65,6 @@ CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd tes %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} -# Remove undocumented wrappers of minimal use -rm %{buildroot}/%{_bindir}/%{name}less -rm %{buildroot}/%{_bindir}/%{name}grep # Don't install the static lib rm %{buildroot}/%{_libdir}/libzstd.a %if 0%{?with_pzstd} @@ -76,7 +73,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %endif %files -%doc NEWS README.md +%doc CHANGELOG README.md %{_bindir}/%{name} %if 0%{?with_pzstd} %{_bindir}/p%{name} @@ -85,9 +82,13 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %{_bindir}/%{name}mt %{_bindir}/un%{name} %{_bindir}/%{name}cat +%{_bindir}/%{name}grep +%{_bindir}/%{name}less %{_mandir}/man1/%{name}.1* %{_mandir}/man1/un%{name}.1* %{_mandir}/man1/%{name}cat.1* +%{_mandir}/man1/%{name}grep.1* +%{_mandir}/man1/%{name}less.1* %license LICENSE %files -n lib%{name} @@ -106,6 +107,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Mon Dec 31 2018 Pádraig Brady - 1.3.8-1 +- Latest upstream + * Mon Oct 08 2018 Pádraig Brady - 1.3.6-1 - Latest upstream From d9876f667d1cb93d6500ebc32598243317f003ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 29 Apr 2019 09:15:45 -0700 Subject: [PATCH 08/14] latest upstream (1.4.0) (cherry picked from commit 67c4c7bf68e4fecbfabb6b8f27d08a95295c3870) --- .gitignore | 1 + sources | 2 +- zstd.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f497b49..b6b9e46 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /zstd-1.3.5.tar.gz /zstd-1.3.6.tar.gz /zstd-1.3.8.tar.gz +/zstd-1.4.0.tar.gz diff --git a/sources b/sources index 64e70e3..7906fff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.3.8.tar.gz) = 5c1c0a7a998b814a9edc1466f6d321b0d8ffcf927295fd5499137c9075a8823be03d98f61ea5212d1969f8d52b32e940b1cc10d1507d7702424ea2eea0e79a1b +SHA512 (zstd-1.4.0.tar.gz) = ef6d95639593fed3cfb9ff4f1527c4ba38658e42f16eb3369b2a4bbe150905751bb71c6e3fe9c8bbdfceee26a540ae3e41bd0f0bc692d36db444b7da65a6e304 diff --git a/zstd.spec b/zstd.spec index 6440a1a..e68f05e 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.3.8 +Version: 1.4.0 Release: 1%{?dist} Summary: Zstd compression library @@ -107,6 +107,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Mon Apr 29 2019 Pádraig Brady - 1.4.0-1 +- Latest upstream + * Mon Dec 31 2018 Pádraig Brady - 1.3.8-1 - Latest upstream From e052aebc36c392daf975c5524c137229f35a8a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 31 Jul 2019 15:31:17 +0100 Subject: [PATCH 09/14] latest upstream (1.4.2) --- .gitignore | 1 + sources | 2 +- zstd.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b6b9e46..e2a4858 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /zstd-1.3.6.tar.gz /zstd-1.3.8.tar.gz /zstd-1.4.0.tar.gz +/zstd-1.4.2.tar.gz diff --git a/sources b/sources index 7906fff..b6cfd25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.0.tar.gz) = ef6d95639593fed3cfb9ff4f1527c4ba38658e42f16eb3369b2a4bbe150905751bb71c6e3fe9c8bbdfceee26a540ae3e41bd0f0bc692d36db444b7da65a6e304 +SHA512 (zstd-1.4.2.tar.gz) = b760f201ff8d018c422b030d3f59245b5f1cfd157ba8d6eb9fe9240e23d5739ca7b5a705b2d5e8ace703d041ab77bea66d735b283e51facfb18923794fabe213 diff --git a/zstd.spec b/zstd.spec index e68f05e..95ff99d 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.4.0 +Version: 1.4.2 Release: 1%{?dist} Summary: Zstd compression library @@ -107,6 +107,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Wed Jul 31 2019 Pádraig Brady - 1.4.2-1 +- Latest upstream + * Mon Apr 29 2019 Pádraig Brady - 1.4.0-1 - Latest upstream From 37c28eeccb6524c1e8de8a405671b66ab387fb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 15 Jan 2020 14:22:44 +0000 Subject: [PATCH 10/14] latest upstream (1.4.4) --- .gitignore | 1 + pzstd.1.patch | 13 ++++++------- sources | 2 +- zstd.spec | 5 ++++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index e2a4858..bf8c006 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /zstd-1.3.8.tar.gz /zstd-1.4.0.tar.gz /zstd-1.4.2.tar.gz +/zstd-1.4.4.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index cfe2e45..c0c451a 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,11 +1,10 @@ -diff -Naur -Naru zstd-1.3.4/programs/zstd.1 zstd-1.3.4.new/programs/zstd.1 ---- zstd-1.3.4/programs/zstd.1 2018-03-26 22:19:34.000000000 +0000 -+++ zstd-1.3.4.new/programs/zstd.1 2018-03-28 04:28:27.532777239 +0000 -@@ -177,7 +177,14 @@ +diff -Naur zstd-1.4.4.orig/programs/zstd.1 zstd-1.4.4/programs/zstd.1 +--- zstd-1.4.4.orig/programs/zstd.1 2019-11-04 17:54:32.000000000 +0000 ++++ zstd-1.4.4/programs/zstd.1 2020-01-15 14:25:34.227060058 +0000 +@@ -209,6 +209,14 @@ .TP \fB\-\-\fR All arguments after \fB\-\-\fR are treated as files --. + +.SH Parallel Zstd OPTIONS +Additional options for the pzstd utility @@ -14,6 +13,6 @@ diff -Naur -Naru zstd-1.3.4/programs/zstd.1 zstd-1.3.4.new/programs/zstd.1 + number of threads to use for (de)compression (default:4) + + - .SH "DICTIONARY BUILDER" - \fBzstd\fR offers \fIdictionary\fR compression, which greatly improves efficiency on small files and messages\. It\'s possible to train \fBzstd\fR with a set of samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary, using command \fB\-D dictionaryFileName\fR\. Compression of small files similar to the sample set will be greatly improved\. . + .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 is supported currently, for setting compression level\. \fBZSTD_CLEVEL\fR can be used to set the level between 1 and 19 (the "normal" range)\. If the value of \fBZSTD_CLEVEL\fR is not a valid integer, it will be ignored with a warning message\. \fBZSTD_CLEVEL\fR just replaces the default compression level (\fB3\fR)\. It can be overridden by corresponding command line arguments\. diff --git a/sources b/sources index b6cfd25..c3586eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.2.tar.gz) = b760f201ff8d018c422b030d3f59245b5f1cfd157ba8d6eb9fe9240e23d5739ca7b5a705b2d5e8ace703d041ab77bea66d735b283e51facfb18923794fabe213 +SHA512 (zstd-1.4.4.tar.gz) = f12b6f38bd322a0538179ef90e4c83d2cba29e1fef391a8e8e964785e5761e7ba685f62e9a5a1d6b66171fd64e4fd6374e607569531e2f4c05c470cff2294454 diff --git a/zstd.spec b/zstd.spec index 95ff99d..857b340 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,7 +8,7 @@ %endif Name: zstd -Version: 1.4.2 +Version: 1.4.4 Release: 1%{?dist} Summary: Zstd compression library @@ -107,6 +107,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %postun -n lib%{name} -p /sbin/ldconfig %changelog +* Wed Jan 15 2020 Pádraig Brady - 1.4.4-1 +- Latest upstream + * Wed Jul 31 2019 Pádraig Brady - 1.4.2-1 - Latest upstream From 453ed8eead80a346a10984297e1dffa5d1da501b Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 22 May 2020 10:54:30 +0300 Subject: [PATCH 11/14] Add static library subpackage Some zstd APIs are only available via the static package. Make it available so they can be used. These APIs are experimental, so they should be used with care, but Fedora should still make them available. See https://facebook.github.io/zstd/zstd_manual.html#Chapter14 for more details. --- zstd.spec | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/zstd.spec b/zstd.spec index 857b340..820bf74 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Name: zstd Version: 1.4.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -34,9 +34,15 @@ Zstandard compression shared library. Summary: Header files for Zstd library Requires: lib%{name}%{?_isa} = %{version}-%{release} +%package -n lib%{name}-static +Summary: Static variant of the Zstd library +Requires: lib%{name}-devel = %{version}-%{release} + %description -n lib%{name}-devel Header files for Zstd library. +%description -n lib%{name}-static +Static variant of the Zstd library. %prep %setup -q @@ -65,8 +71,6 @@ CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd tes %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} -# Don't install the static lib -rm %{buildroot}/%{_libdir}/libzstd.a %if 0%{?with_pzstd} install -D -m755 contrib/pzstd/pzstd %{buildroot}/usr/bin/pzstd install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 @@ -106,7 +110,13 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig +%files -n lib%{name}-static +%{_libdir}/libzstd.a + %changelog +* Fri May 22 2020 Avi Kivity - 1.4.4-3 +- Added static library subpackage + * Wed Jan 15 2020 Pádraig Brady - 1.4.4-1 - Latest upstream From e2ac2a61344e393500414750362ce7a7575d5de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 22 May 2020 13:36:07 +0100 Subject: [PATCH 12/14] latest upstream (1.4.5) --- .gitignore | 1 + pzstd.1.patch | 18 +++++++++--------- sources | 2 +- zstd.spec | 7 +++++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index bf8c006..a3f7f64 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /zstd-1.4.0.tar.gz /zstd-1.4.2.tar.gz /zstd-1.4.4.tar.gz +/zstd-1.4.5.tar.gz diff --git a/pzstd.1.patch b/pzstd.1.patch index c0c451a..d6d0ee7 100644 --- a/pzstd.1.patch +++ b/pzstd.1.patch @@ -1,10 +1,10 @@ -diff -Naur zstd-1.4.4.orig/programs/zstd.1 zstd-1.4.4/programs/zstd.1 ---- zstd-1.4.4.orig/programs/zstd.1 2019-11-04 17:54:32.000000000 +0000 -+++ zstd-1.4.4/programs/zstd.1 2020-01-15 14:25:34.227060058 +0000 -@@ -209,6 +209,14 @@ - .TP - \fB\-\-\fR - All arguments after \fB\-\-\fR are treated as files +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 @@ + . + .IP "\(bu" 4 + \fB\-\-\fR: All arguments after \fB\-\-\fR are treated as files + +.SH Parallel Zstd OPTIONS +Additional options for the pzstd utility @@ -14,5 +14,5 @@ diff -Naur zstd-1.4.4.orig/programs/zstd.1 zstd-1.4.4/programs/zstd.1 + + . - .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 is supported currently, for setting compression level\. \fBZSTD_CLEVEL\fR can be used to set the level between 1 and 19 (the "normal" range)\. If the value of \fBZSTD_CLEVEL\fR is not a valid integer, it will be ignored with a warning message\. \fBZSTD_CLEVEL\fR just replaces the default compression level (\fB3\fR)\. It can be overridden by corresponding command line arguments\. + .IP "" 0 + . diff --git a/sources b/sources index c3586eb..0271367 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-1.4.4.tar.gz) = f12b6f38bd322a0538179ef90e4c83d2cba29e1fef391a8e8e964785e5761e7ba685f62e9a5a1d6b66171fd64e4fd6374e607569531e2f4c05c470cff2294454 +SHA512 (zstd-1.4.5.tar.gz) = 417b813ade6c8436690bd9d6da34a9f87f50e7378752b72e63066befbee496392a4b72896fa56688d814f461871ab31d3c6637497ff2ed7a282d58513631a38b diff --git a/zstd.spec b/zstd.spec index 820bf74..b804585 100644 --- a/zstd.spec +++ b/zstd.spec @@ -8,8 +8,8 @@ %endif Name: zstd -Version: 1.4.4 -Release: 2%{?dist} +Version: 1.4.5 +Release: 1%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -114,6 +114,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %{_libdir}/libzstd.a %changelog +* Fri May 22 2020 Pádraig Brady - 1.4.5-1 +- Latest upstream + * Fri May 22 2020 Avi Kivity - 1.4.4-3 - Added static library subpackage From cda3b512c89b664be9ac33ecda8252ea664f17b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 25 May 2020 13:22:39 +0100 Subject: [PATCH 13/14] build shared library with correct compiler flags * lib-make.patch: Fix regression in 1.4.5 lib/Makefile * zstd.spec: Apply the patch --- lib-make.patch | 38 ++++++++++++++++++++++++++++++++++++++ zstd.spec | 7 ++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 lib-make.patch diff --git a/lib-make.patch b/lib-make.patch new file mode 100644 index 0000000..1b45b29 --- /dev/null +++ b/lib-make.patch @@ -0,0 +1,38 @@ +From 66db79bbb0977bea7023000dca6211c2cacf9a07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Mon, 25 May 2020 13:16:31 +0100 +Subject: [PATCH] fix generalization of pattern rules in lib/Makefile + +This was introduced in v1.4.4-383-gf77fd5ce +and results in the default rule in lib/ doing nothing. +--- + lib/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/Makefile b/lib/Makefile +index e6213ac8..de437a98 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -221,14 +221,14 @@ libzstd : $(LIBZSTD) + lib : libzstd.a libzstd + + .PHONY: lib-mt +-%-mt : CPPFLAGS += -DZSTD_MULTITHREAD +-%-mt : LDFLAGS += -pthread +-%-mt : % ++% : CPPFLAGS += -DZSTD_MULTITHREAD ++% : LDFLAGS += -pthread ++% : lib + @echo multi-threading build completed + + .PHONY: lib-release +-%-release : DEBUGFLAGS := +-%-release : % ++% : DEBUGFLAGS := ++% : lib + @echo release build completed + + +-- +2.26.2 + diff --git a/zstd.spec b/zstd.spec index b804585..5e2233e 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Name: zstd Version: 1.4.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -17,6 +17,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 BuildRequires: gcc gtest-devel @@ -50,6 +51,7 @@ find -name .gitignore -delete %if 0%{?with_pzstd} %patch1 -p1 %endif +%patch2 -p1 %build %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} @@ -114,6 +116,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %{_libdir}/libzstd.a %changelog +* Fri May 25 2020 Pádraig Brady - 1.4.5-2 +- Build shared library with correct compiler flags + * Fri May 22 2020 Pádraig Brady - 1.4.5-1 - Latest upstream From ee3876414aaeec41984ff91291f88085cc3b4370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Mon, 25 May 2020 15:12:51 +0100 Subject: [PATCH 14/14] sync lib/Makefile fix from upstream The previous one incorrectly enabled multithread options everywhere --- lib-make.patch | 48 +++++++++++++++--------------------------------- zstd.spec | 4 ++-- 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/lib-make.patch b/lib-make.patch index 1b45b29..2bbe9cf 100644 --- a/lib-make.patch +++ b/lib-make.patch @@ -1,38 +1,20 @@ -From 66db79bbb0977bea7023000dca6211c2cacf9a07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?P=C3=A1draig=20Brady?= -Date: Mon, 25 May 2020 13:16:31 +0100 -Subject: [PATCH] fix generalization of pattern rules in lib/Makefile - -This was introduced in v1.4.4-383-gf77fd5ce -and results in the default rule in lib/ doing nothing. ---- - lib/Makefile | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/lib/Makefile b/lib/Makefile -index e6213ac8..de437a98 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -221,14 +221,14 @@ libzstd : $(LIBZSTD) +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 --%-mt : CPPFLAGS += -DZSTD_MULTITHREAD --%-mt : LDFLAGS += -pthread --%-mt : % -+% : CPPFLAGS += -DZSTD_MULTITHREAD -+% : LDFLAGS += -pthread -+% : lib +-.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 : % -+% : DEBUGFLAGS := -+% : lib +-.PHONY: lib-release + %-release : DEBUGFLAGS := + %-release : % @echo release build completed - - --- -2.26.2 - diff --git a/zstd.spec b/zstd.spec index 5e2233e..c2f5060 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Name: zstd Version: 1.4.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -116,7 +116,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1 %{_libdir}/libzstd.a %changelog -* Fri May 25 2020 Pádraig Brady - 1.4.5-2 +* Mon May 25 2020 Pádraig Brady - 1.4.5-3 - Build shared library with correct compiler flags * Fri May 22 2020 Pádraig Brady - 1.4.5-1