Support transition to new non-free-firmware component
APT doesn't care all that much about components and this MR actually makes this a tiny bit more true.
The main feature through is introducing notices for users who have likely missed reading the release notes (which have yet to actually include a section about this).
The generated messages are:
a) for a user who has non-free
but not non-free-firmware
in its sources.list
:
N: Repository 'Debian bookworm' changed its 'non-free component' value from 'non-free' to 'non-free non-free-firmware'
N: More information about this can be found online in the Release notes at: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split
and b) for a user who has no non-free
, but has a (hardcoded) firmware package installed and not downloadable which is shipped in non-free-firmware
:
N: Repository 'Debian bookworm' changed its 'firmware component' value from 'non-free' to 'non-free-firmware'
N: More information about this can be found online in the Release notes at: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split
If you think the first line in each sounds a bit cryptic: That is right, but
- I am reusing an existing message here as I don't want to annoy translators with two new strings for messages which in an ideal world nobody ever sees and reads (although if the last release is any indication…)
- I have a hard time coming up with a better message which fits in one line and wouldn't be confusing anyhow as it is technically a layer violation
- All that message really should do is get people to read the release notes – more cryptic = better
😜
Compared to the draft version:
- slightly refactored the code to avoid code duplicates, but no practical change
- the link chosen based on release-notes discussion
- I picked
component
instead ofsection
in the first line as somehow that is what the release-notes seem to use (for now) in the chapter I link to. - list of firmware packages to suggest adding non-free-firmware for (scenario b) guesstimated based on mails & bugreport plans and current repo content
crude shell script to generate firmware package list
```sh #!/bin/sh set -e OLD_REL='bullseye' NEW_REL='bookworm' MIRROR='https://deb.debian.org/debian' APTHELPER=/usr/lib/apt/apt-helperdownload_packages_file() {
"APTHELPER" download-file "
{MIRROR}/dists/{1}/
{2}/binary-{3}/Packages.xz" "Packages_
{1}${2}${3}.xz"
}
download_all_packages_files() {
"APTHELPER" download-file "
{MIRROR}/dists/{1}/Release" "Release-
{1}"
for ARCH in (grep '^Architectures: ' "Release-
{1}" | cut -d':' -f 2 | tr ' ' '\n'); do
if [ -z "ARCH" -o "
ARCH" = 'all' ]; then continue; fi
download_packages_file "$1" "2" "
ARCH"
done
}
download_all_packages_files "$NEW_REL" 'non-free-firmware' download_all_packages_files "$OLD_REL" 'non-free'
get_binary_firmware_package_names() {
"APTHELPER" cat-file Packages_
{NEW_REL}non-free-firmware*.xz | grep '^Package: ' | cut -d' ' -f 2
# https://lists.debian.org/debian-boot/2023/01/msg00235.html
for SRCPKG in 'amd64-microcode' 'intel-microcode' \
'atmel-firmware' 'firmware-ast' 'firmware-sof' 'rtl8723bt-firmware' \
'bluez-firmware' 'dahdi-firmware' 'firmware-nonfree' \
'zd1211-firmware' \
'ixp4xx-microcode' \
'midisport-firmware' \
; do
apt-helper cat-file Packages_${OLD_REL}_non-free_*.xz | grep-dctrl -nS -s Package "$SRCPKG"
done
}
ixp4xx-microcode: #1029814
get_binary_firmware_package_names | sort -u |
sed -e '/^ixp4xx-microcode$/ d' |
sed -e 's#^(.*)$#"\1",#' | tr '\n' ' '
</details>