Merge branch 'dusty-preset-autoupdates' into 'main'

standard: convert apply updates enablement to a preset

See merge request fedora/bootc/base-images!794
This commit is contained in:
Dusty Mabe 2026-09-30 02:02:29 +00:00
commit c21f3c5d02
4 changed files with 31 additions and 9 deletions

View file

@ -1,8 +0,0 @@
# Enable automatic updates by default
postprocess:
- |
#!/usr/bin/env bash
set -xeuo pipefail
target=/usr/lib/systemd/system/default.target.wants
mkdir -p $target
ln -s ../bootc-fetch-apply-updates.timer $target

View file

@ -9,13 +9,13 @@ recommends: true
include:
- ../minimal-plus/manifest.yaml
- autoupdates.yaml
- networking-tools.yaml
- system-configuration.yaml
- coreos-user-experience.yaml
- persistent-journal.yaml
- initramfs-full.yaml
- generic-growfs.yaml
- systemd-presets.yaml
packages:
# Include and set the default editor

View file

@ -0,0 +1,14 @@
# Postprocessing relating to systemd presets on the system.
#
# Note this relies on the `systemctl preset-all` run from
# minimal/systemd-presets.yaml running after this postprocess.
postprocess:
# Enable automatic updates by default
- |
#!/bin/bash
set -xeuo pipefail
# Enable automatic updates by default
cat <<EOF > usr/lib/systemd/system-preset/86-bootc-standard.preset
# Enable automatic updates by default
enable bootc-fetch-apply-updates.timer
EOF

View file

@ -0,0 +1,16 @@
#!/bin/bash
set -xeuo pipefail
# Right now the `systemctl preset-all` runs via a postprocess in
# minimal/systemd-presets.yaml but the preset for the timer is only
# set up in a postprocess in standard/systemd-presets.yaml.
#
# This test ensures that the ordering works out such that the preset
# from standard got applied.
#
# Verify if the preset file exists (only on standard) that the timer
# is enabled. Right now the `s
if [ -f /usr/lib/systemd/system-preset/86-bootc-standard.preset ]; then
# Will return success (0) if enabled or failure (1) if not
systemctl is-enabled bootc-fetch-apply-updates.timer
fi