rootdir=$(mktemp -d "$builddir/create-$suite-XXXXXX")
cleanup+=("rm -r $rootdir")
cleanup+=("umount $rootdir/sys")
+script=/usr/share/debootstrap/scripts/"$suite"
+if ! [ -e "$script" ]; then
+ if [ -z "$ubuntu" ]; then
+ script=/usr/share/debootstrap/scripts/sid
+ else
+ script=/usr/share/debootstrap/scripts/gutsy
+ fi
+fi
set -x
debootstrap \
--include="apt" \
--variant=buildd \
--arch="$arch" \
- "$suite" "$rootdir" "$mirror"
-echo "$tuple" > $rootdir/etc/debian_chroot
+ "$suite" "$rootdir" "$mirror" "$script"
+echo "$tuple" > "$rootdir/etc/debian_chroot"
+echo "force-unsafe-io" > "$rootdir/etc/dpkg/dpkg.cfg.d/force-unsafe-io"
chroot "$rootdir" apt-get update
chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends policyrcd-script-zg2