Commit Graph

8138 Commits

Author SHA1 Message Date
Richard Hughes
6af68ff17e trivial: Load the builtin plugins when parsing firmware using fwupdtool 2022-09-29 12:48:28 +01:00
Richard Hughes
1bd8b5d211 trivial: Speed up the build by about 9%
Only build libfwupdplugin source files once; we were only using one
non-exported symbol and so move that to the exported map so we can just link
the library in the self tests.
2022-09-29 12:42:50 +01:00
Richard Hughes
75e3c4e8ac trivial: Use the existing plugin objects in dbxtool 2022-09-29 12:32:53 +01:00
Richard Hughes
9648eac936 trivial: Use the existing plugin objects in fwupdtpmevlog 2022-09-29 12:32:53 +01:00
Richard Hughes
b85f36ceb3 trivial: Use the existing plugin objects in fwupdate 2022-09-29 12:32:53 +01:00
Richard Hughes
a8e56396d5 Prevent a partial fuzzing DoS when loading corrupt SREC files
The SREC parser attempts to fill 1Mb of data when parsing corrupt data sections
-- which in the static fuzz targets takes a long time. Correctly check that the
data exists to mitigate.

Fixes https://oss-fuzz.com/testcase-detail/6102934106013696
2022-09-29 12:32:35 +01:00
Richard Hughes
66bf03e8eb trivial: Run the fuzzers for less time during PRs 2022-09-29 12:32:35 +01:00
Haowei Lo
653b1b67e5 dfu: Ignore FPC fingerprint readers 2022-09-28 21:46:22 +01:00
Richard Hughes
c8e0f2c475 dfu: Use more standard string parsing for DfuForceVersion 2022-09-28 21:46:22 +01:00
Richard Hughes
09b37cecb0 dfu: Allow disabling a DFU device by setting the version to 0
This would be used where the device matches the `USB\CLASS_FE&SUBCLASS_01`
instance ID, but wants to be handled in another plugin.
2022-09-28 21:46:22 +01:00
Mario Limonciello
d5585728a2 trivial: don't refer to plugindir in the build system anymore 2022-09-28 15:12:10 -05:00
Mario Limonciello
5c069f81e8 trivial: remove stray fwupd.conf 2022-09-28 15:12:10 -05:00
Mario Limonciello
6165e3b34b trivial: fedora: don't refer to fwupdplugin_version anymore 2022-09-28 20:50:59 +01:00
Richard Hughes
99002a7a18 Build many more plugins as builtin
This reduces the plugin directory size by 2.2Mb
2022-09-28 17:01:23 +01:00
Richard Hughes
439c364f46 trivial: Fold FuPluginVfuncs into FuPluginClass
This adds 7 pointer-size blocks of wasted space for each modular plugin, and
three pointers for builtin plugins, but allows us to use the exact same vfuncs
when building plugins in either mode.

This will allow us to convert nearly all the plugins to being builtin.
2022-09-28 14:42:04 +01:00
Richard Hughes
f8400ffaae trivial: Rename the FuPluginClass signals callbacks
The aim is to fold FuPluginVfuncs into this, and the names clash.
2022-09-28 14:42:04 +01:00
Richard Hughes
2a5f7766a4 trivial: Remove the deprecated fu_plugin_set_secure_config_value() 2022-09-28 14:42:04 +01:00
Richard Hughes
3dbf5fa8a4 trivial: Remove the deprecated fu_volume_new_esp_default() 2022-09-28 14:42:04 +01:00
Richard Hughes
d629240a83 trivial: Remove the padding from FuXxxClass structs
The library is now tied to the current fwupd version, so we can break API.
2022-09-28 14:42:04 +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
Mario Limonciello
e26c2a4d7e trivial: avoid duplication of fu-util tools.
Split out all the common code into a library, that we can store in our private
rpath.
2022-09-28 10:24:59 +01:00
Mario Limonciello
ec0496b47a Make libfwupdplugin an internal library instead
This drops the requirement on us being so strict on a particular ABI version,
and also more strongly discourages out of tree plugin development.

We should still strive to keep API stable, and as such keep a symbol map still.

