FS#57385 - [fwupdate] cleanup script not being run on install
Attached to Project:
Community Packages
Opened by Mario (superm1) - Monday, 05 February 2018, 19:29 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Tuesday, 27 February 2018, 18:30 GMT
Opened by Mario (superm1) - Monday, 05 February 2018, 19:29 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Tuesday, 27 February 2018, 18:30 GMT
|
Details
We've gotten some failures that point to the initial
fwupdate cleanup task is not being run on Arch installs of
fwupdate.
This script is shipped as a systemd unit (https://github.com/rhboot/fwupdate/blob/master/linux/cleanup.service.in) but it can also be manually called during a postinst task https://github.com/rhboot/fwupdate/blob/master/linux/cleanup.in The script will remove any old EFI variables from a different distribution to prevent pointing to the wrong files. If not removed then the fwupdate libraries will try to re-use variables and paths that they point to. At least one report to LVFS indicates that it is not being run (The installation refers to an Ubuntu variable that should have been previously removed). "Metadata": { "AppstreamGlibVersion": "0.7.4", "BootTime": "1517589445", "CpuArchitecture": "x86_64", "DistroId": "arch", "FwupdVersion": "1.0.4", "GUsbVersion": "0.2.11", "KernelVersion": "4.14.15-1-ARCH" }, "Modified": 1517669223, "Plugin": "uefi", "UpdateError": "UEFI firmware update failed: {error #0} libfwup.c:1178 get_fd_and_media_path(): open of /boot/efi/EFI/ubuntu/fw/fwupdate-3qh11r.cap failed: Datei oder Verzeichnis nicht gefunden", "UpdateState": 3, "VersionNew": "0.1.7.5", "VersionOld": "0.1.7.4" |
This task depends upon
Closed by Bruno Pagani (ArchangeGabriel)
Tuesday, 27 February 2018, 18:30 GMT
Reason for closing: Implemented
Additional comments about closing: Wiki page + instructions redirecting to it in fwupdate 10-1.
Tuesday, 27 February 2018, 18:30 GMT
Reason for closing: Implemented
Additional comments about closing: Wiki page + instructions redirecting to it in fwupdate 10-1.
Also I’ve already agreed that this is more a documentation issue (we should have a wiki page telling to clean those things manually), but I don’t have time to write anything currently. Eventually if the script gets adjusted to run without assuming the ESP location, we could just add a line in the .install to tell people to run it (in addition to copying the required files).
The path for efivars should be static no matter where you put the ESP, if you don't run the unit can you please at least clean those variables up?
Please remove leftover from eventual previous install of fwupdate by running
this (as root or with sudo):
chattr -i /sys/firmware/efi/efivars/fwupdate-*-0abba7dc-e516-4167-bbf5-4d9d1c739416
rm /sys/firmware/efi/efivars/fwupdate-*-0abba7dc-e516-4167-bbf5-4d9d1c739416
If you're not going to automatically run those tasks I think that message makes sense.
post_install() {
echo "Please read https://wiki.archlinux.org/index.php/fwupd for things to setup before using fwupdate"
}
post_upgrade() {
if [ $(vercmp $2 10-1) -lt 0 ] ; then
post_install
fi
}
And https://wiki.archlinux.org/index.php/Fwupd#Verifying_leftovers_from_previous_installations