Commit Graph

3076 Commits

Author SHA1 Message Date
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
Mario Limonciello
a3069f57b0 trivial: snap: set return code 2 on fwupd-activate.service as success
Otherwise the common case (nothing to do) will return 2 and show the systemd
unit as failed every time.
2019-04-04 22:30:25 +01:00
Mario Limonciello
14891c7934 trivial: ci: pull libxmlb from debian unstablef
Use apt pinning to not pull in the rest of debian unstable
2019-04-04 06:33:43 -05:00
Mario Limonciello
f981036e33 trivial: meson.build: bump libxmlb dep to 0.1.7
Shutdown activation for ATA disks doesn't work with older versions, and it's
not obvious how to debug or fix the problem.
2019-04-04 06:33:43 -05:00
Mario Limonciello
fe593944a9 fu-tool: Port get-history command to fwupdtool 2019-04-03 14:37:25 -05:00
Mario Limonciello
3d9078f427 trivial: disable CentOS CI
It's currently failing with no changes caused by fwupd.

```
Step 10/16 : RUN pip3 install pillow pygobject
 ---> Running in 613ba74c32ce
Collecting pillow
  Downloading 6b2971adc1/Pillow-6.0.0.tar.gz (29.5MB)
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/Pillow.egg-info
    writing dependency_links to pip-egg-info/Pillow.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/Pillow.egg-info/top_level.txt
    writing pip-egg-info/Pillow.egg-info/PKG-INFO
    writing manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-6xakdwq1/pillow/setup.py", line 792, in <module>
        zip_safe=not (debug_build() or PLATFORM_MINGW), )
      File "/usr/lib/python3.4/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 278, in run
        self.find_sources()
      File "/usr/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 293, in find_sources
        mm.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 524, in run
        self.add_defaults()
      File "/usr/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 560, in add_defaults
        sdist.add_defaults(self)
      File "/usr/lib/python3.4/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
        self._add_defaults_ext()
      File "/usr/lib/python3.4/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/usr/lib64/python3.4/distutils/cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/lib64/python3.4/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-6xakdwq1/pillow/setup.py", line 268, in finalize_options
        if sys.version_info.major >= 3 and not self.parallel:
      File "/usr/lib64/python3.4/distutils/cmd.py", line 103, in __getattr__
        raise AttributeError(attr)
    AttributeError: parallel

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6xakdwq1/pillow/
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip3 install pillow pygobject' returned a non-zero code: 1
```
2019-04-03 15:35:52 -04:00
Richard Hughes
dbeba37def Recreate the history database if migration failed
If the history database is corrupt or the daemon crashed during the migration
the history object fails to load, which in turn fails the daemon startup.

Rather than leaving the user with a broken system (which also shows UI to that
effect in gnome-software) delete the existing file and start afresh. Nothing
in the history database is that important anyway.
2019-04-03 14:01:21 -04:00
Mario Limonciello
4eb251c4e5 trivial: snap: start/stop fwupd-activate on install/remove 2019-04-02 09:14:37 -05:00
Mario Limonciello
2df922c23d Move the core built-in 'fwupd' remote over to the dell-esrt plugin
This metadata is useless to other systems, so if compiling a custom
fwupd without -Dplugin_dell=true it shouldn't be included.
2019-04-02 07:18:29 -05:00