These messages are useful for debugging but not to users. Many issues
get filed because they're cryptic and users can't do anything about them.
Downgrade the actual messages to debugging in the engine, and just send
back a generic message for clients.
Fixes: #1659Fixes: #1261
When installed using systemd, the system will try to use the paths
that are for the system wise configuration directory for remotes
and configuration. If those paths don't exist, fallback to the ones
that were configured for the package itself.
So basically if installed into `$PREFIX` `/usr/local` on most systems
if starting from systemd the path `/etc` gets used. Otherwise `/usr/local/etc`
would be used.
Right now vendor string is detected by walking up the udev chain
until a vendor is found. On some systems this is finding incorrect
data such as `Intel Corporation` for the vendor on the touchpad.
As the plugin only supports Synaptics devices, Correct it by hardcoding
vendor to `Synaptics`.
Sample output:
```
└─Touchpad:
Device ID: b26933c085b020ecf84c490812458523aee710ac
Current version: 1.5.2767034
Bootloader Version: 54.0
Vendor: Synaptics (HIDRAW:0x06CB)
GUIDs: f4384034-9243-5334-8075-a534be913e46 ← HIDRAW\VEN_06CB&DEV_76AF&REV_00
424bd00e-9789-5cdf-a12a-3c81bc4676d6 ← HIDRAW\VEN_06CB&DEV_76AF
140f4458-951b-5bb9-85e2-879bd5b02615 ← SYNAPTICS_RMI\TM3038-003
b29d3c85-cd0e-503e-9c7e-f6731c1eaf2d ← SYNAPTICS_RMI\TM3038
Device Flags: • Internal device
• Updatable
```
It's confusing to have FuConfig load both the daemon.conf file and also keep
track of the enabled remotes. It's also wasteful of memory to keep the GKeyFile
alive the entire time.
Logically these are different pools of information and should be managed by
different objects. This allows us to implement reload() in a sane way and be
less reliant on the inotify event.
Currently devices with a matching GUID will match any metadata that
has the same GUID.
For Dell in the future there will be a situation that the same GUID
is supported by two different FwupdDevice objects but the payload
required for the different objects will vary.
So start matching the protocol and the GUID both to make sure that
the right Fwupd device gets matched from the metadata.
Dell does not include the first byte in the ESRT value, ignoring it. Using a
`quad` means we get versions like `0.1.4.0` rather than `1.4.0` which confuses
both users comparing versions to the vendor website, and also anyone trying to
do analysis on the firmware.
We painted ourselves into a corner when we added the `LVFS::VersionFormat`
metadata key, as using newer keys like `bcd` would not be recognised by older
versions of the daemon as there was no explicit fallback path.
This allows plugins or devices to 'upgrade' from simpler formats like:
* `pair` -> `bcd`
* `quad` -> `intel-me`
* `triplet` -> `surface`
* `plain` -> `misc-defined-vendor-format`
This means the LVFS can write multiple `LVFS::VersionFormat` keys, although the
'older' version format has to be listed first to preserve compatibility with
older daemon versions that just validate the first matching node.
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.
With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
In some CI infrastructures other devices show up and so the webcam
is not automatically picked.
```
Enabling fwupd-tests remote...
Successfully enabled remote
Update the device hash database...
Choose a device:
0. Cancel
1. 08d460be0f1f9f128413f816022a6439e0078018 (Integrated Webcam™)
2. bbbf1ce3d1cf15550c3760b354592040292415bb (Virtio network device)
Request canceled
FAIL: fwupd/fwupdmgr.test (Child process exited with code 2)
SUMMARY: total=1; passed=0; skipped=0; failed=1; user=0.0s; system=0.0s; maxrss=11736
FAIL: fwupd/fwupdmgr.test (Child process exited with code 2)
autopkgtest [22:09:32]: test ci: -----------------------]
ci FAIL non-zero exit status 2
autopkgtest [22:09:33]: test ci: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [22:09:33]: @@@@@@@@@@@@@@@@@@@@ summary
ci FAIL non-zero exit status 2
```