Commit Graph

5589 Commits

Author SHA1 Message Date
Richard Hughes
e8f95bc26d Do not prevent firmware updates on desktop hardware
Fixes https://github.com/fwupd/fwupd/issues/3236
2021-05-10 14:36:51 +01:00
Richard Hughes
cb5aa1a254 trivial: Convert FwupdRelease to use @self 2021-05-10 14:35:10 +01:00
Richard Hughes
3f0340c3a7 trivial: Convert FwupdPlugin to use @self 2021-05-10 14:35:10 +01:00
Richard Hughes
8246e43174 trivial: Convert FwupdDevice to use @self 2021-05-10 14:35:10 +01:00
Richard Hughes
20ef071b3c trivial: Style fixes to lots of gtk-doc 2021-05-10 14:35:10 +01:00
Richard Hughes
45f834f0e2 trivial: Fix up flatpak docs to reflect reality 2021-05-10 13:58:32 +01:00
JackZhang-Primax
6e2ee2113c Update pixart-rf.quirk
Add black Mocha vendor & product id in pixart-rf qurik.
2021-05-06 09:48:46 -05:00
Daniel Campello
a4fbe2a6f4 Switch lock directory from /var/run to /run/lock
This allows for proper locking between executions of fwupdtool in
Chromium OS minijail environment. It is needed after commit
9cf5f8f7ff was introduced.

Change-Id: I37b33c8d1fbe97ec9baddc5f77ea94e2f4ff1fa4
2021-05-05 13:34:49 -06:00
Mario Limonciello
b125361e20 trivial: move circleci for windows build to fedora 33 2021-05-05 18:30:45 +01:00
Richard Hughes
608992e25d Add 4 new runtime requirements to the win32 build
I guess we know how many people are using 1.6.0 on Windows now...
2021-05-04 12:51:52 +01:00
Richard Hughes
70e195d18b trivial: Add an error prefix to show the full path 2021-05-04 09:45:03 +01:00
Richard Hughes
0ad70b9be4 trivial: Skip the swap tests when the system bus cannot be started 2021-05-04 09:45:03 +01:00
Richard Hughes
ffcaf14021 trivial: Skip the fmap tests when memmem is not available 2021-05-04 09:45:03 +01:00
Richard Hughes
29e04f926d trivial: Skip the efivar tests on Windows 2021-05-04 09:45:03 +01:00
Richard Hughes
7b7eb9e9b5 trivial: Skip the lockdown tests on Windows 2021-05-04 09:45:03 +01:00
Aleksander Morgado
3417128704 modem-manager: add generic support for PCI based modems
No longer rely on the modems being USB based, we can also support PCI
based devices with the same protocols.
2021-05-01 15:43:38 +01:00
Jason Gerecke
99b4475777 wacom_usb: Fail parsing if wac firmware sections are not in sorted order
The code currently assumes that the firmware sections are in sorted
order (e.g. using images_cnt as the current index). This seems to
be the case with real firmware images, but is not actually guaranteed
by anything. Rewriting the code to use the actual index from the WA
header is a little difficult so just assert this condition for now.
2021-04-30 20:42:28 +01:00
Jason Gerecke
1ddac4447b wacom_usb: Read current firmware index before finding image to write
The value of `self->firmware_index` is not valid until we call
`fu_wac_device_ensure_firmware_index`. Because of this, we would always
request the firmware for index 0. If that slot is currently active then
our attempt to program it will fail since the pages are write-protected.
Annoyingly the only signs that something has gone wrong are that the
flash completes almost instantly and the firmware version never changes.

To fix this we re-order our usage of the variable to be after it
becomes valid. We also add a noisy failure message that is triggered
if no blocks are written.

Fixes: 7afd7cba0d ("Use FuFirmware as a container for firmware images")
2021-04-30 20:42:28 +01:00
Jason Gerecke
50a4ec70e6 wacom_usb: Firmware versions are packed BCD, not "decimal"
Version numbers used by Wacom firmware are typically coded as packed BCD
numbers. The minor version numbers are typically rendered with leading
zeros in the wild, though it appears fwupd doesn't follow this same
visual convention.

Some example versions:

  * { 0x00, 0x05 } --> 0.05 (Wacom rendering) / 0.5 (fwupd rendering)
  * { 0x01, 0x01 } --> 1.01 (Wacom rendering) / 1.1 (fwupd rendering)
  * { 0x01, 0x23 } --> 1.23 (Wacom rendering) / 1.23 (fwupd rendering)

Fixes: 872ec1b68f (Add an experimental plugin to update some new Wacom tablets)
2021-04-30 20:42:28 +01:00
Richard Hughes
5e95cae0c4 trivial: Fix CI by including the version symbols 2021-04-30 16:07:10 +01:00
Richard Hughes
c77b4f03a2 Check the versions of libfwupd and libfwupdplugin at startup
This prevents super-hard-to-debug crashes like we saw in #3197 where the user
was mixing PPAs and official versions.
2021-04-30 15:00:04 +01:00
Richard Hughes
76cafb29b7 Fix a critical warning when downloading files
The call to g_proxy_resolver_get_default() is (transfer none) and so unref'ing
it causes GLib to get very upset. Also, move it to be per-FwupdClient rather
than per-request as it can be expensive to call in the PAC-runner case.
2021-04-30 11:19:09 +01:00
Jan Blechta
197d3dc3b9 Fix regression in build system
Reverts small part of 99832622e1.
EFI_APP_LOCATION conf var (or FWUPD_EFIAPPDIR env var) is needed for

  fu_common_get_path (FU_KIND_PATH_EFIAPPDIR)

