[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: work around mv not moving read-only directories

Holger Levsen holger at moszumanska.debian.org
Fri Oct 16 13:32:27 UTC 2015


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 ccfc0135e00986e037a2ce5fc0b3ae18bfa9bcf2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Oct 16 15:31:37 2015 +0200

    reproducible: work around mv not moving read-only directories
---
 bin/reproducible_arch_schroot_setup.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_arch_schroot_setup.sh b/bin/reproducible_arch_schroot_setup.sh
index 0d7ee9d..b29464c 100755
--- a/bin/reproducible_arch_schroot_setup.sh
+++ b/bin/reproducible_arch_schroot_setup.sh
@@ -16,9 +16,8 @@ bootstrap() {
 	echo "$(date -u) - downloading Archlinux bootstrap.tar.gz."
 	curl -O https://mirrors.kernel.org/archlinux/iso/2015.08.01/archlinux-bootstrap-2015.08.01-x86_64.tar.gz
 	tar xzf archlinux-bootstrap-2015.08.01-x86_64.tar.gz
-	mv root.x86_64/* $SCHROOT_TARGET
-	rmdir root.x86_64
-	rm archlinux-bootstrap-2015.08.01-x86_64.tar.gz
+	mv root.x86_64/* $SCHROOT_TARGET || true # proc and sys have 0555 perms, thus mv will fail... also see below
+	rm archlinux-bootstrap-2015.08.01-x86_64.tar.gz root.x86_64 -rf
 	# write the schroot config
 	echo "$(date -u ) - writing schroot configuration for $TARGET."
 	sudo tee /etc/schroot/chroot.d/jenkins-"$TARGET" <<-__END__
@@ -32,6 +31,8 @@ bootstrap() {
 	__END__
 	# finally, put it in place
 	mv $SCHROOT_TARGET $SCHROOT_BASE/$TARGET
+	mkdir $SCHROOT_BASE/$TARGET/proc $SCHROOT_BASE/$TARGET/sys
+	chmod 555 $SCHROOT_BASE/$TARGET/proc $SCHROOT_BASE/$TARGET/sys
 }
 
 cleanup() {

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