-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Open
Copy link
Labels
C: firmwareThis issue pertains to firmware in Qubes OS.This issue pertains to firmware in Qubes OS.C: updatesThis issue pertains to updating Qubes OS.This issue pertains to updating Qubes OS.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.Priority: default. Default priority for new issues, to be replaced given sufficient information.affects-4.2This issue affects Qubes OS 4.2.This issue affects Qubes OS 4.2.needs diagnosisRequires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed.Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed.
Description
Qubes OS release
Qubes OS 4.2
Brief summary
The jcat file published at https://cdn.fwupd.org/downloads/firmware.xml.xz.jcat now contains two p7b files. As a result, when I run qubes-fwupdmgr refresh
, this code tries to rename the same file twice and raises a FileNotFoundError because the source file does not exist the second time.
The affected code lives in the fwupd repository, but I am filing the issue here because that's probably where users are more likely to find it and the code appears to be mostly maintained by the Qubes OS project.
Steps to reproduce
- Run
qubes-fwupdmgr refresh
in dom0.
Expected behavior
Successful refresh.
Actual behavior
Error:
[root@dom0 ~]# qubes-fwupdmgr refresh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15403 100 15403 0 0 108k 0 --:--:-- --:--:-- --:--:-- 108k
Validating directories
Traceback (most recent call last):
File "/usr/libexec/qubes-fwupd/fwupd_download_updates.py", line 154, in <module>
main()
~~~~^^
File "/usr/libexec/qubes-fwupd/fwupd_download_updates.py", line 146, in main
dn.download_metadata(url=url)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/libexec/qubes-fwupd/fwupd_download_updates.py", line 110, in download_metadata
self._download_metadata_jcat()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/libexec/qubes-fwupd/fwupd_download_updates.py", line 96, in _download_metadata_jcat
os.rename(path, new_path)
~~~~~~~~~^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.cache/fwupd/metadata/firmware-08309-stable.xml.xz.p7b' -> '/home/user/.cache/fwupd/metadata/firmware.xml.xz.p7b'
Failed to refresh remote 'lvfs': Metadata download failed.
Additional information
I can think of a few ways to fix the problem that might be reasonable:
- Only extract the files that dom0 is actually going to use. I applied the patch below on my system, and it seemed to work. Of course, it would be better to factor out the list of files used by dom0 into a place that this code can also reference rather than duplicating it.
--- /usr/libexec/qubes-fwupd/fwupd_download_updates.py.mattorig 2023-07-09 16:30:27.000000000 -0400
+++ /usr/libexec/qubes-fwupd/fwupd_download_updates.py.mattnew 2025-10-11 11:13:08.820811101 -0400
@@ -92,8 +92,9 @@
base_path, ext = os.path.splitext(path)
if base_path == self.metadata_file:
continue
- new_path = f"{self.metadata_file}{ext}"
- os.rename(path, new_path)
+ if ext in (".asc", ".sha256"):
+ new_path = f"{self.metadata_file}{ext}"
+ os.rename(path, new_path)
def download_metadata(self, url=None):
"""Downloads default metadata and its signatures"""
- Just slap a
set(...)
here to process each filename only once. However, that would make things more confusing if dom0 actually needs both p7b files in the future.
Metadata
Metadata
Assignees
Labels
C: firmwareThis issue pertains to firmware in Qubes OS.This issue pertains to firmware in Qubes OS.C: updatesThis issue pertains to updating Qubes OS.This issue pertains to updating Qubes OS.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.Priority: default. Default priority for new issues, to be replaced given sufficient information.affects-4.2This issue affects Qubes OS 4.2.This issue affects Qubes OS 4.2.needs diagnosisRequires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed.Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed.