[ cc += Alexandre, lost a few mails ago ] Cyril Brulebois <k...@debian.org> (2025-05-21): > In this case, I suppose it wouldn't be too hard to have the list of > files from that package (either including it somewhere in the image, > e.g. under the dep11 directory, next to the .patterns file), or to > locate the .deb on the installation image and look at its contents > [the former would seem easier]… and skip any such files when copying > loose files[3].
We already have Contents-firmware with the following mapping: firmware_file_path firmware_deb_filename component so we only need to record firmware_deb_filename on the debian-cd side, when install_firmwares_initrd() is called. That can be done with either the deb's filename (basename) or with its Package field. The former means a direct match in Contents-firmware, so I've implemented and tested that. Branches for hw-detect: - bug-1106005-v1: first attempt, cleaning up after the fact (i.e. after copying all loose files); inefficient but that did the job already; - bug-1106005-v2: optimized version, cleaning up before the copy happens. Branch for debian-cd: to-do, I need to clean things up a little (fixup commit in my custom branch with local settings), but basically, extra line: basename ${FILE} >> ${FWDIR}/usr/lib/firmware/.embedded-firmware-debs > This would be generic enough to work without any more changes (at the > hw-detect level) if we start including firmware-intel-sound contents as > well. Seeing how debian-cd uses the following when a speakup-enabled initrd is spotted, having an extra call with e.g. firmware-intel-sound should mean absolutely no changes required in hw-detect, and no further changes in debian-cd: install_firmwares_initrd "$CDDIR/$INSTALLDIR/initrd" "firmware-sof-signed" install_firmwares_initrd "$CDDIR/$INSTALLDIR/gtk/initrd" "firmware-sof-signed" (The former isn't called due to the check on isolinux/spk.cfg — ENOENT — which mirrors the check on isolinux/spkgtk.cfg — which exists — for the latter.) > This would also mean not having to care about whether sound modules are > loaded/in use to decide whether to queue installation. I haven't tested the modified image on my Dell G3 15 just yet, but that one was pulling firmware-sof-signed via modalias (hiding the loose files problem there), and I don't have any reasons to believe it's going to regress. At least, not due to the proposed changes… On my Asus Vivobook, firmware-sof-signed was not pulled, and I was able to confirm the *many* extra files before patching… and their going away after patching. The following happens with the graphical installer, remembering the extra file (.embedded-firmware-debs) is only going to be there with a patched debian-cd: May 22 01:14:33 install-firmware: looking to clean loose files belonging to firmware-sof-signed_2025.01-1_all.deb (according to /cdrom/firmware/Contents-firmware) May 22 01:14:33 install-firmware: ... removed up to 494 files Those lines aren't seen with the text installer, since the extra file is not added by debian-cd, since install_firmwares_initrd() isn't called for that initrd. This means we should be able to upload hw-detect as it is, without fearing any breakages that might be linked to a file that isn't getting added just yet. Maybe someone might want to sanity-check bug-1106005-v2 before that gets merged/uploaded? Seeing how everything seems lined up already, I'm quite confident we can include that (with or without any further fixups) in time for D-I Trixie RC 2. Cheers, -- Cyril Brulebois (k...@debian.org) <https://debamax.com/> D-I release manager -- Release team member -- Freelance Consultant
signature.asc
Description: PGP signature