Commit Graph

23 Commits

Author SHA1 Message Date
Richard Hughes
3e0a4dc1c3 Be smarter and include less header files per source file 2022-06-14 14:36:52 -05:00
Richard Hughes
067d7d8088 Split out the path helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92 Split out the string helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
e17a107ce1 trivial: Cast the g_signal_connect() object to allow static analysis
This is useful when using https://gitlab.freedesktop.org/tartan/tartan
2022-01-03 22:46:23 +00:00
Richard Hughes
2e99055d1e trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
Richard Hughes
46d06bf42a Fixup the GLib error message when inotify/max_user_instances is too low
This can be reproduced using sysctl fs.inotify.max_user_instances=25
and then running the daemon.
2021-12-07 18:51:11 +00:00
Richard Hughes
1b1009cf5f Avoid modifying remotes when possible
Found in the NixOS downstream patches, thanks @maxine.
2021-10-19 17:21:57 +01:00
Richard Hughes
3f82205062 Support loading remotes from /var/lib/fwupd/remotes.d
This allows us to add remotes on /etc immutable systems.
2021-10-08 17:22:24 +01:00
Richard Hughes
1669f532be trivial: Move the metadata directory
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.
2021-10-08 17:22:24 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
f2fd6b0717 trivial: Do not save the self test quirk silo to disk
This also speeds up the tests as the amount of pointless i/o is reduced.

Fixes https://github.com/fwupd/fwupd/issues/3522
2021-07-22 12:51:47 +01:00
Richard Hughes
dd415ab396 Add fwupd_remote_setup() to split out the 'parsing' from the 'validation' 2021-05-14 06:02:56 +01:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
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.
2021-01-07 14:48:16 +00:00
Richard Hughes
8bcc5f3e80 Allow the client to send PKCS7 and GPG signatures
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.
2020-11-30 15:16:39 +00:00
Richard Hughes
9ba348cd7a Force the remote kind to JCat server-side
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.
2020-11-29 07:24:33 +00:00
Richard Hughes
f4052b53f4 trivial: Do not warn about the same missing remote more than once
Removes 4 instances of 'ignoring unfound remote fwupd' at startup.
2020-10-01 16:39:10 +01:00
Richard Hughes
33dcfb7219 trivial: Remove over-eager debugging output 2020-09-28 16:43:12 +01:00
Richard Hughes
0b6f58394b Cancel the file monitor before disposal to avoid a potential deadlock
Fixes https://github.com/fwupd/fwupd/issues/2350
2020-09-01 20:59:56 +01:00
Richard Hughes
a885926aa2 Always return AppStream markup for remote agreements
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>)
2020-03-02 18:31:58 +00:00
Mario Limonciello
427e01fcf3 fu-remote-list: emit a changed signal when modifying a remote
This should notify the daemon of changes before the inotify letting
the data store get reloaded and fix autopkgtest race conditions.
Fixes: #1648
2020-01-08 11:57:11 -06:00
Mario Limonciello
2c6a5f952f fu-remote-list: Drop fallback path behavior
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.
2019-12-12 13:23:13 -06:00
Mario Limonciello
62b8336383 trivial: fu-remotes-list: drop usage of FU_SELF_TEST_REMOTES_DIR
Instead use `CONFIGURATION_DIRECTORY`, which already supported by
`fu-common`.
2019-12-12 13:23:13 -06:00
Richard Hughes
d1808aae67 Split out the remote loading from FuConfig
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.
2019-12-10 21:40:31 +00:00