Package: fwupd Version: 2.0.3-3 Severity: important Tags: patch upstream X-Debbugs-Cc: adr...@adorsaz.ch
Dear Maintainer, I needed to update the TPM firmware of my DELL Latitude 5580 laptop and I found a firmware update on the DELL support site. I downloaded the ".exe" update and tried to install it with the install_dell_bios_exe.py tool provided by the fwupd package on Debian testing. The script seems to run fine but it prints an error in the middle of its output (I outlined the error line with stars): > root@bulbizarre:/usr/share/fwupd# ./install_dell_bios_exe.py ~/DellTpm2.0_Fw1.3.2.8_V3_64.exe > org.freedesktop.fwupd property OnlyTrusted, current value is True > setting configuration key OnlyTrusted to false > org.freedesktop.fwupd property OnlyTrusted, current value is False > *** Expected a Fwupd.DeviceFlags, but got int *** > org.freedesktop.fwupd property OnlyTrusted, current value is False > setting configuration key OnlyTrusted to true > org.freedesktop.fwupd property OnlyTrusted, current value is True > An update requires a reboot to complete > Restart now? (Y/N) n > Reboot your machine manually to finish the update. First I did not notice this error and I was surprised on reboot the fwupd updater said there was no upgrade to install. The error is about an integer received instead of a DeviceFlags, so I've inspected the script and I noticed a missusage of the [has_flag](https://fwupd.github.io/libfwupd/method.Device.has_flag.html ) method which expects an FwupdDeviceFlags as argument (in the find_uefi_device method). I've updated the script with this patch (I've choosed the flags according to the comments): $ diff install_dell_bios_exe.py install_dell_bios_exe.py.fixed 71c71 < if not item.has_flag(1 << 0): --- > if not item.has_flag(Fwupd.DeviceFlags.INTERNAL): 74c74 < if not item.has_flag(1 << 8): --- > if not item.has_flag(Fwupd.DeviceFlags.NEEDS_REBOOT): With this patch, the output of the script was more complete and contained information about a file found and added to install on the next upgrade. On the next reboot fwupd has successfully found the upgrade and installed it correctly on my computer. Best regards, Adrien PS: I've just checked on upstream git repository and it seems their python script is same code than currently installed on my system: > adrien-local@bulbizarre:~/code/fwupd$ git remote -v > origin https://github.com/fwupd/fwupd.git (fetch) > origin https://github.com/fwupd/fwupd.git (push) > adrien-local@bulbizarre:~/code/fwupd$ git status > Sur la branche main > Votre branche est à jour avec 'origin/main'. > > rien à valider, la copie de travail est propre > adrien-local@bulbizarre:~/code/fwupd$ git log | head -n 1 > commit b499847076aaadcdbf6ae997e4e082146d1b44af > adrien-local@bulbizarre:~/code/fwupd$ diff /usr/share/fwupd/install_dell_bios_exe.py contrib/firmware_packager/install_dell_bios_exe.py > adrien-local@bulbizarre:~/code/fwupd$ -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.12.9-amd64 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages fwupd depends on: ii libarchive13t64 3.7.4-1.1 ii libblkid1 2.40.2-13 ii libc6 2.40-5 ii libcbor0.10 0.10.2-2 ii libcurl3t64-gnutls 8.11.1-1 ii libdrm-amdgpu1 2.4.123-1 ii libdrm2 2.4.123-1 ii libflashrom1 1.4.0-3 ii libfwupd3 2.0.3-3 ii libglib2.0-0t64 2.82.4-2 ii libgnutls30t64 3.8.8-2 ii libjcat1 0.2.0-2+b3 ii libjson-glib-1.0-0 1.10.6+ds-1 ii liblzma5 5.6.3-1+b1 ii libmbim-glib4 1.30.0-1+b2 ii libmbim-proxy 1.30.0-1+b2 ii libmm-glib0 1.22.0-3+b2 ii libpolkit-gobject-1-0 126-1 ii libprotobuf-c1 1.4.1-1+b3 ii libqmi-glib5 1.34.0-2+b2 ii libqmi-proxy 1.34.0-2+b2 ii libsqlite3-0 3.46.1-1 ii libsystemd0 257.2-1 ii libtss2-esys-3.0.2-0t64 4.1.3-1.2 ii libusb-1.0-0 2:1.0.27-1+b1 ii libxmlb2 0.3.21-1 ii shared-mime-info 2.4-5+b1 ii systemd [systemd-sysusers] 257.2-1 ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1 Versions of packages fwupd recommends: ii bolt 0.9.8-1 ii dbus [default-dbus-system-bus] 1.16.0-1 ii fwupd-amd64-signed [fwupd-signed] 1:1.7+1 ii jq 1.7.1-3+b1 ii python3 3.12.8-1 pn secureboot-db <none> ii udisks2 2.10.1-11 Versions of packages fwupd suggests: ii gir1.2-fwupd-2.0 2.0.3-3 -- Configuration Files: /etc/fwupd/fwupd.conf [Errno 13] Permission non accordée: '/etc/fwupd/fwupd.conf' -- no debconf information