summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_arch_schroot_setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_arch_schroot_setup.sh')
-rwxr-xr-xbin/reproducible_arch_schroot_setup.sh7
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() {