From fa59f1ec28188f3036f43a4761a2c5d17f624c9e Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jun 30 2023 14:00:14 +0000 Subject: [PATCH 1/2] fedora-common-ostree: Make presets canonical This ensures that only services defined in presets are enabled by default. This has two advantages: - services enabed in RPM scriptlets are dropped - new services can be enabled by default simply by adding them to presets This mirrors the behaviour of Fedora CoreOS. For more informations, see: - https://github.com/coreos/fedora-coreos-config/blob/testing-devel/manifests/ignition-and-ostree.yaml#L39..L48 - https://github.com/coreos/fedora-coreos-config/pull/73 - https://github.com/coreos/fedora-coreos-config/pull/77 - https://github.com/coreos/fedora-coreos-config/pull/122 - https://github.com/coreos/rpm-ostree/issues/1803 --- diff --git a/fedora-common-ostree.yaml b/fedora-common-ostree.yaml index 558a259..62c6f4e 100644 --- a/fedora-common-ostree.yaml +++ b/fedora-common-ostree.yaml @@ -111,4 +111,11 @@ postprocess: # Remove loader directory causing issues in Anaconda in unified core mode # Will be obsolete once we start using bootupd rm -rf /usr/lib/ostree-boot/loader + + # Undo RPM scripts enabling units; we want the presets to be canonical + # https://github.com/projectatomic/rpm-ostree/issues/1803 + rm -rf /etc/systemd/system/* + systemctl preset-all + rm -rf /etc/systemd/user/* + systemctl --user --global preset-all postprocess-script: "postprocess.sh" From 32d3823b99db88ec829d56e3de173fe983ca45a6 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Jun 30 2023 14:08:13 +0000 Subject: [PATCH 2/2] fedora-common-ostree: Add workaround for nfs-client.target See: https://bugzilla.redhat.com/show_bug.cgi?id=2218006 --- diff --git a/fedora-common-ostree.yaml b/fedora-common-ostree.yaml index 62c6f4e..0e67b0d 100644 --- a/fedora-common-ostree.yaml +++ b/fedora-common-ostree.yaml @@ -118,4 +118,7 @@ postprocess: systemctl preset-all rm -rf /etc/systemd/user/* systemctl --user --global preset-all + + # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2218006 + systemctl enable nfs-client.target postprocess-script: "postprocess.sh"