Commit Graph

3084 Commits

Author SHA1 Message Date
Richard Hughes
b6f4a1697e trivial: Fix two bugs in the hardware self tests script 2019-04-30 09:26:48 +01:00
Richard Hughes
5079f26f0e Never guess the version format from the version string
This leads to madness, as some formats are supersets of the detected types,
e.g. 'intel-me' is detected as 'quad' and 'bcd' is detected as 'pair'.

Where the version format is defined in a specification or hardcoded in the
source use a hardcoded enum value, otherwise use a quirk override.

Additionally, warn if the version does not match the defined version format
2019-04-30 09:25:41 +01:00
Richard Hughes
94422f651e Only force a semver when the device opts-in
This is only used by one, so-far out-of-tree plugin. Reduce complexity by not
using the version format to decide if we're forcing a semver.
2019-04-30 09:25:41 +01:00
Richard Hughes
c84b36c541 Export the version-format to clients
This allows a vendor to verify the VersionFormat of a device without running
the daemon in verbose mode.
2019-04-30 09:25:41 +01:00
Mario Limonciello
396026582d Add missing gtk-doc documentation 2019-04-30 07:05:26 +01:00
Richard Hughes
5d7f5a2a87 dfu: Add some trivial, but useful, debugging for AVR DFU devices 2019-04-29 08:27:51 -05:00
Richard Hughes
3c7f58170d dfu: Correctly identify DFU firmware that starts at offset zero
Use 0xffffffff as the 'never set' base address.
2019-04-29 08:27:51 -05:00
Richard Hughes
2cebf6c555 dfu: Don't keep showing trivial debug output 2019-04-29 08:27:51 -05:00
Richard Hughes
e4e96742e7 dfu: Reset the forced version during attach and detach
If the runtime DFU version is a vanilla DFU runtime rather than the AVR32 DFU
variant then we no longer need to use the override.
2019-04-29 08:27:51 -05:00
Mario Limonciello
8b222bd557 ata/nvme: For devices running Dell firmware, set VersionFormat (Fixes: #1169)
Dell firmware is known to use `VersionFormat` `plain`.
2019-04-25 10:26:02 -05:00
Mario Limonciello
253b825e6b fu-engine: Check if VersionFormat is ambiguous when adding devices
Set `UpdateError` in this case, and prevent updates.

If the `VersionFormat` is not known, then the device will later have
problems installing firmware with errors like:
```
failed to get release version: version format unset and version 13000001 ambiguous
```

or

```
Firmware version formats were different, device was '(null)' and release is 'plain'

```

This generally should be corrected by quirking the device.
2019-04-25 10:26:02 -05:00
Richard Hughes
cdd390a785 trivial: Fix fwupdate --apply 2019-04-25 12:52:59 +01:00
Richard Hughes
8ef139faba Only use class-based instance IDs for quirk matching
These are dangerous GUIDs that shouldn't generally be used by any device
for distribution of firmware updates. They'll potentially apply to
devices outside of the vendor they were created for.

Additionally if two USB devices with common interface classes are
on the system, they may lead to one device not being populated by
fwupd.

Fixes https://github.com/hughsie/fwupd/issues/1162
2019-04-23 15:23:31 -04:00
Mario Limonciello
398afe545f trivial: dell-dock: set minimum board to 6
Drop all TODO and quirks for older pre-production boards.
2019-04-23 13:36:30 -05:00
Richard Hughes
59ea33de80 trivial: post release version bump 2019-04-23 10:31:07 +01:00
Richard Hughes
828c913e37 Release fwupd 1.2.8 2019-04-23 10:25:55 +01:00
Richard Hughes
7886c086a1 Don't upload reports when the user has configured their system in a broken way
I'm getting a bit fed up with failed reports from arch users where they just
have a broken system. I don't think it's useful to upload to the LVFS or notify
the vendor about failures like this.
2019-04-18 22:06:01 +08:00
Mario Limonciello
38027e696b Allow setting the daemon verbose domains at runtime 2019-04-17 12:12:13 -04:00
Mario Limonciello
bfcf75b7a6 Allow fwupdmgr to modify the daemon config
This allows several things, for instance:

 * Adding or removing blacklisted plugins or devices
 * Changing the idle timeout where allowed

...without a user needing to manually modify a configuration file.
2019-04-17 12:12:13 -04:00
Richard Hughes
fb9cfffe7d trivial: Share some systemd code for future usage 2019-04-17 12:12:13 -04:00
Richard Hughes
982e23c438 Do not compare version formats when the release format is unknown 2019-04-17 12:11:45 -04:00
Richard Hughes
3c8777f0f6 Do not fall back integers to a plain version format
We can't possibly know what version format to use.
2019-04-17 12:11:45 -04:00
Richard Hughes
2c40b3734f Use the device version format when converting the release version
This is arguably the more correct fix, regardless of the UEFI quirk use as each
release was reading and converting the exact same property from the component.

Fixes https://github.com/hughsie/fwupd/issues/1156
2019-04-17 12:11:45 -04:00
Richard Hughes
21ab7f588c Set the VersionFormat using the metadata or the UEFI quirk
This allows existing Dell firmware to not ship a LVFS::VersionFormat key and
instead use the existing SmbiosManufacturer quirk.
2019-04-17 12:11:45 -04:00
Richard Hughes
75449d9db1 trivial: Return the superclassed FuDevice from fu_engine_get_details()
This allows us to print the daemon-specific properties like VersionFormat when
debugging. The caller can continue to operate on the subclassed FwupdDevice
without changes.
2019-04-17 12:11:45 -04:00
Richard Hughes
099f0f1123 trivial: Fix some spaces-for-tabs failure 2019-04-17 12:11:45 -04:00
Richard Hughes
1fb8202b06 nvme: Fix the correct handling of a plain version number 2019-04-17 15:46:58 +01:00
Mario Limonciello
c73c02fa70 trivial: uefi: clarify errors related to secure boot 2019-04-17 16:39:29 +08:00
Mario Limonciello
a50b02faf2 uefi: Don't leak the application build path into the binary
This can be set at runtime if needed using environment variables.
2019-04-17 16:39:29 +08:00
Richard Hughes
8fada51919 Correctly parse DFU interfaces with extra vendor-specific data
Fixes: https://github.com/hughsie/fwupd/issues/1152
2019-04-17 15:12:43 +08:00
Richard Hughes
cce6a1cb5a Do not report transient failures
We don't need to report failures to do with AC or battery level to the LVFS.
2019-04-17 08:20:44 +08:00
Richard Hughes
456328072b Detect version number like RQR24.06_B0030 as 'plain'
Failing the semver checks we want to fall back to PLAIN, rather than UNKNOWN.

Fixes https://github.com/hughsie/fwupd/issues/1151
2019-04-16 11:32:03 -04:00
Richard Hughes
622e054d20 trivial: post release version bump 2019-04-12 10:40:55 +01:00
Richard Hughes
a7f860c67f Release fwupd 1.2.7 2019-04-11 14:33:25 +01:00
welaq
a8c9813967 l10n: Create Lithuanian translation file 2019-04-11 09:30:59 -04:00
welaq
f9b9953c49 l10n: Update LINGUAS 2019-04-11 09:30:59 -04:00
Kelly Anderson
31b2ce83e1 Updated: Add support for 8BitDo M30. 2019-04-09 12:38:24 -04:00
Aleksander Morgado
8a1dce9472 modem-manager: increase the timeout to wait for modem after uninhibited
The timeout to wait for the modem after being uninhibited was until
now exclusively to cover the port probing time, because the device
would be already available and ready to be used as soon as the
inhibition was removed.

With the change to include carrier config selection as part of the
fwupd upgrade process, the time to wait for the modem after being
uninhibited should now cover a full reboot of the module, and so the
original timeout of 45s could be a bit tight under some circumstances
(e.g the MM device probing logic is quite slow when there is no SIM
card detected by the module).

We increase this timeout to a much safer value of 120s, which is
extremely long for most cases, but should also be enough to cover even
the worst case scenario.
2019-04-09 07:54:46 -04:00
Aleksander Morgado
ffb8fd5edc modem-manager: implement qmi pdc active config selection as attach()
When we install the MCFG carrier config files with QMI PDC, we were
not explicitly selecting one, and that would end up reporting the
"DF" (default) config is in use. Instead, we should explicitly select
the carrier configuration that we were using before the firmware
upgrade operation.

For example, if the device originally was running with the Vodafone
specific carrier configuration (e.g. T77W968.F1.0.0.3.7.VF.009) and we
trigger the upgrade to the next available firmware associated to
the Vodafone carrier (e.g. T77W968.F1.0.0.3.8.VF.009), we would want
the device to boot with the Vodafone carrier config selected, instead
of booting without any config selected (T77W968.F1.0.0.3.8.DF.009).

This also fixes several upgrade problems detected by fwupd, because it
may end up complaining that the target firmware that was selected to
be installed (e.g. VF variant) is not the one actually reported by the
device after the upgrade (e.g. DF variant).

The selection of which is the config to activate is based on mapping
the mcfg file name with the firmware version reported by the module
before the upgrade. E.g. if the VF variant is reported by the module
(T77W968.F1.0.0.3.7.VF.009), fwupd will look for a MCFG file named
with the "mcfg.VF." prefix.
2019-04-09 07:54:46 -04:00
Mario Limonciello
6c0e9ce6b4 fu-engine: When removing activation flag match the correct version 2019-04-09 04:24:15 -04:00
Richard Hughes
ce3cea8cb4 Require --force to install a release with a different version format
If the user is trying to install version '20190104' on something with the
existing version '1.2.3' then something has gone wrong. Ensure the device
release version format matches the release version format and fail to apply the
update if this is not true.

In the common case setting the version with fu_device_set_version('1.2.3')
would set the version format to TRIPLET, and setting <release version='1.2.3'>
so no action is required. In cases where the version format could be ambiguous
then the format should be set both in a quirk and also in the metainfo file.
2019-04-09 04:16:32 -04:00
Richard Hughes
0b3e9fdb96 trivial: Allow detecting unsupported version formats in _from_string() 2019-04-09 04:16:32 -04:00
Richard Hughes
3d280caf4a Match the old or new version number when setting NEEDS_REBOOT
Some devices update then need a reboot, and other reboot to update.
2019-04-09 04:16:32 -04:00
Richard Hughes
8fc8985224 trivial: Add the missing 'pair' version format to the string helpers 2019-04-09 04:16:32 -04:00
Mario Limonciello
a90dba7ab2 trivial: Copy the version format from donor devices 2019-04-09 08:31:45 +01:00
Richard Hughes
5b715e1dc3 Make an error message clearer when there are no updates available
Fixes some of https://github.com/hughsie/fwupd/issues/767
2019-04-09 15:23:10 +08:00
Richard Hughes
b62c3a4fae Add support for the not-child extension from Logitech
This ensures that child devices are updated before the receiver as the update
protocol may be changed during the update.

Fixes https://github.com/hughsie/fwupd/issues/1139
2019-04-09 15:23:10 +08:00
Mario Limonciello
cc3d560571 thunderbolt: Set require-ac for Thunderbolt devices (Fixes: #1142) 2019-04-09 03:15:30 -04:00
Richard Hughes
dce91204c9 Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
Richard Hughes
02ac92c17c Add a component categories to express the firmware type
Some firmwares only update one part of the system, e.g. the EC or ME firmware.
Other updates include all the updates needed for the whole system, and vendors
have been doing different things with the component name due to this.

To fix, add an enumerated set of firmware 'categories' that can be set by the
uploader in the metainfo.xml file (or changed the LVFS) which automatically
set the name suffix.

Only append the translated version in the client when <categories> has
not been set, as the LVFS is still operating in compatibility mode and setting
the <name> with the prefix. Add the support to fwupd now so we can switch in
about 9 months time.
2019-04-04 17:35:02 -04:00