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 88 additions and 19 deletions

8
.gitignore vendored
View File

@ -6,3 +6,11 @@
/zstd-1.3.1.tar.gz
/zstd-1.3.2.tar.gz
/zstd-1.3.3.tar.gz
/zstd-1.3.4.tar.gz
/zstd-1.3.5.tar.gz
/zstd-1.3.6.tar.gz
/zstd-1.3.8.tar.gz
/zstd-1.4.0.tar.gz
/zstd-1.4.2.tar.gz
/zstd-1.4.4.tar.gz
/zstd-1.4.5.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,11 +1,10 @@
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 @@
.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,6 +13,6 @@ diff -Naur zstd-1.2.0.orig/programs/zstd.1 zstd-1.2.0/programs/zstd.1
+ number of threads to use for (de)compression (default:4)
+
+
.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)\.
.
.IP "" 0
.

View File

@ -1 +1 @@
SHA512 (zstd-1.3.3.tar.gz) = 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae
SHA512 (zstd-1.4.5.tar.gz) = 417b813ade6c8436690bd9d6da34a9f87f50e7378752b72e63066befbee496392a4b72896fa56688d814f461871ab31d3c6637497ff2ed7a282d58513631a38b

View File

@ -8,8 +8,8 @@
%endif
Name: zstd
Version: 1.3.3
Release: 1%{?dist}
Version: 1.4.5
Release: 3%{?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
@ -34,9 +35,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
@ -44,9 +51,11 @@ find -name .gitignore -delete
%if 0%{?with_pzstd}
%patch1 -p1
%endif
%patch2 -p1
%build
%{?__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
@ -56,6 +65,7 @@ CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/p
%check
%{?__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
@ -63,18 +73,13 @@ 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}
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 NEWS README.md
%doc CHANGELOG README.md
%{_bindir}/%{name}
%if 0%{?with_pzstd}
%{_bindir}/p%{name}
@ -83,9 +88,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}
@ -103,7 +112,40 @@ 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
* Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
- Build shared library with correct compiler flags
* Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1
- Latest upstream
* Fri May 22 2020 Avi Kivity <avi@scylladb.com> - 1.4.4-3
- Added static library subpackage
* 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
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
- Latest upstream
* 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
* 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
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
- Latest upstream