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