From efa3d301b9784b3e1f4ce3307086cff9c4dc761e Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jan 26 2023 10:28:32 +0000 Subject: Reenable systemd-journald-audit.socket after upgrades ... (rhbz#2164594) The socket exists and is enabled in the initrd. After switch-root, the system goes into an infinite loop trying to stop the socket while incoming audit messages trigger start jobs for the socket. This is a bug in the transaction logic, that'll need to be fixed separately. We need to preset the socket after the upgrade so that it remains enabled by default. This should fix the boot issue, though it's not a complete fix, because we actually want to allow people to disable the socket. On initial install, the socket is covered by preset-all and gets enabled. --- diff --git a/systemd.spec b/systemd.spec index fc91a81..f3a3ddd 100644 --- a/systemd.spec +++ b/systemd.spec @@ -876,11 +876,17 @@ if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then systemctl start systemd-resolved.service &>/dev/null || : fi -%triggerpostun -- systemd < 247.3-2 +%triggerun -- systemd < 247.3-2 # This is for upgrades from previous versions before oomd-defaults is available. +systemctl --no-reload preset systemd-oomd.service &>/dev/null || : + +%triggerpostun -- systemd < 253~rc1-2 +# This is for upgrades from previous versions where systemd-journald-audit.socket +# had a static enablement symlink. # We use %%triggerpostun here because rpm doesn't allow a second %%triggerun with # a different package version. -systemctl --no-reload preset systemd-oomd.service &>/dev/null || : +systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || : + %global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service}