libseccomp: upgraded package to upstream
Upgraded sys-libs/libseccomp to version 2.4.2-r1 on amd64, arm
BUG=b:155372505
TEST=tryjob
Change-Id: I36070796e4fc91b36b27c4ef969caa4a4e71311d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2174917
Tested-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Robert Kolchmeyer <rkolchmeyer@google.com>
(cherry picked from commit d589d3637bbb4e7168ff69f6d1ba4a8009383b77)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2185808
diff --git a/metadata/md5-cache/sys-libs/libseccomp-2.3.3 b/metadata/md5-cache/sys-libs/libseccomp-2.3.3
deleted file mode 100644
index a162ed3..0000000
--- a/metadata/md5-cache/sys-libs/libseccomp-2.3.3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=sys-kernel/linux-headers-4.3
-DESCRIPTION=high level interface to Linux seccomp filter
-EAPI=5
-HOMEPAGE=https://github.com/seccomp/libseccomp
-IUSE=static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
-KEYWORDS=*
-LICENSE=LGPL-2.1
-SLOT=0
-SRC_URI=https://github.com/seccomp/libseccomp/releases/download/v2.3.3/libseccomp-2.3.3.tar.gz
-_eclasses_=eutils 06133990e861be0fe60c2b428fd025d9 multibuild 40fe59465edacd730c644ec2bc197809 multilib b2f01ad412baf81650c23fcf0975fa33 multilib-build 1979aa0ff4d356d32507ca4650d9f37d multilib-minimal 8bddda43703ba94d8341f4e247f97566 toolchain-funcs 209edad4a5c4812e7b2f8021650974f0
-_md5_=eb6fe67807fff5c2383dd889389ed2fb
diff --git a/metadata/md5-cache/sys-libs/libseccomp-2.4.2-r1 b/metadata/md5-cache/sys-libs/libseccomp-2.4.2-r1
new file mode 100644
index 0000000..312b7d7
--- /dev/null
+++ b/metadata/md5-cache/sys-libs/libseccomp-2.4.2-r1
@@ -0,0 +1,12 @@
+DEFINED_PHASES=compile configure install prepare test
+DEPEND=>=sys-kernel/linux-headers-4.3
+DESCRIPTION=high level interface to Linux seccomp filter
+EAPI=7
+HOMEPAGE=https://github.com/seccomp/libseccomp
+IUSE=static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+KEYWORDS=*
+LICENSE=LGPL-2.1
+SLOT=0
+SRC_URI=https://github.com/seccomp/libseccomp/releases/download/v2.4.2/libseccomp-2.4.2.tar.gz
+_eclasses_=multibuild 40fe59465edacd730c644ec2bc197809 multilib b2f01ad412baf81650c23fcf0975fa33 multilib-build 1979aa0ff4d356d32507ca4650d9f37d multilib-minimal 8bddda43703ba94d8341f4e247f97566 toolchain-funcs 209edad4a5c4812e7b2f8021650974f0
+_md5_=c066bc019e96c2f2f7c88327b80d8245
diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest
index 92ebced..fd3d2a6 100644
--- a/sys-libs/libseccomp/Manifest
+++ b/sys-libs/libseccomp/Manifest
@@ -1 +1 @@
-DIST libseccomp-2.3.3.tar.gz 564546 SHA256 7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155 SHA512 845c7e0e916b5f5ad74da446ceff3250148b745c909185f6d5059e807d1b42fa6b74f356cce2a396bff0d4c7a3120e7cdad98d490a97d549327c7693fe1918be WHIRLPOOL 86dd59fc03145c2ec7746a20926ed4b56e307f829a9862d5f822b82699742349c1c0a7f39e75b66160a049969d5a0c63133a3215371fbceeb302978cf1da4bcb
+DIST libseccomp-2.4.2.tar.gz 601014 BLAKE2B cff2612498a6ff3097809e9e04542e0be12c2c5d80fd51c2abd35fb6ac59f3ef7fce1c5205216876c1f67eb762d31c7df8e0f237f3957b7710148a1298502ae5 SHA512 375a3c7c658be6a08b9bb30963e10bb49e8e066119e0be6d3d97faac3db18b8e2c6938d8b5d3874b2f5331ec8295170112fbae83b5a3b5a5bebc0d6705bdfdbb
diff --git a/sys-libs/libseccomp/files/libseccomp-2.4.2-missing_SNR_ppoll_defs.patch b/sys-libs/libseccomp/files/libseccomp-2.4.2-missing_SNR_ppoll_defs.patch
new file mode 100644
index 0000000..9194706
--- /dev/null
+++ b/sys-libs/libseccomp/files/libseccomp-2.4.2-missing_SNR_ppoll_defs.patch
@@ -0,0 +1,41 @@
+From e3647f5b6b52996bf30d0c2c1d1248e4182e1c1c Mon Sep 17 00:00:00 2001
+From: Miroslav Lichvar <mlichvar@redhat.com>
+Date: Wed, 13 Nov 2019 13:36:10 +0100
+Subject: [PATCH] api: define __SNR_ppoll again
+
+Commit bf747eb21e428c2b3ead6ebcca27951b681963a0 accidentally removed the
+__SNR_ppoll definition. Add it back, using a PNR value if disabled in
+the kernel headers.
+
+Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
+Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
+Signed-off-by: Paul Moore <paul@paul-moore.com>
+---
+ include/seccomp-syscalls.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h
+index 6457592..3c958df 100644
+--- a/include/seccomp-syscalls.h
++++ b/include/seccomp-syscalls.h
+@@ -272,6 +272,7 @@
+ #define __PNR_timerfd_gettime64 -10238
+ #define __PNR_timerfd_settime64 -10239
+ #define __PNR_utimensat_time64 -10240
++#define __PNR_ppoll -10241
+
+ /*
+ * libseccomp syscall definitions
+@@ -1359,6 +1360,12 @@
+ #define __SNR_poll __PNR_poll
+ #endif
+
++#ifdef __NR_ppoll
++#define __SNR_ppoll __NR_ppoll
++#else
++#define __SNR_ppoll __PNR_ppoll
++#endif
++
+ #ifdef __NR_ppoll_time64
+ #define __SNR_ppoll_time64 __NR_ppoll_time64
+ #else
diff --git a/sys-libs/libseccomp/libseccomp-2.3.3.ebuild b/sys-libs/libseccomp/libseccomp-2.4.2-r1.ebuild
similarity index 70%
rename from sys-libs/libseccomp/libseccomp-2.3.3.ebuild
rename to sys-libs/libseccomp/libseccomp-2.4.2-r1.ebuild
index 80aa858..7661e7a 100644
--- a/sys-libs/libseccomp/libseccomp-2.3.3.ebuild
+++ b/sys-libs/libseccomp/libseccomp-2.4.2-r1.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# TODO: Add python support.
-EAPI="5"
+EAPI=7
-inherit eutils multilib-minimal
+inherit multilib-minimal
DESCRIPTION="high level interface to Linux seccomp filter"
HOMEPAGE="https://github.com/seccomp/libseccomp"
@@ -20,20 +20,26 @@
# version here, just be safe and pull in the latest stable ones. #551248
DEPEND=">=sys-kernel/linux-headers-4.3"
+PATCHES=(
+ "${FILESDIR}/${P}-missing_SNR_ppoll_defs.patch"
+)
+
src_prepare() {
+ default
sed -i \
-e '/_LDFLAGS/s:-static::' \
tools/Makefile.in || die
}
multilib_src_configure() {
- ECONF_SOURCE=${S} \
- econf \
- $(use_enable static-libs static) \
+ local myeconfargs=(
+ $(use_enable static-libs static)
--disable-python
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
- find "${ED}" -name libseccomp.la -delete
+ find "${ED}" -type f -name libseccomp.la -delete || die
einstalldocs
}
diff --git a/sys-libs/libseccomp/metadata.xml b/sys-libs/libseccomp/metadata.xml
index 56f0df8..b31e5b3 100644
--- a/sys-libs/libseccomp/metadata.xml
+++ b/sys-libs/libseccomp/metadata.xml
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
<upstream>
<remote-id type="github">seccomp/libseccomp</remote-id>
<remote-id type="sourceforge">libseccomp</remote-id>