From 3ea8662956564750fedc9f01014c379e472f3b22 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Wed, 3 Jul 2019 15:58:18 +0300 Subject: [PATCH] TT#61152 Drop support of debootstrap Since mr7.3 we use mmdebstrap as it's faster so it's time to drop debootstrap support. Change-Id: I0cd5b03ace2b752decd71c4a06d8109105fb5c1e --- templates/scripts/includes/deployment.sh | 40 ++++++------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index dddc716..91d6d8d 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -1390,38 +1390,18 @@ deb ${MIRROR} ${DEBIAN_RELEASE}-updates main contrib non-free deb ${DBG_MIRROR} ${DEBIAN_RELEASE}-debug main contrib non-free EOF -case "$DEBIAN_RELEASE" in - stretch|buster) - if ! [ -r "/usr/share/debootstrap/scripts/${DEBIAN_RELEASE}" ] ; then - echo "Enabling ${DEBIAN_RELEASE} support for debootstrap via symlink to sid" - ln -s /usr/share/debootstrap/scripts/sid "/usr/share/debootstrap/scripts/${DEBIAN_RELEASE}" - fi - ;; -esac - -# defaults -DEBOPT_OPTIONS=("--keyring=${KEYRING} --no-merged-usr") -if checkBootParam nommdebstrap ; then - echo "Boot option nommdebstrap found, disabling usage of mmdebstrap for installing Debian" -else - # mmdebstrap is available only since buster, so ensure we're running on - # a buster based Grml ISO - case $(cat /etc/debian_version) in - buster*|10*) - echo "Using mmdebstrap for bootstrapping Debian" - ADDITIONAL_PACKAGES+=(mmdebstrap) - ensure_packages_installed - export DEBOOTSTRAP=mmdebstrap # for usage with grml-debootstrap - # it's a no-op in mmdebstrap v0.4.1, but force its usage to not be surprised - # if that default should ever change - DEBOPT_OPTIONS=("--no-merged-usr") - ;; - *) - echo "NOTE: not running on top of a Debian/buster based ISO, can't enable mmdebstrap usage" - ;; - esac +if [[ ! -x "$(which mmdebstrap)" ]]; then + die "Can't find mmdebstrap" fi +ADDITIONAL_PACKAGES+=(mmdebstrap) +ensure_packages_installed +export DEBOOTSTRAP=mmdebstrap # for usage with grml-debootstrap + +# it's a no-op in mmdebstrap v0.4.1, but force its usage to not be surprised +# if that default should ever change +DEBOPT_OPTIONS=("--no-merged-usr") + # install only "Essential:yes" packages plus apt (explicitly included in minbase variant), # systemd + network related packages DEBOPT_OPTIONS+=("--variant=minbase --include=systemd,systemd-sysv,init,isc-dhcp-client,ifupdown")