sys-apps/sandbox - 2.18 (didos)

Search

Install

Install this version:

emerge -a =sys-apps/sandbox-2.18

Package Information

Description:
sandbox'd LD_PRELOAD hack
Homepage:
https://www.gentoo.org/proj/en/portage/sandbox/
License:
GPL-2

Ebuild Details

Version EAPI Keywords Slot
2.18 7 ~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 0
View Raw Ebuild
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit 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/~vapier/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="+ptrace"

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
	use ptrace || append-cppflags -DSB_NO_TRACE

	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
}

USE Flags

Manage flags for this package: euse -i <flag> -p sys-apps/sandbox | euse -E <flag> -p sys-apps/sandbox | euse -D <flag> -p sys-apps/sandbox

Global/Standard Flags

ptrace
Default: Enabled (+)

Inherited Eclasses

Dependencies

DEPEND

app-arch/xz-utils
	>=app-misc/pax-utils-0.1.19

Manifest for 2.18

Type File Size Source URLs
DIST sandbox-2.18.tar.xz 427760 bytes https://dev.gentoo.org/~vapier/dist/sandbox-2.18.tar.xz