http://ftp.uk.debian.org/debian
echo "$chrootdir" > /opt/chroot/$chrootdir/etc/debian_chroot
+# make chroot profile
+mkdir -p /etc/schroot/$chrootdir
+cp /etc/schroot/default/copyfiles /etc/schroot/$chrootdir
+touch /etc/schroot/$chrootdir/nssdatabases
+
+# create special fstab not bind-mounting /home
+cat <<EOF >/etc/schroot/$chrootdir/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 chroot config to schroot.conf
cat <<EOF >>/etc/schroot/schroot.conf
[$chrootdir]
directory=/opt/chroot/$chrootdir
groups=sbuild-security,$SUDO_USER,users
type=directory
+profile=$chrootdir
EOF
echo "Adding the following $chrootdir section to /etc/schroot/schroot.conf:
"
# Install apt dependencies in the chroot
+cd /tmp
schroot -c $chrootdir /bin/bash << EOF
echo Installing necessary apt dependencies in the chroot
apt-get update -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
-