[Qa-jenkins-scm] [jenkins.debian.net] 01/01: chroot-create: do not bind-mount /dev and /dev/fs inside new chroots

Mattia Rizzolo mattia at debian.org
Mon Dec 11 17:46:23 UTC 2017


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

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

commit f5874f0779aa675a2e7b1559290eb3042aaa7f3e
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Mon Dec 11 18:45:36 2017 +0100

    chroot-create: do not bind-mount /dev and /dev/fs inside new chroots
    
    The code in-between just installs packages, package install really ought to
    not need a ful devfs in /dev, and much less a /dev/pts.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/schroot-create.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index f86f6d3..ece66e3 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -169,7 +169,7 @@ bootstrap() {
 
 	robust_chroot_apt update
 	if [ -n "$1" ] ; then
-		for d in proc dev dev/pts ; do
+		for d in proc ; do
 			sudo mount --bind /$d $SCHROOT_TARGET/$d
 		done
 		set -x
@@ -203,8 +203,8 @@ bootstrap() {
 			sudo chroot $SCHROOT_TARGET dpkg -l diffoscope
 			echo
 		fi
-		# umount in reverse order
-		for d in dev/pts dev proc ; do
+		# umount in reverse order than how they were mounted earlier
+		for d in proc ; do
 			sudo umount -l $SCHROOT_TARGET/$d
 		done
 		# configure sudo inside just like outside

-- 
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