summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-10 20:25:56 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-10 20:25:56 +0000
commit9ec521b35d4c4442e9520ab80cb21ca698315ad5 (patch)
tree9af7f2b2c5915d227a420ab2129313be3686c738 /app-shells/sandboxshell
parentVersion bump (diff)
downloadhistorical-9ec521b35d4c4442e9520ab80cb21ca698315ad5.tar.gz
historical-9ec521b35d4c4442e9520ab80cb21ca698315ad5.tar.bz2
historical-9ec521b35d4c4442e9520ab80cb21ca698315ad5.zip
Dont flood the env with functions #113624 and add sandboxwrite for custom ccache/distcc paths if they exist #114387. Both by Petteri Raty.
Package-Manager: portage-2.0.53
Diffstat (limited to 'app-shells/sandboxshell')
-rw-r--r--app-shells/sandboxshell/ChangeLog10
-rw-r--r--app-shells/sandboxshell/Manifest16
-rw-r--r--app-shells/sandboxshell/files/digest-sandboxshell-0.3 (renamed from app-shells/sandboxshell/files/digest-sandboxshell-0.2)0
-rw-r--r--app-shells/sandboxshell/files/sandboxshell4
-rw-r--r--app-shells/sandboxshell/files/sandboxshell.conf25
-rw-r--r--app-shells/sandboxshell/sandboxshell-0.3.ebuild (renamed from app-shells/sandboxshell/sandboxshell-0.2.ebuild)2
6 files changed, 37 insertions, 20 deletions
diff --git a/app-shells/sandboxshell/ChangeLog b/app-shells/sandboxshell/ChangeLog
index 50c3a5c49b02..fd6f6bc804d6 100644
--- a/app-shells/sandboxshell/ChangeLog
+++ b/app-shells/sandboxshell/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-shells/sandboxshell
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/ChangeLog,v 1.7 2005/11/20 07:54:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/ChangeLog,v 1.8 2005/12/10 20:25:56 vapier Exp $
+
+*sandboxshell-0.3 (10 Dec 2005)
+
+ 10 Dec 2005; Mike Frysinger <vapier@gentoo.org> files/sandboxshell,
+ files/sandboxshell.conf, -sandboxshell-0.2.ebuild,
+ +sandboxshell-0.3.ebuild:
+ Dont flood the env with functions #113624 and add sandboxwrite for custom
+ ccache/distcc paths if they exist #114387. Both by Petteri Raty.
*sandboxshell-0.2 (20 Nov 2005)
diff --git a/app-shells/sandboxshell/Manifest b/app-shells/sandboxshell/Manifest
index 362607b8cacc..16330a0021ed 100644
--- a/app-shells/sandboxshell/Manifest
+++ b/app-shells/sandboxshell/Manifest
@@ -1,17 +1,17 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 1d5718b8f683595a25fe3a28a285e380 ChangeLog 1116
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sandboxshell-0.2 0
-MD5 9a9a13478f46e54048795ba214e5e84d files/sandboxshell 1355
+MD5 736d6e69656d6d0efd37db81203a6bfa ChangeLog 1444
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-sandboxshell-0.3 0
+MD5 0267cb95e99d6f7e5e9287e25c87fa16 files/sandboxshell 1331
MD5 89728cab133398dad145e13d92fff6b2 files/sandboxshell.1 3117
-MD5 c295e6e7bd0933033a63791ef54e0370 files/sandboxshell.conf 1715
+MD5 2507315f5bac2f69f7da8ccb5378ef8c files/sandboxshell.conf 2147
MD5 1fb0cef8c20e31d8fee121ebb2205588 metadata.xml 221
-MD5 dd79ec5b34a47984cfb0f918ad2d9b35 sandboxshell-0.2.ebuild 663
+MD5 491f447c5f9b6f79e34fabfd58688c19 sandboxshell-0.3.ebuild 663
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFDgFbsgIKl8Uu19MoRAkzeAJ98Gl7Jg94J/4mlcieI90McaYL+wwCeJZ8K
-oiVsfERmmBYJ3itA9ZfFjH0=
-=tHgc
+iD8DBQFDmzqUgIKl8Uu19MoRAhD+AJ9DSNnMwY4XKIz7PlsxRThwvAy7jQCeJsaC
+fzIfOrxSU+h8ZSDSFrzd+44=
+=uhzs
-----END PGP SIGNATURE-----
diff --git a/app-shells/sandboxshell/files/digest-sandboxshell-0.2 b/app-shells/sandboxshell/files/digest-sandboxshell-0.3
index e69de29bb2d1..e69de29bb2d1 100644
--- a/app-shells/sandboxshell/files/digest-sandboxshell-0.2
+++ b/app-shells/sandboxshell/files/digest-sandboxshell-0.3
diff --git a/app-shells/sandboxshell/files/sandboxshell b/app-shells/sandboxshell/files/sandboxshell
index 165c9dcd13cb..a7c4dc2edfca 100644
--- a/app-shells/sandboxshell/files/sandboxshell
+++ b/app-shells/sandboxshell/files/sandboxshell
@@ -1,7 +1,7 @@
#!/bin/bash
# Written by vapier@gentoo.org
# public-domain code ... z0r ...
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell,v 1.3 2005/11/20 07:54:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell,v 1.4 2005/12/10 20:25:56 vapier Exp $
. /sbin/functions.sh
. /etc/profile
@@ -36,5 +36,5 @@ einfo " adddeny <path>: deny access to <path>"
einfo " addpredict <path>: allow fake access to <path>"
export SANDBOX_ACTIVE="armedandready"
-export SANDBOX_WRITE=${SANDBOX_WRITE}:$(pwd):/etc/mtab:/dev/ram5:/root/.ccache
+export SANDBOX_WRITE=${SANDBOX_WRITE}:$(pwd):/etc/mtab
exec /bin/bash --init-file /etc/sandboxshell.conf
diff --git a/app-shells/sandboxshell/files/sandboxshell.conf b/app-shells/sandboxshell/files/sandboxshell.conf
index 75df274ca688..3ed6daafc2c7 100644
--- a/app-shells/sandboxshell/files/sandboxshell.conf
+++ b/app-shells/sandboxshell/files/sandboxshell.conf
@@ -1,7 +1,7 @@
#!/bin/bash
# Written by vapier@gentoo.org
# public-domain code ... z0r ...
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell.conf,v 1.6 2005/11/20 10:57:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell.conf,v 1.7 2005/12/10 20:25:56 vapier Exp $
trap ":" INT QUIT TSTP
@@ -31,21 +31,30 @@ if [[ ${PWD:0:${#sbs_pdir}} == "${sbs_pdir}" ]] ; then
read env
sbs_PREPWD=${PWD}
if [[ ${env} == "y" ]] ; then
- set -a
+ # First try to source variables and export them ...
+ eval $(sed -e '/^[[:alnum:]_-]*=/s:^:export :' -e '/^[[:alnum:]_-]* ()/Q' "${sbs_tmpenvfile}") 2>/dev/null
+ # Then grab everything (including functions)
source "${sbs_tmpenvfile}" 2> /dev/null
- set +a
export SANDBOX_WRITE=${SANDBOX_WRITE}:${sbs_pdir}${sbs_bdir}:${sbs_pdir}/homedir
fi
PWD=${sbs_PREPWD}
fi
fi
-cd ${PWD}
+unset sbs_gpdir sbs_cpdir sbs_pdir sbs_bdir sbs_tmpenvfile sbs_PREPWD env
+
+cd "${PWD}"
export PS1="[s]${PS1}"
-adddeny() { export SANDBOX_DENY=$SANDBOX_DENY:$1 ; }
-addpredict() { export SANDBOX_PREDICT="$SANDBOX_PREDICT:$1" ; }
-addread() { export SANDBOX_READ="$SANDBOX_READ:$1" ; }
-addwrite() { export SANDBOX_WRITE="$SANDBOX_WRITE:$1" ; }
+adddeny() { export SANDBOX_DENY=${SANDBOX_DENY}:$1 ; }
+addpredict() { export SANDBOX_PREDICT=${SANDBOX_PREDICT}:$1 ; }
+addread() { export SANDBOX_READ=${SANDBOX_READ}:$1 ; }
+addwrite() { export SANDBOX_WRITE=${SANDBOX_WRITE}:$1 ; }
sandboxon() { export SANDBOX_ON="1" ; }
sandboxoff() { export SANDBOX_OFF="0" ; }
+
+[[ -z ${CCACHE_DIR} ]] && export CCACHE_DIR=/root/.ccache
+for var in CCACHE_DIR DISTCC_DIR ; do
+ [[ ${!var+set} == "set" ]] && addwrite ${!var}
+done
+unset var
diff --git a/app-shells/sandboxshell/sandboxshell-0.2.ebuild b/app-shells/sandboxshell/sandboxshell-0.3.ebuild
index 4cf369246d38..ceff0e14e38d 100644
--- a/app-shells/sandboxshell/sandboxshell-0.2.ebuild
+++ b/app-shells/sandboxshell/sandboxshell-0.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/sandboxshell-0.2.ebuild,v 1.1 2005/11/20 07:54:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/sandboxshell-0.3.ebuild,v 1.1 2005/12/10 20:25:56 vapier Exp $
DESCRIPTION="launch a sandboxed shell ... useful for debugging ebuilds"
HOMEPAGE="http://wh0rd.org/"