So far we've supported updating systems that we installed,
but we also need to handle updating at least older CoreOS
systems.
This shares a lot of similarity with `update`; the biggest
difference is that we aren't sure which files we should
be managing. So given a pending update, we only replace
files that exist in that update.
Closes: https://github.com/coreos/bootupd/issues/38
For now let's address concerns over how we represent
the operating system by dropping them from the status
JSON. Instead detect CoreOS specifically client side
too and print the aleph there.
This removes the current library/binary crate split, leaving
only the application in place.
The original idea was to add the logic as a vendored library into
rpm-ostree for an emergency fix. However the urgency dropped and
this now lives as a self-standing application.
We may or may not consider re-adding it later on, but only for the
interop parts (paths, JSON, etc).
There's no reason to sit there taking up RAM just because
someone did `bootupctl status`. Properly implementing
exit-on-idle really requires an event loop (e.g. `tokio`)
but that'd be a large change.
For now let's just exit when a client disconnects. However,
this quickly broke the test suite which does a lot of
commands in a row.
Tweak the systemd unit to allow more restarts, and also
add a few strategic sleeps.
Closes: https://github.com/coreos/bootupd/issues/43
This introduces a new `-v(vv)` flag on both `bootupd` and `bootupctl`
to control log verbosity. The default level only shows warnings and
higher priorities.
The service unit sets up the daemon to log info messages too, and
can be overridden via a drop-in.
This also introduces some basic unit-tests on CLI parsing.
This tweaks daemon core-logic to keep going on client-induced errors,
logging them at "error" level.
It also introduces docstring to ease casual code navigation.
This is a temporary compat patch to bridge backend verbs
via bootupctl, for existing consumers.
It is meant to be reverted as a whole later on once all consumers
have been migrated.
This reworks the CLI options parser to branch the inner logic
to accommodate two entrypoints, `bootupd` and `bootupctl`, into
a single multicall binary.
Let's add support for checking the on-disk state. This helps
cross-check our implementation and is also useful for administrators
(ref `ostree fsck`, `rpm -V` etc).
This moves CLI parsing logic and sub-commands handling to its own
module, making full use of structopt for matching verbs to enum
variant and for dispatching to the relevant entrypoint.