Commit Graph

5082 Commits

Author SHA1 Message Date
Jan Tojnar
a8b3f9ed57 trivial: fu-engine: skip empty cmdline commands
g_strsplit returns an empty vector for an empty string,
which leads to assertion in g_strv_contains when /proc/cmdline
ends with a space.
2020-11-07 19:51:07 +00:00
Richard Hughes
01ba0c1eea Set the SMBIOS chassis type to portable if a DT battery exists
This allows getting the HSI result on a Pinebook Pro laptop.
2020-11-07 08:15:20 +00:00
Richard Hughes
42a5b39385 colorhug: Don't set the version format to triplet at startup
The USB revision is BCD if there's no 'FW' vendor data in the descriptor, so
only set the format when we know.
2020-11-07 08:03:24 +00:00
Richard Hughes
4d781ae14f Revert "If incorporating the version from a subclass, also set the verfmt too"
This reverts commit c0dee27b6d.
2020-11-07 07:57:50 +00:00
Richard Hughes
3e445ece04 Allow components to set the icon from the metadata
In this case, we want to set the generic ESRT entry to have the icon 'battery'.
2020-11-06 16:57:21 +00:00
Richard Hughes
11832e10af trivial: Fix a warning when generating the GtkDoc pages 2020-11-06 13:18:25 +00:00
Richard Hughes
1d0e7fb3bf colorhug: Fix detection of version on older firmware versions
Without the 'FW' version hint in newer firmware versions we fall back to the
BCD USB release which we need to override to triplet.
2020-11-06 13:04:34 +00:00
Richard Hughes
c0dee27b6d If incorporating the version from a subclass, also set the verfmt too
Otherwise we could be left with a device that sets the expected verfmt in the
plugin _init(), but would not be inherited from the subclass. It would have:

    Version:              0.2
    VersionFormat:        triplet

...which makes no sense.
2020-11-06 13:04:34 +00:00
Richard Hughes
0658ae184b trivial: Remove traces of the UA HSI suffixes 2020-11-06 09:57:03 +00:00
Richard Hughes
e0f9207d3b trivial: Fix two introspection warnings 2020-11-06 09:57:03 +00:00
Richard Hughes
58993ac005 trivial: Fix some error prefixes 2020-11-06 09:57:03 +00:00
Evan Lojewski
0304f8d4fd bcm57xx: Fix reading vendor/device ids from firmware.
The PCI Vendor and Device ID locations located in firmware were mistakenly
swapped in the bcm5719-fw repository. As a result, the code here based on said
repository also has swapped IDs. This fixes the ids to reflect the
correct locations.

Signed-off-by: Evan Lojewski <github@meklort.com>
2020-11-06 08:27:06 +00:00
Richard Hughes
41a1650c2a Remove HSI update and attestation suffixes
The logic here is that the attestation is more than just the PCR0 value, and
multiple device firmware (such as EC, ME, etc.) needs to be included to validate
the system.

By the same logic, updates for the system firmware do not tell the whole story,
and confuse HSI as a specification. Remove them.
2020-11-05 15:12:12 +00:00
Hsieh-Tseng Shen
c7e58784c7 trivial: make dbxtool executable to fix snap build 2020-11-05 13:00:33 +00:00
Richard Hughes
bf43978dfa Ignore an invalid vendor-id when adding releases for display
The idea for a missing vendor-id would be that the LVFS sets the value
`NEVER_GOING_TO_MATCH` which is shown (along with the correct value) when the
user tries to **install** the firmware.
In 1.5.0 we correctly switched to filtering the devices by GUID and *then*
checking requirements before showing to the user.

In the missing vendor-id case the the poor ODM does not know why the device is
not showing up until they run the daemon in --verbose mode.

Relax the vendor-id checks when adding releases to devices, but of course leave
them in place for installing firmware. The ignore-vid-pid flag is not added
from `Install(a{sv})` and so this stays the same as before.
2020-11-04 16:14:00 +00:00
Richard Hughes
a053134504 Notify the service manager when idle-quitting
This makes sure that the main process won't get SIGTERM on shutdown.

