]> git.proxmox.com Git - fwupd.git/log
fwupd.git
21 months agoEnsure composite devices all share the same acquiesce delay
Richard Hughes [Thu, 9 Feb 2023 12:40:05 +0000 (12:40 +0000)]
Ensure composite devices all share the same acquiesce delay

We go to great pains to set the parent to the MAX of the child delays, but we
don't actually set the children to have the new parent value.

This means if you update the child device without the parent in the transaction
we don't always wait for all the USB devices to come back -- which is what the
acquiesce delay is designed to do.

Fixes an intermittant device test for the Wacom USB tablet.

21 months agotrivial: Ignore device requests when emulated
Richard Hughes [Mon, 6 Feb 2023 13:53:16 +0000 (13:53 +0000)]
trivial: Ignore device requests when emulated

21 months agoccgx: Add support for the CalDigit Element Hub
Richard Hughes [Wed, 8 Feb 2023 15:39:16 +0000 (15:39 +0000)]
ccgx: Add support for the CalDigit Element Hub

21 months agoccgx: Detect factory mode and set a non-zero version
Richard Hughes [Thu, 2 Feb 2023 14:22:07 +0000 (14:22 +0000)]
ccgx: Detect factory mode and set a non-zero version

The Element Hub (and several other docks that use the CCGX5 DMC reference
design) is in "factory mode" out of the box, displaying a version of `0.0.0.0`

Detect factory mode and set a non-zero version -- using the "real" version if
possible by matching the CCG5 devx base firmware firmware.

21 months agotrivial: Disable the automatic snap stable promotion
Mario Limonciello [Thu, 9 Feb 2023 05:33:25 +0000 (23:33 -0600)]
trivial: Disable the automatic snap stable promotion

The snap is converted into a confined version, but we need to make
sure that the snapd has promoted into a stable release so that fwupd
snap also works.

We should revert this after that happens.

21 months agoFix fwupdtool firmware-convert to work with image-less formats
Richard Hughes [Tue, 7 Feb 2023 11:52:16 +0000 (11:52 +0000)]
Fix fwupdtool firmware-convert to work with image-less formats

Converting 'simple' non-nested formats like Intel Hex into nested formats like
DfuSe needs us to create a binary child firmware to avoid missing data.

Fixes https://github.com/fwupd/fwupd/issues/5493

21 months agotrivial: Do not return the internal libxmlb error back to the user
Richard Hughes [Tue, 7 Feb 2023 19:32:03 +0000 (19:32 +0000)]
trivial: Do not return the internal libxmlb error back to the user

21 months agoPrint errors as JSON objects when using --json
Richard Hughes [Tue, 7 Feb 2023 12:23:14 +0000 (12:23 +0000)]
Print errors as JSON objects when using --json

For example:

$ fwupdmgr local-install --json foo.zip
{
  "Error" : {
    "Domain" : "FwupdError",
    "Code" : 7,
    "Message" : "failed to open foo.zip"
  }
}

Fixes https://github.com/fwupd/fwupd/issues/5499

21 months agosnap: read the host os-release instead of base snap
Valentin David [Tue, 7 Feb 2023 12:55:13 +0000 (13:55 +0100)]
snap: read the host os-release instead of base snap

This should fix #5485. Depends on https://github.com/snapcore/snapd/pull/12545

21 months agoOptimise getting the list of upgrades using the legacy API
Richard Hughes [Tue, 7 Feb 2023 19:13:57 +0000 (19:13 +0000)]
Optimise getting the list of upgrades using the legacy API

We use GetReleases for all the *possible* releases that could be installed
(although the device might be in UPDATABLE_HIDDEN), and the legacy GetUpgrades
API just wants to know what can be done right now.

21 months agoSpeed up regenerating the MOTD
Richard Hughes [Tue, 7 Feb 2023 19:12:06 +0000 (19:12 +0000)]
Speed up regenerating the MOTD

This is regenerated on every device hotplug event, and although infrequent
there is no point doing all that CPU-heavy requirement checking for no reason.

21 months agowistron-dock: Use only-wait-for-replug to speed up device replug
Richard Hughes [Mon, 6 Feb 2023 13:54:24 +0000 (13:54 +0000)]
wistron-dock: Use only-wait-for-replug to speed up device replug

Also, set the progress steps correctly.

