Updating firware is sometimes scary, and for user-facing CLI tools we ought to
show some kind of reassurance than it went well.
Fixes some of https://github.com/fwupd/fwupd/issues/1409
Somewhat embarrassingly we were not actually showing the 8bitdo manual detach
images because... we were not actually exporting them. I don't know how this
ever worked in GNOME Software, but it would also explain the low 'success' rate
of the 8bitdo firmware on the LVFS.
This will also be used by Logitech in the future for the C1 Unifying devices.
To work in gnome-softare, this also needs the matching functionality to call
gs_app_add_screenshot() with the new exported data.
We don't need to enumerate USB and UDev devices in the self tests. In the case
where the probe fails (due to a permissions error, as not running as root) we
don't want the tests to fail.
Embedded newline characters don't do so well.
Before:
```
└─XPS 13 9380 System Update:
New version: 0.1.3.2
Remote ID: lvfs
Summary: Firmware for the Dell XPS 13 9380
License: proprietary
Size: 19.9 MB
Vendor: Dell Inc.
Flags: is-downgrade|blocked-version
Description: This stable release fixes the following issues:
�� Fixed an issue with Secure Boot Option ROM Signature Verification.
�� Firmware updates to address security advisory INTEL-SA-00185 (CVE-2018-12188 CVE-2018-12190 CVE-2018-12191 CVE-2018-12192 CVE-2018-12199 CVE-2018-12198 CVE-2018-12200 CVE-2018-12187 CVE-2018-12196 CVE-2018-12185).
�� Firmware updates to address security advisories INTEL-SA-00191(CVE-2018-12201, CVE-2018- 12202, CVE-2018-12203, CVE-2018-12205).
me new functionality has also been added:
�� Removed the option Always Allow Dell Docks from BIOS settings. Dell dock connection and the port behavior will be controlled via the USB and Thunderbolt Adapter configuration settings under operating system environment.
�� Replaces Absolute Software service from Computrace to Absolute Persistence Module service.
�� Supports Dell Dock Station WD19.
```
After:
```
└─XPS 13 9380 System Update:
New version: 0.1.3.2
Remote ID: lvfs
Summary: Firmware for the Dell XPS 13 9380
License: proprietary
Size: 19.9 MB
Vendor: Dell Inc.
Flags: is-downgrade|blocked-version
Description: This stable release fixes the following issues:
• Fixed an issue with Secure Boot Option ROM Signature Verification.
• Firmware updates to address security advisory INTEL-SA-00185 (CVE-2018-12188 CVE-2018-12190 CVE-2018-12191 CVE-2018-12192 CVE-2018-12199 CVE-2018-12198 CVE-2018-12200 CVE-2018-12187 CVE-2018-12196 CVE-2018-12185).
• Firmware updates to address security advisories INTEL-SA-00191(CVE-2018-12201, CVE-2018- 12202, CVE-2018-12203, CVE-2018-12205).
Some new functionality has also been added:
• Removed the option Always Allow Dell Docks from BIOS settings. Dell dock connection and the port behavior will be controlled via the USB and Thunderbolt Adapter configuration settings under operating system environment.
• Replaces Absolute Software service from Computrace to Absolute Persistence Module service.
• Supports Dell Dock Station WD19.
```
-o <arg> will redirect stdout to <arg>, -O <arg> what we want to be
using, it saves the file to <arg>.
Signed-off-by: Filipe Laíns <lains@archlinux.org>
At least two vendors are not using SREC according to the spec. They are using
it like a recipe to write specific values at specific addresses.
All the logic like line lengths and checksumming (and therefore all the various
checks for malicious firmware) are still valid, so provide a new function to
just tokenize the file and to not assign a padded image.
When the LVFS switches over to outputting <issues> rather than appending to the
update description we need to be in a position to display the new data.
This allows us to easily build just libfwupd in a flatpak manifest without
installing dozens of deps to build things we're just going to delete anyway.
The fwupd UEFI plugin refuses to start if bit 3 of the "BIOS Characteristics
Extension Byte 2" (13h) is cleared. Bit 3 is UEFI Specification is supported.
Also, double-check that /sys/firmware/efi does not exist before disabling the
plugin as other machines may be affected too. The quirk then acts to supress
the console warning about the broken SMBIOS value.
Fixes https://github.com/fwupd/fwupd/issues/1342
This brings consistency to all fwupd output and allows stuff like
this:
```
No upgrades for Thunderbolt controller in Dell dock, current is 43.00: 40.00=older
No upgrades for Package level of Dell dock, current is 01.00.08.01: 01.00.04.01=older
No upgrades for RTS5413 in Dell dock, current is 01.21: 01.21=same
No upgrades for RTS5487 in Dell dock, current is 01.47: 01.47=same
No upgrades for VMM5331 in Dell dock, current is 05.04.00: 05.03.10=older
No upgrades for WD19TB, current is 01.00.00.02: 01.00.00.00=older
○
└─XPS 13 9380 System Firmware:
│ Device ID: 6c24a747f97668873b761558e322398a91dbf394
│ Current version: 0.1.6.0
│ Minimum Version: 0.1.6.0
│ Vendor: Dell Inc.
│ Flags: internal|updatable|require-ac|supported|registered|needs-reboot
│
└─XPS 13 9380 System Update:
Version: 0.1.7.0
Remote ID: lvfs
Summary: Firmware for the Dell XPS 13 9380
License: proprietary
Size: 0x1563d67
Vendor: Dell Inc.
Flags: is-upgrade
Description: This stable release fixes the following issues:
Fixed the issue where the Dell Power Manager displays an error when a 130W Type-C adapter is connected to the system.
new functionality has also been added:
Added a new feature to automatically suspend BitLocker before upgrading the firmware. After the firmware upgrade is complete, BitLocker is automatically enabled.
```
Mostly for consistency purpose. Details:
* It's confusing that internally the functions for `FwupdClient` use
`upgrade` in the name.
* The logical antonym of `downgrade` is `upgrade` not `update`
* People who don't use the tool frequently may try `get-upgrades`
This allows the daemon to set the base directory to store remotes.
This fixes issues with systemd where the installation prefix was set
to soemthing not writable such as `/usr/local` but systemd
`STATE_DIRECTORY` doesn't match up.
```
$ fwupdmgr refresh
Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading… [***************************************] Less than one minute remaining…
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc
Failed to update metadata for lvfs: Error creating directory /usr/local/var/lib/fwupd/remotes.d: Read-only file system
```
It should also hopefully help with immutable systems.
* Show "No Device ID" if no matching devices
* Don't show flags if no flags available
Before:
```
Device ID:
Description: Updating the MST FW improves display performance.
Flags:
GUID: 0a52c8c7-26d5-59a0-ae44-6b00e276d775
```
After:
```
Device ID: No Device ID
Description: Updating the MST FW improves display performance.
GUID: 0a52c8c7-26d5-59a0-ae44-6b00e276d775
```