Inspired from a patch by Jonathan Kang <jonathankang@gnome.org>
2020-11-04 14:45:59 +00:00
Thierry Vignaud
aa52c0cc64 trivial: Use proper %{_mandir} macro
Signed-off-by: Richard Hughes <richard@hughsie.com>
2020-11-04 08:21:32 +00:00
Richard Hughes
a805d68aab Add note to the README about not using Snap or Flatpak versions
Fixes https://github.com/fwupd/fwupd/issues/2543
2020-11-03 20:28:41 +00:00
Richard Hughes
27846c448a trivial: post release version bump 2020-11-02 14:54:39 +00:00
Richard Hughes
bbb1a8136e Release fwupd 1.5.1 2020-11-02 14:52:43 +00:00
Richard Hughes
203ed841da trivial: Codespell fixes 2020-11-02 14:26:26 +00:00
Richard Hughes
bde99ef4bc trivial: Fix Debian CI failure 2020-11-02 14:22:37 +00:00
Richard Hughes
0bdf561035 Use UDisks to find out if swap devices are encrypted
Using a heuristic is certainly not awesome.
2020-11-02 14:22:37 +00:00
Richard Hughes
2b188c8488 trivial: Export if the volume is encrypted
This requires passing in the udisks block proxy when creating the object.
2020-11-02 14:22:37 +00:00
Richard Hughes
f3993a6b96 trivial: Add GObject properties to FuVolume
This will allow us to add other properties in the future.
2020-11-02 14:22:37 +00:00
Richard Hughes
43417b2a95 trivial: Return GDBusProxy objects from fu_common_get_block_devices()
This allows us to reuse the GDBusConnection without passing it to all places a
new interface proxy is created.
2020-11-02 14:22:37 +00:00
Richard Hughes
c57a8f5726 trivial: Fix GtkDoc for fu_common_get_block_devices() 2020-11-02 14:22:37 +00:00
Richard Hughes
f9fcf47749 trivial: Add device tests for the Lenovo 40au0065 device 2020-11-02 12:01:41 +00:00
Richard Hughes
1df9b82046 Show a link to discover more information about a specific plugin failure
Fixes bugs like https://github.com/fwupd/fwupd/issues/2531
2020-11-02 10:21:57 +00:00
exploide
0c10507219 trivial: fix description of unblock-firmware 2020-11-01 20:00:23 +00:00
exploide
7f2ab39c98 updated fish completions to 1.5.0 2020-11-01 17:23:16 +00:00
Richard Hughes
e612078b8d Remove the duplicate parent-child data in FwupdDevice and FuDevice
The FuDevice derives from FwupdDevice, and yet both objects have a (potentially
different) parent and set of children. This is super confusing, and just not
required.

Removing the duplication also removes a sizable memory leak when hotplugging
composite devices as the parent was ref'd by the child and the child was ref'd
by the parent in different objects... Fun to debug...
2020-10-31 13:19:11 +00:00
Richard Hughes
b5d6aacf9f Show a less scary fwupdate output for devices without info
Before:

    Information for the update status entry 0:
      Information Version: 7
      Firmware GUID: {ddc0ee61-e7f0-4e7d-acc5-c070a398838e}
      Capsule Flags: 0x00000000x
      Hardware Instance: 0
      Update Status: attempted
      Capsule File Path: /EFI/fedora/fw/fwupd-ddc0ee61-e7f0-4e7d-acc5-c070a398838e.cap

    failed: Error opening file /sys/firmware/efi/efivars/fwupd-671d19d0-43c-
    4852-98d9-1ce16f9967e4-0-0abba7dc-e516-4167-bbf5-4d9d1c739416: No such file
    or directory
    failed: Error opening file /sys/firmware/efi/efivars/fwupd-a9971959-9246-
    4a5b-b2f2-ba6fdcb19349-0-0abba7dc-e516-4167-bbf5-4d9d1c739416: No such file
    or directory

After:

    Information for the update status entry 0:
      Information Version: 7
      Firmware GUID: {ddc0ee61-e7f0-4e7d-acc5-c070a398838e}
      Capsule Flags: 0x00000000x
      Hardware Instance: 0
      Update Status: attempted
      Capsule File Path: /EFI/fedora/fw/fwupd-ddc0ee61-e7f0-4e7d-acc5-c070a398838e.cap

    Information for the update status entry 1:
      Firmware GUID: {671d19d0-d43c-4852-98d9-1ce16f9967e4}
      Update Status: No update info found

    Information for the update status entry 2:
      Firmware GUID: {a9971959-9246-4a5b-b2f2-ba6fdcb19349}
      Update Status: No update info found

