Commit Graph

1105 Commits

Author SHA1 Message Date
Richard Hughes
2b0f92506b Refactor the hwids functionality
This refactors the code as it was getting very confusing; before FuSmbios was
reading both SMBIOS and the kernel-provided DT -- and various things were
injecting overrides in three different place. To properly support FDT remove
one layer of indirection.

This also lets us use the compatible strings to enable plugins specifying the
flag _REQUIRE_HWID -- which means we only load the plugin if it's got a chance
of working. e.g.

    [aspeed,ast2500]
2023-01-18 07:04:44 +00:00
Mario Limonciello
c2a494e871 trivial: install dmi data into installed-tests
fixes: #5402
2023-01-11 07:45:58 -06:00
Mario Limonciello
e5e6067e22 trivial: fail setup script if dependencies are missing
This makes CI failures more predictable and obvious.
2023-01-10 14:34:40 -06:00
Mario Limonciello
ced9e0c934 trivial: drop docs from abi job
It's built with features=disabled, no need to include it.
2023-01-10 14:34:40 -06:00
Richard Hughes
02d17592b2 Fix deprecated meson commands 2022-12-29 15:49:02 +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
069fa56f1a Add fu_archive_firmware_get_image_fnmatch() for future use
It's useful to get images from archives by a specific filename extension.
2022-12-17 07:44:27 +00:00
Gary Buhrmaster
ad930b8d13 The README.md is not a config file.
This also removes the errant % in spec file and addrssses the
build error "sh: line 1: noreplace: command not found"
2022-11-30 07:12:43 +00:00
Richard Hughes
9d20464606 Add more metadata to the report attributes
This can be used in gnome-control-center when building the security report.

Fixes https://github.com/fwupd/fwupd/discussions/5262
2022-11-29 16:55:25 +00:00
Demi Marie Obenour
ff1f3677d9 Drop sys-usb support
sys-usb will use the Qubes OS updates proxy and an in-VM fwupd instance.
This allows shedding a large amount of code.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
0bbdc8a0b6 Prevent exception when comparing invalid versions
This broke the test suite.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
1836433efc Pass -q and -a to qvm-run
Useful to avoid junk in e.g. stderr.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
49fa741fcf trivial: contrib/qubes: fix AttributeError and ImportError
Also make various minor cleanups.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
63903c82d9 contrib/qubes: Do not dynamically create shell commands
The security reasons for this are obvious.  When shell commands must be
generated dynamically, use shlex.join() to ensure that proper quoting is
done.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
cb8c163462 trivial: contrib/qubes: Use fwupdmgr --json instead of fwupdagent
The later is deprecated and the former is a drop-in replacement.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
4110e356bf contrib/qubes: Do not perform manual .cab verification
fwupd already does this, and besides the file has been checked against
the metadata already.
2022-11-29 09:03:08 +00:00
Demi Marie Obenour
3150f04acf trivial: contrib/qubes: Place cache in /var/cache
/root/.cache is for applications run by the root user in an interactive
session, not for system services.
2022-11-29 09:03:08 +00:00
Richard Hughes
85495b5bb2 Generate OVAL rules 2022-11-24 10:22:27 +00:00
Kai Michaelis
6519f28d26
Explain the smc bmc license issue
Add documentation and a helper license script.
2022-11-04 12:55:48 +00:00
Richard Hughes
3a0f187a16 Move the AMT functionality to the Intel MEI plugin 2022-10-13 18:34:00 +01:00
Mario Limonciello
99d449fb10 trivial: snap: fetch the EFI package from the Ubuntu archive
This will let us track the same version in core22's release.
2022-10-10 11:29:30 -05:00
Mario Limonciello
598e31ded5 trivial: snap: move fix-bash-completion step into build step 2022-10-10 11:29:30 -05:00
Mario Limonciello
40c8132dbb trivial: ci: don't add gi-docgen to debian/control
It causes FTBFS due to Build-Profiles nodoc
2022-10-07 23:07:40 -05:00
Richard Hughes
fc3cfbad92 Do not check the build hash of modular plugins
We removed the abilty to easily build modular plugins, and so we don't need to
worry so much about random 3rd party modules being loaded.
2022-09-30 14:19:56 +01:00
Richard Hughes
e1e8b9e261 Only include the last 5 releases in the installed metainfo file
We have to include the entire history in git, and also to generate the NEWS
file, but this reduces the size of the on-disk file by 116Kb.
2022-09-30 12:48:07 +01:00
Mario Limonciello
56adf2473b trivial: debian: fix building fwupd-tests package 2022-09-29 15:59:33 -05:00
Richard Hughes
35bd34fffd Build FuEngine functionality into libfwupdengine
This speeds up the build, and further reduces the on disk size by 340kB.
2022-09-29 13:19:49 +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
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
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
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
waynehuang2022
22106fea81 focalfp: Add new plugin to update touchpads from focaltech 2022-09-27 09:13:08 +01:00
Richard Hughes
34486b90e2 trivial: Remove long-dead meson option 2022-09-23 16:39:21 +01: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
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
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
Khem Raj
e9964a0f96 trivial: Fix compile when using python 3.7 or older
Signed-off-by: Richard Hughes <richard@hughsie.com>
2022-09-20 16:05:13 +01:00
Mario Limonciello
e8ca440bad Add new plugin to display SMU firmware version on AMD APU/CPU
This plugin is read-only, but can be used to tell what version of
SMU firmware is installed.
2022-09-19 06:51:27 -05:00
Richard Hughes
bfebede490 Add support for platform capability descriptors so devices can set quirks
This feature adds support for platform capability BOS descriptors which allows
the device itself to ship quirk data.

Use `sudo fwupdtool get-devices --save-backends=FILENAME` to save fake backend
devices to a file. This allows easy creation of self tests that do not require
physical hardware.
2022-09-13 12:07:35 +01:00
Mario Limonciello
f5d51d80eb trivial: fix container generation 2022-09-08 23:18:22 -05:00