On Monday, 9 April 2018 12:56:12 CEST Lars Kollstedt wrote: [...] > This patch should IMHO work, but I have no opportunity to test it without > your help, since we're in udeb and testing preseed issues. ;-)
Hi again, 20 times looked at it and still overlooked one detail. This must of course be 'echo "$comment"'. Kind regards, Lars -- Lars Kollstedt Telefon: +49 6151 16-71027 E-Mail: l...@man-da.de man-da.de GmbH Dolivostraße 11 64293 Darmstadt Sitz der man-da.de GmbH: Darmstadt Amtsgericht Darmstadt, HRB 9484 Geschäftsführer: Andreas Ebert
diff -rupNw apt-setup-0.104ubuntu5.orig/generators/60local apt-setup-0.104ubuntu5.fixed/generators/60local --- apt-setup-0.104ubuntu5.orig/generators/60local 2016-06-08 19:08:12.000000000 +0200 +++ apt-setup-0.104ubuntu5.fixed/generators/60local 2018-04-09 13:11:08.347671088 +0200 @@ -35,8 +35,17 @@ while db_get "apt-setup/local$i/reposito while :; do if fetch-url "$key" "$ROOT/tmp/key$i.pub"; then # add it to the keyring - $chroot $ROOT apt-key add "/tmp/key$i.pub" - rm -f "$ROOT/tmp/key$i.pub" + if [ -n "$comment" ]; then + name=$(echo "$comment" | sed -E 's/[^0-9A-Za-z]+/_/g') + else + name="apt-setup_local$i" + fi + if grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----' $ROOT/tmp/key$i.pub + then + mv "$ROOT/tmp/key$i.pub" "$ROOT/etc/apt/trusted.gpg.d/$name.asc" + else + mv "$ROOT/tmp/key$i.pub" "$ROOT/etc/apt/trusted.gpg.d/$name.gpg" + fi break else db_subst apt-setup/local/key-error MIRROR "${repository%% *}"