Allow choosing an alternate Debian mirror for the chroot
authorCesar Strauss <cestrauss@gmail.com>
Tue, 22 Aug 2023 22:01:15 +0000 (19:01 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Tue, 22 Aug 2023 22:01:15 +0000 (19:01 -0300)
For now, keep using the UK one as default.

mk-deb-chroot

index 76dcc8f666a0fc95b2ec4baea0ef77fccf73c42f..81b4a3cb79431214d73af47d8beda07fce447b6a 100755 (executable)
@@ -62,10 +62,13 @@ elif [ -e /etc/arch-release ]; then
     pacman -S --needed debootstrap schroot
 fi
 
+# Debian mirror from where to download packages for the chroot
+CHROOT_DEBIAN_MIRROR=${CHROOT_DEBIAN_MIRROR:-http://ftp.uk.debian.org/debian}
+
 # Install debian/buster chroot using debootstrap,
 # any /etc/ config must be done after this point!
-/usr/sbin/debootstrap buster /opt/chroot/$chrootdir \
-                      http://ftp.uk.debian.org/debian
+/usr/sbin/debootstrap buster /opt/chroot/$chrootdir $CHROOT_DEBIAN_MIRROR
+
 echo "$chrootdir" > /opt/chroot/$chrootdir/etc/debian_chroot
 
 # make chroot profile