Commit Graph

753 Commits

Author SHA1 Message Date
Richard Hughes
f4fb625fba Set the context automatically when setting the device proxy 2022-04-11 15:36:13 +01:00
Sergii Dmytruk
4795ab3122 trivial: libfwupd,libfwupdplugin: fix typos in several comments
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2022-04-11 15:31:03 +01:00
Richard Hughes
633571fa99 trivial: Fix some 'Comparison of narrow type with wide type in loop condition' 2022-04-05 14:45:42 +01:00
Richard Hughes
91e9f359c3 Add a plugin for the CH341A device 2022-04-03 16:29:30 +01:00
Mario Limonciello
55af9a8238 trivial: return an error string rather than HSI number for missing data 2022-04-03 09:06:00 -05:00
Richard Hughes
18f3b927e0 Add some default size values to the CFI device 2022-04-01 19:35:36 +01:00
Richard Hughes
f042bbd42c Add fu_common_reverse_uint8() for future functionality 2022-03-31 16:34:27 +01:00
Richard Hughes
356bd2fa5e Use the CFI manufacturer ID to set the vendor 2022-03-31 15:44:54 +01:00
Richard Hughes
ea9dd851af trivial: Add a missing possible CFI quirk key 2022-03-31 15:44:54 +01:00
Richard Hughes
dcd39d80a7 Add the CFI quirks in setup() so the device can be open 2022-03-31 12:47:13 +01:00
Richard Hughes
b3e1b74d21 trivial: Use the proxy physical ID automatically 2022-03-31 09:59:33 +01:00
Richard Hughes
691166d203 trivial: Use a short string form for the CFI commands 2022-03-30 18:45:49 +01:00
Richard Hughes
04f00e8a17 trivial: Never return the invalid value from fu_progress_get_percentage() 2022-03-30 18:42:01 +01:00
Richard Hughes
16edfd345e Correctly probe USB-2 hubs with more than 7 ports
See https://github.com/fwupd/fwupd/pull/4426#discussion_r836155609
2022-03-30 07:09:26 +01:00
Richard Hughes
5817ef3b4f Emit 0% in FuProgress to show the child has started
This prevents showing the 'old' percentage until the first sub-task has
completed for some device firmware updates.
2022-03-29 20:04:26 +01:00
Richard Hughes
c1ff3e67af trivial: Fix a small memory leak when getting the udev parent 2022-03-25 21:12:53 +00:00
Richard Hughes
41bc319331 trivial: Fix -Wundef warning when compiling without libcbor 2022-03-18 10:38:12 +00:00
Richard Hughes
da37d93eb0 trivial: Remove some long dead docs about fu_plugin_device_add_delay() 2022-03-16 09:18:29 +00:00
Richard Hughes
8b62bf6b64 Set the context in the right place more often 2022-03-16 09:18:29 +00:00
Richard Hughes
945002f7a3 Fix build for MacOS
This is more for curiosity than anything else.
2022-03-15 14:37:28 +00:00
Richard Hughes
92515d193a Add coSWID and uSWID parsers to libfwupdplugin
These parse the structures as defined in:

 * https://datatracker.ietf.org/doc/draft-ietf-sacm-coswid/
 * https://github.com/hughsie/python-uswid
2022-03-15 14:37:02 +00:00
Richard Hughes
6b5d933e99 Do not show unconnected or unreachable devices in the client tools
Fixes https://github.com/fwupd/fwupd/issues/4378
2022-03-15 14:08:17 +00:00
Richard Hughes
e8f0d76da7 Do not leak child processes when cancelling
See https://github.com/fwupd/fwupd/pull/4372
2022-03-15 14:01:45 +00:00
Richard Hughes
b4e88bae49 trivial: Move the UNREACHABLE inhibit to common code 2022-03-15 11:29:00 +00:00
Daniel Campello
61226b49f3 fwupdplugin-self-test: fix spawn tests for qemu
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
2022-03-09 17:32:40 -07:00
Richard Hughes
66cb93c4e2 trivial: Make clear sizes are in hex 2022-03-07 12:38:33 +00:00
Richard Hughes
94d572375f trivial: Clarify the unit for the device remove delay 2022-03-03 11:26:17 +00:00
Richard Hughes
c4ca026294 Allow devices to build instance IDs more easily
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.
2022-03-03 09:13:29 +00:00
Mario Limonciello
d04f2468c0 trivial: switch from path to full_path for meson 0.56+ 2022-02-28 08:34:48 -06:00
Mario Limonciello
6896e0ab52 trivial: switch from meson.source_root to meson.project_source_root
The former is deprecated in meson 0.56 or later.
2022-02-28 08:34:48 -06:00
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
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
2022-02-28 08:34:48 -06:00
Daniel Campello
bcaeda34ad Backfill SHA256 when generating metadata from cab files
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
2022-02-25 10:31:03 +00:00
Richard Hughes
adfef91731 trivial: Strip leading and trailing spaces from the vendor name 2022-02-24 17:07:44 +00:00
Richard Hughes
e3583793ed trivial: Fix two potential critical warnings when finding devices 2022-02-24 17:07:32 +00:00
Richard Hughes
f3a13f89dd Allow specifing the DeviceIntegrity flag from metadata 2022-02-22 19:12:06 +00:00
Richard Hughes
758d5d8c6f Add a flag to indicate the device is signed or unsigned
Devices without either flag are unknown.
2022-02-22 19:12:06 +00:00
Richard Hughes
7ef94d7a31 vli: Skip probing the Dell DA300 device
Although 2109:2820 and 2109:0820 is the generic reference firmware,
firmware revision 3003 is specific to this device.

Fixes https://github.com/fwupd/fwupd/issues/4305
2022-02-22 17:22:13 +00:00
Richard Hughes
e21391f85d trivial: Don't warn if the superclass is using custom flags 2022-02-22 13:28:48 +00:00
Richard Hughes
4cd8468722 trivial: Don't warn if overwriting with the same device name 2022-02-22 13:28:48 +00:00
Richard Hughes
bd02edcc43 trivial: Add missing API wrapper for future functionality 2022-02-21 18:57:20 +00:00
Richard Hughes
308e03a6f4 Sanitize the instance ID parts more carefully
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.
2022-02-18 08:23:39 +00:00
Richard Hughes
eb6ba4eafb trivial: Show the firmware GType in the device ->to_string() 2022-02-17 06:15:30 +00:00
Richard Hughes
f63080fbe2 Allow assigning issues to devices
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
2022-02-16 14:50:29 +00:00
Richard Hughes
c71ca76235 Add a plugin to set GPIOs for the duration of an update 2022-02-16 14:01:07 +00:00
Richard Hughes
55bd4862d3 Try harder to convert to a version into a correct semver
This is really useful for the flashrom plugin.
2022-02-11 15:28:05 +00:00
Richard Hughes
171ebda355 Check the IFD sections have non-zero data length
This fixes a critical warning when loading an invalid builder file.
2022-02-09 13:31:55 +00:00
Richard Hughes
8cec5d8686 Allow padding firmware sections in builder XML files 2022-02-09 13:31:55 +00:00
Richard Hughes
2448660922 trivial: Print the RemoveDelay in the device debug string 2022-02-07 14:21:01 +00:00
Richard Hughes
24c041c3f8 trivial: Fix the range check for the RemoveDelay quirk 2022-02-07 14:21:01 +00:00
Richard Hughes
2fd4ea5ddc Get the SMBIOS table on Windows
Fixes https://github.com/fwupd/fwupd/issues/4253
2022-02-07 14:04:44 +00:00