21 months agowistron-dock: Fix critical warning during update
Richard Hughes [Mon, 6 Feb 2023 13:53:44 +0000 (13:53 +0000)]
wistron-dock: Fix critical warning during update

21 months agotrivial: Only use clang-format on C source files
Richard Hughes [Sat, 4 Feb 2023 12:10:46 +0000 (12:10 +0000)]
trivial: Only use clang-format on C source files

21 months agoAdd support for Quit() in fwupdmgr
Richard Hughes [Mon, 6 Feb 2023 17:12:10 +0000 (17:12 +0000)]
Add support for Quit() in fwupdmgr

This allows us to only shut down the P2P daemon in the installed tests.
The easy fix would have been to use something like:

    gdbus call --address unix:path=/run/fwupd.sock --object-path / --method org.freedesktop.fwupd.Quit'

...but the daemon does not implement an ObjectManager, which gdbus requires.

This worked correctly for so long because the p2p tests were being run after
the bus tests, so shutting down the system daemon had no effect.

Fedora 37 seems to have flipped the order for some reason -- and now it
*sometimes* matters that we were doing the worng thing...

21 months agotrivial: Fix Fedora CI when it cannot autostart udisks
Richard Hughes [Mon, 6 Feb 2023 16:14:42 +0000 (16:14 +0000)]
trivial: Fix Fedora CI when it cannot autostart udisks

21 months agocros-ec: Clear the bulk transfer buffer to zero before using
Richard Hughes [Fri, 3 Feb 2023 15:20:23 +0000 (15:20 +0000)]
cros-ec: Clear the bulk transfer buffer to zero before using

This allow us to emulate the device as the buffer contents are now 100%
predictable and replayable.

21 months agotrivial: Fix a tiny coverity-spotted memory leak on error
Richard Hughes [Mon, 6 Feb 2023 09:29:44 +0000 (09:29 +0000)]
trivial: Fix a tiny coverity-spotted memory leak on error

21 months agoMove the Fedora CI job to F37
Richard Hughes [Sat, 4 Feb 2023 11:01:57 +0000 (11:01 +0000)]
Move the Fedora CI job to F37

21 months agoUse the correct range check when parsing SMBIOS
Richard Hughes [Sat, 4 Feb 2023 12:46:03 +0000 (12:46 +0000)]
Use the correct range check when parsing SMBIOS

The SMBIOS specification says:

    Maximum size of SMBIOS Structure Table, pointed to by the
    Structure Table Address, in bytes. The actual size is guaranteed
    to be less or equal to the maximum size.

So, the firmware is actually allowed to return a DMI blob smaller than the
specified size.

Fixes https://github.com/fwupd/fwupd/issues/5486

21 months agonvme: Detect and warn users with the broken firmware 3B2QGXA7
Richard Hughes [Thu, 2 Feb 2023 09:11:00 +0000 (09:11 +0000)]
nvme: Detect and warn users with the broken firmware 3B2QGXA7

21 months agotrivial: Fix fu-self-test with libgusb from the main branch
Richard Hughes [Fri, 3 Feb 2023 17:25:03 +0000 (17:25 +0000)]
trivial: Fix fu-self-test with libgusb from the main branch

21 months agotrivial: Fix critical warning when loading an emulated DFU device
Richard Hughes [Fri, 3 Feb 2023 16:53:48 +0000 (16:53 +0000)]
trivial: Fix critical warning when loading an emulated DFU device

21 months agoRevert "trivial: Fix clang-format of JSON files for newer versions of clang"
Richard Hughes [Fri, 3 Feb 2023 15:43:04 +0000 (15:43 +0000)]
Revert "trivial: Fix clang-format of JSON files for newer versions of clang"

This reverts commit 2eb4357a70c6b1b28bc117e518d197b47df7b66c.

21 months agotrivial: Fix clang-format of JSON files for newer versions of clang
Richard Hughes [Fri, 3 Feb 2023 14:07:23 +0000 (14:07 +0000)]
trivial: Fix clang-format of JSON files for newer versions of clang

This explains why Mario and I had different precommit settings.

21 months agoti-tps6598x: Ignore the 'wrong' USB device class before calling ->setup()
Richard Hughes [Tue, 31 Jan 2023 15:08:04 +0000 (15:08 +0000)]
ti-tps6598x: Ignore the 'wrong' USB device class before calling ->setup()

No functional change, but a few less i/o operations when inserting the dock.

