Compare commits

..

15 Commits
rawhide ... el6

Author SHA1 Message Date
Pádraig Brady ee3876414a sync lib/Makefile fix from upstream
The previous one incorrectly enabled multithread options everywhere
2020-05-25 15:36:40 +01:00
Pádraig Brady cda3b512c8 build shared library with correct compiler flags
* lib-make.patch: Fix regression in 1.4.5 lib/Makefile
* zstd.spec: Apply the patch
2020-05-25 13:37:33 +01:00
Pádraig Brady e2ac2a6134 latest upstream (1.4.5) 2020-05-22 16:30:53 +01:00
Avi Kivity 453ed8eead 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.
2020-05-22 13:27:49 +01:00
Pádraig Brady 37c28eeccb latest upstream (1.4.4) 2020-01-15 14:54:08 +00:00
Pádraig Brady e052aebc36 latest upstream (1.4.2) 2019-07-31 15:38:53 +01:00
Pádraig Brady d9876f667d latest upstream (1.4.0)
(cherry picked from commit 67c4c7bf68)
2019-04-29 09:52:22 -07:00
Pádraig Brady 9036269b65 latest upstream (1.3.8) 2019-01-01 06:14:23 -08:00
Pádraig Brady bd5449ebb8 latest upstream (1.3.6)
(cherry-picked from aecbe7d8e7)
2018-10-07 20:01:19 -07:00
Pádraig Brady 2a1c3e4008 fix zstd -l processing with closed stdin
(cherry picked from commit 53ca653abf)
2018-07-01 22:23:02 -07:00
Pádraig Brady 3b1a7e3edd latest upstream (1.3.5)
(cherry picked from commit e74f648564)
2018-07-01 22:22:45 -07:00
Pádraig Brady dd0b032335 latest upstream (1.3.4)
Cherry-picked from 21908004d0
2018-03-27 23:18:26 -07:00
Pádraig Brady 3f57329121 Merge branch 'master' into el6 2017-12-21 16:51:06 +00:00
Pádraig Brady 0a8443e1b2 unconditionally set -lrt 2017-11-10 00:10:24 -08:00
Pádraig Brady ff994bc472 depend on -lrt explicitly for clock_gettime 2017-11-09 23:48:22 -08:00
5 changed files with 65 additions and 150 deletions

6
.gitignore vendored
View File

@ -14,9 +14,3 @@
/zstd-1.4.2.tar.gz
/zstd-1.4.4.tar.gz
/zstd-1.4.5.tar.gz
/zstd-1.4.7.tar.gz
/zstd-1.4.9.tar.gz
/zstd-1.5.0.tar.gz
/zstd-1.5.1.tar.gz
/zstd-1.5.2.tar.gz
/zstd-1.5.4.tar.gz

20
lib-make.patch Normal file
View File

@ -0,0 +1,20 @@
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

View File

@ -1,9 +1,9 @@
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
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
@ -12,6 +12,7 @@ diff -Naur zstd-1.5.4/programs/zstd.1 zstd-1.5.4.new/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:
.

View File

@ -1 +1 @@
SHA512 (zstd-1.5.4.tar.gz) = 2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394
SHA512 (zstd-1.4.5.tar.gz) = 417b813ade6c8436690bd9d6da34a9f87f50e7378752b72e63066befbee496392a4b72896fa56688d814f461871ab31d3c6637497ff2ed7a282d58513631a38b

170
zstd.spec
View File

