summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-04-13 13:05:00 -0400
committerMike Gilbert <floppym@gentoo.org>2024-04-13 13:10:47 -0400
commitd58730757b79ce429d5fbe8f35dede6074d4c243 (patch)
tree362211b08559d461e797abe783c714cdf40c00fb
parentsys-kernel/linux-docs: disable py3.9 (diff)
downloadgentoo-d58730757b79ce429d5fbe8f35dede6074d4c243.tar.gz
gentoo-d58730757b79ce429d5fbe8f35dede6074d4c243.tar.bz2
gentoo-d58730757b79ce429d5fbe8f35dede6074d4c243.zip
sys-libs/libseccomp: backport fix for arch-syscall-check
Bug: https://bugs.gentoo.org/926648 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r--sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch45
-rw-r--r--sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild1
2 files changed, 46 insertions, 0 deletions
diff --git a/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch b/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch
new file mode 100644
index 000000000000..238098ad4c9e
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.5.5-arch-syscall-check.patch
@@ -0,0 +1,45 @@
+From 744c9a897b74ad66d065791593e25a05e4b6f6a1 Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Tue, 1 Nov 2022 11:59:51 +0100
+Subject: [PATCH] src: Make arch-syscall-check work in VPATH build
+
+The aim of arch-syscall-check test is to check for syscalls
+missing implementation. It does so by comparing two files:
+
+ 1) src/syscalls.csv
+ 2) include/seccomp-syscalls.h
+
+However, due to use of relative paths these files are not found
+when doing a VPATH build. But, we can re-use an idea from GNU
+coreutils and get an absolute path to the source dir. All that's
+needed then is to prefix those two paths with the source dir
+path.
+
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
+Signed-off-by: Paul Moore <paul@paul-moore.com>
+---
+ src/arch-syscall-check | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/arch-syscall-check b/src/arch-syscall-check
+index ae67daa..9c7fd41 100755
+--- a/src/arch-syscall-check
++++ b/src/arch-syscall-check
+@@ -22,8 +22,11 @@
+ # along with this library; if not, see <http://www.gnu.org/licenses>.
+ #
+
+-SYSCALL_CSV="./syscalls.csv"
+-SYSCALL_HDR="../include/seccomp-syscalls.h"
++# Based on an idea from GNU coreutils
++abs_topsrcdir="$(unset CDPATH; cd $(dirname $0)/.. && pwd)"
++
++SYSCALL_CSV="$abs_topsrcdir/src/syscalls.csv"
++SYSCALL_HDR="$abs_topsrcdir/include/seccomp-syscalls.h"
+
+ function check_snr() {
+ (export LC_ALL=C; diff \
+--
+2.44.0
+
diff --git a/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
index 6d3ea7b07d2b..4c007df8cdfd 100644
--- a/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
+++ b/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild
@@ -49,6 +49,7 @@ PATCHES=(
"${FILESDIR}"/libseccomp-python-shared.patch
"${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch
"${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch
+ "${FILESDIR}"/libseccomp-2.5.5-arch-syscall-check.patch
)
src_prepare() {