** Description changed: + [ Impact ] + + May break initramfs-tools hook, resulting in the apt install/upgrade + operation that called it failing. + + [ Test plan ] + + For each $release: + + $ lxc launch ubuntu:$release foo -c limits.cpu=4 -c limits.memory=4GiB --vm + $ lxc shell foo + # apt update + # apt install acpi-override-initramfs + + Observe failure. Enable proposed in apt configuration, then: + + # apt update + # apt install -t $release-proposed acpi-override-initramfs + # reboot + + Check install succeeds, and VM reboots correctly. + + [ Where things could go wrong ] + + Given the fix affects the building of the initramfs, it may potentially + break the booting of the system. While unlikely, the test plan covers + this by rebooting and ensuring the system comes back up. + + [ Original description ] + Ubuntu 20.04, but the same version is also in 20.10 user@system:~$ sudo apt install acpi-override-initramfs Reading package lists... Done - Building dependency tree + Building dependency tree Reading state information... Done The following NEW packages will be installed: - acpi-override-initramfs + acpi-override-initramfs 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/2.640 B of archives. After this operation, 17,4 kB of additional disk space will be used. Selecting previously unselected package acpi-override-initramfs. (Reading database ... 206064 files and directories currently installed.) Preparing to unpack .../acpi-override-initramfs_0.1+nmu1_all.deb ... Unpacking acpi-override-initramfs (0.1+nmu1) ... Setting up acpi-override-initramfs (0.1+nmu1) ... update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.136ubuntu6.2) ... update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic cp: cannot stat '/var/lib/acpi-override/*': No such file or directory E: /usr/share/initramfs-tools/hooks/acpi-override failed with return 1. update-initramfs: failed for /boot/initrd.img-5.4.0-42-generic with 1. dpkg: error processing package initramfs-tools (--configure): - installed initramfs-tools package post-installation script subprocess returned + installed initramfs-tools package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: - initramfs-tools + initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) I assume the problematic statement is in line 18 in /usr/share/initramfs-tools/hooks/acpi-override cp -a /var/lib/acpi-override/* "$ACPI/kernel/firmware/acpi/" || exit 1 If there is no file in /var/lib/acpi-override/ (which is to be expected at initial installation of that package) the cp command gives return code 1 and dpkg ends with an error. In my opinion the cp command should only be executed when files exist, so it probably has to be put into some kind of "if" clause (or needs an "ignore-if-empty" option).
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892035 Title: [SRU] acpi-override-initramfs makes update-initramfs fail when /var/lib/acpi-override/ is empty To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/acpi-override/+bug/1892035/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
