From: Andrey Miroshnikov Date: Thu, 23 Sep 2021 11:43:46 +0000 (+0100) Subject: mk-deb-chroot: Moved brokenproxy cp command to after the debian chroot environment... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d4287ffa7a7e282f25a8293aa8e562b2f4ca894;p=dev-env-setup.git mk-deb-chroot: Moved brokenproxy cp command to after the debian chroot environment is setup (after which /etc/ will exist). --- diff --git a/mk-deb-chroot b/mk-deb-chroot index 1c67729..96d766e 100755 --- a/mk-deb-chroot +++ b/mk-deb-chroot @@ -39,10 +39,6 @@ else cp /tmp/brokenproxy /etc/apt/apt.conf.d/80-retries fi -# No need to check if exists, this script always runs with new chroot -cp /tmp/brokenproxy /opt/chroot/$chrootdir/etc/apt/apt.conf.d/80-retries - - # Install debootstrap and schroot if [ -e /etc/debian_version ]; then # Debian detected: use apt @@ -52,7 +48,8 @@ elif [ -e /etc/arch-release ]; then pacman -S --needed debootstrap schroot fi -# Install debian/buster chroot using debootstrap +# 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 echo "$chrootdir" > /opt/chroot/$chrootdir/etc/debian_chroot @@ -62,6 +59,9 @@ mkdir -p /etc/schroot/$chrootdir cp /etc/schroot/default/copyfiles /etc/schroot/$chrootdir touch /etc/schroot/$chrootdir/nssdatabases +# Copy over brokenproxy apt script to the new chroot environment +cp /tmp/brokenproxy /opt/chroot/$chrootdir/etc/apt/apt.conf.d/80-retries + # create special fstab not bind-mounting /home schroot_fstab=" #