Commit Graph

4304 Commits

Author SHA1 Message Date
Mario Limonciello
ae71a62620 snap: switch to core18
This makes the snap build quicker by using more distro dependencies
and also fixes some unicode output errors.
2019-09-22 08:46:01 -05:00
Richard Hughes
6d0e7fddd5 trivial: Return the correct property when getting the host product 2019-09-21 12:58:31 +01:00
Mario Limonciello
1dbb82d25e trivial: fu-util-common: fix description wrapping (Fixes: #1378)
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.
```
2019-09-21 12:23:55 +01:00
Mario Limonciello
ce94d163f8 fu-util/fu-tool: Map out changelogs from remotes
If the data is there, try to show the changelog that matches the
release.
2019-09-20 16:02:55 -05:00
Mario Limonciello
3be596b907 fu-util/fu-tool: Better display historical information
* When firmware has been modified use the device key "Previous version"
  instead of "Current version".
* Show release as a child node when looking at history
* Don't output empty flags for release
* Use the key "New version" for releases

Sample output from `get-history`
```
├Integrated Webcam™:
│ │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
│ │   Previous version:    1.2.2
│ │   Update State:        success
│ │   Flags:               updatable
│ │   Last modified:       2019-09-20 14:53
│ │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
│ │
│ └  New version:       1.2.3
│
└Integrated Webcam™:
  │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
  │   Modified version:    1.2.2
  │   Update State:        success
  │   Flags:               updatable
  │   Last modified:       2019-09-20 14:53
  │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
  │
  └  New version:       1.2.4
```

Sample output from `get-updates`
```
Integrated Webcam™:
  │   Device ID:           08d460be0f1f9f128413f816022a6439e0078018
  │   Summary:             A fake webcam
  │   Current version:     1.2.2
  │   Previous Version:     1.2.0
  │   Bootloader Version:  0.1.2
  │   Vendor:              ACME Corp. (USB:0x046D)
  │   Flags:               updatable|supported|registered
  │   GUID:                b585990a-003e-5270-89d5-3705a17f9a43
  │
  ├FakeDevice Firmware:
  │     New version:       1.2.4
  │     Remote ID:         fwupd-tests
  │     Summary:           Firmware for the ACME Corp Integrated Webcam
  │     License:           GPL-2.0+
  │     Size:              17 bytes
  │     Vendor:            ACME Corp
  │     Flags:             is-upgrade
  │     Description:       Fixes another bug with the flux capacitor to prevent time going backwards.
  │
  └FakeDevice Firmware:
        New version:       1.2.3
        Remote ID:         fwupd-tests
        Summary:           Firmware for the ACME Corp Integrated Webcam
        License:           GPL-2.0+
        Size:              17 bytes
        Vendor:            ACME Corp
        Flags:             is-upgrade
        Description:       Fixes a bug with the flux capacitor to avoid year 2038 overflow.
```
2019-09-20 16:02:55 -05:00
Mario Limonciello
9ec074332f fu-history: Update device_modified in sql database during updates 2019-09-20 16:02:55 -05:00
Richard Hughes
63c1712194 unifying: Use the instance ID to check for supported devices
If we're using an instance ID with FU_DEVICE_INSTANCE_FLAG_ONLY_QUIRKS (e.g.
for the vendor match in the previous commit) then the GUID is not available.
2019-09-20 18:56:31 +01:00
Richard Hughes
d9f52c7573 unifying: Ensure HID++ v2.0 peripheral devices get scanned by the plugin
Since adding fu_plugin_add_rule(FU_PLUGIN_RULE_REQUIRES_QUIRK) all peripheral
devices were being ignored.
2019-09-20 18:56:31 +01:00
Richard Hughes
80eb7bef8b trivial: Add some more defines to the srec parser
This makes it more helpful when subclassing it.
2019-09-20 18:23:49 +01:00
Filipe Laíns
e091427993 trivial: fix wget command in fu-tool.c
-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>
2019-09-20 10:08:56 +01:00
Richard Hughes
6819f9e461 Allow parsing a raw SREC file
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.
2019-09-20 09:59:32 +01:00
Mario Limonciello
f32c3fdbc0 trivial: wacom: Add support for second vendor ID
Wacom indicates that some systems will use this alternative VID.
2019-09-19 17:35:11 +01:00
Mario Limonciello
01a7958cd1 uefi, dell-esrt: Show firmware version when capsule updates unavailable
When the system doesn't support UEFI capsule updates no firmware version
is displayed for the BIOS.  Fix this by creating a dummy device:
```
├─System Firmware:
│     Device ID:           123fd4143619569d8ddb6ea47d1d3911eb5ef07a
│     Current version:     1.7.0
│     Vendor:              Dell Inc.
│     Update Error:        UEFI Capsule updates not available or enabled
│     Flags:               internal|require-ac|registered|needs-reboot
```

If the dell-esrt plugin determines that capsule updates can be enabled
however, make the device it creates replace the dummy device:
```
├─Dell UEFI updates:
│     Device ID:           123fd4143619569d8ddb6ea47d1d3911eb5ef07a
│     Summary:             Enable UEFI Update Functionality
│     Current version:     0
│     Update Error:        Firmware updates disabled; run 'fwupdmgr unlock' to enable
│     Flags:               locked|supported|registered|needs-reboot
```

Fixes: #1366
2019-09-19 15:48:39 +01:00
Richard Hughes
3901fa6bae Add some more debugging to the SREC and IHEX parsers
Additionally, change the reported line to be indexed from 1 (rather than 0) as
most text editors show line 1 as the first line.
2019-09-19 08:54:24 +01:00
Richard Hughes
33cb526248 Print the instance IDs if the GUIDs are unconverted
This caused some head scratching about the 'missing' values when doing
fu_device_to_string() before fu_device_convert_instance_ids() had been called.
2019-09-18 17:07:39 +01:00
Richard Hughes
38245ff194 Add fu_common_bytes_compare_raw() for future usage 2019-09-18 17:05:00 +01:00
Richard Hughes
aeb466de42 Call the set_quirk_kv() vfunc for the superclassed object
Although, we have to use the converted instance IDs rather than the GUIDs as
fu_device_setup() has not typically been called at this point.
2019-09-18 17:04:49 +01:00
Mario Limonciello
78987fb394 uefi: make the TPM optional for runtime again (Fixes: #1362)
It's intentional to use a different error message for library failure
so that we can tell if there is a regression in CI related to TPM usage.
2019-09-17 23:41:41 +01:00
Mario Limonciello
5206592347 trivial: uefi: Make the TCTI output less verbose 2019-09-17 23:41:41 +01:00
Richard Hughes
0ad59cbc03 Support <issues> in AppStream metadata
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.
2019-09-17 13:48:44 +01:00
Richard Hughes
89def5ea51 Include all GUIDs when uploading a report
The LVFS already knows how to deal with arrays of strings, so this is a forwards
and backwards compatible change.

Fixes https://github.com/fwupd/fwupd/issues/1363
2019-09-17 13:46:15 +01:00
Richard Hughes
8b98b1cbd9 Do not crash when starting tpm2-abrmd
The value G_LOG_LEVEL_MASK includes debugging, which tpm2-abrmd is certainly
allowed to use.

Fixes https://github.com/fwupd/fwupd/issues/1353
2019-09-16 16:57:55 +01:00
worldofpeace
180111c495 trivial: Update DBus conf path for example Fedora package 2019-09-16 16:37:06 +01:00
worldofpeace
41a25be6f4 Move D-Bus conf file to datadir/dbus-1/system.d
Since D-Bus 1.9.18 configuration files installed by third-party should
go in share/dbus-1/system.d. The old location is for sysadmin overrides.
2019-09-16 16:37:06 +01:00
Richard Hughes
ca8868e9fe trivial: Add fu_io_channel_write_byte_array() for future use 2019-09-16 11:36:59 +01:00
Richard Hughes
ff1d7efb9e trivial: post release version bump 2019-09-13 11:00:01 +01:00
Richard Hughes
67ad8d0d22 Release fwupd 1.3.1 2019-09-13 10:58:38 +01:00
Richard Hughes
fbff921b35 Allow disabling all plugins
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.
2019-09-13 10:27:57 +01:00
Richard Hughes
6f82b989e8 trivial: Specify the tpm2-tss-devel version in the example spec file
Lower versions than this fail to link the uefi self test binary.
2019-09-12 18:05:20 +01:00
Richard Hughes
03ce21c61f Move to CI Fedora 30
Fedora 29 is EOL in just a few weeks.
2019-09-12 18:05:20 +01:00
Richard Hughes
fa0c41fb36 modem-manager: Fix two build warnings on Fedora 30 2019-09-12 18:05:20 +01:00
Richard Hughes
1c257b7779 synapticsmst: Add another name quirk for the ThinkPad USB-C Dock 2019-09-12 09:44:38 +01:00
Richard Hughes
71db86f466 Re-introduce GUID support to fwupdmgr and fwupdtool
This reverts commit dca4d6a5d6.

I've had two vendors ask me why the GUIDs have disappeared from the device.
2019-09-11 13:00:16 +01:00
Richard Hughes
04cb360847 uefi-recovery: Add a plugin to add a fake ESRT entry for device recovery
The factory-shipped MinnowBoardMAX board has firmware that does not include
the ESRT table. Create a 'fake' UEFI device with the lowest possible version
so that it can be updated to any version firmware.

All the HwId GUIDs are used for the fake UEFI device, and so should be used in
the firmware metadata for releases that should recover the system.
2019-09-11 12:47:31 +01:00
Richard Hughes
1984180592 Add a DMI quirk for the Minnowboard Turbot
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
2019-09-10 20:39:45 +01:00
Richard Hughes
83e2ca2129 trivial: Make it easy to disable or enable libflashrom for distros 2019-09-10 14:17:34 +01:00
Richard Hughes
f5e68d4e89 trivial: Don't use Recommends for RHEL 7 2019-09-10 14:17:34 +01:00
Filipe Laíns
718905f7f0 unifying: fix timeout metadata
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2019-09-07 15:25:29 -05:00
Filipe Laíns
ccda6790f5 ci: arch: minor improvements
- Moved version discovery routine to PKGBUILD
- Set PKGEXT to .pkg.tar to avoid the package being compressed
- Added --needed to pacman arguments when installing the dependencies to
avoid reinstalling packages

Signed-off-by: Filipe Laíns <lains@archlinux.org>
2019-09-06 16:37:38 +02:00
Filipe Laíns
a39951b289 unifying: fix timeout
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2019-09-06 13:44:10 +01:00
Richard Hughes
0e46b22728 Allow disabling SSL strict mode for broken corporate proxies 2019-09-05 19:14:38 +01:00
Richard Hughes
c4ee883ea4 trivial: Allow ignoring the daemon version check by using --force 2019-09-05 18:13:05 +01:00
Mario Limonciello
20cc9eebc5 Try to only show DMI product name once
* libfwupd: export new property HostProduct
* clients: Use this property for setting the title of trees

Before:
```
○
├─XPS 13 7390 TPM 2.0:
│     Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
│     Summary:             Platform TPM device
│     Current version:     7.2.1.0
│     Vendor:              Dell Inc.
│     Update Error:        Updating disabled due to TPM ownership
│     Flags:               internal|require-ac|registered
└─XPS 13 7390 System Firmware:
      Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
      Current version:     0.1.1.1
      Minimum Version:     0.1.1.1
      Vendor:              Dell Inc.
      Flags:               internal|updatable|require-ac|registered|needs-reboot

```

After:
```
XPS 13 7390
│
├─TPM 2.0:
│     Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
│     Summary:             Platform TPM device
│     Current version:     7.2.1.0
│     Vendor:              Dell Inc.
│     Update Error:        Updating disabled due to TPM ownership
│     Flags:               internal|require-ac|registered
└─System Firmware:
      Device ID:           b6c08fb9e5384d9d101853cc1ca20cf0ce2df2e2
      Current version:     0.1.1.1
      Minimum Version:     0.1.1.1
      Vendor:              Dell Inc.
      Flags:               internal|updatable|require-ac|registered|needs-reboot
```
2019-09-05 11:22:39 -05:00
Mario Limonciello
3996af38c8 trivial: fu-util-common: Show unknown devices as interesting devices
This restore `fwupdmgr get-details` working with nothing plugged in.
2019-09-05 11:22:39 -05:00
Mario Limonciello
2275379196 dell: Use TSS to query and build TPM vendor strings for GUIDs
These are a more scalable way to apply firmware across a variety of
platforms.

An example:
```
XPS 13 7390 TPM 2.0
  DeviceId:             c56e9f77cfee65151bdef90310776f9d62827f5a
  Guid:                 a4352c96-f8d7-526c-8485-7f84085f348e <- 0962-2.0
  Guid:                 7d65b10b-bb24-552d-ade5-590b3b278188 <- DELL-TPM-2.0-NTC-NPCT
  Guid:                 6f5ddd3a-8339-5b2a-b9a6-cf3b92f6c86d <- DELL-TPM-2.0-NTC-NPCT75x
  Guid:                 fe462d4a-e48f-5069-9172-47330fc5e838 <- DELL-TPM-2.0-NTC-NPCT75xrls
  Summary:              Platform TPM device
  Plugin:               uefi
  Flags:                internal|require-ac|registered
  Vendor:               Dell Inc.
  Version:              7.2.1.0
  VersionFormat:        quad
  Icon:                 computer
  Created:              2019-09-04
```

When this system is queried using tpm2-tools:
```
$ sudo tpm2_getcap -c properties-fixed
TPM_PT_FAMILY_INDICATOR:
  as UINT32:                0x08322e3000
  as string:                "2.0"
TPM_PT_LEVEL:               0
TPM_PT_REVISION:            1.38
TPM_PT_DAY_OF_YEAR:         0x00000008
TPM_PT_YEAR:                0x000007e2
TPM_PT_MANUFACTURER:        0x4e544300
TPM_PT_VENDOR_STRING_1:
  as UINT32:                0x4e504354
  as string:                "NPCT"
TPM_PT_VENDOR_STRING_2:
  as UINT32:                0x37357800
  as string:                "75x"
TPM_PT_VENDOR_STRING_3:
  as UINT32:                0x02010024
  as string:                ""
TPM_PT_VENDOR_STRING_4:
  as UINT32:                0x726c7300
  as string:                "rls"
```
2019-09-05 00:23:23 -05:00
Mario Limonciello
43742bcd3b trivial: dell: show reasons for lack of updates in UpdateError
```
└─XPS 13 7390 TPM 2.0:
      Device ID:           c56e9f77cfee65151bdef90310776f9d62827f5a
      Summary:             Platform TPM device
      Current version:     7.2.1.0
      Vendor:              Dell Inc.
      Update Error:        Updating disabled due to TPM owernship
      Flags:               internal|require-ac|registered
```
2019-09-05 00:23:23 -05:00
Mario Limonciello
26563d750f fu-util-common: strip all trailing whitespace in XML description
Before:
```
└─Thunderbolt controller in Dell dock:
  │   Device ID:           42b9e069d0b5515065cf4a32cec39552861439c9
  │   Description:         Updating the dock improves performance.
  │
  │   Flags:               updatable|require-ac|registered
  │
  └─Thunderbolt controller Update:
        Version:           43.00
        Summary:           Update for the Thunderbolt controller within a Dell dock
        License:           proprietary
        Size:              409.6 kB
        Vendor:            Dell Inc.
        Flags:             trusted-payload
```

After:
```
└─Thunderbolt controller in Dell dock:
  │   Device ID:           42b9e069d0b5515065cf4a32cec39552861439c9
  │   Description:         Updating the dock improves performance.
  │   Flags:               updatable|require-ac|registered
  │
  └─Thunderbolt controller Update:
        Version:           43.00
        Summary:           Update for the Thunderbolt controller within a Dell dock
        License:           proprietary
        Size:              409.6 kB
        Vendor:            Dell Inc.
        Flags:             trusted-payload

```
2019-09-05 00:09:40 -05:00
Mario Limonciello
ef3c766e1f trivial: fu-common: match all whitespace not just ' ' in fu_common_strstrip 2019-09-05 00:09:40 -05:00
Mario Limonciello
8e14544d37 fu-util: show release output in get-details again
This was lost in the move to tree output
```
$ fwupdmgr get-details tpm.cab
Decompressing…           [***************************************]
○
└─XPS 13 9380 TPM 2.0:
  │   Device ID:           1a433daa3acb71e6befadcf2b1a783c1549663b1
  │   Description:         Updating the system firmware improves performance.
  │
  │   Flags:               internal|updatable|require-ac|registered|needs-reboot
  │
  └─TPM 2.0 Update:
        Version:           7.2.0.2
        Summary:           Firmware for the Dell TPM 2.0
        License:           proprietary
        Size:              1.1 MB
        Vendor:            Dell Inc.
        Flags:             none
```
2019-09-05 00:09:40 -05:00
Filipe Laíns
21b591f996 unifying: use fu_firmware_strparse_uint16 to read be 16bit values
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2019-08-29 20:01:58 +01:00