diff --git a/.gitignore b/.gitignore index 6f0345b..118799f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libseccomp-2.5.2.tar.gz +libseccomp-2.5.3.tar.gz diff --git a/.libseccomp.metadata b/.libseccomp.metadata deleted file mode 100644 index 57568b8..0000000 --- a/.libseccomp.metadata +++ /dev/null @@ -1 +0,0 @@ -81e6fc7b63baae9ba2b607d920588eb4d5072d6b SOURCES/libseccomp-2.5.2.tar.gz diff --git a/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch b/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch deleted file mode 100644 index 521cb67..0000000 --- a/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --color -ru a/tests/11-basic-basic_errors.c b/tests/11-basic-basic_errors.c ---- a/tests/11-basic-basic_errors.c 2021-09-01 18:57:34.018676687 +0200 -+++ b/tests/11-basic-basic_errors.c 2021-11-05 15:04:34.647739284 +0100 -@@ -29,9 +29,13 @@ - int rc; - scmp_filter_ctx ctx; - uint32_t attr; -+ unsigned int api; - struct seccomp_notif *req = NULL; - struct seccomp_notif_resp *resp = NULL; - -+ /* get the api level */ -+ api = seccomp_api_get(); -+ - /* seccomp_init errors */ - ctx = seccomp_init(SCMP_ACT_ALLOW + 1); - if (ctx != NULL) -@@ -199,39 +203,41 @@ - ctx = NULL; - - /* seccomp notify errors */ -- ctx = seccomp_init(SCMP_ACT_ALLOW); -- if (ctx == NULL) -- return -1; -- rc = seccomp_notify_alloc(NULL, NULL); -- if (rc != 0) -- return -1; -- rc = seccomp_notify_alloc(&req, NULL); -- if (rc != 0) -- return -1; -- rc = seccomp_notify_alloc(NULL, &resp); -- if (rc != 0) -- return -1; -- seccomp_notify_free(NULL, NULL); -- seccomp_notify_free(req, resp); -- req = NULL; -- resp = NULL; -- rc = seccomp_notify_receive(-1, NULL); -- if (rc == 0) -- return -1; -- rc = seccomp_notify_respond(-1, NULL); -- if (rc == 0) -- return -1; -- rc = seccomp_notify_id_valid(-1, 0); -- if (rc == 0) -- return -1; -- rc = seccomp_notify_fd(NULL); -- if (rc == 0) -- return -1; -- rc = seccomp_notify_fd(ctx); -- if (rc == 0) -- return -1; -- seccomp_release(ctx); -- ctx = NULL; -+ if (api >= 5) { -+ ctx = seccomp_init(SCMP_ACT_ALLOW); -+ if (ctx == NULL) -+ return -1; -+ rc = seccomp_notify_alloc(NULL, NULL); -+ if (rc != 0) -+ return -1; -+ rc = seccomp_notify_alloc(&req, NULL); -+ if (rc != 0) -+ return -1; -+ rc = seccomp_notify_alloc(NULL, &resp); -+ if (rc != 0) -+ return -1; -+ seccomp_notify_free(NULL, NULL); -+ seccomp_notify_free(req, resp); -+ req = NULL; -+ resp = NULL; -+ rc = seccomp_notify_receive(-1, NULL); -+ if (rc == 0) -+ return -1; -+ rc = seccomp_notify_respond(-1, NULL); -+ if (rc == 0) -+ return -1; -+ rc = seccomp_notify_id_valid(-1, 0); -+ if (rc == 0) -+ return -1; -+ rc = seccomp_notify_fd(NULL); -+ if (rc == 0) -+ return -1; -+ rc = seccomp_notify_fd(ctx); -+ if (rc == 0) -+ return -1; -+ seccomp_release(ctx); -+ ctx = NULL; -+ } - - return 0; - } diff --git a/SPECS/libseccomp.spec b/libseccomp.spec similarity index 55% rename from SPECS/libseccomp.spec rename to libseccomp.spec index 536fbcb..c175fd9 100644 --- a/SPECS/libseccomp.spec +++ b/libseccomp.spec @@ -1,29 +1,19 @@ -%bcond_without check +Name: libseccomp +Version: 2.5.3 +Release: 10%{?dist} +Summary: Enhanced seccomp library +License: LGPL-2.1-only +URL: https://github.com/seccomp/libseccomp +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz -Summary: Enhanced seccomp library -Name: libseccomp -Version: 2.5.2 -Release: 1%{?dist} -ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x -License: LGPLv2 -Group: System Environment/Libraries -Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz -URL: https://github.com/seccomp/libseccomp +BuildRequires: gcc +BuildRequires: gperf +BuildRequires: make -## From: https://github.com/seccomp/libseccomp/commit/5532444587fa5f33a43179ca5cc710f1bb05f51f -Patch0101: 0101-fix-11-basic-basic_errors-on-old-kernels.patch - -Buildrequires: gperf -%ifarch %{valgrind_arches} +%ifnarch riscv64 s390 # Versions prior to 3.13.0-4 do not work on ARM with newer glibc 2.25.0-6 # See https://bugzilla.redhat.com/show_bug.cgi?id=1466017 -BuildRequires: valgrind >= 1:3.13.0-4 -%endif -# Upstream tests are not suited to some architectures -%ifarch s390 || s390x || ppc64le -%global good_arch 0 -%else -%global good_arch 1 +BuildRequires: valgrind >= 1:3.13.0-4 %endif %description @@ -34,9 +24,8 @@ application is allowed to execute, all of which are enforced by the Linux Kernel. %package devel -Summary: Development files used to build applications with libseccomp support -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} pkgconfig +Summary: Development files used to build applications with libseccomp support +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The libseccomp library provides an easy to use interface to the Linux Kernel's @@ -46,9 +35,8 @@ application is allowed to execute, all of which are enforced by the Linux Kernel. %package static -Summary: Enhanced seccomp static library -Group: Development/Libraries -Requires: %{name}-devel%{?_isa} = %{version}-%{release} pkgconfig +Summary: Enhanced seccomp static library +Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description static The libseccomp library provides an easy to use interface to the Linux Kernel's @@ -58,37 +46,28 @@ application is allowed to execute, all of which are enforced by the Linux Kernel. %prep -%setup -q - -%patch0101 -p1 +%autosetup -p1 %build %configure -make V=1 %{?_smp_mflags} +%make_build %install -rm -rf "%{buildroot}" -mkdir -p "%{buildroot}/%{_libdir}" -mkdir -p "%{buildroot}/%{_includedir}" -mkdir -p "%{buildroot}/%{_mandir}" -make V=1 DESTDIR="%{buildroot}" install -rm -f "%{buildroot}/%{_libdir}/libseccomp.la" +mkdir -p %{buildroot}/%{_libdir} +mkdir -p %{buildroot}/%{_includedir} +mkdir -p %{buildroot}/%{_mandir} + +%make_install + +rm -f %{buildroot}/%{_libdir}/libseccomp.la -%if %{with check} && %{good_arch} %check -make V=1 check -%endif +%make_build check -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig %files -%{!?_licensedir:%global license %%doc} %license LICENSE -%doc CREDITS -%doc README.md -%doc CHANGELOG +%doc CREDITS README.md CHANGELOG CONTRIBUTING.md %{_libdir}/libseccomp.so.* %files devel @@ -104,27 +83,87 @@ make V=1 check %{_libdir}/libseccomp.a %changelog -* Fri Nov 05 2021 Zoltan Fridrich - 2.5.2-1 -- rebase to 2.5.2 - resolves: rhbz#2019893 +* Tue Oct 29 2024 Troy Dawson - 2.5.3-10 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 -* Thu Feb 18 2021 Radovan Sroka - 2.5.1-1 -- rebase to 2.5.1 - resolves: rhbz#1927635 +* Mon Jun 24 2024 Troy Dawson - 2.5.3-9 +- Bump release for June 2024 mass rebuild -* Tue Apr 21 2020 Jiri Vymazal - 2.4.3-1 -- rebase to upstream version 2.4.3 - resolves: rhbz#1770693 - resolves: rhbz#1768583 +* Thu Jan 25 2024 Fedora Release Engineering - 2.5.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Fri May 31 2019 Marek Tamaskovic - 2.4.1-1 -- rebase to 2.4.1 +* Sun Jan 21 2024 Fedora Release Engineering - 2.5.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -* Fri May 10 2019 Daniel Kopecek - 2.3.3-4 -- spec: make the check phase conditional +* Thu Jul 20 2023 Fedora Release Engineering - 2.5.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild -* Fri Aug 3 2018 Florian Weimer - 2.3.3-3 -- Honor %%{valgrind_arches} +* Thu Jun 01 2023 Anderson Toshiyuki Sasaki - 2.5.3-5 +- SPDX migration + +* Thu Jan 19 2023 Fedora Release Engineering - 2.5.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 2.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 2.5.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Nov 06 2021 Neal Gompa - 2.5.3-1 +- New upstream version (#2020824) + +* Wed Nov 03 2021 Debarshi Ray - 2.5.2-1 +- New upstream version (#1900097) + +* Wed Nov 03 2021 Debarshi Ray - 2.5.1-1 +- New upstream version (#1900097) + +* Thu Jul 22 2021 Fedora Release Engineering - 2.5.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 2.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Aug 05 2020 Neal Gompa - 2.5.0-3 +- Apply fixes to change internal handling of the notification fd (#1865802) + +* Tue Jul 28 2020 Fedora Release Engineering - 2.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 24 2020 Neal Gompa - 2.5.0-1 +- New upstream version (#1858965) + +* Wed Jan 29 2020 Fedora Release Engineering - 2.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Dec 16 2019 Neal Gompa - 2.4.2-2 +- Modernize spec +- Backport fix for missing __SNR_ppoll symbol (#1777889) +- Refresh patch to build on aarch64 with upstream version + +* Wed Nov 20 2019 Zbigniew Jędrzejewski-Szmek - 2.4.2-1 +- New upstream version (#1765314) + +* Thu Jul 25 2019 Fedora Release Engineering - 2.4.1-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Apr 17 2019 Paul Moore - 2.4.1-0 +- New upstream version + +* Thu Mar 14 2019 Paul Moore - 2.4.0-0 +- New upstream version +- Added a hack to workaround test failures (see %%check above) + +* Fri Feb 01 2019 Fedora Release Engineering - 2.3.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Nov 07 2018 Paul Moore - 2.3.3-4 +- Remove ldconfig scriptlet, thanks to James Antill (RHBZ #1644074) + +* Fri Jul 13 2018 Fedora Release Engineering - 2.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 2.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -228,4 +267,3 @@ make V=1 check * Tue Jun 12 2012 Paul Moore - 0.1.0-0 - Initial version - diff --git a/sources b/sources new file mode 100644 index 0000000..4616327 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libseccomp-2.5.3.tar.gz) = 00170fe2360f0c0b33293dccfcc33e98fabb99619f34ecefbcc92bfdaa249ba91e7433226545b842b71542a3b224b6e980ea2ae656c4addf07e84a0def1870a0