Commit Graph

16 Commits

Author SHA1 Message Date
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
37855a3f5d trivial: Match up the translator comments with the source strings
Doing clang-format on the codebase broke a few of these.
2021-10-06 16:07:43 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05: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
9a68084dbc Always check for PLAIN when doing vercmp() operations
In 1de7cc we checked the version format when checking for update, but there are
many other places that are doing verfmt-insensitive comparisons. For instance,
the predicates in <requires> all fail if the device version format is plain.
his breaks updating some NVMe drives where the `ne` requirements are not
semantic versions.

To avoid trying to catch all the bugs in different places, and in case we have
a future verfmt that should be treated another way, refactor this out in to a
common function and deprecate the old function.
2020-02-20 15:49:27 +00:00
Richard Hughes
afdba37644 trivial: Set the offline trigger using an environment variable
This allows us to build a object that does not have a custom FU_OFFLINE_DESTDIR.
2019-11-25 09:29:46 +00:00
Richard Hughes
668ee21567 trivial: Use prefixes for DATADIR in config.h for portability
DATADIR is an enumerated type in MinGW, and the other names are very generic.
2019-11-24 14:17:38 -06:00
Richard Hughes
01c0badd38 trivial: Allow compiling without getuid() 2019-11-23 17:07:53 +00:00
Richard Hughes
41c35d084c trivial: Fix a typo spotted by coverity 2019-05-02 09:59:47 +01:00
Mario Limonciello
e1b4b20978 Dynamically read path to use for /system-update
This allows `fwupdoffline` to work in installations that don't use
`/var/lib/fwupd`.
2019-05-01 09:24:55 -05:00
Richard Hughes
5e4bf9dc15 offline: Be more graceful when dealing with Plymouth failures
Older versions of Plymouth are more fragile and we can sometimes block the
offline process waiting for the splash to appear.

Use the new system-upgrade and reboot modes, falling back to older modes if
unavailable, showing text on stderr if Plymouth is either not installed or just
not working.
2019-03-25 14:18:30 -05:00
Richard Hughes
ba28a58cb9 trivial: Allow downgrading in the offline updater
We've already done the permissions check in the scheduler, and allowing
downgrade allows the user to go back to a working version in the event of a
regression.
2019-03-24 21:27:00 +00:00
Richard Hughes
1dfc367ba2 Update Plymouth when updating pending firmware
Some updates take some time to deploy, so we need to update the UI to avoid the
user thinking it's just hung.
2019-03-23 12:00:26 +00:00
Richard Hughes
f517c9aa09 Allow running offline updates when in system-update.target 2019-03-23 10:45:52 +00:00
Richard Hughes
42a1b9aea3 trivial: Make testing the offline update easier by allowing reinstalls
Only refuse to schedule an offline update if the device is already pending.
2019-03-21 20:58:42 +00:00
Richard Hughes
4499d19ba3 Move out the offline update functionality to a new binary
The offline updates environment is special, and we have to be careful to delete
the trigger before doing anything that can fail to avoid boot loops.

For this reason, split it out to a simple self-contained binary that is easy to
understand.
2019-03-08 09:45:30 -06:00