Commit Graph

6004 Commits

Author SHA1 Message Date
Mario Limonciello
28a04c7c78 trivial: check-license: rename license variable to lic
license is a built-in.
caught by codacity.
2021-08-08 15:41:43 -05:00
Mario Limonciello
915916e22a Add a pre-commit rule to verify a SPDX license header is present 2021-08-08 14:43:21 -05:00
Mario Limonciello
9c35617b54 trivial: out-of-tree: add SPDX license headers 2021-08-08 14:43:21 -05:00
Mario Limonciello
4ff6a6dedb trivial: flashrom: Add SPDX license header
Clarify that the license was intended to be LGPL2.1 when the project
adjusted and this source file was just missed as well.
2021-08-08 14:43:21 -05:00
Jeremy Bopp
3604b897b5 Fix detection of 8Bitdo wireless usb adapter
Limits copying the get version response payload to the size of the out buffer.
Devices that return a larger payload pack the necessary version information at
the beginning of the payload.

Fixes: #1661
2021-08-07 21:51:26 -05:00
Richard Hughes
e44ec2f0e4 trivial: Do not show superset plugin warnings when disabled 2021-08-06 20:51:22 +01:00
Richard Hughes
ad24f1623d redfish: Also conflict with the bios plugin when required 2021-08-06 20:51:22 +01:00
Richard Hughes
d4a4362621 redfish: Fix writing large firmware files 2021-08-06 20:51:22 +01:00
Richard Hughes
f5c0eab25d redfish: Add a per-vendor quirk to set all devices as requiring a reboot
Some versions of XCC do not send the Base.1.10.ResetRequired message.
2021-08-06 20:51:22 +01:00
Richard Hughes
f42b44e427 Remove some deprecated API 2021-08-06 19:49:53 +01:00
Richard Hughes
a5a978b3f6 Rename some confusing API
More than one person has asked about 'why call fu_plugin_update() for a
reinstall or downgrade' and I didn't have a very good answer.

The plugin API is not officially stable, and we should fix things to be
less confusing. Use the same verbs as the FuDevice vfuncs instead.
2021-08-06 19:49:53 +01:00
Peter Marheine
059f56e6ce realtek-mst: add support for RTD2141B
The RTD2141B has the same update protocol as RTD2142, but the Chromebook
targets that use it require us to find the drm_dp_aux_dev i2c channel
differently because the AMD display driver doesn't give each output a
unique name in sysfs, so it must be found by walking sysfs from the drm
device representing an output.

Change-Id: Icb6c1a40b8a62af72808d68a0a69555810abc272
2021-08-06 11:00:35 +10:00
Ricardo Cañuelo
14d21c941c trivial: Allow handling EPROTO in plugins
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-08-05 15:46:06 +01:00
Ricardo Cañuelo
7b18e593ea trivial: Ignore NUL chars in the device version
Signed-off-by: Richard Hughes <richard@hughsie.com>
2021-08-05 14:22:15 +01:00
Richard Hughes
2815a30274 elantp: Fix a crash when starting the daemon
FuElantpHidDevice derives from FuUdevDevice, not FuUsbDevice -- and the
former does not define a class->setup vfunc.

Fixes https://github.com/fwupd/fwupd/issues/3548
2021-08-05 12:54:17 +01:00
Richard Hughes
51efc1c772 trivial: Disable the FreeBSD CI action as it's been failing for a long time 2021-08-05 08:35:54 +01:00
Richard Hughes
068cff6111 test: Allow setting plugin parameters using an environment variable
Based on a patch by Twain Byrnes <binarynewts@google.com>, many thanks.

Use this to test:

sudo FWUPD_TEST_PLUGIN_XML="<config><delay_decompress_ms>100</delay_decompress_ms></config>" \
./src/fwupdtool --plugins test get-devices -v
2021-08-05 08:12:58 +01:00
Thomas Deutschmann
9e4d1bc73b dell-dock plugin requires gusb
Closes: https://github.com/fwupd/fwupd/issues/3598
2021-08-04 18:19:09 +01:00
Thomas Deutschmann
bd6adc8beb modem-manager: Fix compiling with old versions of libxmlb
Closes: https://github.com/fwupd/fwupd/issues/3600
2021-08-04 18:16:18 +01:00
Jerry Zhang
0776918dd8 dfu: Add support for Poly Studio P21 usb device
Specify the Flags in dfu.qurik for Poly Studio P21's camera.
2021-08-04 17:27:11 +01:00
Richard Hughes
12842fdfce Fall back to the parent if the child does not have a battery level set 2021-08-04 09:29:02 +01:00
Twain Byrnes
eed815331c Inhibit system suspend during update
Create and destroy /run/lock/power_override/fwupd.lock.
This file will hold the contents of getpid (), which will
stop the device from being suspended while the file exists.
The file will be created and written just before the
update is put into motion and be destroyed once the update
finishes, or upon restart in case of catastrophic failure.

Change-Id: If8dd17b0358862a842c9589e11ed0de12d852797
2021-08-04 08:33:57 +01:00
8BitDo
c381b334eb 8bitdo: Fix N30 Pro 2 install duration 2021-08-03 18:35:07 +01:00
Richard Hughes
05c1f2b1f3 trivial: Fix docgen warning that crept in with FwupdRequest 2021-08-03 17:33:21 +01:00
Richard Hughes
7a1d547128 trivial: Do not set up the backends if there is no coldplug
This speeds up fu-self-test, but more importantly fixes a intermittent
'ninja check' failure when a host USB device disconnects at exactly the
wrong time.

