On Sat, Dec 08, 2018 at 03:08:22PM +0100, Vagrant Cascadian wrote: > On 2018-12-07, Vagrant Cascadian wrote: > But it's also possible to have some mirrors include a file:/// url > that's trusted and some that are not... so it needs to be specified on a > per-mirror basis.
Just another try w/ conditionally added trust; the attached patch seems to work for me, please check. Wolfgang
From 7106088bcbd7d0a0a49144b66ab10ab2f943e9d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Schweer <wschw...@arcor.de> Date: Mon, 10 Dec 2018 11:02:26 +0100 Subject: [PATCH] Debian: ltsp-build-client: Trust file:/ mirrors that point to /media/cdrom to be able to use a CDROM now that file:/// mirrors are no longer trusted by default. https://bugs.debian.org/911380 --- .../Debian/share/ltsp/ltsp-build-client-functions | 13 ++++++++++--- .../ltsp-build-client/Debian/010-debootstrap | 6 +----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/server/Debian/share/ltsp/ltsp-build-client-functions b/server/Debian/share/ltsp/ltsp-build-client-functions index ae019cc9..8fce9652 100644 --- a/server/Debian/share/ltsp/ltsp-build-client-functions +++ b/server/Debian/share/ltsp/ltsp-build-client-functions @@ -16,10 +16,17 @@ add_mirrors() { components="$COMPONENTS" fi - echo "deb $mirror $dist $components" >> $ROOT/etc/apt/sources.list case $mirror in - *file:///*) - dir=$(echo "$mirror" | sed -e 's,^file://,,g') + file:///media/cdrom) + echo "deb [trusted=yes] $mirror $dist $components" >> $ROOT/etc/apt/sources.list + ;; + *) + echo "deb $mirror $dist $components" >> $ROOT/etc/apt/sources.list + ;; + esac + + case $mirror in + file:///*) dir=$(echo "$mirror" | sed -e 's,^file://,,g') mkdir -p $ROOT/$dir chroot_mount $dir $dir --bind ;; diff --git a/server/share/ltsp/plugins/ltsp-build-client/Debian/010-debootstrap b/server/share/ltsp/plugins/ltsp-build-client/Debian/010-debootstrap index f7543cb9..64374c73 100644 --- a/server/share/ltsp/plugins/ltsp-build-client/Debian/010-debootstrap +++ b/server/share/ltsp/plugins/ltsp-build-client/Debian/010-debootstrap @@ -30,12 +30,8 @@ case "$MODE" in echo " $0 --dist etch" exit 1 fi - # Strip out apt options, such as [trusted=yes] file:/// ... - # https://bugs.debian.org/911380 - DEBOOTSTRAP_MIRROR="$(echo $MIRROR | sed -e 's,\[.*\],,g')" - # Install base packages - LC_ALL=C ${DEBOOTSTRAP:-"debootstrap"} $DEBOOTSTRAPOPTS --arch $ARCH $DIST $ROOT $DEBOOTSTRAP_MIRROR + LC_ALL=C ${DEBOOTSTRAP:-"debootstrap"} $DEBOOTSTRAPOPTS --arch $ARCH $DIST $ROOT $MIRROR if [ -x "$CROSS_ARCH_EMULATOR" ]; then # configured for cross architecture install. this requires a # statically built emulator such as qemu, and binfmt_misc -- 2.20.0.rc2
signature.asc
Description: PGP signature