[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1050316: apt-setup: Unable to use local repo when installing older release



Source: apt-setup
Version: 1:0.183
Severity: normal
Tags: d-i
X-Debbugs-Cc: ssgelm@debian.org

I sometimes use the current stable d-i to install the n-1 release when I
need to install on hardware that requires a newer kernel, then I install
the backport kernel in the preseed so the system boots. With the
bookworm debian-installer, my local apt repo does not get successfully
added to the system.

After some debugging, I determined the issue is here: https://salsa.debian.org/installer-team/apt-setup/-/blob/master/generators/60local#L46
The /etc/apt/keyrings directory wasn't added to the apt package until
apt 2.4.0, but bullseye only ships with 2.2.4. The fix here is simple
and I believe it to be low risk: the generator just needs to run
"mkdir -p /etc/apt/keyrings" at the beginning of 60local. Since newer
versions of apt already create that empty directory it will be a no-op
for them.

In case anyone else runs into this issue and stumbles onto this bug, I
was able to work around it by adding the following to my preseed:

d-i partman/early_command string printf "#!/bin/sh\nmkdir -p \$ROOT/etc/apt/keyrings\n" > /usr/lib/apt-setup/generators/02fixbug && chmod +x /usr/lib/apt-setup/generators/02fixbug

I understand that the current release is the main priority of d-i but
given the fix seems to be low risk it would be appreciated if it could
be fixed in stable!


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.3.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled


Reply to: