summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-07-12 07:48:30 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-07-12 07:48:46 +0100
commit44a8ff0d8ea8e992e7956f99f9665f6d7439b84a (patch)
tree9201199d9643cd1511dc51b250ebba6e24ceda8e /sys-apps/sandbox/sandbox-2.18.ebuild
parentnet-misc/youtube-dl: Version 2019.07.12 (diff)
downloadgentoo-44a8ff0d8ea8e992e7956f99f9665f6d7439b84a.tar.gz
gentoo-44a8ff0d8ea8e992e7956f99f9665f6d7439b84a.tar.bz2
gentoo-44a8ff0d8ea8e992e7956f99f9665f6d7439b84a.zip
sys-apps/sandbox: bump up to 2.18, bug #549108
The main change from 2.17 is basic musl support. Closes: https://bugs.gentoo.org/549108 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-apps/sandbox/sandbox-2.18.ebuild')
-rw-r--r--sys-apps/sandbox/sandbox-2.18.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/sys-apps/sandbox/sandbox-2.18.ebuild b/sys-apps/sandbox/sandbox-2.18.ebuild
new file mode 100644
index 000000000000..179163388c4e
--- /dev/null
+++ b/sys-apps/sandbox/sandbox-2.18.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils flag-o-matic multilib-minimal multiprocessing pax-utils
+
+DESCRIPTION="sandbox'd LD_PRELOAD hack"
+HOMEPAGE="https://www.gentoo.org/proj/en/portage/sandbox/"
+SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~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 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
+}