Commit Graph

3423 Commits

Author SHA1 Message Date
Richard Hughes
989acf12e7 Create the custom plugin GType in common code
This reduces the amount of boilerplate in plugins.
2019-10-07 12:37:21 +01:00
Richard Hughes
7f67721432 Reduce more boilerplate in plugins 2019-10-07 12:37:21 +01:00
Richard Hughes
d6fc172ec9 synaptics-rmi: Check the correct register when querying bootloader mode 2019-10-07 11:50:49 +01:00
Mario Limonciello
d70260692f trivial: fu-engine: fix never reporting remotes
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):
0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
1
key ReportUri not supported
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
9213c5c7bf trivial: fu-util: don't show warnings for no reports to upload
```
(fwupdmgr:5605): FuMain-WARNING **: 22:16:06.048: No reports require uploading
```
2019-10-07 05:36:22 -05:00
Mario Limonciello
71d4b08445 trivial: debian: remove more conffiles from transitions (Closes: #932617) 2019-10-06 21:05:02 -05:00
Mario Limonciello
1ff1164630 trivial: debian/control*: Update for fwupdate transition
Per Steve's recommendation:
 1. In fwupd, add Provides/Replaces, plus Conflicts: against the older
    versions of fwupdate-*-signed. That will tell apt to upgrade
    cleanly and thereby switch to fwupd instead. See
    https://www.debian.org/doc/manuals/developers-reference/ch05.html#s5.9.3
2019-10-06 21:00:24 -05:00
Richard Hughes
e4ad9d27fd trivial: Fix a tiny memory leak when starting the daemon 2019-10-05 13:03:19 +01:00
Richard Hughes
9cb3c84712 modem-manager: Fix a tiny memory leak when starting the daemon 2019-10-05 13:03:02 +01:00
Richard Hughes
2524c3fd79 synaptics-rmi: Copy the behavior of rmi4utils for BL7 detach 2019-10-05 09:07:22 +01:00
Richard Hughes
1c53c0eb86 synaptics-rmi: Simplify fu_synaptics_rmi_device_read()
We don't need a double loop here as we only ever require one READ_ADDR request.
2019-10-05 09:07:22 +01:00
Richard Hughes
08ddb2b7c4 synaptics-rmi: Set the version after ->setup has run
The build_id might be overwritten in the BL-specific setup.
2019-10-05 09:07:22 +01:00
Richard Hughes
339f823ee2 synaptics-rmi: Use the correct mask when getting the bootloader mode on BL7 2019-10-05 09:07:22 +01:00
Richard Hughes
3b8a2ea47f syanptics-rmi: The build_id is 3 bytes long, not 2 2019-10-04 17:08:21 +01:00
Richard Hughes
007140bd78 synaptics-rmi: Read the config partition the same as rmi4utils 2019-10-04 15:47:16 +01:00
Richard Hughes
4b30380e78 Provide a default implementation of common FuDevice actions
This reduces the amount of boilerplate in each plugin.

    32 files changed, 156 insertions(+), 584 deletions(-)
2019-10-04 14:57:32 +01:00
Christian Kellner
7e5c7b269a thunderbolt-power: avoid checking for bolt support
Avoid checking if bolt supports force-power in coldplug (early on)
because that will dbus-activate boltd, even on systems where there
is no actual thunderbolt hardware and thus also no force-power
support. Since boltd does use the very same kernel mechanism that
fwupd would use when boltd is not around this can not lead to any
regressions.
2019-10-04 08:16:28 -05:00
Richard Hughes
0e17281997 synaptics-rmi: Add some debugging for BL7 devices 2019-10-04 10:59:08 +01:00
Yehezkel Bernat
bddfde9615 Fix usage of incorrect type for return value
This seems like a bug, as `FALSE` == `0` == `VALIDATION_PASSED`
2019-10-03 10:41:48 -05:00
Richard Hughes
c6cda8bc71 synaptics-rmi: Do as little as possible in device setup
This reduces the setup time by another 70ms and also makes the plugin simpler.
2019-10-03 15:14:10 +01:00
Richard Hughes
b8e97e56c3 synaptics-rmi: Speed up reading the PDT from 900ms to 30ms
Don't continue to scan pages after the last function.
2019-10-03 15:14:10 +01:00
Mario Limonciello
d837ca8c28 fu-util: add support for a reinstall command 2019-10-03 08:16:41 -05:00
Mario Limonciello
350fc4c787 trivial: fu-util/fu-tool: update re-install help text to reinstall 2019-10-03 08:16:41 -05:00
Mario Limonciello
f59cc375ae trivial: fu-util: remove double printed message about succesful firmware update 2019-10-03 08:16:41 -05:00
Mario Limonciello
d122facc09 trivial: fu-util: show no updatable devices error for update command
This makes it mirror the behavior of `get-updates` command.
2019-10-03 08:16:41 -05:00
Richard Hughes
eeb6c22c1e synaptics-rmi: Ignore the ATTN reports from the hardware when reading DATA
Fixes https://github.com/fwupd/fwupd/issues/1427
2019-10-03 13:10:58 +01:00
Richard Hughes
9f7a3364ae synaptics-rmi: Move the fuzzing instructions to the toplevel README 2019-10-02 16:28:28 +01:00
Richard Hughes
47ae4f89d7 Fuzz the SREC and IHEX file parsers once more 2019-10-02 16:28:28 +01:00
Richard Hughes
e9232c4fc0 Use parallel fuzzing for the SMBIOS checks too 2019-10-02 16:28:28 +01:00
Richard Hughes
e87abd81a2 synaptics-rmi: Fix the packing of the partition table
The data was part of the union, not the struct. It's also binary format and
thus needs to be packed.
2019-10-02 12:28:06 +01:00
Richard Hughes
63aa6759f0 Add a plugin to update Synaptics RMI4 devices 2019-10-02 10:45:13 +01:00
Richard Hughes
201d5ac138 trivial: Add a parallel fuzzing script
This approximately doubles performace of fuzzing for every two cores you have.
2019-10-02 09:37:43 +01:00
Mario Limonciello
2b69098d89 trivial: fu-util: output newline after prompt.
Before:
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
```

After:
```
Uploading firmware reports helps hardware vendors to quickly identify failing and successful updates on real devices.
Upload report now? (Requires internet connection):
0.	Do not upload reports at this time, but prompt again for future updates
1.	Do not upload reports, and never ask to upload reports for future updates
2.	Upload reports just this one time, but prompt again for future updates
3.	Upload reports this time and automatically upload reports after completing future updates
```
2019-10-01 16:07:48 -05:00
Mario Limonciello
fac50a8eef trivial: fix %u output in report upload
Don't bother showing the numbers, they were listed right above.
2019-10-01 16:07:48 -05:00
Richard Hughes
0b1c65ede8 Add a --no-domain logging option
This allows us to match the debug output of other legacy tools easier, which
allows us to compare output dumps for differences.
2019-10-01 10:46:09 -05:00
Richard Hughes
1002b92fb2 trivial: Fix compiler warning for impossible-to-hit condition 2019-10-01 15:34:48 +01:00
Mario Limonciello
34c366aab2 Add support for automatically uploading reports 2019-09-30 16:21:23 -05:00
Mario Limonciello
4f13bbc7e3 trivial: motd: disable updating motd for now
It looks like a systemd bug is happening, but let it be diagnosed upstream
systemd first.

https://github.com/systemd/systemd/issues/13688
2019-09-30 14:09:18 -05:00
Mario Limonciello
dc7e7c3808 trivial: fwupd-refresh: fix a clash with fwupd.service (Closes: #941360)
`fwupd-refresh.service` uses `DynamicUser=true` which causes systemd
to make `/var/cache/fwupd` a symlink to `/var/cache/private/fwupd`.

Individual units aren't allowed to access this directory, only the ones
with the directive.  This means that `fwupd.service` stops working as
soon as a user tries to start `fwupd-refresh.service`.

The bug details are present in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941360
2019-09-30 14:09:18 -05:00
Richard Hughes
3d6ff6e27e trivial: Fix Fedora CI 2019-09-30 17:13:07 +01:00
Mario Limonciello
dc6d0af352 trivial: fu-udev-device: fix some assertions
These seem to be caused by udev_parent being `NULL`.

```
19:26:06:0220 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0220 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0220 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0221 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0221 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0221 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0221 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0221 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0221 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0222 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0222 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0222 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0222 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0223 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0223 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0223 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0223 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0223 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0223 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0224 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0224 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0224 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0224 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0224 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0224 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0225 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0225 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0225 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0225 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0225 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0225 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0225 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0225 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0226 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0226 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0226 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0226 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0226 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0226 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0226 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0227 GLib-GObject         g_object_ref: assertion 'G_IS_OBJECT (object)' failed
19:26:06:0227 GUdev                g_udev_device_get_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
19:26:06:0227 GUdev                g_udev_device_get_parent: assertion 'G_UDEV_IS_DEVICE (device)' failed
```
2019-09-30 09:49:30 +01:00
Richard Hughes
a86790ac11 Search up the tree for a vendor name rather than (ab)using the HID_NAME 2019-09-28 21:58:04 +01:00
Richard Hughes
c56d2bd046 Add some success messages when CLI tasks have completed
Updating firware is sometimes scary, and for user-facing CLI tools we ought to
show some kind of reassurance than it went well.

Fixes some of https://github.com/fwupd/fwupd/issues/1409
2019-09-27 12:20:00 -05:00
Richard Hughes
bcee63a52d trivial: Put the boolean prompt on the same line as the text 2019-09-27 12:20:00 -05:00
Richard Hughes
07184d3822 Never show LicenseRef-proprietary to the end user
Just provide a translated string for this most common of cases.
2019-09-27 12:24:28 +01:00
Mario Limonciello
506ef63a59 trivial: snap: correct install hook root directory 2019-09-26 13:34:26 -05:00
Richard Hughes
868db4e1a8 Export the instructions for detaching the device
Somewhat embarrassingly we were not actually showing the 8bitdo manual detach
images because... we were not actually exporting them. I don't know how this
ever worked in GNOME Software, but it would also explain the low 'success' rate
of the 8bitdo firmware on the LVFS.

This will also be used by Logitech in the future for the C1 Unifying devices.

To work in gnome-softare, this also needs the matching functionality to call
gs_app_add_screenshot() with the new exported data.
2019-09-26 16:40:12 +01:00
Mario Limonciello
5bd649ef31 uefi: detect unmounted ESP partitions (Fixes: #1405)
Mount these while writing out updates.
Leave them mounted when done (you gotta reboot anyway).
2019-09-26 10:39:45 -05:00
Mario Limonciello
dc227c6037 uefi: stop recording efibootmgr output after flash
We've not had to reference this in a long time for bugs, all the major
IBVs and OEMs have good fwupd support now.
2019-09-26 10:39:45 -05:00
Richard Hughes
7b257d9692 trivial: post release version bump 2019-09-26 11:06:19 +01:00