This allows us to print better warning strings, and in the future
would allow us to profile each operation in a meaningful way.
Also, add context to some of the progress steps as required.
Only opt-in plugins that have been tested -- unconditionally enabling
this may cause regressions on devices like docks.
Fixes https://github.com/fwupd/fwupd/issues/4378
This allows us to make smarter policy decisions in the future on when
to show unavailable updates. It also means we can show translated
text in the frond-end clients.
Only problems the user can "fix" are enumerated. For example, opening
the laptop lid, or charging the device battery.
Allow the admin to override the inhibit(s) on devices using a similar
format to the other kvs. For instance, setting two different quirks and
clearing another could be done using:
Quirk = usb-blocked:Device defective,needs-reboot:Reboot system,not-authorized:
This also allows unsetting the quirk, which was impossible before as
`@value` was always non-NULL.
This allows creating the silo when starting the engine with custom
plugin keys such as WacomI2cFlashBaseAddr.
If we move the plugin initialization earlier then we don't get the
HwID matches, so we really do have to split this into a 4-stage startup,
e.g. ->load(), ->init(), ->startup() and ->coldplug().
Some plugins were creating local versions (which were not attached to
the daemon progress in any way) as a workaround as they needed to do
actions that took a long time to complete.
To a user there is no point to explicitly showing two failures for
encrypted RAM if the system supports SME and TSME both.
To show them a single failure, de-duplicate the attributes by appstream
ID during depsolve.
If the plugin didn't explicitly set obsoletes and two attributes are both
failures and both share the same appstream ID obsolete one of them.
Wrap the spawned script with an explicit call to the /bin/sh
interpreter needed when running tests in a cross compiled enviroment.
Also increase the timeout for the spawned script to execute to give
enough time for the print to happen in the much slower virtualized
environment.
Change-Id: I71ed377e1bc8db4be4c522cdb9562c1662df7266
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.
Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
tristate features will automatically disable if dependencies marked
as required are missing.
Packagers can manually override using `auto_features`.
Link: https://mesonbuild.com/Build-options.html#features
This change allows for the computation of SHA256 checksum when
generating metadata from cabinet file. This is particularly used when
working with the directory type of remote config.
Change-Id: I1a6e90a76b79cdae97d68d799a5cea81430da03f
The only users of `SERIO\FWID` and `I2C\NAME` are already 'safe' and
the device GUIDs should all be unchanged.
There are no current users of the `MTD\NAME` instance IDs, and these
are the ones that may be more unpredictable and in need of sanity.
This allows us to show in the tools if a device is currently affected
by a specific CVE. For instance, we could inform the user that a device
requires a critical firmware update that is being actively exploited.
Note, this also means we can show the user a firmware update is now
required, even though the firmware may not be available on the LVFS.
Also show the issue in the `fwupdmgr security` output, e.g.
There are devices with issues:
Samsung — MZVLB2T0HALB-000L7:
• CVE-2022-12345
• CVE-2022-54321
At the moment a lot of the failures are only visible when running the
daemon in verbose mode, and the inhibit functionalit provides us a way
to unset FWUPD_DEVICE_FLAG_UPDATABLE from multiple places, as well as
setting the update error for the user to see why.
The only place we were using the instance ID -> GUID conversion was in
the self tests, and assuming the group is always a GUID removes a lot
of checks from a very hot path at startup.
Decrease the GUsb polling interval when any of the devices is in
`WAIT_FOR_REPLUG` on when running on Windows. Any device that can
re-enumerate much faster than the default 1000ms may be missed and the
detach may fail.
Linux doesn't have this problem as it has `LIBUSB_CAP_HAS_HOTPLUG`.
This allows us to replace the 'dfu-tool replace' with a much more
controlled 'fwupdtool firmware-patch' command that patches at a set of
specific offsets.
Drop in the new functionality into the existing firmware ->write()
vfuncs so that the image headers, footers and/or checksums are correct.