21 months agosnap: Use common directory for vendor path
Valentin David [Mon, 30 Jan 2023 12:03:57 +0000 (13:03 +0100)]
snap: Use common directory for vendor path

21 months agosnap: Use strict confinement
Valentin David [Thu, 22 Sep 2022 10:14:06 +0000 (12:14 +0200)]
snap: Use strict confinement

21 months agosnap: Fix a meson parameter
Valentin David [Mon, 30 Jan 2023 12:00:06 +0000 (13:00 +0100)]
snap: Fix a meson parameter

21 months agosnap: Remove some unused/redundant dependencies
Valentin David [Mon, 30 Jan 2023 11:44:40 +0000 (12:44 +0100)]
snap: Remove some unused/redundant dependencies

21 months agosnap: Remove dconf
Valentin David [Mon, 30 Jan 2023 11:40:21 +0000 (12:40 +0100)]
snap: Remove dconf

21 months agosnap: Add missing libraries
Valentin David [Mon, 30 Jan 2023 11:35:54 +0000 (12:35 +0100)]
snap: Add missing libraries

21 months agoOptionally disable Polkit check with an environment variable
Valentin David [Mon, 30 Jan 2023 11:08:04 +0000 (12:08 +0100)]
Optionally disable Polkit check with an environment variable

When running in a confined snap, it is not possible to check whether a
policies have been installed.

21 months agoAllow overriding lock directory with an environment variable
Valentin David [Mon, 30 Jan 2023 11:06:15 +0000 (12:06 +0100)]
Allow overriding lock directory with an environment variable

21 months agodfu: Use more const buffer data when writing to AVR chips
Richard Hughes [Wed, 1 Feb 2023 16:56:11 +0000 (16:56 +0000)]
dfu: Use more const buffer data when writing to AVR chips

21 months agodfu: Clear the buffer before getting the status
Richard Hughes [Wed, 1 Feb 2023 16:54:47 +0000 (16:54 +0000)]
dfu: Clear the buffer before getting the status

This makes emulation of DFU devices work as the control transfer data is then
predictable.

21 months agotrivial: Enable USB debugging when backend debugging is enabled
Richard Hughes [Wed, 1 Feb 2023 15:39:22 +0000 (15:39 +0000)]
trivial: Enable USB debugging when backend debugging is enabled

21 months agotrivial: Use new API in libgusb to better detect USB replug
Richard Hughes [Wed, 1 Feb 2023 15:38:52 +0000 (15:38 +0000)]
trivial: Use new API in libgusb to better detect USB replug

21 months agoAdd API to wait for a device
Richard Hughes [Tue, 31 Jan 2023 19:11:29 +0000 (19:11 +0000)]
Add API to wait for a device

This allows us to ignore all the delays when the device is emulated, with the
idea being to do dozens of device emulations in the CI tests.

Also, do not call fu_progress_sleep() when the device is emulated.

21 months agoDo not invalidate the probe for emulated devices
Richard Hughes [Tue, 31 Jan 2023 15:04:56 +0000 (15:04 +0000)]
Do not invalidate the probe for emulated devices

If the device does not replug, and we change the GUsbDevice because the phase
changed we don't want reprobe the hardware.

If we reprobe then the emulated device will request extra data compared to the
real device, which will cause emulation to fail.

21 months agotrivial: Require --force to overwrite files with 'fwupdmgr download'
Richard Hughes [Tue, 31 Jan 2023 15:27:54 +0000 (15:27 +0000)]
trivial: Require --force to overwrite files with 'fwupdmgr download'

21 months agoReturn an error when the pending db could not be updated
Richard Hughes [Tue, 31 Jan 2023 08:44:27 +0000 (08:44 +0000)]
Return an error when the pending db could not be updated

21 months agobuild(deps): bump docker/build-push-action from 3 to 4
dependabot[bot] [Mon, 30 Jan 2023 23:09:43 +0000 (23:09 +0000)]
build(deps): bump docker/build-push-action from 3 to 4

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
21 months agotrivial: Do not hardcode fwupdmgr as a binary name
Richard Hughes [Mon, 30 Jan 2023 20:53:38 +0000 (20:53 +0000)]
trivial: Do not hardcode fwupdmgr as a binary name

21 months agotrivial: Record the install phase for future functionality
Richard Hughes [Mon, 30 Jan 2023 14:46:19 +0000 (14:46 +0000)]
trivial: Record the install phase for future functionality

