summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-09-24 10:21:14 -0400
committerMike Frysinger <vapier@gentoo.org>2021-09-24 10:36:24 -0400
commitb49c70025769eb840e0df421d4b1a17870ae9d38 (patch)
tree57c3294b2bc5dd32a8bfdac73c5ca21814071faa /sys-apps
parentsys-apps/minijail: drop old version 9 (diff)
downloadgentoo-b49c70025769eb840e0df421d4b1a17870ae9d38.tar.gz
gentoo-b49c70025769eb840e0df421d4b1a17870ae9d38.tar.bz2
gentoo-b49c70025769eb840e0df421d4b1a17870ae9d38.zip
sys-apps/minijail: version bump to 17
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/minijail/Manifest1
-rw-r--r--sys-apps/minijail/minijail-17.ebuild77
2 files changed, 78 insertions, 0 deletions
diff --git a/sys-apps/minijail/Manifest b/sys-apps/minijail/Manifest
index 4de10bcb3327..1c7ceaf74b06 100644
--- a/sys-apps/minijail/Manifest
+++ b/sys-apps/minijail/Manifest
@@ -1 +1,2 @@
DIST minijail-12.tar.gz 157030 BLAKE2B 55a1bb2aeb31290c211da8b8322672abadab7a2729b0afd6eafce9854a51320a2515bedc54864debc7ede6e437607dad8532ae76c14828d6c4f4265fec404dbe SHA512 feb829fc113f0041b9ab25e845560af47408f3d5f0704cdf756d0b8162ae7aae331c350908c3b17a4a5593ffa7326044f222a35e6794471cd5ed60173b2befa2
+DIST minijail-17.tar.gz 212425 BLAKE2B 411a0e2f1af21dd689fa669f9658e78c3c3c6439fdbea01b41b1d0cb3cbc1dc017634177350a3d5392783201f80874ec2a1604ed2577dbf5d7dbdf584a087267 SHA512 4b9aa29a78f7525ffeedfb927f6b567044ff7c9d32ef0e6771ed2b5c2d47c7a14ccbe000efc988ce6bb4173c5a9ae734b222aac1a00fb0e60777d7dccc149acf
diff --git a/sys-apps/minijail/minijail-17.ebuild b/sys-apps/minijail/minijail-17.ebuild
new file mode 100644
index 000000000000..9f0c093fd994
--- /dev/null
+++ b/sys-apps/minijail/minijail-17.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="helper binary and library for sandboxing & restricting privs of service"
+HOMEPAGE="https://android.googlesource.com/platform/external/minijail"
+
+# Use GitHub mirror as Gitiles doesn't generate stable tarballs.
+SRC_URI="https://github.com/google/${PN}/archive/linux-v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="+seccomp test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-libs/libcap-ng:="
+DEPEND="${RDEPEND}
+ test? (
+ virtual/pkgconfig
+ >=dev-cpp/gtest-1.8.0:=
+ )"
+
+S="${WORKDIR}/${PN}-linux-v${PV}"
+
+PATCHES=(
+ "${FILESDIR}/minijail-12-makefile.patch"
+)
+
+pkg_pretend() {
+ local CONFIG_CHECK="~NAMESPACES ~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS
+ ~SECCOMP ~SECCOMP_FILTER ~CGROUPS"
+ check_extra_config
+}
+
+src_configure() {
+ export LIBDIR="/usr/$(get_libdir)"
+ export USE_seccomp="$(usex seccomp)"
+ export USE_SYSTEM_GTEST=yes
+ if use test; then
+ export GTEST_CXXFLAGS="$($(tc-getPKG_CONFIG) --cflags gtest_main)"
+ export GTEST_LIBS="$($(tc-getPKG_CONFIG) --libs gtest_main)"
+ else
+ export GTEST_CXXFLAGS='' GTEST_LIBS=''
+ fi
+ export VERBOSE=1
+}
+
+src_compile() {
+ tc-env_build emake all parse_seccomp_policy
+}
+
+src_test() {
+ GTEST_FILTER="-NamespaceTest.test_tmpfs_userns:NamespaceTest.test_namespaces" \
+ tc-env_build emake tests
+}
+
+src_install() {
+ dosbin minijail0
+ dolib.so libminijail{,preload}.so
+ dobin parse_seccomp_policy
+
+ doman minijail0.[15]
+ dodoc README.md
+
+ local include_dir="/usr/include"
+
+ "${S}"/platform2_preinstall.sh "${PV}" "${include_dir}"
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ doins libminijail.pc
+
+ insinto "${include_dir}"
+ doins libminijail.h scoped_minijail.h
+}