diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-16 15:31:37 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-16 15:31:37 +0200 |
commit | ccfc0135e00986e037a2ce5fc0b3ae18bfa9bcf2 (patch) | |
tree | 6e46ab04879a6b1b30bb128ae8ed81b79d92b680 | |
parent | bb55d983b41b350ce3cbaad05c2cd6b85ce5affe (diff) | |
download | jenkins.debian.net-ccfc0135e00986e037a2ce5fc0b3ae18bfa9bcf2.tar.xz |
reproducible: work around mv not moving read-only directories
-rwxr-xr-x | bin/reproducible_arch_schroot_setup.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/reproducible_arch_schroot_setup.sh b/bin/reproducible_arch_schroot_setup.sh index 0d7ee9d1..b29464cb 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() { |