On 2018-12-16, Wolfgang Schweer wrote: > On Sun, Dec 16, 2018 at 09:30:21AM +0100, Vagrant Cascadian wrote: >> On 2018-12-16, Vagrant Cascadian wrote: >> > I'm now thinking of passing an option --trust-file-mirrors or something >> > like that. Then the trust is explicit, consistent with apt behavior >> > requiring to explicitly trust it. It wouldn't allow different levels of >> > trust for different file mirror types, but it will at least be simpler >> > to code... >> >> And implemented, please test: >> >> >> https://git.launchpad.net/ltsp/commit/?id=85f4e9585d996bde20620a775185d06a6f41dc46 > > The new option is evaluated too late; if set to "True", the sources.list > file contains 'deb True file:/// ... '.
Thanks for testing! > The attached patch works for me, please check. ... > diff --git a/server/Debian/share/ltsp/ltsp-build-client-functions > b/server/Debian/share/ltsp/ltsp-build-client-functions > index 4fdd1dce..871714da 100644 > --- a/server/Debian/share/ltsp/ltsp-build-client-functions > +++ b/server/Debian/share/ltsp/ltsp-build-client-functions > @@ -16,16 +16,18 @@ add_mirrors() { > components="$COMPONENTS" > fi > > + echo "deb $mirror $dist $components" >> $ROOT/etc/apt/sources.list > case $mirror in > file:///*) > - echo "deb $TRUST_FILE_MIRROR $mirror $dist $components" >> > $ROOT/etc/apt/sources.list > + if ! [ -z "$trust-file-mirror" ] ; then > + # Option to enable trusted file mirrors: > + # https://bugs.debian.org/911380 > + sed -i 's/deb/deb [trusted=yes]/' > $ROOT/etc/apt/sources.list > + fi $trust-file-mirror is not a valid variable name in shell, so I'm guessing this worked for you by always triggering this codepath... I'd rather not edit all sources.list entries and stick to the way I had it, and just make sure it evaluates early enough... Will try again! :) live well, vagrant
signature.asc
Description: PGP signature