Commit Graph

6625 Commits

Author SHA1 Message Date
Richard Hughes
46b3eb0f82 trivial: Add more translations for HSI events 2022-01-18 14:23:13 +00:00
Crag Wang
fbcc031ae4 trivial: refresh bash completion to reflect recent changes 2022-01-17 13:41:20 -06: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
0cf11b9dc9 trivial: Do not match the legacy bootloader VID/PID
This is the ID assigned to STMicroelectronics... more specifically for
a mini LED display. It also seems to be used by other vendors who also
did not change the default from the devkit, e.g. the Vaydeer Multimedia
Console.

Fixes https://github.com/fwupd/fwupd/issues/4180
2022-01-17 15:41:04 +00:00
Richard Hughes
e74d38bfd3 Fix compiling with new versions of efivar
Fixes https://github.com/fwupd/fwupd/issues/4181
2022-01-17 15:27:05 +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
Mario Limonciello
64e7ea25b1 Fix the logic for removable fallback path in uefi-capsule
The logic was built on the presumption of Ubuntu core which doesn't
have /etc/os-release.  Since other distributions do have /etc/os-release
adjust the logic to instead build the path explicitly.
2022-01-15 07:09:04 -06:00
Richard Hughes
d7b682430e thunderbolt: Set the retimer NVM version 2022-01-14 18:04:13 +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
045bc383a6 thunderbolt: Fix a typo in the USB4 port online 2022-01-14 18:04:13 +00:00
Dylan Van Assche
e3b62e643b modem-manager: uninhibit modem after upgrade
When fastboot is used, the modem is rediscovered through udev
after upgrading. However, the modem-manager plugin did not mark
the modem as unhibited with ModemManager. This resulted into
ModemManager not exposing the modem without restarting ModemManager or
rebooting the device.

Mark the modem as uninhibited and do not take ownership over the
plugin data as this caused segfaults.
2022-01-13 20:30:09 +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
f56eec47b4 trivial: post release version bump 2022-01-13 13:29:53 +00:00
Richard Hughes
99d21d576d Release fwupd 1.7.4 2022-01-13 13:09:02 +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
Richard Hughes
45673e7d9f trivial: Show results when using FWUPD_XMLB_VERBOSE 2022-01-12 16:16:52 +00:00
Richard Hughes
1ef67c60ca Only accept GUIDs when calling fu_quirks_lookup_by_id()
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.
2022-01-12 16:16:52 +00: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
e6dc11a205 trivial: Update all the device test URLs to reflect reality 2022-01-12 14:23:44 +00:00
Richard Hughes
e03b8c46ed thunderbolt: Split the retimer and controller into two different objects
Although they do a lot of the same things, trying to deal with both
kinds of device in the same GObject type was making it very hard to
understand and maintain.

Split out two GObjects that both derive from FuThunderboltDevice.
2022-01-11 20:15:44 +00:00
Richard Hughes
d78ad32f24 trivial: Do not abort with a critical warning for a weird TPM event log
There is one eventlog item per-PCR with zero size.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2038167
2022-01-11 20:14:21 +00:00
Richard Hughes
c74c0ab655 trivial: Fix builds with -Dgusb=false 2022-01-11 09:40:57 +00:00
Richard Hughes
2734f0ab77 redfish: Do not autoload ipmi-si to avoid warning on non-server hardware
This leads to reports of:

    systemd-modules-load[1710]: Failed to insert 'ipmi_si': No such device
    systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
2022-01-10 14:06:34 +00:00
Richard Hughes
22a88da111 trivial: Update subprojects to latest versions 2022-01-10 10:40:36 +00:00
Richard Hughes
c30f491001 trivial: Add a device test for the Servo Micro hardware 2022-01-07 20:18:30 +00:00
Richard Hughes
40dad22388 cros-ec: Add progress completion when writing blocks
Also, simplify the helper that's passed to the retry function.
2022-01-07 07:24:08 +00:00
Richard Hughes
2f8e7dc05c logitech-hidpp: Always hardcode the vendor for FuLogitechHidPpDevice 2022-01-06 19:23:58 +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
25b1813069 trivial: Fix up some clang-format issues that snuck in recently 2022-01-06 17:04:34 +00:00
Mario Limonciello
c1b2377782 trivial: disable logitech bulk controller on ubuntu by default
It needs to go through a MIR
2022-01-06 10:52:10 -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
Ricardo Cañuelo
cdb924ba8d doc: add developers guidelines and howtos 2022-01-06 10:02:18 +01: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
e70f2df7f7 trivial: Fix some recently added gtk-doc markup 2022-01-05 09:51:45 +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
Richard Hughes
1c62194dd3 trivial: Fix fu_common_dump_full() header when specifying both flags 2022-01-04 22:06:33 +00:00
Richard Hughes
8df102b7c0 Add fu_usb_device_add_interface() for plugins to use
It's a common action for plugins to call FuUsbDevice->open() then claim
interfaces, and then release them just before FuUsbDevice->close().

It's also something a lot of plugins get wrong, so provide common code
to handle it correctly in one place.
2022-01-04 22:05:37 +00:00
Mario Limonciello
ab7a5fc569 trvial:debian: Add Rules-Requires-Root clause 2022-01-04 14:38:16 -06:00
Mario Limonciello
12fed692e3 trivial: debian: drop unused debian/source/include-binaries 2022-01-04 14:38:16 -06:00
Mario Limonciello
07623cafa3 trivial: debian: use wildcards in lintian override for library-not-linked-against-libc 2022-01-04 14:38:16 -06:00