Commit Graph

9570 Commits

Author SHA1 Message Date
Richard Hughes
c907d77608 Copy some flags from the proxy to the logical device 2023-02-23 13:04:10 -06:00
Mario Limonciello
794cbee9da trivial: update fwupd-efi to 1.4
fwupd-efi 1.4 enforces that NX bit is set by default.
This won't affect most users, it should only affect those that compile
by hand and don't have fwupd-efi installed already.
2023-02-23 13:04:10 -06:00
Richard Hughes
16a3856b3a trivial: Do not ask for polkit auth if the device is emulated 2023-02-23 13:04:10 -06:00
Richard Hughes
7277a4dd3c trivial: Do not wait for the acquiesce delay if emulated 2023-02-23 13:04:10 -06:00
Frédéric Danis
084874d198 Propagate device tag to parent device 2023-02-23 13:04:10 -06:00
Richard Hughes
465052fec8 trivial: Correctly compress zip files in FuArchive 2023-02-23 13:04:10 -06:00
Richard Hughes
409586cbca Ensure the new GUsbDevice is assigned in subclasses of FuUsbDevice
Re-incorporate the emulated USB devices when the backend device changes.
2023-02-23 13:04:10 -06:00
Richard Hughes
f2cf09ba13 trivial: Fix critical warning in future code
Both types need to be FuUdevDevice to compare the sysfs paths.
2023-02-23 13:04:10 -06:00
Richard Hughes
1a65617ac6 Do not return emulated devices from GetHistory 2023-02-23 13:04:10 -06:00
Richard Hughes
4dc7c5ff61 trivial: Add fu_device_has_problem() to be consistent and hide details 2023-02-23 13:04:10 -06:00
Richard Hughes
d3f4a7032d 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-02-23 13:04:10 -06:00
Richard Hughes
5da8e1c760 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-02-23 13:04:10 -06:00
Richard Hughes
3d56ac8a90 colorhug: Show the flash success value in debugging 2023-02-23 13:04:10 -06:00
Mario Limonciello
01d82b5538 Add python3-pefile/python-pefile to CI build deps
This is so that it can be used by subproject fwupd-efi
2023-02-23 13:04:10 -06:00
Richard Hughes
3b1400c4be Fix hotplug events when emulating devices 2023-02-23 13:04:10 -06:00
Ivan Mikhanchuk
af74423ba5 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-02-23 13:04:10 -06:00
Jason Gerecke
9bfab134ca 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-02-23 13:04:10 -06:00
Richard Hughes
85c26e17c0 trivial: Fix tests to include 'emulated' 2023-02-23 13:04:10 -06:00
Richard Hughes
83c6b33778 Add fu_device_remove_backend_tag() for future use 2023-02-23 13:04:10 -06:00
Richard Hughes
8f4604a14a trivial: Proxy the _SAVE_EVENTS flag even if set at runtime 2023-02-23 13:04:10 -06:00
Richard Hughes
772f9db7ae Use the new GUsb API for loading by tag
Based on a patch by frederic.danis@collabora.com, many thanks.
2023-02-23 13:04:10 -06:00
Richard Hughes
3c51604ab8 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-02-23 13:04:10 -06:00
Richard Hughes
7d5f0e3e3f trivial: Add a device flag specifying it is emulated 2023-02-23 13:04:10 -06:00
Richard Hughes
746f1bbaac trivial: Fix fuzzing with libxmlb from main, harder 2023-02-23 13:04:10 -06:00
Richard Hughes
ed74c87782 trivial: Force enums to be uint64, harder 2023-02-23 13:04:10 -06:00
Richard Hughes
7f4491ea5c trivial: Fix fuzzing with libxmlb from main 2023-02-23 13:04:10 -06:00
Richard Hughes
e7b08d1626 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-02-23 13:04:10 -06:00
Richard Hughes
b5a70a70ee Support unsetting specific device flags
This makes it possible to 'undo' the notification, for example.
2023-02-23 13:04:10 -06:00
Richard Hughes
e92bb8a2ac trivial: Fix build fix when using ppc64le system 2023-02-23 13:04:10 -06:00
Richard Hughes
ffd1b415d9 trivial: Use %autochangelog in reference spec file 2023-02-23 13:04:10 -06:00
Richard Hughes
3457715749 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-02-23 13:04:10 -06:00
Richard Hughes
6bf9c9f983 trivial: post release version bump 2023-02-23 13:04:10 -06:00
Mario Limonciello
e338b6f0ae releasing package fwupd version 1.8.10-2 2023-01-24 09:13:05 -06:00
Mario Limonciello
dc17852b2f Backport a patch to hopefully help with autopkgtest failures on !x86 2023-01-24 09:13:00 -06:00
Mario Limonciello
5bd4547a62 releasing package fwupd version 1.8.10-1 2023-01-23 08:52:22 -06:00
Mario Limonciello
dac3850211 Drop patches, upstream 2023-01-23 08:33:50 -06:00
Mario Limonciello
0a1f339298 Release fwupd 1.8.10
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEFj61ARkiXbPfj0nqF6y6jfqXDhcFAmPOXskUHHJpY2hhcmRA
 aHVnaHNpZS5jb20ACgkQF6y6jfqXDhdyBAf/YXQ8w8giq39B2Bn1AnMhjQ1Raox7
 4+dgbabmHY8yP1zEDk7g2SkkXP19Ur76pYfJHg9nlo4zuGj5QlxgHwTfIeDrJE+O
 pZVytRS1sKZpSJOzGXRsKbJHEr7scNap02wlSqoyzku3X1lfv8B2oKQT5aMFLxPH
 E6eFN4v3V1XGeAybpTTu4UNJB3mWAZoq2oeyeavxehkznCLh9oPW+HURjtO6T1nO
 RxFQC2Nu7wOc/IwE5h77OvsycC0g9VAjPFmQgP8MqT2lP3MkeIWpXH0cPBvjw+97
 TvAZADAa2VEIJPVkFsIUCHxCXC2/Lo4WlrYXvW1/zWf97Kp+BtzGi9xg4Q==
 =nLs4
 -----END PGP SIGNATURE-----

Merge tag '1.8.10' into debian

Release fwupd 1.8.10
2023-01-23 08:18:27 -06: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