This moves the cached metadata location from /var/lib/fwupd/remotes.d
to /var/lib/fwupd/metadata
The former was a bad name as it wasn't a list of remotes, and .d is the
suffix for directories the user can install files into, rather than for
binary content managed entirely by the daemon.
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
This restores compatibility when running with a new daemon and old remote files
and properly fixes all combinations of the regression casued by the commit
2f49da7f4e which appeared in the 1.5.2 release.
We can't do this in the library as Ubuntu want to ship a new libfwupd with an
old daemon. The new daemon only understands jcat and does not know how to
determine the age of an .asc file.
At the moment we're returning plain text for the embargo remotes and AppStream
markup for LVFS remotes. This fixes the warning on the console:
$ fwupdmgr enable-remote lenovo_thinkpad-embargo
failed to compile foo: Document must begin with an element (e.g. <book>)
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.
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.