Commit Graph

2179 Commits

Author SHA1 Message Date
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
b2bb76dbdd Add X-BaseboardManagementController as an acceptable category 2022-02-16 14:08:01 +00:00
Richard Hughes
f7c69d794b Show the user when devices are updatable by inhibited
Fixes https://github.com/fwupd/fwupd/issues/4281
2022-02-14 16:03:12 +00:00
Richard Hughes
ad0b274cec trivial: Move the date_eol attribute to the component node
The LVFS has been changed to do the same, and no real vendors have
added EOL information yet.
2022-02-11 10:44:10 +00:00
Gaël PORTAY
73377b2a53 trivial: Add new category type for video display 2022-02-10 13:47:17 +00:00
Richard Hughes
b5e7a0be16 Do not use gettext before calling setlocale 2022-02-09 16:56:47 +00:00
Richard Hughes
b4fb6fa6aa flashrom: Fix loading devices in coreboot mode
We were specifying _REQUIRE_HWID but the plugin list was not yet loaded when we were trying all the HwIds.
2022-02-09 14:21:03 +00:00
Richard Hughes
9ea78077af trivial: Fix a logic thinko when adding the community warning in fwupdmgr 2022-02-08 17:10:28 +00:00
Richard Hughes
31dacb8687 Allow marking a device as EOL
This probably means it is unlikely to get any new security updates.
2022-02-07 16:03:44 +00:00
Richard Hughes
930e6f4e52 Get the host machine ID when running on Windows 2022-02-07 16:01:51 +00:00
Richard Hughes
2633b68cd8 trivial: Fix the vendor to battery threshold mapping
I broke this when optimizing fu_context_lookup_quirk_by_id() to only
take a GUID. Mea culpa.

Fixes https://github.com/fwupd/fwupd/issues/4250
2022-02-04 19:28:49 +00:00
Richard Hughes
7d8fef4139 trivial: Remove the unused com.redhat.fwupdate built version
We've not needed this for several years, and no firmware on the LVFS actually uses this.
2022-02-04 11:59:51 +00:00
Richard Hughes
dbd0995071 Add support for outputting versions in JSON format
To use this, do: 'fwupdmgr --version --json'
2022-02-03 15:42:57 +00:00
Richard Hughes
67d24b0f65 trivial: Add the HostBkc to the report metadata 2022-02-03 15:42:57 +00:00
Richard Hughes
5f50b5e9a1 trivial: Remove unused variable 2022-01-31 14:36:38 +00:00
Richard Hughes
bb1bcce863 Allow fwupd to operate without a D-Bus daemon
This adds support for optionally using a UNIX domain socket where a
D-Bus daemon may not be running.

To use this, launch the daemon and clients with something like
`FWUPD_DBUS_SOCKET=/var/run/fwupd.sock fwupdmgr get-devices`
2022-01-31 14:05:23 +00:00
Richard Hughes
47c92393de trivial: Always use the GCancellable in fwupdmgr 2022-01-31 13:05:41 +00:00
Richard Hughes
7290da5dda Allow the root user to ask the daemon to quit
This makes it easier to test the fwupd in the installed tests:

    sudo gdbus call --system \
    	--dest org.freedesktop.fwupd \
    	--object-path / \
    	--method org.freedesktop.fwupd.Quit
2022-01-31 10:47:26 +00:00
Richard Hughes
6eada0e067 Add a flag to indicate the firmware is not provided by the vendor
Also, force the user to accept this warning for every update.
2022-01-25 10:13:40 +00:00
Richard Hughes
8707d3d048 Translate the firmware flags when using fwupdmgr 2022-01-25 09:53:52 +00:00
Richard Hughes
02d8753097 Move the clear-history command to fwupdtool
This is perhaps a useful thing to do when debugging, but isn't the sort
of thing we need users to understand.
2022-01-21 15:25:05 +00:00
Richard Hughes
ffac7d6024 Merge the little-used clear-offline action into clear-results
Fixes https://github.com/fwupd/fwupd/issues/3581
2022-01-21 15:25:05 +00:00
Richard Hughes
38bab8fc4f Allow overriding daemon parameters using /var/etc/fwupd/daemon.conf
This is super useful for debugging immutable systems like ChromeOS.
2022-01-21 11:52:06 +00:00
Richard Hughes
122dee1a19 Allow specifying the BKC locally
Fixes https://github.com/fwupd/fwupd/issues/4040
2022-01-21 11:35:54 +00:00
Richard Hughes
59845f970e trivial: Fix a compile problem when fwupdmgr is built before fu-hash.h 2022-01-20 17:06:14 +00:00
Richard Hughes
fc4687f3e5 trivial: Add the missing keys for the daemon ModifyConfig method 2022-01-20 13:44:53 +00:00
Crag Wang
b728608baa Show results when calling get-details if failing requirements 2022-01-19 12:10:52 +00:00
Richard Hughes
46b3eb0f82 trivial: Add more translations for HSI events 2022-01-18 14:23:13 +00:00
Crag Wang
6c985fac3b trivial: allow multiple GUID or DEVICE-ID to update command
Merged fu_util_update_all() and fu_util_update_by_id() to simplify the
maintaince work and streamline the flow for consistent behavior across
a normal update for all updatable devices and a small set of chosen
devices.