The FuUsbBackend code is unusual in that the setup() code sets up a
context (with a thread) which takes up to 2 seconds to timeout.
2021-08-03 17:04:27 +01:00
Richard Hughes
8f19ea75d3 Sanitize the device name harder 2021-08-03 15:45:37 +01:00
Richard Hughes
7cfbea795c redfish: Allow starting when using RestrictAddressFamilies 2021-08-03 15:45:15 +01:00
Richard Hughes
27fbab1990 redfish: Disable the uefi_capsule plugin if coldplug succeeded
We don't want to show the big warning about the missing ESRT on server
hardware that is managed by a BMC:

    WARNING: UEFI capsule updates not available or enabled in firmware setup
      See https://github.com/fwupd/fwupd/wiki/PluginFlag:capsules-unsupported for more information.
2021-08-03 13:10:10 +01:00
Richard Hughes
9b49e7b83b trivial: post release version bump 2021-08-02 15:22:43 +01:00
Richard Hughes
2f9eece213 Release fwupd 1.6.2 2021-08-02 15:18:37 +01:00
Richard Hughes
6c2535a71f uefi-capsule: Disable all UX capsules for Lenovo hardware
Applying updates to my new P1G3:

 * schedule the update in fwupd
 * boot into the BootNext
 * apply the capsule with RT->UpdateCapsule
 * reboot with RT->ResetSystem

Except the firmware updater EFI binary then wasn't running. The ESRT
last_attempt_status comes back as Success on the reboot.

Disabling the UX capsule made the update apply correctly each and every
time. Until we can work out what models are affected, use a per-vendor
quirk to avoid delaying the release.
2021-08-02 14:26:45 +01:00
Richard Hughes
731190a500 trivial: Don't expect 35_fwupd for non-UEFI packages 2021-08-02 14:26:45 +01:00
Richard Hughes
19ab121f80 trivial: Write some initial release notes 2021-07-31 20:46:03 +01:00
Richard Hughes
f12068d2e9 Allow devices to only accept version upgrades
See https://github.com/fwupd/fwupd/issues/3554 for details.
2021-07-31 20:41:21 +01:00
Mario Limonciello
89e975490e trivial: try again to fix void docker creation 2021-07-31 13:17:05 -05:00
Mario Limonciello
143efb9d88 trivial: only build powerd on new enough glib
snap has an older glib and the plugin fails to compile.
2021-07-30 20:25:46 -05:00
Richard Hughes
f11abafed7 trivial: Use a valid firmware file for the ColorHug test 2021-07-30 18:53:30 +01:00
Richard Hughes
4daaabe451 trivial: Do not log a scary warning for the common case 2021-07-30 18:53:30 +01:00
Richard Hughes
3b919fc38d trivial: Actually use USE_PARENT_FOR_OPEN for close as the docs say
This fixes updating the Synaptics prometheus hardware.
2021-07-30 18:53:30 +01:00
Richard Hughes
d8f9b66e0e trivial: Actually use the right USE_PARENT_FOR_OPEN flag 2021-07-30 18:53:30 +01:00
George Popoola
1a58398afb powerd: Creating recurring powerd callback
This CL moves the battery information retrieval into a new function,
called "fu_plugin_powerd_callback()", which returns the information in a
struct.

This information is then used in fu_plugin_update_prepare() for battery
checks. There is also a g_timeout_add() function being created in
fu_plugin_startup() in order to enable the plugin to repeatedly send a method
call to powerd.

fu_plugin_update_prepare is removed as its functionality is now handled
by src/fu-engine.c
2021-07-30 10:58:40 -06:00
Daniel Campello
40295c673d trival: reformat fu-plugin-powerd.c 2021-07-30 10:58:40 -06:00
Richard Hughes
a52de99813 trivial: Do not assume updates fail by default
We have the property notification in place now so that the update state
is saved correctly to the database on error.

This helps with debugging as we don't need to explain (to ourselves?!)
why the device is marked as failed even though nothing has run.
2021-07-30 16:35:24 +01:00
Richard Hughes
944ba87b59 Set the update state and error in more cases
If we swap from runtime -> bootloader -> runtime we need to copy the
update state in each step even if we're just switching the swapping the
runtime device.

This regressed, as we optimized away the call to fu_device_list_replace.
2021-07-30 16:35:24 +01:00
Richard Hughes
ac56353f05 trivial: Use the correct enum name
No functional change
2021-07-30 16:35:24 +01:00
Richard Hughes
5f7e58b395 Revert "trivial: Ignore the NUL suffix to fix loading new firmware"
This reverts commit a8d73369f7.

“No matter how far you have gone on the wrong road, turn back.”
2021-07-30 13:42:41 +01:00
Mario Limonciello
8b679f7320 trivial: make contrib/reformat-code.py easier to use
1. Let the user know what commit it's reformatting in stdout
2. Add a debug mode to show the command that was launched
3. Fix output of errors
4. Allow the user to specify starting commit in an argument
2021-07-30 06:42:57 -05:00
Mario Limonciello
269c1ea1d3 trivial: only run clang reformatter on C code 2021-07-30 06:42:57 -05:00
Richard Hughes
32997b10f7 realtek-mst: Add a warning that extreme caution should be used 2021-07-30 09:26:43 +01:00
Richard Hughes
ac44c59605 Support DeviceRequest in the regression device-tests
Real hardware needs this and it was causing failures in the pre-release
regression tests.
2021-07-30 07:24:17 +01:00