diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 9 | ||||
-rw-r--r-- | bin/isolated-functions.sh | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 73ea8c807..714084f0b 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -5,6 +5,15 @@ PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}" +if [[ $PORTAGE_SANDBOX_COMPAT_LEVEL -lt 22 ]] ; then + # Ensure that /dev/std* streams have appropriate sandbox permission for + # bug #288863. This can be removed after sandbox is fixed and portage + # depends on the fixed version (sandbox-2.2 has the fix but it is + # currently unstable). + export SANDBOX_WRITE="${SANDBOX_WRITE:+${SANDBOX_WRITE}:}/dev/stdout:/dev/stderr" + export SANDBOX_READ="${SANDBOX_READ:+${SANDBOX_READ}:}/dev/stdin" +fi + # 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. diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 46685f891..12feea0ed 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -603,7 +603,8 @@ save_ebuild_env() { PORTAGE_INST_UID PORTAGE_IPC_DAEMON \ PORTAGE_LOG_FILE PORTAGE_MASTER_PID \ PORTAGE_NONFATAL PORTAGE_QUIET PORTAGE_PYTHON \ - PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_SIGPIPE_STATUS \ + PORTAGE_REPO_NAME PORTAGE_RESTRICT \ + PORTAGE_SANDBOX_COMPAT_LEVEL PORTAGE_SIGPIPE_STATUS \ PORTAGE_UPDATE_ENV \ PORTAGE_USERNAME PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \ PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \ |