drop sandbox settings that sandbox itself takes care of #258684
authorMike Frysinger <vapier@gentoo.org>
Wed, 3 Jun 2009 02:50:29 +0000 (02:50 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 3 Jun 2009 02:50:29 +0000 (02:50 -0000)
svn path=/main/trunk/; revision=13627

bin/ebuild.sh

index ca001ab33b438b7f3445107b0a43bb98f6d373d7..8446d6b6c32797d93237bc365c6cf5587b274311 100755 (executable)
@@ -6,9 +6,6 @@
 PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
 PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}"
 
-export SANDBOX_PREDICT="${SANDBOX_PREDICT:+${SANDBOX_PREDICT}:}/proc/self/maps:/dev/console:/dev/random"
-export SANDBOX_WRITE="${SANDBOX_WRITE:+${SANDBOX_WRITE}:}/dev/shm:/dev/stdout:/dev/stderr:${PORTAGE_TMPDIR}"
-export SANDBOX_READ="${SANDBOX_READ:+${SANDBOX_READ}:}/:/dev/shm:/dev/stdin:${PORTAGE_TMPDIR}"
 # Don't use sandbox's BASH_ENV for new shells because it does
 # 'source /etc/profile' which can interfere with the build
 # environment by modifying our PATH.
@@ -21,10 +18,6 @@ if [ -n "${PORTAGE_ROOTPATH}" ] ; then
        unset PORTAGE_ROOTPATH
 fi
 
-if [ ! -z "${PORTAGE_GPG_DIR}" ]; then
-       SANDBOX_PREDICT="${SANDBOX_PREDICT}:${PORTAGE_GPG_DIR}"
-fi
-
 # These two functions wrap sourcing and calling respectively.  At present they
 # perform a qa check to make sure eclasses and ebuilds and profiles don't mess
 # with shell opts (shopts).  Ebuilds/eclasses changing shopts should reset them 
@@ -105,6 +98,10 @@ addwrite()   { _sb_append_var WRITE   "$@" ; }
 adddeny()    { _sb_append_var DENY    "$@" ; }
 addpredict() { _sb_append_var PREDICT "$@" ; }
 
+addwrite "${PORTAGE_TMPDIR}"
+addread "/:${PORTAGE_TMPDIR}"
+[[ -n ${PORTAGE_GPG_DIR} ]] && addpredict "${PORTAGE_GPG_DIR}"
+
 lchown() {
        chown -h "$@"
 }