Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
a32034b844 Drop UEFI quirks we now inherit from metadata
Fixes https://github.com/fwupd/fwupd/issues/1843
2020-03-06 12:10:15 +00:00
Mario Limonciello
16eea10554 ci: build Debian using libflashrom
The package is now in unstable in the 1.2-4 package.
2020-03-05 17:07:28 -06:00
Crag Wang
ae422989f3 trivial: case insensitive while explorering cabinet files
The cabinet file's extension name disregards uppercase or lowercase
2020-03-05 11:59:51 -06:00
Mario Limonciello
2a0c066a2f trivial: remove unused variables 2020-03-05 09:40:05 -06:00
Mario Limonciello
b87d48a042 When TPM PCR0 measurements fail, query if secure boot is available and enabled
If the measurements are missing but it's a UEFI system, it's a good indication
that the user has secure boot turned off.
Notify the user on the UEFI device through a non-fatal `UpdateMessage`

To accomplish this, move fu-uefi-vars into the plugin library for other plugins to use
2020-03-05 07:54:15 -06:00
Mario Limonciello
be1a555737 trivial: uefi: set vendor ID on dummy device 2020-03-05 07:54:15 -06:00
Dennis Kadioglu
d9597df863 fix fwupd.shutdown.in according to the movement of fwupdtool to bindir 2020-03-05 07:09:25 -06:00
Tilmann Meyer
9f137339e9 ata: Add OUI quirk for Western Digital and Intel 2020-03-04 19:29:36 +00:00
Mario Limonciello
663ac20909 trivial: update libfwupdplugin map for symbol backported to 1_3_X 2020-03-04 10:58:10 -06:00
Mario Limonciello
428ed8a0b2 trivial: Fix bash completion
`get-devices` and `get-remotes` output changed in the past.
It would be ideal to use `jq` instead, but it's not available by
default in most distros.
2020-03-04 08:03:19 -06:00
Richard Hughes
e675a33f93 trivial: A new enough flashrom is available for Fedora now 2020-03-04 08:50:24 +00:00
exploide
dfd7870697 improved fish shell completion 2020-03-03 13:01:50 -06:00
Richard Hughes
6dd54fa9c4 vli: Set the MSP430 version format to pair
Apparently the Windows tool ignores the first byte, so we should too.
2020-03-03 14:19:42 +00:00
Richard Hughes
a885926aa2 Always return AppStream markup for remote agreements
At the moment we're returning plain text for the embargo remotes and AppStream
markup for LVFS remotes. This fixes the warning on the console:

    $ fwupdmgr enable-remote lenovo_thinkpad-embargo
    failed to compile foo: Document must begin with an element (e.g. <book>)
2020-03-02 18:31:58 +00:00
Mario Limonciello
29e085f441 trivial: send users to a wiki page for TPM PCR0 construction errors 2020-03-02 11:53:18 -06:00
Richard Hughes
9e54fc595a ata: Add trivial OUI quirk for Micron 2020-03-02 13:58:38 +00:00
exploide
c33fbb5002 added completion script for fish shell 2020-02-29 16:31:50 +00:00
Daniel Campello
b5ae60cc8b Do not fail loading in /etc/machine-id is not available
In Chrome OS /etc/machine-id is not available on the sandbox
environment. Chrome OS specifically rotate it constantly and is
considered PII.

Change-Id: Ia4113affa68c5973b36d196a35278a3f6cee2898
Signed-off-by: Daniel Campello <campello@chromium.org>
2020-02-28 10:54:01 -06:00
Mario Limonciello
96117d19df trivial: 1.3.9->1.4.0
We decided to branch at 1.3.8 and backport fix only things for 1_3_X.
So bump all the new stuff to 1.4.0 (which will be next release)
2020-02-28 10:17:56 -06:00
Daniel Campello
227cefb74f Use xb_builder_source_add_simple_adapter
Use xb_builder_source_add_simple_adapter instead
xb_builder_source_add_adapter to avoid sniffing MIME type for output xml
contents

Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: I123c37339720b5844351f85a5aeb9cec4928785c
2020-02-27 19:01:28 +00:00
Richard Hughes
c6eb416fd5 Create FuCabinet and untangle a lot of legacy code
Replace fu_common_cab_build_silo() with an actual GObject that can hold parsing
state. This cleans up the code a lot, and means we can add additional
functionality in the future without breaking ABI or API.