21 months agotrivial: Do not inherit history from emulated devices
Richard Hughes [Mon, 30 Jan 2023 14:46:39 +0000 (14:46 +0000)]
trivial: Do not inherit history from emulated devices

21 months agotrivial: Remove some dead comments left in after debugging
Richard Hughes [Mon, 30 Jan 2023 14:39:49 +0000 (14:39 +0000)]
trivial: Remove some dead comments left in after debugging

21 months agoUse indexes when building the quirk prepared queries
Richard Hughes [Sat, 28 Jan 2023 19:11:47 +0000 (19:11 +0000)]
Use indexes when building the quirk prepared queries

This can save 250us on each query (of which we do a *lot*), and reduces the
number of queries by about half if the user is using a libxmlb version that can
convert from `_BOUND_TEXT` to `_BOUND_INDEX_TEXT`.

The more devices detected, the bigger the difference, and without this patch
fixing libxmlb would break fwupd as we'e been searching with an index, but not
actually providing one.

21 months agotrivial: Add FuProgress to fu_context_load_hwinfo()
Richard Hughes [Sat, 28 Jan 2023 12:32:49 +0000 (12:32 +0000)]
trivial: Add FuProgress to fu_context_load_hwinfo()

TIL: fu_bios_settings_setup() takes over 50ms (10%!) at startup.

21 months agotrivial: Remove duplicate call to fu_engine_ensure_device_supported()
Richard Hughes [Fri, 27 Jan 2023 16:50:06 +0000 (16:50 +0000)]
trivial: Remove duplicate call to fu_engine_ensure_device_supported()

This is moderately expensive to call as it processes each requirement on each
release on each device, so the last thing we want to do is call it *twice*.

21 months agotrivial: Update all fixes using markdownlint
Richard Hughes [Mon, 30 Jan 2023 13:36:53 +0000 (13:36 +0000)]
trivial: Update all fixes using markdownlint

21 months agotrivial: Update all fixes using codespell
Richard Hughes [Mon, 30 Jan 2023 13:35:27 +0000 (13:35 +0000)]
trivial: Update all fixes using codespell

21 months agoUse a more compact JSON format using precommit
Richard Hughes [Mon, 30 Jan 2023 12:24:35 +0000 (12:24 +0000)]
Use a more compact JSON format using precommit

21 months agoRemove unused API for setting backend tags
Richard Hughes [Mon, 30 Jan 2023 11:54:05 +0000 (11:54 +0000)]
Remove unused API for setting backend tags

It turns out we do not want to know the current phase of the device, and we can
achieve the same thing tagging the GUsbDevice manually and clearing the events
at exactly the correct time.

21 months agoti-tps6598x: Assign the DMC as the proxy rather than just the parent
Richard Hughes [Mon, 30 Jan 2023 11:05:03 +0000 (11:05 +0000)]
ti-tps6598x: Assign the DMC as the proxy rather than just the parent

We 'write through' the parent, and by telling fwupd this we can make better
decisions when emulating.

21 months agoCopy some flags from the proxy to the logical device
Richard Hughes [Mon, 30 Jan 2023 11:41:38 +0000 (11:41 +0000)]
Copy some flags from the proxy to the logical device

21 months agotrivial: update fwupd-efi to 1.4
Mario Limonciello [Fri, 27 Jan 2023 16:04:59 +0000 (10:04 -0600)]
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.

21 months agotrivial: Do not ask for polkit auth if the device is emulated
Richard Hughes [Fri, 27 Jan 2023 15:21:11 +0000 (15:21 +0000)]
trivial: Do not ask for polkit auth if the device is emulated

21 months agotrivial: Do not wait for the acquiesce delay if emulated
Richard Hughes [Fri, 27 Jan 2023 15:20:48 +0000 (15:20 +0000)]
trivial: Do not wait for the acquiesce delay if emulated

21 months agoPropagate device tag to parent device
Frédéric Danis [Fri, 20 Jan 2023 10:20:20 +0000 (11:20 +0100)]
Propagate device tag to parent device

21 months agotrivial: Correctly compress zip files in FuArchive
Richard Hughes [Thu, 26 Jan 2023 14:15:48 +0000 (14:15 +0000)]
trivial: Correctly compress zip files in FuArchive

