From: Cesar Strauss Date: Tue, 22 Aug 2023 22:01:15 +0000 (-0300) Subject: Allow choosing an alternate Debian mirror for the chroot X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ebd5ec8d2116058a67eeec851b5e3351b809148;p=dev-env-setup.git Allow choosing an alternate Debian mirror for the chroot For now, keep using the UK one as default. --- diff --git a/mk-deb-chroot b/mk-deb-chroot index 76dcc8f..81b4a3c 100755 --- a/mk-deb-chroot +++ b/mk-deb-chroot @@ -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