Use rpath instead for the static plugins, and set the plugin install directory
to just fwupd-$ABI$ as we're storing more than just plugins here now.
2022-09-28 10:04:12 +01:00
Haowei Lo
6cd0871fcb Add new plugin to update FPC fingerprint devices 2022-09-27 16:41:16 +01:00
Richard Hughes
3fa2df2ab3 trivial: Remove unused build includes
It was amazing this ever worked, as the file was being generated in src/
2022-09-27 14:18:01 +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
waynehuang2022
22106fea81 focalfp: Add new plugin to update touchpads from focaltech 2022-09-27 09:13:08 +01:00
Richard Hughes
24db10ac1c trivial: Add fu_plugin_set_context() for future use 2022-09-26 22:24:41 +01:00
Dylan Van Assche
4c7906c8fd android-boot: set default version format
In case no version is found, android-boot plugin uses a fall back
version (0.0.0) but no version format is set. Therefore, fwupd uses
format 'plain' as default which is not correct as 0.0.0 is a triplet.
2022-09-25 10:53:14 +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
Richard Hughes
b50ef90aa6 trivial: Fix up some internal docs to reflect reality 2022-09-23 16:39:21 +01:00
Richard Hughes
34486b90e2 trivial: Remove long-dead meson option 2022-09-23 16:39:21 +01: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
Mario Limonciello
b7ac4b4077 trivial: fix docs deployment 2022-09-22 21:52:50 -05:00
Mario Limonciello
34dfa86896 trivial: restore libcurl support in snap (Fixes: #5069) 2022-09-22 13:11:42 -05:00
Mario Limonciello
5c284e911a trivial: debian: drop unused lintian override 2022-09-22 11:43:01 -05:00
Mario Limonciello
24a4b322fd trivial: debian: Don't invoke systemd directly for fwupd.postinst 2022-09-22 11:43:01 -05:00
Mario Limonciello
70d34a2fe2 trivial: debian/control: Add explicit depends on adduser
W: fwupd: maintainer-script-needs-depends-on-adduser adduser (does not satisfy adduser) [postinst:91]
2022-09-22 11:43:01 -05:00
Mario Limonciello
8586e25177 trivial: debian: Add symlinks for devhelp to work
Fixes https://www.mit.edu/afs.new/sipb/project/debathena/lintian/www/tags/package-contains-devhelp-file-without-symlink.html
2022-09-22 11:43:01 -05:00
Richard Hughes
c6fde9e085 trivial: Install the host-emulate.d tests in the test package
This fixes the ppc64 Fedora build, as tests are disabled on that arch.
2022-09-22 17:31:42 +01:00
Richard Hughes
5fbc21a535 trivial: Fix the example spec file on i686 2022-09-22 17:31:42 +01:00
Richard Hughes
ec493527c3 trivial: Fix the Pre-boot DMA protection HSI long description
The original string is ambiguous to translate and logically incorrect.
2022-09-22 16:54:26 +01:00
Richard Hughes
49af1667bd trivial: Install the devhelp symlinks relative
We want /usr/share/docs/fwupd/libfwupd for the docs that can be referenced from
index.html, and a symlink of /usr/share/docs/libfwupd for devhelp.

This fixes the rpmbuild warning:

    # absolute symlink: /usr/share/doc/fwupd/libfwupd -> /usr/share/doc/libfwupd
    # absolute symlink: /usr/share/doc/fwupd/libfwupdplugin -> /usr/share/doc/libfwupdplugin
2022-09-22 16:24:56 +01:00
Richard Hughes
713bf04673 trivial: post release version bump 2022-09-22 15:01:15 +01:00
Richard Hughes
456dcb6a68 Release fwupd 1.8.5 2022-09-22 14:58:08 +01: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
ea676855f2 Never save the Redfish passwords to a file readable by users
When the redfish plugin automatically creates an OPERATOR user account on the
BMC we save the autogenerated password to /etc/fwupd/redfish.conf, ensuring it
is chmod'ed to 0660 before writing the file with g_key_file_save_to_file().

Under the covers, g_key_file_save_to_file() calls g_file_set_contents() with
the keyfile string data.
I was under the impression that G_FILE_CREATE_REPLACE_DESTINATION was being
used to copy permissions, but alas not.

GLib instead calls g_file_set_contents_full() with the mode hardcoded to 0666,
which undoes the previous chmod().

Use g_file_set_contents_full() with the correct mode for newer GLib versions,
and provide a fallback with the same semantics for older versions.
2022-09-22 14:46:44 +01:00
Richard Hughes
be2311c6c3 trivial: Fix gtk-doc markup issue 2022-09-22 14:34:10 +01:00
Richard Hughes
5d38e0aeea Move the getting the ESP to the context
We now have two plugins getting the ESP values, and we only allow hardcoding
the ESP in uefi_capsule.conf.

Make all this a lot simpler by moving the ESP+BDP code to `FuContext`, which
also means we can handle the override (via the config file) in the engine,
and the override (in the command line tools) using the same mechanism.

Also, automate the migration of the `OverrideESPMountPoint` -> `EspLocation`
when loading the engine.

Fixes https://github.com/fwupd/fwupd/issues/5042
2022-09-22 14:31:06 +01:00