Commit Graph

674 Commits

Author SHA1 Message Date
Valentin David
70eed3cb9b snap: read the host os-release instead of base snap
This should fix #5485. Depends on https://github.com/snapcore/snapd/pull/12545
2023-02-08 04:21:18 +00:00
Richard Hughes
4257d5f451 Add support for Quit() in fwupdmgr
This allows us to only shut down the P2P daemon in the installed tests.
The easy fix would have been to use something like:

    gdbus call --address unix:path=/run/fwupd.sock --object-path / --method org.freedesktop.fwupd.Quit'

...but the daemon does not implement an ObjectManager, which gdbus requires.

This worked correctly for so long because the p2p tests were being run after
the bus tests, so shutting down the system daemon had no effect.

Fedora 37 seems to have flipped the order for some reason -- and now it
*sometimes* matters that we were doing the worng thing...
2023-02-07 11:00:53 +00:00
Richard Hughes
d6bb00a475 trivial: Update all fixes using markdownlint 2023-01-30 14:19:59 +00:00
Richard Hughes
110ef12cc7 Add a device problem for 'update-in-progress'
We already had this as an inhibit, but this was not translated client-side.

We also need to propagate the problem to the bootloader device if the device
replugs during firmware update.
2023-01-26 09:01:26 +00:00
Richard Hughes
ddd5140832 trivial: Fix tests to include 'emulated' 2023-01-24 15:41:01 +00:00
Richard Hughes
296fe5fb46 trivial: Add a device flag specifying it is emulated 2023-01-24 09:51:04 +00:00
Richard Hughes
bda113829a trivial: Force enums to be uint64, harder 2023-01-23 17:11:23 +00:00
Richard Hughes
53597cf045 Save all the FwupdDeviceFlags in the pending database
Force the compiler to treat them as uint64_t so that bitwise operations work.
At the moment flags greater than 1<<32 are just being silently ignored...
2023-01-23 16:40:22 +00:00
Richard Hughes
a6deceda32 Allow desktop software to inhibit the system to prevent all updates
On edge hardware a process may want to disable firmware updates as it might be
a bad time to allow an upgrade.
2023-01-23 13:14:23 +00:00
Josh Soref
67deecde31
Lots of spelling fixes
Fixes:

* activate
* active
* additional
* and
* approaches
* attestation
* bootloader
* calculate
* capability
* children
* close
* compatible
* continuous
* convenience
* critical
* data
* delivery
* disabled
* disambiguate
* documented
* elapse
* emergency
* erasable
* expectations
* filesystem
* from
* haptic
* ignorable
* images
* infinity
* information
* information
* inhibited
* insufficient
* interrupt
* into
* limited
* management
* manifest
* maximum
* memory
* metadata
* mismatch
* model
* nonexistent
* not
* objects
* offset
* omissions
* ota
* past
* perform
* peripherals
* predictable
* product
* quarterly
* quirk
* quirks
* recognize
* release
* requests
* revocation
* sanitized
* sector
* status
* the
* the update
* timeout
* transfer
* transfers
* typically
* unspecified
* upgrade
* which
* will
* wireless
2022-12-29 13:57:31 +00:00
Richard Hughes
d4bfb0e53c Add a request ID for re-inserting the USB cable 2022-12-20 12:33:47 +00:00
Richard Hughes
63f4038328 Fix some trivial null-correctness spotted by Tartan 2022-12-15 17:27:22 +00:00
Richard Hughes
b9837e4140 trivial: Actually make the self test match the comment 2022-12-15 17:27:22 +00:00
Richard Hughes
1024d97d61 Release fwupd 1.8.8 2022-12-07 18:39:56 +00:00
Richard Hughes
60e83e1918 Load report data from /etc/lsb-release 2022-12-07 11:48:18 +00:00
Richard Hughes
ba14cff478 trivial: Fix a gtk-doc introspection warning 2022-12-06 14:43:33 +00:00
Richard Hughes
324c1b8593 trivial: Fix fuzzers 2022-12-01 14:29:04 +00:00
Richard Hughes
3a8824d4e7 Add FwupdReport to expose the signed reports from QA teams
Some front end clients are going to be allow-listing updates based on what
the release was tested on, or by who the testing team was.

Export this data from each report when requested.
2022-11-29 16:55:55 +00:00
Richard Hughes
40d02f3ae1 Add fwupd_release_incorporate() for future usage 2022-11-29 09:01:58 +00:00
Mario Limonciello
5d25661727 Add security attribute for OEM specific implementations of BIOS rollback protection 2022-11-18 14:28:13 +00:00
Richard Hughes
44f816e1c6 trivial: Fix invalid self test loop
Spotted by Coverity.
2022-11-03 23:51:00 -05:00
Richard Hughes
1e7d741601 Check system integrity when installing UEFI updates
Recently we had an update that changed the system-defined Platform Key, and
we've certainly had updates in the past that changed the Boot#### variables.

Store some core ACPI and UEFI system integrity state from before and after the
update which can be used to mark (waivable) test failures on the LVFS.
2022-11-03 15:51:10 +00:00
Richard Hughes
c837491344 trivial: Store .xz files with the correct filename 2022-10-21 14:53:17 +01:00
Richard Hughes
0f8ec55f46 Add a new plugin to get more Intel ME MCA data
This allows us to get the OEM Public Key BootGuard hashes.

Also add a new HSI test for leaked bootguard keys.
2022-10-13 18:34:00 +01:00
Richard Hughes
48557a428e Add fwupd_device_has_checksum() for future usage 2022-10-12 13:02:44 +01:00
Kai Michaelis
6054d09f35
redfish: Implement updates for Supermicro machines 2022-10-06 12:49:49 +01:00
Richard Hughes
1c3c5d9892 Allow optionally translating request messages
Also add two more request IDs to make these specific enough to be useful.
2022-10-03 20:54:24 +01:00
Richard Hughes
bd5f13f938 Add FwupdRequestFlags for future usage 2022-10-03 18:04:15 +01:00
Richard Hughes
99e9e5d523 Allow compiling plugin as built-in GObjects
Allow plugins to be built into libfwupdpluginbuiltin.so and created via GType.
2022-09-28 12:52:00 +01:00
Richard Hughes
c4b7f42e43 Only compress one version of the builtin-quirks
Saving the quirks in the GResource section worked well, but it made the build
system very complicated and also meant the .data section was duplicated in
both `fwupd` and `fwupdtool` -- negating a lot of the hard-fought savings.

Simplify this feature so that we just `cat` all the quirk files together, then
gzip them into a single file. This means that at startup fwupd only needs to
check the mtime of one file, and weirdly it's actually faster to load a smaller
compressed file from disk that it is to load multiple uncompressed files.
2022-09-27 12:44:04 +01:00
Richard Hughes
3195a57485 trivial: Always use g_assert_no_error() first
It's way more helpful to print the GError message than just an boolean failure.
2022-09-27 12:10:07 +01:00
Richard Hughes
0415db6f67 Revert "trivial: Use files() rather than current_source_dir()"
This reverts commit b581fa5670 as it breaks
`ninja dist` with `-Dgresource_quirks=enabled`.
2022-09-25 10:31:14 +01:00
Richard Hughes
b581fa5670 trivial: Use files() rather than current_source_dir() 2022-09-24 09:12:14 -05:00
Mario Limonciello
7be0c033a9 trivial: skip self tests for fwupd_client_remotes_func if G_DBUS_ERROR_NAME_HAS_NO_OWNER
Fixes: #5073
2022-09-23 07:52:39 -05:00
Richard Hughes
c73a55faa1 Remove a potential foot-gun when saving config values
If a specific plugin calls fu_plugin_set_secure_config_value() and then
fu_plugin_set_config_value() then we'll save the file with the world-readable
permissions.

Set a plugin flag to say that 'this plugin is storing sensitive details' which
allows us to use the same entrypoint and also fix up any files at startup that
do not have the correct permissions.
2022-09-22 14:47:12 +01:00
Richard Hughes
6bb1b1c81f trivial: Fix a BIOS setting self test value
PVS: The 'ret' variable is assigned but is not used by the end of the function.
2022-09-09 19:23:29 +01:00
Richard Hughes
08a9f02912 Use the correct JSON type for fwupd_bios_setting_from_json()
PVS: Converting type 'gint64' to type 'gboolean' can lead to a loss of high-order bits.
2022-09-09 19:23:29 +01:00
Richard Hughes
b3ead97f46 trivial: Fix a -Wdeprecated-declarations issue
G_APPLICATION_FLAGS_NONE was deprecated, but we don't actually need the single
instance functionality, so just use a non-deprecated flag instead.

This fixes Debian CI.
2022-09-06 18:06:55 +01:00
Mario Limonciello
25789ef2e7 trivial: fwupd-client: prefix some windows error messages 2022-08-30 12:06:16 -05:00
Richard Hughes
c4bdc3ae30 trivial: Fix one -Wunused-variable warning 2022-08-25 11:55:03 +01:00
Richard Hughes
6710f360ec trivial: Fix search-replace typo 2022-08-25 10:09:58 +01:00
Richard Hughes
f970b3de23 Do not show HSI events where we changed the spec result value 2022-08-24 13:49:19 +01:00
Mario Limonciello
9549970285 trivial: bios-settings: shuffle the json output order
We want the name and description to be the first few keys
2022-08-24 07:20:01 -05:00
Mario Limonciello
b7b0ce533d trivial: Unify ambiguity between bios-attrs and bios-settings
These are currently used interchangeably since there was indecisiveness
which to use as the feature was being developed.

As outward facing it will be named with "settings", change all uses
in the code to match this.
2022-08-24 07:20:01 -05:00
Richard Hughes
8b63023aaf Only show *changed* events in the fwupdmgr security output
We do not want to show added or removed HSI tests in this UI.
2022-08-24 13:19:17 +01:00
Mario Limonciello
826983b8a7 Add support to set BIOS settings using a JSON payload
The JSON payload is ideally generated from `fwupdmgr get-bios-settings --json`
with all attributes expected to be included as additional arguments.
2022-08-24 09:51:46 +01:00
Mario Limonciello
2536bf462c Allow running get-bios-settings without root or PK
The only information that is secret is the `current_value`.
Augment the d-bus call to determine whether the caller needs this
information.

* If `fwupdmgr` is launched as root it will be provided.
* If `fwupdmgr` is launched with `--authenticate` it will be requested
  and PK will be engaged.
2022-08-11 09:52:26 -05:00
Mario Limonciello
fa661c595d trivial: map common positive or negative keys to possible enumeration values
Dell and Lenovo use Enable or Enabled and Disable or Disabled which is confusing
to an end user.

Set up some heuristics to map positive values and negative values when passed
into the client.
2022-08-10 10:37:27 -05:00
Mario Limonciello
23b7495cbd trivial: add missing read_only BIOS attribute to GVariant
This fixes read_only attributes being advertised to clients as writable.
2022-08-05 14:08:55 -05:00
Richard Hughes
0beed2f138 Store the current BIOS value in a security attribute
We can't very-well ask the user to 'change it back' if we do not tell
them what it is set to already.
2022-08-01 15:45:43 +01:00