21 months agoEnsure the new GUsbDevice is assigned in subclasses of FuUsbDevice
Richard Hughes [Wed, 25 Jan 2023 13:40:27 +0000 (13:40 +0000)]
Ensure the new GUsbDevice is assigned in subclasses of FuUsbDevice

Re-incorporate the emulated USB devices when the backend device changes.

21 months agotrivial: Fix critical warning in future code
Richard Hughes [Wed, 25 Jan 2023 13:38:12 +0000 (13:38 +0000)]
trivial: Fix critical warning in future code

Both types need to be FuUdevDevice to compare the sysfs paths.

21 months agoDo not return emulated devices from GetHistory
Richard Hughes [Thu, 26 Jan 2023 11:41:32 +0000 (11:41 +0000)]
Do not return emulated devices from GetHistory

21 months agotrivial: Add fu_device_has_problem() to be consistent and hide details
Richard Hughes [Thu, 26 Jan 2023 11:14:35 +0000 (11:14 +0000)]
trivial: Add fu_device_has_problem() to be consistent and hide details

21 months agoRemove duplicate calls to fu_device_list_wait_for_replug()
Richard Hughes [Thu, 26 Jan 2023 08:00:31 +0000 (08:00 +0000)]
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.

21 months agoAdd a device problem for 'update-in-progress'
Richard Hughes [Thu, 26 Jan 2023 08:51:00 +0000 (08:51 +0000)]
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.

21 months agocolorhug: Show the flash success value in debugging
Richard Hughes [Thu, 26 Jan 2023 08:55:49 +0000 (08:55 +0000)]
colorhug: Show the flash success value in debugging

21 months agoAdd python3-pefile/python-pefile to CI build deps
Mario Limonciello [Wed, 25 Jan 2023 22:56:15 +0000 (16:56 -0600)]
Add python3-pefile/python-pefile to CI build deps

This is so that it can be used by subproject fwupd-efi

22 months agoFix hotplug events when emulating devices
Richard Hughes [Wed, 25 Jan 2023 10:24:46 +0000 (10:24 +0000)]
Fix hotplug events when emulating devices

22 months agomodem-manager: remove improper use of assert
Ivan Mikhanchuk [Wed, 25 Jan 2023 01:06:09 +0000 (17:06 -0800)]
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.

22 months agowacom-usb: Retry set_report on failure
Jason Gerecke [Tue, 17 Jan 2023 22:24:14 +0000 (14:24 -0800)]
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>
22 months agotrivial: Fix tests to include 'emulated'
Richard Hughes [Tue, 24 Jan 2023 15:41:01 +0000 (15:41 +0000)]
trivial: Fix tests to include 'emulated'

22 months agoAdd fu_device_remove_backend_tag() for future use
Richard Hughes [Tue, 24 Jan 2023 13:15:28 +0000 (13:15 +0000)]
Add fu_device_remove_backend_tag() for future use

22 months agotrivial: Proxy the _SAVE_EVENTS flag even if set at runtime
Richard Hughes [Mon, 23 Jan 2023 15:54:10 +0000 (15:54 +0000)]
trivial: Proxy the _SAVE_EVENTS flag even if set at runtime

22 months agoUse the new GUsb API for loading by tag
Richard Hughes [Mon, 23 Jan 2023 15:52:54 +0000 (15:52 +0000)]
Use the new GUsb API for loading by tag

Based on a patch by frederic.danis@collabora.com, many thanks.

22 months agoDo not make any of the HWIDs setup failures fatal
Richard Hughes [Tue, 24 Jan 2023 09:52:17 +0000 (09:52 +0000)]
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

22 months agotrivial: Add a device flag specifying it is emulated
Richard Hughes [Mon, 23 Jan 2023 17:30:11 +0000 (17:30 +0000)]
trivial: Add a device flag specifying it is emulated

22 months agotrivial: Fix fuzzing with libxmlb from main, harder
Richard Hughes [Mon, 23 Jan 2023 17:16:57 +0000 (17:16 +0000)]
trivial: Fix fuzzing with libxmlb from main, harder

22 months agotrivial: Force enums to be uint64, harder
Richard Hughes [Mon, 23 Jan 2023 17:11:23 +0000 (17:11 +0000)]
trivial: Force enums to be uint64, harder

