The fu_context_load_quirks(FU_QUIRKS_LOAD_FLAG_NO_CACHE) has to be done first,
otherwise fu_context_load_hwinfo() auto-loads the quirk db with the defaults.
Fixes a build failure in Fedora QA.
Explicitly load_hwinfo at start of mtd self test
```
.# Start of mtd tests
.# GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ?gio-vfs?
.# XbSilo-DEBUG: attempting to load /tmp/.E94WW1
.# XbSilo-DEBUG: failed to load silo: blob too small
Bail out! FuContext-FATAL-CRITICAL: cannot use HWIDs before calling ->load_hwinfo()
(/usr/libexec/installed-tests/fwupd/mtd-self-test:1758): FuContext-CRITICAL **: 23:27:43.095: cannot use HWIDs before calling ->load_hwinfo()
```
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.
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.
Pine64 PinePhone Pro has an SPI device which is handled by the MTD
plugin and comes with Tow-Boot pre-installed from the factory.
Expose it as Tow-Boot and mark the firmware type with uSWID for version
extraction. However, it does not provide uSWID data so users have to manually
upgrade to a Tow-Boot version with uSWID data support first.
The coSWID is a child of the parent, and the parent container does not have a
version. Also fix a small memory leak when parsing container formats.
Fixes https://github.com/fwupd/fwupd/issues/4294
the autopkgtest environment in Ubuntu seems to not be preparing the mtdram
device properly. Sometimes the udev node "exists" but the /dev/mtd0 does not
exist.
Look for this explicitly and skip the test if it happens.
Now incorporate is fixed to copy across the properties we need in the
superclass, we don't need to do the subclass ->probe().
Note, we still need to do the subclassed ->probe() when using
FU_UDEV_DEVICE_FLAG_VENDOR_FROM_PARENT or when looking at properties
on the parent device.
This also removes the spurious 'already set GType to FuVliUsbhubDevice,
ignoring FuVliUsbhubDevice' messages when running the daemon.
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.
Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
tristate features will automatically disable if dependencies marked
as required are missing.
Packagers can manually override using `auto_features`.
Link: https://mesonbuild.com/Build-options.html#features
The only users of `SERIO\FWID` and `I2C\NAME` are already 'safe' and
the device GUIDs should all be unchanged.
There are no current users of the `MTD\NAME` instance IDs, and these
are the ones that may be more unpredictable and in need of sanity.
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.
It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.