The baseclass is calling fu_device_build_instance_id_quirk() and when we
incorporate the device we were only copying the 'proper' instance IDs and not
the ones used for quirk matching -- which we need to match the devices that use
keys containing MODALIAS for the Plugin key to be set.
This does not serve much purpose now, but would be useful if we need to know
more about the installed PK from other plugins. If nothing else it makes the
`--verbose` output more helpful.
There are two reasons for this. First is that GKeyFile is quite inefficient,
using a large amount of heap memory when loading. Given we don't actually use
the merge and replace functionality of GKeyFile and we only need line-by-line
access we can parse this ourselves and reduce the peak RSS considerably.
This also accidentally fixes another bug. Moving from multiple quirk files to
a single builtin.quirk meant that multiple subsystem plugins were deduped --
which isn't really what we wanted. For example, this now works:
[MEI]
Plugin = one
[MEI]
Plugin = two
This allows us to be more specific when matching devices, and also means we get
more attributes 'for free' from the FuUdevDevice->probe().
This would allow us to have multiple device GTypes handling multiple MEI
interfaces in the same plugin., for instance, PTHI and MKHI.
The slight fly in the ointment is that the kernel does not set the 'dev' for
the mei_me devices, but it's always going to be just /dev/mei0, so hardcode it.
When I replaced the regex with a fu_strtoull() in bb548f15 I missed that the
regex looked at the 2nd-to-last sysfs path element, e.g. the i2c bus number for
/sys/devices/pci0000:00/0000:00:15.2/i2c_designware.1/i2c-1/i2c-1AF80175:00 is
actually '1'.
This fixes enumerating the parade-lspcon on a Puff ChromeBox.
This would allow us to convert more easily to a built-in plugin in the future
and means we match the source style used in 97% of the other plugins.
No logic changes.
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.
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
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.
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.