22 months agotrivial: Fix fuzzing with libxmlb from main
Richard Hughes [Mon, 23 Jan 2023 16:46:13 +0000 (16:46 +0000)]
trivial: Fix fuzzing with libxmlb from main

22 months agoSave all the FwupdDeviceFlags in the pending database
Richard Hughes [Mon, 23 Jan 2023 15:43:37 +0000 (15:43 +0000)]
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...

22 months agoSupport unsetting specific device flags
Richard Hughes [Mon, 23 Jan 2023 16:05:00 +0000 (16:05 +0000)]
Support unsetting specific device flags

This makes it possible to 'undo' the notification, for example.

22 months agotrivial: Fix build fix when using ppc64le system
Richard Hughes [Mon, 23 Jan 2023 11:22:43 +0000 (11:22 +0000)]
trivial: Fix build fix when using ppc64le system

22 months agotrivial: Use %autochangelog in reference spec file
Richard Hughes [Mon, 23 Jan 2023 10:44:28 +0000 (10:44 +0000)]
trivial: Use %autochangelog in reference spec file

22 months agoAllow desktop software to inhibit the system to prevent all updates
Richard Hughes [Sat, 21 Jan 2023 13:37:49 +0000 (13:37 +0000)]
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.

22 months agotrivial: post release version bump
Richard Hughes [Mon, 23 Jan 2023 10:19:17 +0000 (10:19 +0000)]
trivial: post release version bump

22 months agoRelease fwupd 1.8.10
Richard Hughes [Mon, 23 Jan 2023 10:17:45 +0000 (10:17 +0000)]
Release fwupd 1.8.10

22 months agoemmc: correct legacy GUID generation
Daniil Lunev [Sun, 22 Jan 2023 22:44:09 +0000 (09:44 +1100)]
emmc: correct legacy GUID generation

It used to be generated with decimal, not hexadecimal values.

Change-Id: I2a6a5bdea50e2d08a7de9f65a1f9a03de29e1591

22 months agotrivial: Fix bitwise operators in last commit
Richard Hughes [Sun, 22 Jan 2023 08:23:45 +0000 (08:23 +0000)]
trivial: Fix bitwise operators in last commit

22 months agoAdd fu_context_remove_flag() for future use
Richard Hughes [Sat, 21 Jan 2023 20:47:18 +0000 (20:47 +0000)]
Add fu_context_remove_flag() for future use

22 months agoSpeed up startup by a huge amount when using directory remotes
Richard Hughes [Sat, 21 Jan 2023 09:54:28 +0000 (09:54 +0000)]
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.

22 months agoShow some debugging when we ignore a release due to missing checksums
Richard Hughes [Sat, 21 Jan 2023 11:00:48 +0000 (11:00 +0000)]
Show some debugging when we ignore a release due to missing checksums

22 months agoFallback to the <checksum> if the <artifact> is invalid
Richard Hughes [Sat, 21 Jan 2023 10:59:22 +0000 (10:59 +0000)]
Fallback to the <checksum> if the <artifact> is invalid

In 62a62f8f0f707d815e65ca9d0634459edb6eed97 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.

22 months agowacom-usb: prefix errors that occur when writing to the device
Aaron Skomra [Thu, 27 Oct 2022 02:11:50 +0000 (19:11 -0700)]
wacom-usb: prefix errors that occur when writing to the device

Make it easier to locate errors that occur when writing to the device.

22 months agoParse the DT chassis-type when parsing the FDT
Richard Hughes [Wed, 18 Jan 2023 15:10:22 +0000 (15:10 +0000)]
Parse the DT chassis-type when parsing the FDT

22 months agouefi-capsule: Do not call grub2-probe without arguments
Michal Suchanek [Wed, 18 Jan 2023 15:07:05 +0000 (16:07 +0100)]
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>
22 months agoUpdate documentation to indicate that loading "OS Optimized Defaults"
Mario Limonciello [Wed, 11 Jan 2023 16:17:51 +0000 (10:17 -0600)]
Update documentation to indicate that loading "OS Optimized Defaults"
may enable security processor rollback protection on Lenovo systems.

fixes: #5394

22 months agoImprove FDT parsing compatibility
Richard Hughes [Fri, 13 Jan 2023 10:06:07 +0000 (10:06 +0000)]
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.

22 months agoRefactor the hwids functionality
Richard Hughes [Mon, 16 Jan 2023 15:42:55 +0000 (15:42 +0000)]
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]