The long term plan is to verify the metadata and payload signatures when
parsing FuCabinet, rather than much later in _check_requirements().
This of course requires passing in a keyring context (which we don't yet have)
and would mean we can stop setting the various confusing 'fwupd::ReleaseBlob'
XbNode extra data.

No logic changes for now, just a lot of moving things into sane places.
2020-02-27 18:06:26 +00:00
Richard Hughes
1beec89c57 nvme: Do not try to handle integer version numbers
We've never come across a drive that uses anything other than plain.
2020-02-27 13:26:00 +00:00
Richard Hughes
b097603800 Allow server metadata to set the version format on some devices
It appears just choosing 'if Dell then QUAD else TRIPLET' isn't good enough.
2020-02-26 15:45:40 +00:00
Mario Limonciello
984e29ca33 fu-tool: Correctly append the release to devices in get-details
Previously the device would helpfully show nothing about the CAB
when you ran `get-details` using `fwupdtool`.
2020-02-26 08:47:43 -06:00
Mario Limonciello
dc0608dea4 For the get-details command make sure to always show devices
This was likely an existing bug; but if running `get-details` on a CAB
for a device not in your system it would be filtered by default device
filters.
2020-02-26 08:47:43 -06:00
Mario Limonciello
8bcdfaa7e7 fu-engine: Copy the version and format from donor device in get-details 2020-02-26 08:47:43 -06:00
Mario Limonciello
f675c21827 fu-engine: Use unknown for version format by default on get-details 2020-02-26 08:47:43 -06:00
Richard Hughes
cfde249435 Inihbit all power management actions using logind when updating
Fixes https://github.com/fwupd/fwupd/issues/1814
2020-02-25 14:31:46 +00:00
Richard Hughes
f50ff2c27e Decouple the version format from the version itself
If we say that the version format should be the same for the `version_lowest`
and the `version_bootloader` then it does not always make sense to set it at
the same time.

Moving the `version_format` to a standalone first-class property also means it
can be typically be set in the custom device `_init()` function, which means we
don't need to worry about *changing* ther version format as set by the USB and
UDev superclass helpers.
2020-02-25 14:00:09 +00:00
Mario Limonciello
c1776c9ad4 Add raw versions for bootloader and lowest
The assumption is that same version format is used for all 3 of these
versions.
2020-02-25 12:20:51 +00:00
Richard Hughes
4a32296f6a trivial: Fix the version generator to correctly compare versions 2020-02-24 18:49:22 +00:00
Mario Limonciello
1afe177696 trivial: add an OUI quirk for a seagate disk 2020-02-24 17:16:20 +00:00
Richard Hughes
f43381f4a7 Allow server metadata to set the device name on some devices
This does 'bleed' the metadata contents into areas previously covered by quirks,
but in this case may be pragmatic and more up to date than a build-time
generated quirk file, which increases the user-friendliness of fwupdmgr.
2020-02-24 14:15:34 +00:00
Richard Hughes
8d919b3acb Remove support for GCab less than v1.0
We can fall back to the subproject version if required for CI targets.
2020-02-24 12:33:44 +00:00
Mario Limonciello
99eb3f06b6 fu-device-list: Check protocol before de-duping devices
Some Dell devices offer the exact same GUID in UEFI as well as in NVME
plugins.  These devices can be flashed in either way, but the payload
for them is different.

The UEFI payload includes relevant headers and metadata to be acceptable
from a capsule.  The NVME payload is raw data that the drive will process.

Since baa9e75ca8, fwupd should enforce that
the correct device is flashed with the correct protocol.
2020-02-21 14:39:06 -06:00
Mario Limonciello
93d6131d0e trivial: debian: fix build for systems without UEFI
Just dynamically find the binaries in usr/bin rather than hardcoding
2020-02-21 10:39:55 -06:00
Richard Hughes
9113f3edd1 trivial: Add a OUI quirk for Intel 2020-02-21 12:07:47 +00:00
Richard Hughes
dac0bc5fb7 trivial: Ensure the OUI quirk required prompt starts on a new line 2020-02-21 12:06:32 +00:00
Richard Hughes
5337a43802 trivial: Fix the comparison function in fu_plugin_get_config_value_boolean() 2020-02-21 12:04:32 +00:00
Richard Hughes
dbdafa303e trivial: Fix Fedora non-x86_64 build 2020-02-21 10:14:15 +00:00
Richard Hughes
a1f95352f5 trivial: Downgrade a warning to a debug
This cleans up the output when running fwupdtool with --plugin-whitelist...
2020-02-21 08:14:54 +00:00
Mario Limonciello
dc9a1a8512 trivial: fwupdtool: fix tree title
The title isn't initialized until the engine is started, so don't
try to read it too early.
2020-02-20 14:31:14 -06:00
Richard Hughes
d8ea8da902 Do not allow devices that have no vendor ID to be UPDATABLE 2020-02-20 16:02:44 +00:00
Richard Hughes
dbcc8e1137 ata: Include a vendor ID for ATA hardware
Some vendors want to ship updates for ATA hardware, but there are currently no
lock-down restrictions in place for these kind of devices.

There is the OUI from the WWN block which is supposed to identify the vendor,
but this is not always set and so we have to be a little creative. We can match
90% of hardware using the vendor name prefix, and the last 10% can be detected
with a heuristic that was the result of comparing over 900 drive models.

I'm not including very old drive models, media converters, raid controllers,
or external 'portable' drives as I don't think it is useful. Also, if the drive
contains a Dell vendor block just hardcode this as Dell rather than trying to
be clever.

Also ask the user to contribute OUI values if this data is found with no quirk
data as this is the only real sane way to manage this data long term.
The list of OUIs can be found here: http://standards-oui.ieee.org/oui.txt
2020-02-20 16:02:44 +00:00
Richard Hughes
52bbae8209 ata: Switch off the verbose logging by default 2020-02-20 16:02:44 +00:00
Richard Hughes
9a68084dbc Always check for PLAIN when doing vercmp() operations
In 1de7cc we checked the version format when checking for update, but there are
many other places that are doing verfmt-insensitive comparisons. For instance,
the predicates in <requires> all fail if the device version format is plain.
his breaks updating some NVMe drives where the `ne` requirements are not
semantic versions.

To avoid trying to catch all the bugs in different places, and in case we have
a future verfmt that should be treated another way, refactor this out in to a
common function and deprecate the old function.
2020-02-20 15:49:27 +00:00
Mario Limonciello
27164b70b6 Discard the reason upgrades aren't available (Fixes: #1678)
Also fixes: #1792
2020-02-20 09:40:52 -06:00
Mario Limonciello
9ee0e63e53 trivial: add some better descriptions for man pages
Since more utilities are now in `bindir`, they should be more descriptive.
2020-02-20 09:34:10 -06:00
Mario Limonciello
b2dc3d481f Improve the description of fwupdtpmevlog for man page 2020-02-20 09:02:11 -06:00
Mario Limonciello
9fa7b38ac1 Move fwupdtpmevlog into bindir 2020-02-20 09:02:11 -06:00