diff --git a/sys-libs/libseccomp/Manifest b/sys-libs/libseccomp/Manifest index cb80334dbe3c9..22cf81e8df7d2 100644 --- a/sys-libs/libseccomp/Manifest +++ b/sys-libs/libseccomp/Manifest @@ -1,2 +1,4 @@ DIST libseccomp-2.6.0.tar.gz 685655 BLAKE2B 45c4f4dd67db5848bb536613e8929633f95cfbeb8738525381a76631187e7b0fc2c02f1a103579cd0f4135e9c175250fe2d784b85cc85424ec3125b4dafcf11c SHA512 9039478656d9b670af2ff4cb67b6b1fa315821e59d2f82ba6247e988859ddc7e3d15fea159eccca161bf2890828bb62aa6ab4d6b7ff55f27a9d6bd9532eeee1b DIST libseccomp-2.6.0.tar.gz.asc 833 BLAKE2B 3bec3fc850bcd631018f152ee8a81d89ad3e7b15d91a559048400a07efe1b1787d1cdc1b056dca62bbf8134ad81ad1b4bf53f3230e24bf94a39296b2b1562e64 SHA512 973b69c58085a1567f860e621e3a197be02c0ca71dad664234418cf5c00c39767efd37a7c4016f1be5bd588262617b6603855262db2ee6f31bc16061bc130e0f +DIST libseccomp-2.6.1.tar.gz 656231 BLAKE2B 05d9d1b584afa399f1f3cb8d27b659aabbbe66b639743ee48b186d44ee506a6399c84acb08ec216e0f26d15b94f6e37464dd4568327ac879e30a8a12615bc1f5 SHA512 468404874ee013177f048611a4fefef87f4ee01b83d991f8bf9026c8fdb8506badd613e0355ad8222c5a7f51162b6829de6d72fc53222a56e0e123d5e85f73c4 +DIST libseccomp-2.6.1.tar.gz.asc 833 BLAKE2B 911fd256dcbf00e6644c124a3f5a8613157ef64adc4d854be8ad555d6a1e0ceb881d634ab6d3dd29fbe01fbd168ba9e7119687c700653bff59af0e8bb350f32a SHA512 2ca5e1d4dac4d1394bd8518504ee9fa4febb269e3105270b7fe4091d4ae16b4a0003c8a64ef9b373d85728c2335ed826415cca1f55821a394fe6a7a7863ea60d diff --git a/sys-libs/libseccomp/libseccomp-2.6.1.ebuild b/sys-libs/libseccomp/libseccomp-2.6.1.ebuild new file mode 100644 index 0000000000000..0f5bcd19bab56 --- /dev/null +++ b/sys-libs/libseccomp/libseccomp-2.6.1.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_OPTIONAL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{12..15} ) + +inherit distutils-r1 multilib-minimal multiprocessing + +DESCRIPTION="High level interface to Linux seccomp filter" +HOMEPAGE="https://github.com/seccomp/libseccomp" + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git" + PRERELEASE="2.6.0" + inherit autotools git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libseccomp.asc + inherit verify-sig + + SRC_URI=" + https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz + verify-sig? ( https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz.asc ) + " + KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86" + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-libseccomp )" +fi + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="python static-libs test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + python? ( ${PYTHON_DEPS} ) +" +# We need newer kernel headers; we don't keep strict control of the exact +# version here, just be safe and pull in the latest stable ones. bug #551248 +DEPEND=" + ${RDEPEND} + >=sys-kernel/linux-headers-5.15 +" +BDEPEND+=" + ${DEPEND} + dev-util/gperf + python? ( + ${DISTUTILS_DEPS} + dev-python/cython[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch + "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi + + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + default + + if [[ ${PV} == *9999 ]] ; then + sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die + + eautoreconf + fi + + # Silence noise when running Python tests + sed -i -e 's:$(pwd)/../src/python/build/lib\.\*:$(pwd):' tests/regression || die +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + --disable-python + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake + + if multilib_is_native_abi && use python ; then + # setup.py expects libseccomp.so to live in "../.libs" + # Copy the python files to the right place for this. + rm -r "${BUILD_DIR}"/src/python || die + cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die + local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}" + + # setup.py reads VERSION_RELEASE from the environment + local -x VERSION_RELEASE=${PRERELEASE-${PV}} + + pushd "${BUILD_DIR}/src/python" >/dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +multilib_src_test() { + local -x LIBSECCOMP_TSTCFG_JOBS="$(get_makeopts_jobs)" + emake -Onone check + + if multilib_is_native_abi && use python ; then + distutils-r1_src_test + fi +} + +python_test() { + local -x LIBSECCOMP_TSTCFG_MODE_LIST="python" + + emake -Onone check +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + if multilib_is_native_abi && use python ; then + distutils-r1_src_install + fi +} + +multilib_src_install_all() { + find "${ED}" -type f -name "${PN}.la" -delete || die + + einstalldocs +} diff --git a/sys-libs/libseccomp/libseccomp-9999.ebuild b/sys-libs/libseccomp/libseccomp-9999.ebuild index 18774689a01fe..0f5bcd19bab56 100644 --- a/sys-libs/libseccomp/libseccomp-9999.ebuild +++ b/sys-libs/libseccomp/libseccomp-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{11..14} ) +PYTHON_COMPAT=( python3_{12..15} ) inherit distutils-r1 multilib-minimal multiprocessing