@ -1,21 +1,15 @@
# enable asm implementations by default
%bcond_without asm
# enable .lz4 support by default
%bcond_without lz4
# enable .xz/.lzma support by default
%bcond_without lzma
# enable .gz support by default
%bcond_without zlib
# enable pzstd support by default
%bcond_without pzstd
# gcc-4.4 is currently too old to compile pzstd
%if 0%{?fedora} || 0%{?rhel} > 6
# aarch64 and armv7hl at least currently segfault
# in ThreadPool test for the pzstd util
%ifarch %{ix86} x86_64
%global with_pzstd 1
%endif
%endif
Name: zstd
Version: 1.5.4
Release: 1%{?dist}
Version: 1.4.5
Release: 3%{?dist}
Summary: Zstd compression library
License: BSD and GPLv2
@ -23,22 +17,9 @@ 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: make
BuildRequires: gcc gtest-devel
%if %{with lz4}
BuildRequires: lz4-devel
%endif
%if %{with lzma}
BuildRequires: xz-devel
%endif
%if %{with pzstd}
BuildRequires: gcc-c++
%endif
%if %{with zlib}
BuildRequires: zlib-devel
%endif
BuildRequires: execstack
%description
Zstd, short for Zstandard, is a fast lossless compression algorithm,
@ -67,44 +48,40 @@ Static variant of the Zstd library.
%prep
%setup -q
find -name .gitignore -delete
%if %{with pzstd}
%if 0%{?with_pzstd}
%patch1 -p1
%endif
%patch2 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
export PREFIX="%{_prefix}"
export LIBDIR="%{_libdir}"
%make_build -C lib lib-mt %{!?with_asm:ZSTD_NO_ASM=1}
%make_build -C programs %{!?with_asm:ZSTD_NO_ASM=1}
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS"
%make_build -C contrib/pzstd %{!?with_asm:ZSTD_NO_ASM=1}
%{?__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
%if 0%{?with_pzstd}
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/pzstd'
%endif
%check
execstack lib/libzstd.so.1
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
make -C tests test-zstd
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS"
make -C contrib/pzstd test
%{?__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
%endif
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
%if %{with pzstd}
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%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
%endif
%files
%doc CHANGELOG README.md
%{_bindir}/%{name}
%if %{with pzstd}
%if 0%{?with_pzstd}
%{_bindir}/p%{name}
%{_mandir}/man1/p%{name}.1*
%endif
@ -118,86 +95,27 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%{_mandir}/man1/%{name}cat.1*
%{_mandir}/man1/%{name}grep.1*
%{_mandir}/man1/%{name}less.1*
%license COPYING LICENSE
%license LICENSE
%files -n lib%{name}
%{_libdir}/libzstd.so.*
%license COPYING LICENSE
%license LICENSE
%files -n lib%{name}-devel
%{_includedir}/zbuff.h
%{_includedir}/zdict.h
%{_includedir}/zstd.h
%{_includedir}/zstd_errors.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -n lib%{name}-static
%{_libdir}/libzstd.a
%ldconfig_scriptlets -n lib%{name}
%changelog
* Mon Feb 13 2023 Pádraig Brady <P@draigBrady.com> - 1.5.4-1
- Latest upstream
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu May 19 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 1.5.2-2
- ThreadPool segfault fixed so build pzst everywhere
* Sat Jan 22 2022 Pádraig Brady <P@draigBrady.com> - 1.5.2-1
- Latest upstream
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Jan 11 2022 Pádraig Brady <P@draigBrady.com> - 1.5.1-6
- Re-enable CET protections (#2039353)
* Fri Jan 07 2022 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.5.1-5
- Enable gz, .xz/.lzma and .lz4 support
* Mon Jan 03 2022 Pádraig Brady <P@draigBrady.com> - 1.5.1-4
- Use correct prefix for pkgconfig.
* Wed Dec 29 2021 Pádraig Brady <P@draigBrady.com> - 1.5.1-3
- Avoid executable stack on i686 also.
* Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.5.1-2
- 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 <P@draigBrady.com> - 1.5.1-1
- Latest upstream
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun May 16 2021 Pádraig Brady <P@draigBrady.com> - 1.5.0-2
- Latest upstream
* Fri Mar 05 2021 Pádraig Brady <P@draigBrady.com> - 1.4.9-1
- Latest upstream
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Dec 17 2020 Pádraig Brady <P@draigBrady.com> - 1.4.7-1
- Latest upstream
* Wed Aug 26 2020 Jeff Law <law@redhat.com> - 1.4.5-6
- Do not force C++11 mode
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.4.5-4
- Build libzstd with multi-threading support
* Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
- Build shared library with correct compiler flags
@ -207,45 +125,27 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
* Fri May 22 2020 Avi Kivity <avi@scylladb.com> - 1.4.4-3
- Added static library subpackage
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 15 2020 Pádraig Brady <P@draigBrady.com> - 1.4.4-1
- Latest upstream
* Wed Jul 31 2019 Pádraig Brady <P@draigBrady.com> - 1.4.2-1
- Latest upstream
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
- Latest upstream
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Dec 31 2018 Pádraig Brady <P@draigBrady.com> - 1.3.8-1
- Latest upstream
* Mon Oct 08 2018 Pádraig Brady <P@draigBrady.com> - 1.3.6-1
- Latest upstream
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Pádraig Brady <P@draigBrady.com> - 1.3.5.1
- Latest upstream
* Wed Mar 28 2018 Pádraig Brady <P@draigBrady.com> - 1.3.4-1
- Latest upstream
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.3-2
- Switch to %%ldconfig_scriptlets
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
- Latest upstream