From e920e290cada763ea0a7fa7e1d2120216cbc7339 Mon Sep 17 00:00:00 2001 From: NixTux Commit Bot Date: Sat, 4 Jan 2020 09:43:06 +0300 Subject: [PATCH 01/16] bot: rpm5 -> rpm4 (1) --- zstd.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zstd.spec b/zstd.spec index b273d49..a3bd442 100644 --- a/zstd.spec +++ b/zstd.spec @@ -86,10 +86,10 @@ find -name .gitignore -delete %build for dir in lib programs; do - CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make -C "$dir" + CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make_build -C "$dir" done %if %{with pzstd} -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make -C 'contrib/pzstd' +CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/pzstd' %endif %install From debbffffa9f1ff793a350617ce172a232d4c63ff Mon Sep 17 00:00:00 2001 From: NixTux Commit Bot Date: Mon, 13 Jan 2020 19:46:53 +0300 Subject: [PATCH 02/16] bot: rpm5 -> rpm4 (8) --- zstd.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zstd.spec b/zstd.spec index a3bd442..aff995e 100644 --- a/zstd.spec +++ b/zstd.spec @@ -86,14 +86,14 @@ find -name .gitignore -delete %build for dir in lib programs; do - CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make_build -C "$dir" + CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make -C "$dir" done %if %{with pzstd} -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/pzstd' +CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make -C 'contrib/pzstd' %endif %install -%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} +%makeinstall_std PREFIX=%{_prefix} LIBDIR=%{_libdir} # Don't install the static lib rm %{buildroot}%{_libdir}/libzstd.a From f46b0f7e3578e5ce603417134735287d3887dddb Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Sat, 11 Apr 2020 22:43:14 +0000 Subject: [PATCH 03/16] 1.4.4 --- .abf.yml | 2 +- zstd.spec | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.abf.yml b/.abf.yml index d730beb..0b807f4 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.4.3.tar.gz: aa9628839ba5032482f4df805d1f15aa485583cf + zstd-1.4.4.tar.gz: 8ec1a47b704001c1804b8670a3c86f4baf035c07 diff --git a/zstd.spec b/zstd.spec index aff995e..2069e59 100644 --- a/zstd.spec +++ b/zstd.spec @@ -13,7 +13,7 @@ Summary: Zstd compression library Name: zstd -Version: 1.4.3 +Version: 1.4.4 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression @@ -86,10 +86,10 @@ find -name .gitignore -delete %build for dir in lib programs; do - CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make -C "$dir" + CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make CC=%{__cc} -C "$dir" done %if %{with pzstd} -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make -C 'contrib/pzstd' +CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make CC=%{__cc} -C 'contrib/pzstd' %endif %install From c07f28ef16ec5e9a3164fc5bc84a0c6c437ea113 Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Sun, 12 Apr 2020 19:55:36 +0000 Subject: [PATCH 04/16] adjust build, use cmake --- pzstd.1.patch | 13 ++-- zstd-1.3.4-multi-thread-default.patch | 13 ++++ zstd.spec | 89 +++++++++++++-------------- 3 files changed, 63 insertions(+), 52 deletions(-) create mode 100644 zstd-1.3.4-multi-thread-default.patch 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/zstd-1.3.4-multi-thread-default.patch b/zstd-1.3.4-multi-thread-default.patch new file mode 100644 index 0000000..025acfd --- /dev/null +++ b/zstd-1.3.4-multi-thread-default.patch @@ -0,0 +1,13 @@ +diff -Naur zstd-1.3.8/programs/zstdcli.c zstd-1.3.8/programs/new-zstdcli.c +--- zstd-1.3.8/programs/zstdcli.c 2018-12-27 13:42:44.000000000 +0100 ++++ zstd-1.3.8/programs/new-zstdcli.c 2019-01-01 04:30:50.000000000 +0100 +@@ -576,7 +576,7 @@ + cLevel = init_cLevel(); + programName = lastNameFromPath(programName); + #ifdef ZSTD_MULTITHREAD +- nbWorkers = 1; ++ nbWorkers = 0; + #endif + + /* preset behaviors */ + diff --git a/zstd.spec b/zstd.spec index 2069e59..35995a7 100644 --- a/zstd.spec +++ b/zstd.spec @@ -2,12 +2,8 @@ %define major 1 %define libname %mklibname %{oname} %{major} %define devname %mklibname %{oname} -d - -# aarch64 and armv7hl at least currently segfault -# in ThreadPool test for the pzstd util -%ifarch %{ix86} x86_64 -%bcond_without pzstd -%endif +# static libraries are used by qemu. Please don't disable them. +%define sdevname %mklibname %{name} -d -s %bcond_with tests @@ -19,30 +15,28 @@ License: BSD and GPLv2+ Group: Archiving/Compression Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz +Patch0: zstd-1.3.4-multi-thread-default.patch Patch1: pzstd.1.patch BuildRequires: gtest-devel +BuildRequires: pkgconfig(liblz4) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +BuildRequires: cmake +BuildRequires: ninja %description Zstd, short for Zstandard, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level compression ratio. %files -%doc CHANGELOG README.md %{_bindir}/%{name} %{_bindir}/%{name}cat %{_bindir}/%{name}grep %{_bindir}/%{name}less %{_bindir}/%{name}mt -%if %{with pzstd} %{_bindir}/p%{name} -%{_mandir}/man1/p%{name}.1* -%endif %{_bindir}/un%{name} -%{_mandir}/man1/%{name}.1* -%{_mandir}/man1/%{name}cat.1* -%{_mandir}/man1/%{name}grep.1* -%{_mandir}/man1/%{name}less.1* -%{_mandir}/man1/un%{name}.1* +%{_mandir}/man1/* #---------------------------------------------------------------------------- @@ -68,44 +62,49 @@ Provides: %{name}-devel = %{EVRD} Header files for Zstd library. %files -n %{devname} -%{_includedir}/zbuff.h -%{_includedir}/zdict.h -%{_includedir}/zstd.h -%{_includedir}/zstd_errors.h +%doc %{_docdir}/zstd +%{_includedir}/*.h %{_libdir}/pkgconfig/libzstd.pc %{_libdir}/libzstd.so #---------------------------------------------------------------------------- +%package -n %{sdevname} +Summary: Static libraries for zstd +Group: Development/C +Requires: %{devname} = %{version}-%{release} + +%description -n %{sdevname} +Static library for zstd. + +%files -n %{sdevname} +%{_libdir}/libzstd.a + +#---------------------------------------------------------------------------- + %prep -%setup -q +%autosetup -p1 +# Get rid of -L/usr/lib insanity +sed -i -e 's,-L\${libdir} ,,g' lib/*.pc.in +sed -i -e '/^Cflags:/d' lib/*.pc.in find -name .gitignore -delete -%if %{with pzstd} -%patch1 -p1 -%endif %build -for dir in lib programs; do - CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" %make CC=%{__cc} -C "$dir" -done -%if %{with pzstd} -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" %make CC=%{__cc} -C 'contrib/pzstd' -%endif +%set_build_flags +pushd build/cmake +%cmake -DZSTD_BUILD_CONTRIB:BOOL=ON \ + -DZSTD_LEGACY_SUPPORT:BOOL=ON \ + -DZSTD_LZ4_SUPPORT:BOOL=ON \ + -DZSTD_LZMA_SUPPORT:BOOL=ON \ + -DZSTD_PROGRAMS_LINK_SHARED:BOOL=ON \ + -DZSTD_ZLIB_SUPPORT:BOOL=ON -G Ninja + +%ninja_build +popd %install -%makeinstall_std PREFIX=%{_prefix} LIBDIR=%{_libdir} - -# Don't install the static lib -rm %{buildroot}%{_libdir}/libzstd.a -%if %{with pzstd} -install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd -install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 -%endif - -%if %{with tests} -%check -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" make -C tests test-zstd -%if %{with pzstd} -CFLAGS="%{optflags}" LDFLAGS="%{ldflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test -%endif -%endif +pushd build/cmake +%ninja_install -C build +install -m 755 build/contrib/pzstd/pzstd %{buildroot}%{_bindir}/ +install -D -m644 build/programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 +popd From a5913790c0bfe4945e1c2ad06307a0a45b551b15 Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 22 Jun 2020 10:30:19 +0000 Subject: [PATCH 05/16] 1.4.5 --- .abf.yml | 2 +- pzstd.1.patch | 18 ------------------ zstd-1.3.4-multi-thread-default.patch | 11 +++++------ zstd.spec | 4 ++-- 4 files changed, 8 insertions(+), 27 deletions(-) delete mode 100644 pzstd.1.patch diff --git a/.abf.yml b/.abf.yml index 0b807f4..9fd5c23 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.4.4.tar.gz: 8ec1a47b704001c1804b8670a3c86f4baf035c07 + zstd-1.4.5.tar.gz: 9c344c2660c990b6d6a9cced73db3a0dfe2b0092 diff --git a/pzstd.1.patch b/pzstd.1.patch deleted file mode 100644 index c0c451a..0000000 --- a/pzstd.1.patch +++ /dev/null @@ -1,18 +0,0 @@ -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 -+.TP -+.BR \-p ", " --processes -+ number of threads to use for (de)compression (default:4) -+ -+ - . - .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/zstd-1.3.4-multi-thread-default.patch b/zstd-1.3.4-multi-thread-default.patch index 025acfd..6efa9cb 100644 --- a/zstd-1.3.4-multi-thread-default.patch +++ b/zstd-1.3.4-multi-thread-default.patch @@ -1,8 +1,8 @@ -diff -Naur zstd-1.3.8/programs/zstdcli.c zstd-1.3.8/programs/new-zstdcli.c ---- zstd-1.3.8/programs/zstdcli.c 2018-12-27 13:42:44.000000000 +0100 -+++ zstd-1.3.8/programs/new-zstdcli.c 2019-01-01 04:30:50.000000000 +0100 -@@ -576,7 +576,7 @@ - cLevel = init_cLevel(); +diff -Naur zstd-1.4.5/programs/zstdcli.c zstd-1.4.5.tpg/programs/zstdcli.c +--- zstd-1.4.5/programs/zstdcli.c 2020-05-22 05:04:00.000000000 +0000 ++++ zstd-1.4.5.tpg/programs/zstdcli.c 2020-05-22 08:33:46.031001998 +0000 +@@ -695,7 +695,7 @@ + if ((filenames==NULL) || (file_of_names==NULL)) { DISPLAY("zstd: allocation error \n"); exit(1); } programName = lastNameFromPath(programName); #ifdef ZSTD_MULTITHREAD - nbWorkers = 1; @@ -10,4 +10,3 @@ diff -Naur zstd-1.3.8/programs/zstdcli.c zstd-1.3.8/programs/new-zstdcli.c #endif /* preset behaviors */ - diff --git a/zstd.spec b/zstd.spec index 35995a7..53db260 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,14 +9,13 @@ Summary: Zstd compression library Name: zstd -Version: 1.4.4 +Version: 1.4.5 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: zstd-1.3.4-multi-thread-default.patch -Patch1: pzstd.1.patch BuildRequires: gtest-devel BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) @@ -66,6 +65,7 @@ Header files for Zstd library. %{_includedir}/*.h %{_libdir}/pkgconfig/libzstd.pc %{_libdir}/libzstd.so +%{_libdir}/cmake/%{name}/*.cmake #---------------------------------------------------------------------------- From 4433d5e08a2edb6320b13eb0354f85e658f8845e Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Tue, 6 Oct 2020 15:39:00 +0000 Subject: [PATCH 06/16] new patch for e2k --- define-mtime-e2k.patch | 13 +++++++++++++ zstd.spec | 1 + 2 files changed, 14 insertions(+) create mode 100644 define-mtime-e2k.patch diff --git a/define-mtime-e2k.patch b/define-mtime-e2k.patch new file mode 100644 index 0000000..1c5c244 --- /dev/null +++ b/define-mtime-e2k.patch @@ -0,0 +1,13 @@ +diff --git a/programs/util.c b/programs/util.c +index ab1abd3..30c9237 100644 +--- a/programs/util.c ++++ b/programs/util.c +@@ -28,7 +28,7 @@ extern "C" { + # include /* _chmod */ + #else + # include /* chown, stat */ +-# if PLATFORM_POSIX_VERSION < 200809L ++# if PLATFORM_POSIX_VERSION < 200809L || !defined(st_mtime) + # include /* utime */ + # else + # include /* AT_FDCWD */ diff --git a/zstd.spec b/zstd.spec index 53db260..0cf1af2 100644 --- a/zstd.spec +++ b/zstd.spec @@ -16,6 +16,7 @@ Group: Archiving/Compression Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: zstd-1.3.4-multi-thread-default.patch +Patch1: define-mtime-e2k.patch BuildRequires: gtest-devel BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) From 199c83281168025c6fcad9adfabba5d6697843de Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Tue, 6 Oct 2020 16:09:41 +0000 Subject: [PATCH 07/16] add more patches --- dont-vectorize-like-a-clang-e2k.patch | 13 +++++++++++++ zstd.spec | 1 + 2 files changed, 14 insertions(+) create mode 100644 dont-vectorize-like-a-clang-e2k.patch diff --git a/dont-vectorize-like-a-clang-e2k.patch b/dont-vectorize-like-a-clang-e2k.patch new file mode 100644 index 0000000..9bb45ca --- /dev/null +++ b/dont-vectorize-like-a-clang-e2k.patch @@ -0,0 +1,13 @@ +diff --git a/lib/common/compiler.h b/lib/common/compiler.h +index 95e9483..088afcf 100644 +--- a/lib/common/compiler.h ++++ b/lib/common/compiler.h +@@ -139,7 +139,7 @@ + + /* vectorization + * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */ +-#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) ++#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && !defined(__LCC__) + # if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5) + # define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) + # else diff --git a/zstd.spec b/zstd.spec index 0cf1af2..6b6eb3f 100644 --- a/zstd.spec +++ b/zstd.spec @@ -17,6 +17,7 @@ Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: zstd-1.3.4-multi-thread-default.patch Patch1: define-mtime-e2k.patch +Patch2: dont-vectorize-like-a-clang-e2k.patch BuildRequires: gtest-devel BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) From c060cfe65970460a3625ef983f608f524cbc3cac Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Wed, 23 Dec 2020 09:38:59 +0000 Subject: [PATCH 08/16] 1.4.8 --- .abf.yml | 2 +- define-mtime-e2k.patch | 13 ------------- zstd-1.3.4-multi-thread-default.patch | 12 ------------ zstd.spec | 4 +--- 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 define-mtime-e2k.patch delete mode 100644 zstd-1.3.4-multi-thread-default.patch diff --git a/.abf.yml b/.abf.yml index 9fd5c23..22aeda8 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.4.5.tar.gz: 9c344c2660c990b6d6a9cced73db3a0dfe2b0092 + zstd-1.4.8.tar.gz: e3027d788b964429c773fab05e000061dc6eb3f6 diff --git a/define-mtime-e2k.patch b/define-mtime-e2k.patch deleted file mode 100644 index 1c5c244..0000000 --- a/define-mtime-e2k.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/programs/util.c b/programs/util.c -index ab1abd3..30c9237 100644 ---- a/programs/util.c -+++ b/programs/util.c -@@ -28,7 +28,7 @@ extern "C" { - # include /* _chmod */ - #else - # include /* chown, stat */ --# if PLATFORM_POSIX_VERSION < 200809L -+# if PLATFORM_POSIX_VERSION < 200809L || !defined(st_mtime) - # include /* utime */ - # else - # include /* AT_FDCWD */ diff --git a/zstd-1.3.4-multi-thread-default.patch b/zstd-1.3.4-multi-thread-default.patch deleted file mode 100644 index 6efa9cb..0000000 --- a/zstd-1.3.4-multi-thread-default.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur zstd-1.4.5/programs/zstdcli.c zstd-1.4.5.tpg/programs/zstdcli.c ---- zstd-1.4.5/programs/zstdcli.c 2020-05-22 05:04:00.000000000 +0000 -+++ zstd-1.4.5.tpg/programs/zstdcli.c 2020-05-22 08:33:46.031001998 +0000 -@@ -695,7 +695,7 @@ - if ((filenames==NULL) || (file_of_names==NULL)) { DISPLAY("zstd: allocation error \n"); exit(1); } - programName = lastNameFromPath(programName); - #ifdef ZSTD_MULTITHREAD -- nbWorkers = 1; -+ nbWorkers = 0; - #endif - - /* preset behaviors */ diff --git a/zstd.spec b/zstd.spec index 6b6eb3f..4dc3a8b 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,14 +9,12 @@ Summary: Zstd compression library Name: zstd -Version: 1.4.5 +Version: 1.4.8 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: zstd-1.3.4-multi-thread-default.patch -Patch1: define-mtime-e2k.patch Patch2: dont-vectorize-like-a-clang-e2k.patch BuildRequires: gtest-devel BuildRequires: pkgconfig(liblz4) From d3303229291d8b670c0f5abc6b5ea8ba48aadd5e Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 17 May 2021 10:13:55 +0000 Subject: [PATCH 09/16] 1.5.0 --- .abf.yml | 2 +- zstd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.abf.yml b/.abf.yml index 22aeda8..28c04a0 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.4.8.tar.gz: e3027d788b964429c773fab05e000061dc6eb3f6 + zstd-1.5.0.tar.gz: 3299248fcd44d7f21ba2f1f198c1173eeb3c4f32 diff --git a/zstd.spec b/zstd.spec index 4dc3a8b..5268b0b 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Summary: Zstd compression library Name: zstd -Version: 1.4.8 +Version: 1.5.0 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression From e9550750ce174d571d8378402b22405099109012 Mon Sep 17 00:00:00 2001 From: Andrey Grigorev Date: Wed, 11 Aug 2021 06:30:52 +0000 Subject: [PATCH 10/16] MassBuild#2339: Increase release tag --- zstd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zstd.spec b/zstd.spec index 5268b0b..33af7e5 100644 --- a/zstd.spec +++ b/zstd.spec @@ -10,7 +10,7 @@ Summary: Zstd compression library Name: zstd Version: 1.5.0 -Release: 1 +Release: 2 License: BSD and GPLv2+ Group: Archiving/Compression Url: http://www.zstd.net/ From 922a624197a389b210b4a5152b2883498684bd4a Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 20 Jun 2022 16:03:48 +0000 Subject: [PATCH 11/16] 1.5.2 upgrade --- .abf.yml | 2 +- dont-vectorize-like-a-clang-e2k.patch | 13 ------------- zstd.spec | 8 +++++--- 3 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 dont-vectorize-like-a-clang-e2k.patch diff --git a/.abf.yml b/.abf.yml index 28c04a0..a965ce9 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.5.0.tar.gz: 3299248fcd44d7f21ba2f1f198c1173eeb3c4f32 + zstd-1.5.2.tar.gz: 8ddf671abb68fd7ed2c655e84753c0e899477455 diff --git a/dont-vectorize-like-a-clang-e2k.patch b/dont-vectorize-like-a-clang-e2k.patch deleted file mode 100644 index 9bb45ca..0000000 --- a/dont-vectorize-like-a-clang-e2k.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/common/compiler.h b/lib/common/compiler.h -index 95e9483..088afcf 100644 ---- a/lib/common/compiler.h -+++ b/lib/common/compiler.h -@@ -139,7 +139,7 @@ - - /* vectorization - * older GCC (pre gcc-4.3 picked as the cutoff) uses a different syntax */ --#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) -+#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && !defined(__LCC__) - # if (__GNUC__ == 4 && __GNUC_MINOR__ > 3) || (__GNUC__ >= 5) - # define DONT_VECTORIZE __attribute__((optimize("no-tree-vectorize"))) - # else diff --git a/zstd.spec b/zstd.spec index 33af7e5..1ebc263 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,13 +9,12 @@ Summary: Zstd compression library Name: zstd -Version: 1.5.0 -Release: 2 +Version: 1.5.2 +Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression Url: http://www.zstd.net/ Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz -Patch2: dont-vectorize-like-a-clang-e2k.patch BuildRequires: gtest-devel BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(liblzma) @@ -88,6 +87,9 @@ Static library for zstd. sed -i -e 's,-L\${libdir} ,,g' lib/*.pc.in sed -i -e '/^Cflags:/d' lib/*.pc.in find -name .gitignore -delete +# Don't use obsolete standards +# https://github.com/facebook/zstd/issues/3163 +sed -i -e 's,c99,gnu2a,g' build/cmake/CMakeModules/AddZstdCompilationFlags.cmake %build %set_build_flags From 167278795a7905a1ce7afc3d976e9621cc72ae3b Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 6 Feb 2023 16:48:59 +0000 Subject: [PATCH 12/16] fix provides --- zstd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/zstd.spec b/zstd.spec index 1ebc263..ad0fed5 100644 --- a/zstd.spec +++ b/zstd.spec @@ -72,6 +72,7 @@ Header files for Zstd library. Summary: Static libraries for zstd Group: Development/C Requires: %{devname} = %{version}-%{release} +Provides: %{name}-static-devel = %{EVRD} %description -n %{sdevname} Static library for zstd. From 157420e33fe8e36c3f7c24f8767a6f91e30d103c Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 6 Feb 2023 17:03:54 +0000 Subject: [PATCH 13/16] fix riscv build --- zstd.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zstd.spec b/zstd.spec index ad0fed5..52c8588 100644 --- a/zstd.spec +++ b/zstd.spec @@ -94,6 +94,10 @@ sed -i -e 's,c99,gnu2a,g' build/cmake/CMakeModules/AddZstdCompilationFlags.cmake %build %set_build_flags +%ifarch %{riscv} +export LDFLAGS="%{ldflags} -latomic" +%endif + pushd build/cmake %cmake -DZSTD_BUILD_CONTRIB:BOOL=ON \ -DZSTD_LEGACY_SUPPORT:BOOL=ON \ From 42b1808831b5482bd5ba9b0c641d5c9e895ce69f Mon Sep 17 00:00:00 2001 From: Aleksandr Proklov Date: Mon, 13 Feb 2023 15:29:57 +0900 Subject: [PATCH 14/16] Update version to 1.5.4 --- .abf.yml | 2 +- zstd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.abf.yml b/.abf.yml index a965ce9..8947dc5 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.5.2.tar.gz: 8ddf671abb68fd7ed2c655e84753c0e899477455 + zstd-1.5.4.tar.gz: cb4b59efb90859059c00951799f2f7f8df0a8356 diff --git a/zstd.spec b/zstd.spec index 52c8588..3b8a5bc 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Summary: Zstd compression library Name: zstd -Version: 1.5.2 +Version: 1.5.4 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression From f1bb521a0e855db0411b4d3dff95cd423b717364 Mon Sep 17 00:00:00 2001 From: Aleksandr Proklov Date: Thu, 6 Apr 2023 13:35:27 +0300 Subject: [PATCH 15/16] Update version to 1.5.5 --- .abf.yml | 2 +- zstd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.abf.yml b/.abf.yml index 8947dc5..d919bd7 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.5.4.tar.gz: cb4b59efb90859059c00951799f2f7f8df0a8356 + zstd-1.5.5.tar.gz: 93f54404a63845ecf9133471275c38040954cbfe diff --git a/zstd.spec b/zstd.spec index 3b8a5bc..17267cf 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Summary: Zstd compression library Name: zstd -Version: 1.5.4 +Version: 1.5.5 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression From f6806a01444fdbfa89d829ac247a1ee0e1459a64 Mon Sep 17 00:00:00 2001 From: Alexander Stefanov Date: Mon, 1 Apr 2024 12:47:20 +0000 Subject: [PATCH 16/16] 1.5.6 --- .abf.yml | 2 +- zstd.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.abf.yml b/.abf.yml index d919bd7..a06f931 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,2 @@ sources: - zstd-1.5.5.tar.gz: 93f54404a63845ecf9133471275c38040954cbfe + zstd-1.5.6.tar.gz: f7fab0328d710aa077b6c83433073be852938d79 diff --git a/zstd.spec b/zstd.spec index 17267cf..afd5498 100644 --- a/zstd.spec +++ b/zstd.spec @@ -9,7 +9,7 @@ Summary: Zstd compression library Name: zstd -Version: 1.5.5 +Version: 1.5.6 Release: 1 License: BSD and GPLv2+ Group: Archiving/Compression