@ -1,3 +1,6 @@
# enable asm implementations by default
%bcond_without asm
# enable .lz4 support by default
%bcond_without lz4
@ -7,48 +10,26 @@
# enable .gz support by default
%bcond_without zlib
%if 0%{?rhel} && 0%{?rhel} <= 6
# gcc-4.4 is currently too old to compile pzstd
%bcond_with pzstd
%else
%ifarch %{ix86} x86_64
# enable pzstd support by default
%bcond_without pzstd
%else
# aarch64 and armv7hl at least currently segfault
# in ThreadPool test for the pzstd util
%bcond_with pzstd
%endif
%endif
%ifarch x86_64
%bcond_without asm
%else
# Disable asm to ensure non excutable stack
# used on archs where asm not actually used
# https://github.com/facebook/zstd/issues/2963
%bcond_with asm
%endif
# Disable gtest
%bcond_with gtest
# Disable gtest on RHEL
%bcond gtest %[ !0%{?rhel} ]
Name: zstd
Version: 1.5.1
Release: 2 %{?dist}
Version: 1.5.5
Release: 9%{?dist}
Summary: Zstd compression library
License: BSD and GPLv2
License: BSD-3-Clause AND GPL-2.0-only
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: enable-CET .patch
Patch2: bti.patch
BuildRequires: make
BuildRequires: gcc
%if %{with gtest}
BuildRequires: gtest-devel
%endif
BuildRequires: gcc %{?with_gtest:gtest-devel}
%if %{with lz4}
BuildRequires: lz4-devel
%endif
@ -93,6 +74,7 @@ find -name .gitignore -delete
%if %{with pzstd}
%patch1 -p1
%endif
%patch2 -p1
%build
@ -113,12 +95,10 @@ execstack lib/libzstd.so.1
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
make -C tests test-zstd
%if %{with pzstd}
%if %{with gtest}
%if %{with pzstd} && %{with gtest}
export CXXFLAGS="$RPM_OPT_FLAGS"
make -C contrib/pzstd test
%endif
%endif
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
@ -163,32 +143,81 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%ldconfig_scriptlets -n lib%{name}
%changelog
* Mon Feb 07 2022 Jakub Martisko <jamartis@redhat.com> - 1.5.1-2
- Add some basic gating tests
Resolves: rhbz#2050272
* Wed Jan 12 2022 Michel Alexandre Salim <salimma@centosproject.org> - 1.5.1-1
- Rebase to the latest upstream version
- Enable optional gz, xz/lzma, and lz4 support in the zstd tool
- Disable amd64 assembly on non-x86_64 architectures (rhbz#2035802)
this should avoid the issue where an executable stack is created
- Re-enable CET protections (rhbz#2039353)
Resolves: rhbz#2039488
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jul 12 2021 Jakub Martisko <jamartis@redhat.com> - 1.5.0-1
* Rebase to the latest upstream version
Resolves: rhbz#1928094
* Thu Jul 01 2021 Jakub Martisko <jamartis@redhat.com> - 1.4.9-3
- Drop gtest-devel dependency
Resolves: rhbz#1977606
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.9-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.5.5-9
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.5.5-8
- Rebuilt for MSVSphere 10
* Tue Jul 23 2024 Jakub Martisko <jamartis@redhat.com> - 1.5.5-8
- Backport the patch that enables BTI on aarch64
Related: RHEL-50092
* Mon Jul 22 2024 Jakub Martisko <jamartis@redhat.com> - 1.5.5-7
- Add the gating test from rhel-9
Related: RHEL-50092
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.5.5-6
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jun 22 2023 Jiří Kučera <jkucera@redhat.com> - 1.5.5-3
- Drop gtest on RHEL (c9s backport)
* Thu Apr 13 2023 Lukáš Zaoral <lzaoral@redhat.com> - 1.5.5-2
- migrate to SPDX license format
* Wed Apr 05 2023 Pádraig Brady <P@draigBrady.com> - 1.5.5-1
- Latest upstream
* 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