Commit Graph

8363 Commits

Author SHA1 Message Date
Richard Hughes
83229af12a trivial: Correctly compress zip files in FuArchive 2023-01-26 14:36:57 +00:00
Richard Hughes
bc50d59f56 Ensure the new GUsbDevice is assigned in subclasses of FuUsbDevice
Re-incorporate the emulated USB devices when the backend device changes.
2023-01-26 14:04:01 +00:00
Richard Hughes
00ec2d8c25 trivial: Fix critical warning in future code
Both types need to be FuUdevDevice to compare the sysfs paths.
2023-01-26 14:04:01 +00:00
Richard Hughes
965a7c64d0 Do not return emulated devices from GetHistory 2023-01-26 14:03:52 +00:00
Richard Hughes
f3f951d3a7 trivial: Add fu_device_has_problem() to be consistent and hide details 2023-01-26 12:35:08 +00:00
Richard Hughes
354122e83c Remove duplicate calls to fu_device_list_wait_for_replug()
The fu_engine_get_device() function is called at the start of each phase,
which calls fu_device_list_wait_for_replug() a second time.

Duplicate calls are at best confusing, and at worst could cause a 'device
failed to come back' failure.
2023-01-26 11:31:02 +00:00
Richard Hughes
110ef12cc7 Add a device problem for 'update-in-progress'
We already had this as an inhibit, but this was not translated client-side.

We also need to propagate the problem to the bootloader device if the device
replugs during firmware update.
2023-01-26 09:01:26 +00:00
Richard Hughes
854bec2e17 colorhug: Show the flash success value in debugging 2023-01-26 08:55:49 +00:00
Mario Limonciello
d26c847776 Add python3-pefile/python-pefile to CI build deps
This is so that it can be used by subproject fwupd-efi
2023-01-25 17:20:01 -06:00
Richard Hughes
3ab4e386c5 Fix hotplug events when emulating devices 2023-01-25 12:09:29 +00:00
Ivan Mikhanchuk
af5fb429c8 modem-manager: remove improper use of assert
FuSaharaLoader being NULL is normal for devices that only
support Firehose and don't use Sahara QDL port.
2023-01-24 20:54:43 -06:00
Jason Gerecke
8076090a00 wacom-usb: Retry set_report on failure
Sometimes the flash process will randomly hang and time-out when sending
data to the device. We currently do not use any retry logic, so if this
happens the flash attempt is treated as a failure. This can be a source
of worry or frustration, especially if subsequent manual retries fail
in a similar way.

Adding FU_HID_DEVICE_FLAG_RETRY_FAILURE to the list of flags used when
calling fu_hid_device_set_report allows fwupd to try sending a block
multiple times if such a time-out (or other error) occurs. This makes
the flash process less prone to failure.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
2023-01-24 18:09:09 +00:00
Richard Hughes
ddd5140832 trivial: Fix tests to include 'emulated' 2023-01-24 15:41:01 +00:00
Richard Hughes
575871f505 Add fu_device_remove_backend_tag() for future use 2023-01-24 14:54:23 +00:00
Richard Hughes
ab04bb345c trivial: Proxy the _SAVE_EVENTS flag even if set at runtime 2023-01-24 13:46:51 +00:00
Richard Hughes
ab27a8d335 Use the new GUsb API for loading by tag
Based on a patch by frederic.danis@collabora.com, many thanks.
2023-01-24 13:46:51 +00:00
Richard Hughes
90e5a58736 Do not make any of the HWIDs setup failures fatal
It's perfectly okay to have no HWIDs defined.

Should help with https://github.com/fwupd/fwupd/issues/5402
2023-01-24 12:45:36 +00:00
Richard Hughes
296fe5fb46 trivial: Add a device flag specifying it is emulated 2023-01-24 09:51:04 +00:00
Richard Hughes
3824af4756 trivial: Fix fuzzing with libxmlb from main, harder 2023-01-23 17:16:57 +00:00
Richard Hughes
bda113829a trivial: Force enums to be uint64, harder 2023-01-23 17:11:23 +00:00
Richard Hughes
62eafd6c46 trivial: Fix fuzzing with libxmlb from main 2023-01-23 16:46:13 +00:00
Richard Hughes
53597cf045 Save all the FwupdDeviceFlags in the pending database
Force the compiler to treat them as uint64_t so that bitwise operations work.
At the moment flags greater than 1<<32 are just being silently ignored...
2023-01-23 16:40:22 +00:00
Richard Hughes
22c41252c5 Support unsetting specific device flags
This makes it possible to 'undo' the notification, for example.
2023-01-23 16:39:26 +00:00
Richard Hughes
5e64c883b0 trivial: Fix build fix when using ppc64le system 2023-01-23 13:19:53 +00:00
Richard Hughes
ff46480adb trivial: Use %autochangelog in reference spec file 2023-01-23 13:19:53 +00:00
Richard Hughes
a6deceda32 Allow desktop software to inhibit the system to prevent all updates
On edge hardware a process may want to disable firmware updates as it might be
a bad time to allow an upgrade.
2023-01-23 13:14:23 +00:00
Richard Hughes
e528bc3940 trivial: post release version bump 2023-01-23 10:19:17 +00:00
Richard Hughes
44137021f2 Release fwupd 1.8.10 2023-01-23 10:17:45 +00:00
Daniil Lunev
8e1715779e emmc: correct legacy GUID generation
It used to be generated with decimal, not hexadecimal values.

