summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-03-11 09:59:56 +0100
committerMichał Górny <mgorny@gentoo.org>2021-03-11 10:52:37 +0100
commit006f51f6f783911b912c72ac6f9144dbc402b7f7 (patch)
treed2bba8ddce886e01ca95bb6c0fa97922795d9623 /sys-apps/sandbox/sandbox-2.21.ebuild
parentapp-text/ronn: add ruby27; EAPI=7 (diff)
downloadgentoo-006f51f6f783911b912c72ac6f9144dbc402b7f7.tar.gz
gentoo-006f51f6f783911b912c72ac6f9144dbc402b7f7.tar.bz2
gentoo-006f51f6f783911b912c72ac6f9144dbc402b7f7.zip
sys-apps/sandbox: Bump to 2.21
Closes: https://bugs.gentoo.org/774054 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-apps/sandbox/sandbox-2.21.ebuild')
-rw-r--r--sys-apps/sandbox/sandbox-2.21.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/sys-apps/sandbox/sandbox-2.21.ebuild b/sys-apps/sandbox/sandbox-2.21.ebuild
new file mode 100644
index 000000000000..0caadf280c6f
--- /dev/null
+++ b/sys-apps/sandbox/sandbox-2.21.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib-minimal multiprocessing
+
+DESCRIPTION="sandbox'd LD_PRELOAD hack"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox"
+SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE=""
+
+DEPEND="app-arch/xz-utils
+ >=app-misc/pax-utils-0.1.19" #265376
+RDEPEND=""
+
+has sandbox_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS="${EBUILD_DEATH_HOOKS} sandbox_death_notice"
+
+sandbox_death_notice() {
+ ewarn "If configure failed with a 'cannot run C compiled programs' error, try this:"
+ ewarn "FEATURES='-sandbox -usersandbox' emerge sandbox"
+}
+
+multilib_src_configure() {
+ filter-lfs-flags #90228
+
+ ECONF_SOURCE="${S}" econf
+}
+
+multilib_src_test() {
+ # Default sandbox build will run with --jobs set to # cpus.
+ emake -j1 check TESTSUITEFLAGS="--jobs=$(makeopts_jobs)"
+}
+
+multilib_src_install_all() {
+ doenvd "${FILESDIR}"/09sandbox
+
+ keepdir /var/log/sandbox
+ fowners root:portage /var/log/sandbox
+ fperms 0770 /var/log/sandbox
+
+ dodoc AUTHORS ChangeLog* NEWS README
+}
+
+pkg_preinst() {
+ chown root:portage "${ED}"/var/log/sandbox
+ chmod 0770 "${ED}"/var/log/sandbox
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ # 1.x was removed from ::gentoo in 2016
+ if [[ ${v} == 1.* ]] ; then
+ local old=$(find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*')
+ if [[ -n ${old} ]] ; then
+ elog "Removing old sandbox libraries for you:"
+ find "${EROOT}"/lib* -maxdepth 1 -name 'libsandbox*' -print -delete
+ fi
+ fi
+ done
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ # 1.x was removed from ::gentoo in 2016
+ if [[ ${v} == 1.* ]] ; then
+ chmod 0755 "${EROOT}"/etc/sandbox.d #265376
+ fi
+ done
+}