1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Pragyan Poudyal
a650e32716 composefs-backend: Start finalize-staged service on update/switch
Rename service to bootc-finalize-staged

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Colin Walters <walters@verbum.org>
2025-10-17 07:05:42 -04:00
Colin Walters
cd8fa591a9 generator: Conditinally enable bootc-status units
Right now this service fails in `bcvk run-ephemeral`, but
also likely fails in any non-bootc system that has `subscription-manager`
installed.

A problem is that dependencies of units are started even
if the dependee has a condition that disables it.

This basically the target and path depend on `/run/ostree-booted`
being present (which yes, won't work for composefs...)

Tests: Covered by extant `012-test-unit-status.nu`

Signed-off-by: Colin Walters <walters@verbum.org>
2025-09-25 16:38:55 -04:00
Pragyan Poudyal
8ac9eae698 Add a composefs backend
This adds a new off-by default feature to enable
a new composefs-native backend for bootc. This
is all still a live work in progress, but
we're landing this first tranche of work to help
avoid continual issues with rebasing.

Thanks to everyone who worked on it!

xref https://github.com/bootc-dev/bootc/issues/1190

Co-authored-by: John Eckersberg <jeckersb@redhat.com>
Co-authored-by: Robert Sturla <robertsturla@outlook.com>
Co-authored-by: Colin Walters <walters@verbum.org>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
2025-09-15 18:19:46 +05:30
Robert Sturla
854a3f16ec chore: switch bootc-fetch-apply-updates.service to non-aliased command
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-07-12 19:27:58 +01:00
ckyrouac
85b2419f09 install: Add cleanup option to install to-existing-root
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>
2025-05-01 18:28:27 -04:00
John Eckersberg
739904481e Add bootc-status-updated-onboot.target
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>
2025-01-22 16:11:53 -05:00
John Eckersberg
edcdf9c830 systemd: enable bootc-status-updated.target on startup
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>
2025-01-17 16:04:49 -05:00
Colin Walters
4efcf52b53 bootc-status-updated: Add ConditionPathExists=/run/ostree-booted
This is a general best practice for our units to ensure
they don't apply outside of bootc systems.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-06 15:30:23 -05:00
John Eckersberg
e5ed45b430 systemd: Add bootc-publish-rhsm-facts.service
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>
2024-12-19 17:06:49 -05:00
John Eckersberg
caecb64db7 systemd: Add bootc-status-updated.{path,target} units
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>
2024-12-19 17:06:49 -05:00
Ben Breard
680f4c9fbe bootc-fetch-apply-updates.timer: RandomizedDelaySec=
RandomizedDelaySec= is the best kept secret of timers.

Signed-off-by: Ben Breard <bbreard@redhat.com>
Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-02 09:54:20 -05:00
Colin Walters
c13c9eb8dc systemd: New bootc-fetch-apply-updates.{timer,service}
Let's ship a baseline systemd unit that can be enabled
for automatic updates.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-15 15:08:54 -05:00