From 0a1425e28e11952f8134e45f2507fc88ef73549d Mon Sep 17 00:00:00 2001 From: Arnaldo Garcia Rincon Date: Fri, 19 Jan 2024 18:33:34 +0000 Subject: [PATCH] systemd-sysusers: change execution order systemd-sysusers might run while the /etc tmpfs filesystem is still being set up, which results on failures on the service when it tries to read SELinux configuration files. With this change, systemd-sysusers is forced to run after the required SELinux configuration files are in place. Signed-off-by: Arnaldo Garcia Rincon --- packages/systemd/systemd-sysusers.conf | 2 ++ packages/systemd/systemd.spec | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 packages/systemd/systemd-sysusers.conf diff --git a/packages/systemd/systemd-sysusers.conf b/packages/systemd/systemd-sysusers.conf new file mode 100644 index 00000000000..d5e54c0fa5e --- /dev/null +++ b/packages/systemd/systemd-sysusers.conf @@ -0,0 +1,2 @@ +[Unit] +After=selinux-policy-files.service diff --git a/packages/systemd/systemd.spec b/packages/systemd/systemd.spec index 8fd4e9be135..c99b5427195 100644 --- a/packages/systemd/systemd.spec +++ b/packages/systemd/systemd.spec @@ -13,6 +13,7 @@ Source2: systemd-modules-load.conf Source3: journald.conf Source4: issue Source5: systemd-journald.conf +Source6: systemd-sysusers.conf # Backport of upstream patches that make the netlink default timeout # configurable. Bottlerocket carries this patch and configures the timeout in @@ -302,6 +303,9 @@ install -p -m 0644 %{S:3} %{buildroot}%{_cross_libdir}/systemd/journald.conf.d/j install -d %{buildroot}%{_cross_unitdir}/systemd-journald.service.d install -p -m 0644 %{S:5} %{buildroot}%{_cross_unitdir}/systemd-journald.service.d/systemd-journald.conf +install -d %{buildroot}%{_cross_unitdir}/systemd-sysusers.service.d +install -p -m 0644 %{S:6} %{buildroot}%{_cross_unitdir}/systemd-sysusers.service.d/systemd-sysusers.conf + # Remove all stock network configurations, as they can interfere # with container networking by attempting to manage veth devices. rm -f %{buildroot}%{_cross_libdir}/systemd/network/*