From 1ebd5ec8d2116058a67eeec851b5e3351b809148 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Tue, 22 Aug 2023 19:01:15 -0300 Subject: [PATCH] Allow choosing an alternate Debian mirror for the chroot For now, keep using the UK one as default. --- mk-deb-chroot | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.30.2