From 59bec70d0ccd121d320e649bfb35b63ae9d0abbb1aea54ba884b8a4bccb4f85d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 6 Jan 2020 16:08:39 +0000 Subject: [PATCH 1/2] Accepting request 761178 from home:Guillaume_G:branches:security - Backport patch to fix test on aarch64: * libseccomp-fix_aarch64-test.patch OBS-URL: https://build.opensuse.org/request/show/761178 OBS-URL: https://build.opensuse.org/package/show/security/libseccomp?expand=0&rev=70 --- libseccomp-fix_aarch64-test.patch | 36 +++++++++++++++++++++++++++++++ libseccomp.changes | 6 ++++++ libseccomp.spec | 4 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 libseccomp-fix_aarch64-test.patch diff --git a/libseccomp-fix_aarch64-test.patch b/libseccomp-fix_aarch64-test.patch new file mode 100644 index 0000000..563b190 --- /dev/null +++ b/libseccomp-fix_aarch64-test.patch @@ -0,0 +1,36 @@ +From 35803ceb43c453762a3ab5177c5f8d5dbb813478 Mon Sep 17 00:00:00 2001 +From: Paul Moore +Date: Tue, 5 Nov 2019 15:11:11 -0500 +Subject: [PATCH] tests: rely on __SNR_xxx instead of __NR_xxx for syscalls + +We recently changed how libseccomp handles syscall numbers that are +not defined natively, but we missed test #15. + +Signed-off-by: Paul Moore +--- + tests/15-basic-resolver.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c +index 6badef1..0c1eefe 100644 +--- a/tests/15-basic-resolver.c ++++ b/tests/15-basic-resolver.c +@@ -55,15 +55,15 @@ int main(int argc, char *argv[]) + unsigned int arch; + char *name = NULL; + +- if (seccomp_syscall_resolve_name("open") != __NR_open) ++ if (seccomp_syscall_resolve_name("open") != __SNR_open) + goto fail; +- if (seccomp_syscall_resolve_name("read") != __NR_read) ++ if (seccomp_syscall_resolve_name("read") != __SNR_read) + goto fail; + if (seccomp_syscall_resolve_name("INVALID") != __NR_SCMP_ERROR) + goto fail; + + rc = seccomp_syscall_resolve_name_rewrite(SCMP_ARCH_NATIVE, "openat"); +- if (rc != __NR_openat) ++ if (rc != __SNR_openat) + goto fail; + + while ((arch = arch_list[iter++]) != -1) { diff --git a/libseccomp.changes b/libseccomp.changes index a580f6e..3b9d89c 100644 --- a/libseccomp.changes +++ b/libseccomp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 6 14:23:04 UTC 2020 - Guillaume GARDET + +- Backport patch to fix test on aarch64: + * libseccomp-fix_aarch64-test.patch + ------------------------------------------------------------------- Thu Dec 19 23:06:51 UTC 2019 - Jan Engelhardt diff --git a/libseccomp.spec b/libseccomp.spec index 88c0356..b64cf74 100644 --- a/libseccomp.spec +++ b/libseccomp.spec @@ -1,7 +1,7 @@ # # spec file for package libseccomp # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,13 +24,13 @@ Summary: A Seccomp (mode 2) helper library License: LGPL-2.1-only Group: Development/Libraries/C and C++ URL: https://github.com/seccomp/libseccomp - Source: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz # no fitting key found #Source2: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz.asc Source3: %name.keyring Source99: baselibs.conf Patch1: no-static.diff +Patch2: libseccomp-fix_aarch64-test.patch BuildRequires: autoconf BuildRequires: automake >= 1.11 BuildRequires: fdupes From f688e26323d8066a408984936d7f76e7c545d84a20fe177b29e69e88ba5ce45c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 7 Jan 2020 16:29:38 +0000 Subject: [PATCH 2/2] Accepting request 761651 from home:Andreas_Schwab:Factory - Tests are passing on all architectures OBS-URL: https://build.opensuse.org/request/show/761651 OBS-URL: https://build.opensuse.org/package/show/security/libseccomp?expand=0&rev=71 --- libseccomp.changes | 5 +++++ libseccomp.spec | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libseccomp.changes b/libseccomp.changes index 3b9d89c..4597a37 100644 --- a/libseccomp.changes +++ b/libseccomp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 7 15:07:23 UTC 2020 - Andreas Schwab + +- Tests are passing on all architectures + ------------------------------------------------------------------- Mon Jan 6 14:23:04 UTC 2020 - Guillaume GARDET diff --git a/libseccomp.spec b/libseccomp.spec index b64cf74..29b55c5 100644 --- a/libseccomp.spec +++ b/libseccomp.spec @@ -106,15 +106,7 @@ find "%buildroot/%_libdir" -type f -name "*.la" -delete %fdupes %buildroot/%_prefix %check -# for ppc64* ref to boo#1142614 -%ifarch ppc s390 s390x i586 ppc64 ppc64le -make check || true -#pushd tests/ -#./regression -v -#popd -%else make check -%endif %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig