Commit Graph

686 Commits

Author SHA1 Message Date
Richard Hughes
48c707485e trivial: Add the closure user_data to the introspection 2023-02-23 13:04:12 -06:00
Richard Hughes
6e9d01eeac trivial: Ensure the progressbar gets to exactly 100% when downloading 2023-02-23 13:04:12 -06:00
Richard Hughes
c96391ed8d Use a predefined message when emulating
This allow us to guide the user through emulation in gnome-firmware.
2023-02-23 13:04:12 -06:00
Richard Hughes
ab2dffac5f Allow downloading files in fwupdtool
The useragent was being set as 'fwupdtool/1.8.11 fwupd/(NULL)' which the LVFS
did not like. As we're using fwupdtool without a daemon proxy just set the
fwupd version manually.

Fixes https://github.com/fwupd/fwupd/issues/5519
2023-02-23 13:04:12 -06:00
Richard Hughes
574b4c1979 Show the 4XX download failure in the error output 2023-02-23 13:04:12 -06:00
Richard Hughes
d011a7d6ba Set the device percentage and status for the duration
Fixes part of https://github.com/fwupd/fwupd/issues/5522
2023-02-23 13:04:12 -06:00
Richard Hughes
a5a98b00bd trivial: Fix the gtk-doc header to reflect reality 2023-02-23 13:04:12 -06:00
Richard Hughes
648e0c6858 trivial: Fix warning: declared with a const-qualified typedef 2023-02-23 13:04:12 -06:00
Richard Hughes
65b158a7cc trivial: Fix warning: repeated branch in conditional chain 2023-02-23 13:04:11 -06:00
Richard Hughes
a5dd069b43 trivial: Include the correct headers to make clang-tidy happy 2023-02-23 13:04:11 -06:00
Richard Hughes
34bd4d6766 trivial: Remove the unused deprecated header files 2023-02-23 13:04:11 -06:00
Richard Hughes
b59c82e1bd Add support for emulating and recording devices
Based on patches from Frédéric Danis <frederic.danis@collabora.com>
2023-02-23 13:04:11 -06:00
Valentin David
37a28e5e1d 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-23 13:04:11 -06:00
Richard Hughes
2fa46d3823 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-23 13:04:11 -06:00
Richard Hughes
601fc544d2 trivial: Update all fixes using markdownlint 2023-02-23 13:04:11 -06:00
Richard Hughes
5da8e1c760 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-02-23 13:04:10 -06:00
Richard Hughes
85c26e17c0 trivial: Fix tests to include 'emulated' 2023-02-23 13:04:10 -06:00
Richard Hughes
7d5f0e3e3f trivial: Add a device flag specifying it is emulated 2023-02-23 13:04:10 -06:00
Richard Hughes
ed74c87782 trivial: Force enums to be uint64, harder 2023-02-23 13:04:10 -06:00
Richard Hughes
e7b08d1626 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-02-23 13:04:10 -06:00
Richard Hughes
3457715749 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-02-23 13:04:10 -06: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