/usr/sbin/debootstrap buster /opt/chroot/coriolis \
http://ftp.uk.debian.org/debian
echo "coriolis2" > /opt/chroot/coriolis/etc/debian_chroot
+# make coriolis2 profile
+mkdir -p /etc/schroot/coriolis2
+cp /etc/schroot/default/* /etc/schroot/coriolis2
+
+# create special fstab not bind-mounting /home
+cat <<EOF >/etc/schroot/coriolis2/fstab
+# <file system> <mount point> <type> <options> <dump> <pass>
+/proc /proc none rw,bind 0 0
+/sys /sys none rw,bind 0 0
+/dev /dev none rw,bind 0 0
+/dev/pts /dev/pts none rw,bind 0 0
+/tmp /tmp none rw,bind 0 0
+EOF
+
+# Add coriolis config to schroot.conf
+cat <<EOF >>/etc/schroot/schroot.conf
+[coriolis]
+description=Debian Buster for Coriolis
+directory=/opt/chroot/coriolis
+groups=sbuild-security,$SUDO_USER,users
+type=directory
+profile=coriolis2
+EOF
+
+echo "Adding the following coriolis section to /etc/schroot/schroot.conf:
+
+[coriolis]
+description=Debian Buster for Coriolis
+directory=/opt/chroot/coriolis
+groups=sbuild-security,$SUDO_USER,users
+type=directory
+profile=coriolis2
+
+This enables you to chroot into coriolis as an unprivileged user by running
+'schroot -c coriolis /bin/bash'
+"
+
# Install apt dependencies in the chroot
-chroot /opt/chroot/coriolis /bin/bash << EOF
+schroot -c coriolis /bin/bash << EOF
echo Installing necessary apt dependencies in the chroot
apt-get update -y
apt-get upgrade -y
echo -e "Added 'export PATH=/usr/lib/ccache:\"\044PATH\"\nexport DISPLAY=:0.0' to /home/$SUDO_USER/.bash_profile to speed up rebuilds"
EOF
-# Add coriolis config to schroot.conf
-cat <<EOF >>/etc/schroot/schroot.conf
-[coriolis]
-description=Debian Buster for Coriolis
-directory=/opt/chroot/coriolis
-groups=sbuild-security,$SUDO_USER,users
-type=directory
-EOF
-
-echo "Adding the following coriolis section to /etc/schroot/schroot.conf:
-
-[coriolis]
-description=Debian Buster for Coriolis
-directory=/opt/chroot/coriolis
-groups=sbuild-security,$SUDO_USER,users
-type=directory
-
-This enables you to chroot into coriolis as an unprivileged user by running
-'schroot -c coriolis /bin/bash'
-"
-
# Build and install yosys from source
# note that a specific version of yosys is needed for ls180 at the moment
chroot /opt/chroot/coriolis /bin/bash << EOF