Commit Graph

6025 Commits

Author SHA1 Message Date
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
Richard Hughes
08caad4ed2 trivial: Skip the Fwupd.Client.connect() method for introspection
In hindsight connect() was a poor choice of name as this is hardcoded
as the GObject parent method for signal attachment. It's not actually
required when using the sync API in Python as it's called when required.
2021-07-30 07:24:17 +01:00
Richard Hughes
cbf57ea9d1 trivial: Fix the fwupdtool progress bar to actually work 2021-07-30 07:23:57 +01:00
Richard Hughes
6f7ceb9b35 trivial: Fix the ctrl+c SIGINT signal handling
This was broken since we started using the no-default GMainContext.
2021-07-30 07:23:57 +01:00
Mario Limonciello
192083479e trivial: fix void container build 2021-07-29 19:56:19 -05:00
Richard Hughes
a8d73369f7 trivial: Ignore the NUL suffix to fix loading new firmware
The LVFS is now adding an artificial NUL to the metainfo data to work
around a possible buffer over-read on old fwupd versions. This breaks
new code that reads the XML buffer using xb_builder_source_load_bytes
as GLib then tries to parse the final NUL byte.

As `xmllint` actually ignores the trailing NUL, we should as well.
2021-07-29 20:07:22 +01:00
Richard Hughes
640a3dbfb8 trivial: Add some more debugging when failing the wait-for-replug 2021-07-29 14:04:05 +01:00
Mario Limonciello
9233ceb8d4 trivial: fix void docker container creation 2021-07-28 21:42:54 -05:00
Jerry Zhang
bb5bae8c17 dfu: Add support for more Poly usb devices
Specify the Flags in dfu.qurik for Poly Studio R30, P5 and E70.
2021-07-28 18:46:53 +01:00
Richard Hughes
cb5912c941 trivial: Do not set URIs of zero length 2021-07-28 18:25:50 +01:00
Mario Limonciello
668623dda2 trivial: ci: timeout freebsd CI after 20 minutes
There have been a few jobs that were left running an hour pulling
a file, and that shouldn't block us and waste CI minutes.
2021-07-28 12:02:17 -05:00
Mario Limonciello
1150189948 trivial: Add VOID into contrib/setup 2021-07-28 11:29:44 -05:00
Mario Limonciello
a7cfe67cfe Add VOID CI target 2021-07-28 11:29:44 -05:00
Mario Limonciello
3081dea088 trivial: allow writing to /boot/grub
When running with systemd confinement writing to /boot/grub is needed.
```
fwupd[20533]: /usr/sbin/grub-mkconfig: 269: cannot create /boot/grub/grub.cfg.new: Read-only file system
fwupd[20492]: 03:12:53:0148 GLib                 posix_spawn avoided (fd close requested)
fwupd[20630]: /usr/bin/grub-editenv: error: cannot open `/boot/grub/grubenv': Read-only file system.
```
2021-07-28 17:11:39 +01:00
Mario Limonciello
b87c6dab95 uefi-capsule: Add support for installing UEFI updates from GRUB
Shim has had a hard time with loading updates from arguments in the
most recent release and this isn't the first time that happened.

Give distros and users an escape hatch that will allow using GRUB
instead.
2021-07-28 17:11:39 +01:00
Richard Hughes
3747e245e5 uefi-capsule: Add support for CapsuleOnDisk
Based on a patch by Ilias Apalodimas <ilias.apalodimas@linaro.org>,
many thanks.

Fixes https://github.com/fwupd/fwupd/issues/2900
2021-07-28 17:11:39 +01:00
Richard Hughes
a1f8096c53 lenovo-thinklmi: Remove the faulty test for the update_error
We should be just checking if the thinklmi plugin inhibited the device,
and if we fix the bug where the last_attempt_status value was not being
read on startup then this test will then fail.
2021-07-28 17:11:39 +01:00
Mario Limonciello
bf32c86c17 trivial: symlink in grub configuration too
If GRUB support was activated in uefi plugin, this will be needed
for it to work.
2021-07-28 10:25:47 -05:00
Mario Limonciello
1dcb42747e trivial: contrib/setup: Run helper stuff to set up local dev environment
If running interactive, offer to setup the local system to using
/usr/local more convenient.
2021-07-28 10:25:47 -05:00
Mario Limonciello
0de861086f trivial: contrib/setup: change the interactive check 2021-07-28 10:25:47 -05:00
Mario Limonciello
84c4ae387d trivial: only use systemd env variables if /usr prefix
This helps avoid confusion of /usr/local/etc vs /etc/ when using hand
install on a system that previous had packaged install.
2021-07-28 10:25:47 -05:00
Mario Limonciello
19a2a5791f trivial: let daemon work when configuration missing
By default the daemon start if no configuration is present, but
the first time that an fd is accessed the following error shows up:
```
A maximum read size must be specified
```

This is because the maximum archive size wasn't initialized.
2021-07-28 06:29:09 -05:00
Daniel Campello
2ece14d9e3 Fix battery threshold handling when AC is *not* required 2021-07-27 17:23:15 -06:00
George Popoola
8e4624809c powerd: Enable updates on devices without battery
This adds a condition to the powerd plugin that passes updates on devices
that do not give provide valid battery information or whose battery
information is unknown, such as Chromeboxes, which have no battery to
read.
2021-07-27 15:36:51 -06:00
Richard Hughes
eb215753ee trivial: Add the ability to download files using PkClient for testing 2021-07-27 15:59:17 +01:00
Richard Hughes
3d6a48fad3 Do not save invalid files on LVFS server error
In the event of a 429 response libcurl does not fail curl_easy_perform()
and instead saves the 'Too Many Requests' string as the payload.
This obviously fails the cabinet checksum specified in the metadata.

Move the response code checks to the success branch and also add checks
for the other 4xx and 5xx errors.

Fixes the fwupd half of https://github.com/fwupd/firmware-lenovo-thinkpad/issues/137
2021-07-27 15:59:17 +01:00
Richard Hughes
7bf7b7846b trivial: Fix the header ordering a little more 2021-07-25 08:58:14 +01:00
Mario Limonciello
01f79c0339 trivial: set the reference commit to run style check against on CI 2021-07-24 20:56:26 -05:00
Daniel Campello
987e7d2929 Add contrib/reformat-code.py to pre-commit hooks 2021-07-24 20:56:26 -05:00
Mario Limonciello
bb202244e3 trivial: add clang-format into dependencies 2021-07-24 20:56:26 -05:00