When set, the bootc-destructive-cleanup flag is added to /sysroot/etc
which enables the bootc-destructive-cleanup systemd service to remove
the previous installation's rpm packages and podman containers/images.
The service is only installed on fedora based systems.
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
The bootc-status-updated.target unit cannot directly be
WantedBy=multi-user.target, because we rely on StopWhenUnneeded=true
so the target will be activated each time bootc-status-updated.path
triggers it. Because multi-user.target remains active, this would
hold bootc-status-updated.target in an active state as well, and the
path unit activating would not have the desired effect of retriggering
the target unit.
The new bootc-status-updated-onboot.target is intended to serve the
same purpose as bootc-status-updated.target but will activate (and
remain active) on boot. Any interested units should be WantedBy both
targets. This updates bootc-publish-rhsm-facts.service to do just
that.
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Any services that react to status changes should be idempotent, and
should run on boot. It is likely (but not guaranteed) that during
boot we are in the process of switching from a previous deployment to
a new one, and thus what was previously "staged" is now "booted" and
what was previously "booted" is now "rollback", so anything that cares
about status is going to want to handle that.
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
When enabled, this triggers on bootc-status-updated.target to update
the facts file for Red Hat Subscription Manager integration via
`bootc internals publish-rhsm-facts`
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
This adds a new systemd path unit which activates on bootc status
changing, and in turn triggers a new systemd target. This allows
adding arbitrary new systemd services with `WantedBy =
bootc-status-updated.target` that will be activated each time the
bootc status is updated.
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
RandomizedDelaySec= is the best kept secret of timers.
Signed-off-by: Ben Breard <bbreard@redhat.com>
Signed-off-by: Colin Walters <walters@verbum.org>