to function properly
2021-04-28 18:07:56 +01:00
Richard Hughes
89d45a0d91 trivial: Standardize on introspection for @error and @cancellable
Also standarize on `Returns:` for the result.
2021-04-28 16:19:50 +01:00
Richard Hughes
7b23f95a21 trivial: Fix up some introspection bugs 2021-04-28 16:19:50 +01:00
Richard Hughes
4462ac4f78 Ask the user to confirm all CLI actions
For some users typing 'fwupdmgr update' just deploys all updates to all hardware,
and that might come as a shock. Ask the user to confirm all actions explicitly
and show the update notes in a warning box rather than plain text on the console.
2021-04-28 15:56:01 +01:00
Richard Hughes
fdd507957a Switch from libproxy to GProxyResolver
GProxyResolver will use libproxy only when required. TIL.
2021-04-28 15:52:45 +01:00
Richard Hughes
495302ca06 Support binary artifact resources in cabinet archives
Fixes the other half of https://github.com/fwupd/fwupd/issues/3193
2021-04-28 15:52:26 +01:00
Richard Hughes
32fd74289a trivial: Don't restart pesign in the example spec file 2021-04-28 14:53:19 +01:00
Richard Hughes
a054780349 Fix a regression in updating the WD19TB dock
Actually use the composite ID for the given device ID.

Fixes the easier half of https://github.com/fwupd/fwupd/issues/3196
2021-04-28 13:17:37 +01:00
Richard Hughes
68c698ea60 trivial: Move the Fedora CI to a supported release 2021-04-28 10:07:04 +01:00
Richard Hughes
c6bb21356f Support all hash types when loading cabinet archives
Fixes half of https://github.com/fwupd/fwupd/issues/3193
2021-04-27 15:41:44 +01:00
Richard Hughes
5ad6fb2a27 dfu: Do not show an invalid warning on attach
For some hardware, it is quite expected the device just resets.
2021-04-26 19:38:13 +01:00
Richard Hughes
0a37abfce8 dfu: Do not require wildcard-pid when flashing a raw binary file 2021-04-26 19:38:13 +01:00
Richard Hughes
584f1d4c6a dfu: Fall back to binary files when flashing stm32 hardware 2021-04-26 19:38:13 +01:00
Richard Hughes
f992fb75cd Use libproxy to get the system proxy setting for a given URL 2021-04-26 16:30:13 +01:00
Richard Hughes
19e77ba445 trivial: post release version bump 2021-04-26 11:03:20 +01:00
Richard Hughes
ba890cde46 Release fwupd 1.6.0 2021-04-26 10:46:50 +01:00
Richard Hughes
1ac05ef3bd trivial: Codespell fixes 2021-04-26 10:29:39 +01:00
Richard Hughes
4fe318bd54 dfu: Fix up some overzealous replacement when renaming the DFU files 2021-04-23 13:59:44 -05:00
Richard Hughes
88eef48f36 trivial: Use g_memdup2() on newer GLib versions 2021-04-23 13:59:28 -05:00
Mario Limonciello
99832622e1 uefi-capsule: Move EFI binary into a subproject
This will allow distributions to package and distribute the unsigned
EFI binary separately, similar to what has been done for GRUB.
2021-04-23 13:59:10 -05:00
Mario Limonciello
76bec1a137 trivial: fix debian package builds after commit 2021-04-23 13:59:10 -05:00
John Karahalis
ae690c57b7 trivial: Update --no-reboot-check description
Update the description of the --no-reboot-check option to clarify that
this option also disables the reboot prompt.
2021-04-23 07:58:14 -05:00
Peter Marheine
72a273e0ff flashrom/lspcon: probe for actual active partition
While the flag bytes in Flash on the PS175 indicate which partition it is
desired the device boot, the device may actually boot something else
because it performs some kind of integrity check on firmware images before
booting them. If the image specified by the flag bytes fails validation,
the device instead boots partition 3 which should be treated as read-only.

The device provides a register on I2C that indicates which partition is
actually running, so probe that register rather than assuming the device
is running the image that the flag bytes specify.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
2021-04-23 07:03:49 +01:00
Peter Marheine
a8e9802271 flashrom/lspcon: make flash layout non-global
Having a mutable global flash layout makes it difficult to reason about which
flash regions will be affected by any given flashrom operation. Make copies of
the layout from a template instead, and default-exclude regions from
operations.
2021-04-23 07:03:49 +01:00
Richard Hughes
63bc42eace Add a composite ID that is used to identify all devices in the same physical package 2021-04-22 16:27:04 +01:00
Richard Hughes
a87440947d flashrom: Do not attempt to change the physical ID after setup() 2021-04-22 15:37:24 +01:00
Richard Hughes
f9e9e087d4 trivial: Do not allow changing the logical or physical IDs after calling ->setup()
If we allowed this then the DeviceID would change, and chaos ensues.
2021-04-22 15:37:24 +01:00
Richard Hughes
6b64bc7afa Check FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN when calculating the SUPPORTED flag
If the device is on battery power, the device will have at least one inhibit
and be in FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN state.

It's still supported, and it's misleading to suggest there are no updates
available. Just check both flags.

Fixes the 3rd half (sic) of https://github.com/fwupd/fwupd/issues/3156
2021-04-22 15:37:24 +01:00