[Qa-jenkins-scm] [jenkins.debian.net] 01/01: fix debootstrap fallout

Holger Levsen holger at layer-acht.org
Sun Nov 13 09:38:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit ea5e63df93c41a39477950685d0532e0fb0db95b
Author: Helmut Grohne <helmut at subdivi.de>
Date:   Sat Nov 12 21:18:53 2016 +0100

    fix debootstrap fallout
    
    jessie's debootstrap would chmod the target directory to 755, but the
    bpo debootstrap no longer does that, so we need to chmod ourselves or
    the / inside the chroot will be 700 (from mkdtemp).
    
    The bpo debootstrap defaults to --merged-usr, but --merged-usr is broken
    (see e.g. #810499). Revert until that is sorted out.
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/chroot-run.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh
index 3e39148..6dcbcbb 100755
--- a/bin/chroot-run.sh
+++ b/bin/chroot-run.sh
@@ -46,6 +46,7 @@ if [ -z "$CHROOT_TARGET" ]; then
 	echo "Could not create a directory to create the chroot in, aborting."
 	exit 1
 fi
+chmod 755 "$CHROOT_TARGET"
 
 export CURDIR=$(pwd)
 
@@ -56,7 +57,7 @@ bootstrap() {
 	local TMPLOG=$(mktemp -p $CHROOT_BASE/ chroot-run-$DISTRO.XXXXXXXXX)
 	echo "$(date -u ) - bootstraping $DISTRO into $CHROOT_TARGET now."
 	set +e
-	sudo debootstrap $BOOTSTRAP_OPTIONS $DISTRO $CHROOT_TARGET $MIRROR | tee $TMPLOG
+	sudo debootstrap --no-merged-usr $BOOTSTRAP_OPTIONS $DISTRO $CHROOT_TARGET $MIRROR | tee $TMPLOG
 	local RESULT=$(egrep "E: (Couldn't download packages|Invalid Release signature)" $TMPLOG || true )
 	rm $TMPLOG
 	set -e
@@ -64,7 +65,7 @@ bootstrap() {
 	        echo "$(date -u) - initial debootstrap failed, sleeping 5min before retrying..."
 	        sudo rm -rf --one-file-system $CHROOT_TARGET
 	        sleep 5m
-	        if ! sudo debootstrap $BOOTSTRAP_OPTIONS $DISTRO $CHROOT_TARGET $MIRROR ; then
+	        if ! sudo debootstrap --no-merged-usr $BOOTSTRAP_OPTIONS $DISTRO $CHROOT_TARGET $MIRROR ; then
 			SLEEPTIME="30m"
 			echo "$(date -u ) - debootstrap failed, slowing down, sleeping $SLEEPTIME now..."
 			sleep $SLEEPTIME

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list