first commit

This commit is contained in:
robojerk 2025-09-01 14:05:34 -07:00
commit 93e2ad4b29
35 changed files with 1048 additions and 0 deletions

View file

@ -0,0 +1,12 @@
[Unit]
Description=Cleanup previous the installation after an alongside installation
Documentation=man:bootc(8)
ConditionPathExists=/sysroot/etc/bootc-destructive-cleanup
[Service]
Type=oneshot
ExecStart=/usr/lib/bootc/fedora-bootc-destructive-cleanup
PrivateMounts=true
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Apply bootc updates
Documentation=man:bootc(8)
ConditionPathExists=/run/ostree-booted
[Service]
Type=oneshot
ExecStart=/usr/bin/bootc upgrade --apply --quiet

View file

@ -0,0 +1,14 @@
[Unit]
Description=Apply bootc updates
Documentation=man:bootc(8)
ConditionPathExists=/run/ostree-booted
[Timer]
OnBootSec=1h
# This time is relatively arbitrary and obviously expected to be overridden/changed
OnUnitInactiveSec=8h
# When deploying a large number of systems, it may be beneficial to increase this value to help with load on the registry.
RandomizedDelaySec=2h
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,22 @@
[Unit]
Description=Bootc Fallback Root Filesystem Grow
Documentation=https://gitlab.com/fedora/bootc/docs
# For now we skip bare metal cases, and we also have nothing to do
# for containers.
ConditionVirtualization=vm
# This helps verify that we're running in a bootc/ostree based target.
ConditionPathIsMountPoint=/sysroot
# For someone making a smaller image, assume they have this handled.
ConditionPathExists=/usr/bin/growpart
# We want to run before any e.g. large container images might be pulled.
DefaultDependencies=no
Requires=sysinit.target
After=sysinit.target
Before=basic.target
[Service]
ExecStart=/usr/libexec/bootc-generic-growpart
# So we can temporarily remount the sysroot writable
MountFlags=slave
# Just to auto-cleanup our temporary files
PrivateTmp=yes

View file

@ -0,0 +1,12 @@
[Unit]
Description=Publish bootc facts to Red Hat Subscription Manager
Documentation=man:bootc(8)
ConditionPathExists=/etc/rhsm/facts
[Service]
Type=oneshot
ExecStart=/usr/bin/bootc internals publish-rhsm-facts
[Install]
WantedBy=bootc-status-updated.target
WantedBy=bootc-status-updated-onboot.target

View file

@ -0,0 +1,7 @@
[Unit]
Description=Target for bootc status changes on boot
Documentation=man:bootc-status-updated.target(8)
ConditionPathExists=/run/ostree-booted
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,5 @@
[Unit]
Description=Target for bootc status changes
Documentation=man:bootc-status-updated.target(8)
StopWhenUnneeded=true
ConditionPathExists=/run/ostree-booted