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

2023-08-23 Thread Cyril Brulebois
Hi Stephen,

Stephen Gelman  (2023-08-22):
> 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!

Thanks for filing as suggested on IRC.

Given the conditions (oldstable as anticipated, but also: local
repository), I'd tend to agree with the “normal” severity, which doesn't
quite match the usual requirements for stable uploads…

We tend to have some leeway with the release team but I wouldn't want to
abuse it. Current gut feeling (after a minute or two only), would be
that it wouldn't deserve an upload on its own, but if there was some
other bugfixes we could probably lump it up in there.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


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

2023-08-22 Thread Stephen Gelman
Source: apt-setup
Version: 1:0.183
Severity: normal
Tags: d-i
X-Debbugs-Cc: ssg...@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