Fixes https://github.com/fwupd/fwupd/issues/2530
2020-10-30 11:36:40 +00:00
Mario Limonciello
3c4e57463a thunderbolt: recognize authorized value of '2' as well
This means that the user performed a challenge to authorize the
device.
Fixes: #2526
2020-10-29 13:37:44 -05:00
Richard Hughes
94e3d24f55 bcm57xx: Make hotplug more reliable
Although hotpluggging PCIe cards isn't common, it's how I'm testing this in the
device test enclosure. Add a tiny delay to wait for the kernel to populate the
net class on hotplug.
2020-10-29 14:01:25 +00:00
Richard Hughes
a78b13fb71 Use a different Device ID for the OptionROM devices
We want to continue to dedupe the ID, and the priority should be decided on the
GUID match.

Fixes https://github.com/fwupd/fwupd/issues/2510 in a different way
2020-10-29 14:01:25 +00:00
Richard Hughes
e98845d6cf Revert "Fix regression when filtering different priorities"
This reverts commit f630678b6f.
2020-10-29 14:01:25 +00:00
Jonas Witschel
267dbd1612 contrib/ci: switch TPM simulator from ibmswtpm to swtpm
Upstream tpm2-tss is moving from ibmswtpm to swtpm as the default TPM
simulator. ibmswtpm still works fine and will be kept around for the
foreseeable future, but adapt to the upstream decision in case ibmswtpm should
ever get dropped from the official Arch Linux repositories (currently there are
no plans to do so).
2020-10-28 07:50:11 -05:00
Richard Hughes
8087b2c9e0 trivial: Set the 'downloading' state when starting the download
For small files we might not get progress callbacks and so we stay in IDLE
status forever.

Fixes https://github.com/fwupd/fwupd/issues/2522
2020-10-27 19:36:18 +00:00
Richard Hughes
ded5410f6d Delete unused EFI variables when deploying firmware
Unconditionally delete FWUPDATE_VERBOSE and FWUPDATE_DEBUG_LOG when deploying
the update using fwupdtool or fwupd and leave it to fwupdate.

If you want to debug the efi binary you then have to use fwupdate and squirt
the .cap file rather than using all the other layers.
2020-10-27 17:05:01 +00:00
Richard Hughes
6d257cbe7f Fix probe warning for the Logitech Unifying device
The same plugin name was being added to the device from the quirk file more than
once, and so we enumerated the device *again* and tried to add a duplicate
device -- the device list correctly refusing to do so.

Check the plugin name does not already exist before adding it, and add a self
test to catch this for the future.
2020-10-27 15:43:17 +00:00
Richard Hughes
49c2a78c99 Include the amount of NVRAM size in use in the LVFS failure report 2020-10-27 13:58:40 +00:00
Mario Limonciello
8aa5d41eb7 Add external interface messages 2020-10-26 12:05:20 -05:00
Richard Hughes
2409b302a6 trivial: Fix typo in HSI document 2020-10-26 15:17:39 +00:00
Mario Limonciello
6fc11ec089 trivial: fu-main: adjust polkit install flow
The authentication happens earlier in `fu_main_install_with_helper`
so no need to make recursive calls from `fu_main_authorize_install_cb`
into `fu_main_authorize_install_queue`.

Just simplify the code in the non-polkit case.
2020-10-26 10:05:41 -05:00
Richard Hughes
a2d8b94bf1 trivial: post release version bump 2020-10-26 11:52:16 +00:00
Richard Hughes
f90cda6f0b Release fwupd 1.5.0 2020-10-26 11:50:11 +00:00
Emily Miller
f9ad963bcf vli: Add support for Hyper hardware 2020-10-26 10:08:00 +00:00
Richard Hughes
f630678b6f Fix regression when filtering different priorities
We need to check if the device is in the remove timeout before unconditionally
replacing a device on insert.

Fixes https://github.com/fwupd/fwupd/issues/2510
2020-10-26 08:43:27 +00:00
Mario Limonciello
13d077353b Revert "fu-engine: Set a device when checking requirements for fu_engine_get_result_from_component"
This reverts commit e4d52866d1.
2020-10-24 07:07:26 +01:00