Change-Id: I2a6a5bdea50e2d08a7de9f65a1f9a03de29e1591
2023-01-22 20:40:38 -06:00
Richard Hughes
fd08eaefee trivial: Fix bitwise operators in last commit 2023-01-22 08:29:20 +00:00
Richard Hughes
5d6cb83d1c Add fu_context_remove_flag() for future use 2023-01-22 07:35:48 +00:00
Richard Hughes
0554d4db32 Speed up startup by a huge amount when using directory remotes
By using libxmlb correctly we can avoid rebuilding the metadata if the directory
is unchanged. This means the initial 'generation' is unchanged in speed, but
subsequent loads are almost instant as the archives are not decompressed.
2023-01-21 13:33:09 +00:00
Richard Hughes
433d138a26 Show some debugging when we ignore a release due to missing checksums 2023-01-21 13:32:53 +00:00
Richard Hughes
60783fa0da Fallback to the <checksum> if the <artifact> is invalid
In 62a62f8f0f we started ignoring the artifact
when the type was 'binary' -- however, we need to fall back to the older tag
schema if the data was not set, rather than only if the <artifact> tag was not
found.
2023-01-21 13:32:53 +00:00
Aaron Skomra
189686368a wacom-usb: prefix errors that occur when writing to the device
Make it easier to locate errors that occur when writing to the device.
2023-01-18 19:36:45 -06:00
Richard Hughes
c647d0d0f6 Parse the DT chassis-type when parsing the FDT 2023-01-18 18:20:35 +00:00
Michal Suchanek
5688191a7b uefi-capsule: Do not call grub2-probe without arguments
commit 684bc0381 ("trivial: fix various shellcheck warnings") adds call
to ${grub_probe} without any argument which causes grub2-probe to return
an error, and generating grub configuration fails.

Add --version argument to avoid the error, and redierct the output to
/dev/null so that it's not included in the grub configuration file.

The commit also adds superfluous single quotes causing another error:

/usr/sbin/grub2-probe: error: cannot find a GRUB drive for `${grub_probe} --target=device \${ESP}` | sed -e "s/^/\t/".  Check your device.map.

Fix the quoting to work at least for single device.

Fixes: #5424
Fixes: 684bc0381 ("trivial: fix various shellcheck warnings")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2023-01-18 10:56:26 -06:00
Mario Limonciello
52d6c3cb78 Update documentation to indicate that loading "OS Optimized Defaults"
may enable security processor rollback protection on Lenovo systems.

fixes: #5394
2023-01-18 08:08:16 +00:00
Richard Hughes
eb30233b35 Improve FDT parsing compatibility
Newer versions of dtc agressively pack the string table, using *any* matching
suffix rather than whole strings. This is specification compliant, but breaks
if you use the offset as a hash key as a [premature] optimization.

Just use the string table as a flat block of memory rather than pre-parsing it.

This fixes reading the system FDT on new OpenBMC builds.
2023-01-18 07:59:45 +00:00
Richard Hughes
2b0f92506b Refactor the hwids functionality
This refactors the code as it was getting very confusing; before FuSmbios was
reading both SMBIOS and the kernel-provided DT -- and various things were
injecting overrides in three different place. To properly support FDT remove
one layer of indirection.

This also lets us use the compatible strings to enable plugins specifying the
flag _REQUIRE_HWID -- which means we only load the plugin if it's got a chance
of working. e.g.

    [aspeed,ast2500]
2023-01-18 07:04:44 +00:00
Richard Hughes
72f5c1e01e trivial: Make the installed-tests redfish.conf secure to avoid a warning
Also, don't attempt to change the permissions if the correct one is already
set.
2023-01-17 19:29:39 +00:00
Mario Limonciello
450c3be909 trivial: update supported cpu documentation to add more info for AMD
This should hopefully help disambiguate when information isn't available
what to do.

Fixes: #5415
2023-01-17 13:28:51 -06:00
Vincent Huang
a01b57b17d
synaptics-rmi: add feature to verify signature (#5406) 2023-01-17 09:33:49 +00:00
Richard Hughes
4057edb24b trivial: Add FU_PATH_KIND_SYSFSDIR_DMI for future use 2023-01-16 20:23:28 +00:00
Richard Hughes
0efc1bebce trivial: Add fu_context_get_hwids() for future use 2023-01-16 17:49:57 +00:00
Richard Hughes
2737b05cf8 trivial: Add fu_context_get_smbios() for future use 2023-01-16 17:49:57 +00:00
Richard Hughes
0e381a8666 trivial: Store the chassis kind in the context 2023-01-16 17:49:57 +00:00
Richard Hughes
8af1943142 trivial: Add FuContextHwidFlags for future usage 2023-01-16 17:49:57 +00:00
Richard Hughes
c95355b498 trivial: Add a GError parameter to fu_context_get_smbios_string()
This matches the behaviour of fu_smbios_get_string() and was probably accidental.
2023-01-16 14:05:48 +00:00
Richard Hughes
17156f13d5 trivial: Fix the progress steps when dumping firmware
In most cases the firmware dump is going to take a *lot* longer than the
engine startup.
2023-01-13 15:43:39 +00:00