summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2006-11-05 10:40:05 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2006-11-05 10:40:05 +0000
commit8bd818939f8083a30e2ab5dd010461346702b5f3 (patch)
tree3e4b03551b6a658ae23b20765f9420d96be6f4bb /app-shells/sandboxshell
parentAdded ~ppc keyword wrt bug 154084 (diff)
downloadgentoo-2-8bd818939f8083a30e2ab5dd010461346702b5f3.tar.gz
gentoo-2-8bd818939f8083a30e2ab5dd010461346702b5f3.tar.bz2
gentoo-2-8bd818939f8083a30e2ab5dd010461346702b5f3.zip
Now sandboxshell works again with >sys-apps/portage-2.1.1. Fixes bug #154105.
(Portage version: 2.1.2_rc1-r3)
Diffstat (limited to 'app-shells/sandboxshell')
-rw-r--r--app-shells/sandboxshell/ChangeLog8
-rw-r--r--app-shells/sandboxshell/files/digest-sandboxshell-0.3-r11
-rw-r--r--app-shells/sandboxshell/files/digest-sandboxshell-0.3-r20
-rw-r--r--app-shells/sandboxshell/files/sandboxshell-r1.conf60
-rw-r--r--app-shells/sandboxshell/sandboxshell-0.3-r2.ebuild27
5 files changed, 94 insertions, 2 deletions
diff --git a/app-shells/sandboxshell/ChangeLog b/app-shells/sandboxshell/ChangeLog
index 1131c905611b..43fb84073c87 100644
--- a/app-shells/sandboxshell/ChangeLog
+++ b/app-shells/sandboxshell/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-shells/sandboxshell
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/ChangeLog,v 1.9 2006/08/06 18:50:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/ChangeLog,v 1.10 2006/11/05 10:40:05 betelgeuse Exp $
+
+*sandboxshell-0.3-r2 (05 Nov 2006)
+
+ 05 Nov 2006; Petteri Räty <betelgeuse@gentoo.org>
+ +files/sandboxshell-r1.conf, +sandboxshell-0.3-r2.ebuild:
+ Now sandboxshell works again with >sys-apps/portage-2.1.1. Fixes bug #154105.
*sandboxshell-0.3-r1 (06 Aug 2006)
diff --git a/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r1 b/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r1
index 8b137891791f..e69de29bb2d1 100644
--- a/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r1
+++ b/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r1
@@ -1 +0,0 @@
-
diff --git a/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r2 b/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r2
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/app-shells/sandboxshell/files/digest-sandboxshell-0.3-r2
diff --git a/app-shells/sandboxshell/files/sandboxshell-r1.conf b/app-shells/sandboxshell/files/sandboxshell-r1.conf
new file mode 100644
index 000000000000..aff373dab4d9
--- /dev/null
+++ b/app-shells/sandboxshell/files/sandboxshell-r1.conf
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Written by vapier@gentoo.org
+# public-domain code ... z0r ...
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell-r1.conf,v 1.1 2006/11/05 10:40:05 betelgeuse Exp $
+
+trap ":" INT QUIT TSTP
+
+source /etc/profile
+
+# do ebuild environment loading ... detect if we're in portage
+# build area or not ... uNF uNF uNF
+#sbs_pdir=$(portageq envvar PORTAGE_TMPDIR)/portage/ #portageq takes too long imo
+if [[ -z ${PORTAGE_TMPDIR} ]] ; then
+ sbs_gpdir=$( source /etc/make.globals && echo $PORTAGE_TMPDIR 2> /dev/null)
+ sbs_cpdir=$( source /etc/make.conf && echo $PORTAGE_TMPDIR 2> /dev/null)
+ [[ -z ${sbs_cpdir} ]] \
+ && sbs_pdir=${sbs_gpdir} \
+ || sbs_pdir=${sbs_cpdir}
+else
+ sbs_pdir=${PORTAGE_TMPDIR}
+fi
+[[ -z ${sbs_pdir} ]] && sbs_pdir=/var/tmp
+sbs_pdir=${sbs_pdir}/portage/
+
+if [[ ${PWD:0:${#sbs_pdir}} == "${sbs_pdir}" ]] ; then
+ sbs_bdir=$(echo ${PWD:${#sbs_pdir}} | cut -d/ -f1,2)
+ sbs_tmpenvfile=${sbs_pdir}${sbs_bdir}/temp/environment
+ if [[ -e ${sbs_tmpenvfile} ]] ; then
+ echo "Found environment at ${sbs_tmpenvfile}"
+ printf " * Would you like to enter the portage environment ? "
+ read env
+ sbs_PREPWD=${PWD}
+ if [[ ${env} == "y" ]] ; then
+ # 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
+ export SANDBOX_WRITE=${SANDBOX_WRITE}:${sbs_pdir}${sbs_bdir}:${sbs_pdir}/homedir
+ fi
+ PWD=${sbs_PREPWD}
+ fi
+fi
+
+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 ; }
+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.3-r2.ebuild b/app-shells/sandboxshell/sandboxshell-0.3-r2.ebuild
new file mode 100644
index 000000000000..6c14080b1a64
--- /dev/null
+++ b/app-shells/sandboxshell/sandboxshell-0.3-r2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/sandboxshell-0.3-r2.ebuild,v 1.1 2006/11/05 10:40:05 betelgeuse Exp $
+
+DESCRIPTION="launch a sandboxed shell ... useful for debugging ebuilds"
+HOMEPAGE="http://wh0rd.org/"
+SRC_URI=""
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+# Portage 2.1.1 changes the /var/tmp/portage structure from <pkg> to <cat>/<pkg>
+RDEPEND=">sys-apps/portage-2.1.1
+ app-shells/bash"
+
+S=${WORKDIR}
+
+src_install() {
+ dobin "${FILESDIR}"/sandboxshell || die
+ doman "${FILESDIR}"/sandboxshell.1
+ insinto /etc
+ doins "${FILESDIR}"/sandboxshell-r1.conf
+}