new host related fixes
[distro-setup] / distro-end
index 77cfa4ba89782d55ec1fa1b8497994c24531f93f..e9b797ae28a78851549c70ab681f4c6432a5fb20 100755 (executable)
@@ -167,8 +167,6 @@ EOF
       t=$(mktemp)
       case $n in
         bookworm)
-          cat >$t <<'EOF'
-EOF
           cat >$t <<EOF
 deb http://deb.debian.org/debian bookworm main
 deb-src http://deb.debian.org/debian bookworm main
@@ -194,11 +192,13 @@ EOF
     if $doupdate; then
       tmpdir=$(mktemp -d)
       cd $tmpdir
-      # otherwise we get a warning message:
-      # W: Download is performed unsandboxed as root as file '/tmp/tmp.UwxbPFG3CZ/debian-archive-keyring_2021.1.1+deb11u1_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
-      chmod 775 .
-      p download debian-archive-keyring
-      s dpkg -i ./debian-archive-keyring*
+      # cant apt get the keyring without doing an update, can't update
+      # without the keyring, this is a stupid chicken and egg problem
+      # that apt should have some feature to solve, but doesn't as far
+      # as I know.
+      f=debian-archive-keyring_2023.3+deb12u1_all.deb
+      wget http://ftp.debian.org/debian/pool/main/d/debian-archive-keyring/$f
+      dpkg -i $f
       p update
       cd -
       rm -rf $tmpdir