This commit also added support for specifying mutliple DEVICE-IDs or
GUIDs in a single run, previously error message 'Invalid Argument' is
seen and soon aborted.
2022-01-17 13:41:20 -06:00
Mario Limonciello
d2e286faae trivial: show uefi_recovery message in get-plugins output
By default it shows just a blank line right now.
2022-01-17 10:21:29 -06:00
Richard Hughes
ff2e6bd1ea trivial: Do not show progressbar status reports when using --json 2022-01-17 15:53:03 +00:00
Richard Hughes
c05494430e trivial: Add support for 'fwupdtool get-plugins --json' 2022-01-15 19:01:12 +00:00
Richard Hughes
d6d3afd7c7 trivial: Do not attempt to stop the daemon when running as user 2022-01-15 18:41:37 +00:00
Richard Hughes
0f2863e9f8 Fix USB4 retimer enumeration
Check the device superclass flags, not the device base class.
2022-01-14 18:04:13 +00:00
Richard Hughes
73f6767d87 trivial: Show why more devices are not marked as updatable 2022-01-13 16:04:31 +00:00
Richard Hughes
ca43733a8c Show why devices are not marked as updatable
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.
2022-01-13 12:40:56 +00:00
Mario Limonciello
e92a286ce8 Move root user ID check message into the error path for commands
This should make it so that the message doesn't pop up for someone
who has used udev rules that match permissions to do

```
fwupdtool install-blob --plugins=dfu foo.bin
```

Unless there really was a failure
2022-01-12 11:55:46 -06:00
Mario Limonciello
62a64afda5 fu-tool: put lockfile in user's cache directory if no permissions for /run 2022-01-12 10:14:49 -06:00
Richard Hughes
cf5a341a51 trivial: Do not show a critical warning for an invalid device test 2022-01-12 14:23:44 +00:00
Richard Hughes
5ce93a2dd9 trivial: Show the file that failed to be downloaded 2022-01-12 14:23:44 +00:00
Richard Hughes
25ee969a27 trivial: Enable VT sequences on Win32 2022-01-06 19:21:50 +00:00
Richard Hughes
9cd9a4b8f7 trivial: Use ANSI escape codes to fix the progressbar on win32 2022-01-06 19:21:50 +00:00
Richard Hughes
dbdb207561 Increase the chances of success of WAIT_FOR_REPLUG on WIN32
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`.
2022-01-06 13:20:34 -06:00
Richard Hughes
07f5ec5bed trivial: Use inhibits for missing critical device data
Also, check both after ->register() rather than using a warning.
2022-01-06 16:51:45 +00:00
Richard Hughes
133e712fc9 trivial: Do not call setup() vfuncs when we're never calling coldplug
Now all plugins define custom GTypes in the _init() vfunc, and so
there's no need to actually probe devices to just get access to those.

This means you can get results from `fwupdtool get-firmware-types`
about two orders of magnitude quicker.
2022-01-05 13:46:37 +00:00
Richard Hughes
32284e1afa Load the quirks and SMBIOS in the correct order
We need to load the quirks (respecting NO_CACHE), then load the SMBIOS,
and only then match the hwids using the quick database.

This means we don't get a console warning when using fwupdtool commands
as a non-root user.
2022-01-05 13:46:37 +00:00
Richard Hughes
62a6f39364 trivial: Move the root user prompt to the engine start 2022-01-05 13:46:37 +00:00
Richard Hughes
f885ab6d2a Allow patching firmware files at known offsets
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.
2022-01-05 09:51:45 +00:00
Mario Limonciello
f57a6637c9 trivial: fix man page sections
They're marked in the man page as section 8 but installed into 1.
They should be installed into 1 as they're not admin tools.
2022-01-04 14:17:43 -06:00
Richard Hughes
c725e42e34 trivial: Fix various const issues 2022-01-03 22:46:23 +00:00