RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/zstd#acbbb2c675385bc5a3d9d38b43c68d56e72f160a
This commit is contained in:
Troy Dawson 2020-10-15 15:31:32 -07:00
parent ca6e86c0d5
commit 810102f265
5 changed files with 280 additions and 0 deletions

16
.gitignore vendored
View File

@ -0,0 +1,16 @@
/zstd-1.1.0.tar.gz
/zstd-1.1.1.tar.gz
/zstd-1.1.3.tar.gz
/zstd-1.2.0.tar.gz
/zstd-1.3.0.tar.gz
/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

18
pzstd.1.patch Normal file
View File

@ -0,0 +1,18 @@
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
+.TP
+.BR \-p ", " --processes
+ number of threads to use for (de)compression (default:4)
+
+
.
.IP "" 0
.

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (zstd-1.4.5.tar.gz) = 417b813ade6c8436690bd9d6da34a9f87f50e7378752b72e63066befbee496392a4b72896fa56688d814f461871ab31d3c6637497ff2ed7a282d58513631a38b

225
zstd.spec Normal file
View File

@ -0,0 +1,225 @@
%if 0%{?rhel} && 0%{?rhel} <= 6
# gcc-4.4 is currently too old to compile pzstd
%bcond_with pzstd
%else
%ifarch %{ix86} x86_64
%bcond_without pzstd
%else
# aarch64 and armv7hl at least currently segfault
# in ThreadPool test for the pzstd util
%bcond_with pzstd
%endif
%endif
Name: zstd
Version: 1.4.5
Release: 6%{?dist}
Summary: Zstd compression library
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
Patch2: lib-make.patch
BuildRequires: gcc gtest-devel
%if %{with pzstd}
BuildRequires: gcc-c++
%endif
%description
Zstd, short for Zstandard, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression ratio.
%package -n lib%{name}
Summary: Zstd shared library
%description -n lib%{name}
Zstandard compression shared library.
%package -n lib%{name}-devel
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
find -name .gitignore -delete
%if %{with pzstd}
%patch1 -p1
%endif
%patch2 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
%make_build -C lib lib-mt
%make_build -C programs
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS"
%make_build -C contrib/pzstd
%endif
%check
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
%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
%endif
%files
%doc CHANGELOG README.md
%{_bindir}/%{name}
%if %{with pzstd}
%{_bindir}/p%{name}
%{_mandir}/man1/p%{name}.1*
%endif
%{_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 COPYING LICENSE
%files -n lib%{name}
%{_libdir}/libzstd.so.*
%license COPYING 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
%files -n lib%{name}-static
%{_libdir}/libzstd.a
%ldconfig_scriptlets -n lib%{name}
%changelog
* 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
* 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
* 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
* Fri Nov 10 2017 Pádraig Brady <P@draigBrady.com> - 1.3.2-1
- Latest upstream
* Mon Aug 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.1-1
- Latest upstream
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Jul 16 2017 Pádraig Brady <P@draigBrady.com> - 1.3.0-1
- Latest upstream
* Mon May 08 2017 Pádraig Brady <P@draigBrady.com> - 1.2.0-1
- Latest upstream
* Mon Mar 06 2017 Pádraig Brady <P@draigBrady.com> - 1.1.3-1
- Latest upstream
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
- Latest upstream
* Thu Oct 6 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
- Add pzstd(1)
* Thu Sep 29 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-1
- New upstream release
- Remove examples and static lib
* Mon Sep 12 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-2
- Adjust various upstream links
- Parameterize various items in spec file
* Mon Sep 5 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-1
- Initial release