Commit Graph

64 Commits

Author SHA1 Message Date
Mario Limonciello
c8bae2a68c Introduce a new VersionFormat for hex
When CPU microcode is distributed it typically is versioned in
hexadecimal in all tools.  Converting it to any of the existing version
formats provides an unexpected result that requires converting back to
hexadecimal.
2020-03-06 08:12:58 -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
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
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
9dce1f7011 Detect kernel lockdown status
Disable superio when kernel lockdown in effect.
2020-02-04 10:08:25 -06:00
Richard Hughes
f1a7122250 Add a dell-bios version format
Dell does not include the first byte in the ESRT value, ignoring it. Using a
`quad` means we get versions like `0.1.4.0` rather than `1.4.0` which confuses
both users comparing versions to the vendor website, and also anyone trying to
do analysis on the firmware.
2019-12-04 16:22:46 +00:00
Richard Hughes
1fbcb1a180 Do not do semver conversion in fu_common_vercmp()
We don't know the version format, and so it's impossible to do it reliably --
just do it in the caller where we *do* know the FuDevice version format.
2019-12-04 15:45:30 +00:00
Richard Hughes
df8833e875 trivial: Deprecate fu_common_version_parse()
This hardcodes the version format of 'triplet' which isn't always correct for
obvious reasons.
2019-12-04 15:45:30 +00:00
Richard Hughes
d865d2473e trivial: Add fu_common_version_from_uint64() 2019-12-04 14:50:41 +00:00
Richard Hughes
45a00738d8 Allow building on Windows with MinGW
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.

With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
2019-12-03 16:33:43 +00:00
Mario Limonciello
5beceda89b trivial: Move progressbar out of libfwupdplugin
The intention with f0f504c740 was to
not offer this in the plugin, but when rebasing 6b0e66354b
this was forgotten to be removed.
2019-11-27 08:18:02 -06:00
Richard Hughes
3ed2ac8315 trivial: Unexport fu_test_get_filename()
We don't actually need either of the things it provides (looking up in source
and built, and converting to an absolute path) so just replace it with
g_build_filename() instead.

This also has the advantage that it does the right thing on Windows.
2019-11-27 12:45:35 +00:00
Richard Hughes
f3d5207351 trivial: Unexport fu_test_loop_run_with_timeout() 2019-11-27 12:45:35 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00