From 4888be4e199583664fe32264f16ff9e166372c34 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 14 May 2025 16:11:42 -0400 Subject: [PATCH 1/2] move systemd-preset enablement code to minimal Arguably we still want to remove rpm systemd enablements and use the presets for the original image we create for all of our images. --- minimal/manifest.yaml | 1 + minimal/systemd-presets.yaml | 11 +++++++++++ standard/manifest.yaml | 9 --------- 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 minimal/systemd-presets.yaml diff --git a/minimal/manifest.yaml b/minimal/manifest.yaml index 2c4a62e..544447b 100644 --- a/minimal/manifest.yaml +++ b/minimal/manifest.yaml @@ -27,6 +27,7 @@ include: - initramfs.yaml - basic-fixes.yaml - kernel-install.yaml + - systemd-presets.yaml packages: # this is implied by dependencies but let's make it explicit diff --git a/minimal/systemd-presets.yaml b/minimal/systemd-presets.yaml new file mode 100644 index 0000000..4607210 --- /dev/null +++ b/minimal/systemd-presets.yaml @@ -0,0 +1,11 @@ +# Postprocessing relating to systemd presets on the system. +postprocess: + # Undo RPM scripts enabling units; we want the presets to be canonical + # https://github.com/projectatomic/rpm-ostree/issues/1803 + - | + #!/bin/bash + set -xeuo pipefail + rm -rf /etc/systemd/system/* + systemctl preset-all + rm -rf /etc/systemd/user/* + systemctl --user --global preset-all diff --git a/standard/manifest.yaml b/standard/manifest.yaml index 8c1e465..2016cc2 100644 --- a/standard/manifest.yaml +++ b/standard/manifest.yaml @@ -59,15 +59,6 @@ packages-aarch64: - irqbalance postprocess: - # Undo RPM scripts enabling units; we want the presets to be canonical - # https://github.com/projectatomic/rpm-ostree/issues/1803 - - | - #!/usr/bin/env bash - set -xeuo pipefail - rm -rf /etc/systemd/system/* - systemctl preset-all - rm -rf /etc/systemd/user/* - systemctl --user --global preset-all # See: https://github.com/coreos/fedora-coreos-tracker/issues/1253 # https://bugzilla.redhat.com/show_bug.cgi?id=2112857 # https://github.com/coreos/rpm-ostree/issues/3918 From 672148a82d2f69273fa08aee13c784ac6c052d43 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Fri, 16 May 2025 15:45:07 -0400 Subject: [PATCH 2/2] minimal/systemd-presets: preset dnf-makecache.timer to disabled This one doesn't make much sense to have enabled by default on systems with image based updates because we shouldn't need a local cache of yum repo metadata (i.e. we should just be interacting with a registry). --- minimal/systemd-presets.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/minimal/systemd-presets.yaml b/minimal/systemd-presets.yaml index 4607210..3f0ce69 100644 --- a/minimal/systemd-presets.yaml +++ b/minimal/systemd-presets.yaml @@ -1,5 +1,14 @@ # Postprocessing relating to systemd presets on the system. postprocess: + - | + #!/bin/bash + set -xeuo pipefail + # Override some of the default presets. + cat < usr/lib/systemd/system-preset/85-bootc.preset + # Disable dnf-makecache.timer on bootc/image mode systems + # https://github.com/coreos/fedora-coreos-tracker/issues/1896#issuecomment-2848251507 + disable dnf-makecache.timer + EOF # Undo RPM scripts enabling units; we want the presets to be canonical # https://github.com/projectatomic/rpm-ostree/issues/1803 - |