From 809be49d2435676bd8c669161cbbad25e1c69b016d9d4d253d38ea3703a0cda2 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 28 May 2021 04:43:28 +0000 Subject: [PATCH] - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use %sysusers_create in %pre and why it should be safe in %post. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1160 --- systemd-mini.changes | 9 +++++++++ systemd-mini.spec | 11 +++++++++-- systemd.changes | 9 +++++++++ systemd.spec | 11 +++++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 94ca8c75..f2787785 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue May 25 16:30:40 UTC 2021 - Franck Bui + +- Allow the sysusers config files shipped by systemd rpms to be + overriden during system installation (bsc#1171962) + +- While at it, add a comment to explain why we don't use + %sysusers_create in %pre and why it should be safe in %post. + ------------------------------------------------------------------- Thu May 20 20:19:27 UTC 2021 - Franck Bui diff --git a/systemd-mini.spec b/systemd-mini.spec index 65aaef57..95c84413 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -865,10 +865,16 @@ fi pam-config --add --systemd || : %endif -%sysusers_create %{_sysusersdir}/systemd.conf +# systemd-sysusers is not available in %pre so this needs to be done +# in %post. However this shouldn't be an issue since all files the +# main package ships are owned by root. +%sysusers_create systemd.conf + [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : + systemctl daemon-reexec || : + %journal_catalog_update %tmpfiles_create @@ -1039,7 +1045,8 @@ fi %service_add_pre systemd-journal-upload.service %post journal-remote -%sysusers_create %{_sysusersdir}/systemd-remote.conf +# Assume that all files shipped by systemd-journal-remove are owned by root. +%sysusers_create systemd-remote.conf %service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_post systemd-journal-remote.socket systemd-journal-remote.service %service_add_post systemd-journal-upload.service diff --git a/systemd.changes b/systemd.changes index 94ca8c75..f2787785 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue May 25 16:30:40 UTC 2021 - Franck Bui + +- Allow the sysusers config files shipped by systemd rpms to be + overriden during system installation (bsc#1171962) + +- While at it, add a comment to explain why we don't use + %sysusers_create in %pre and why it should be safe in %post. + ------------------------------------------------------------------- Thu May 20 20:19:27 UTC 2021 - Franck Bui diff --git a/systemd.spec b/systemd.spec index a3170ca4..afe9955d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -863,10 +863,16 @@ fi pam-config --add --systemd || : %endif -%sysusers_create %{_sysusersdir}/systemd.conf +# systemd-sysusers is not available in %pre so this needs to be done +# in %post. However this shouldn't be an issue since all files the +# main package ships are owned by root. +%sysusers_create systemd.conf + [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : + systemctl daemon-reexec || : + %journal_catalog_update %tmpfiles_create @@ -1037,7 +1043,8 @@ fi %service_add_pre systemd-journal-upload.service %post journal-remote -%sysusers_create %{_sysusersdir}/systemd-remote.conf +# Assume that all files shipped by systemd-journal-remove are owned by root. +%sysusers_create systemd-remote.conf %service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_post systemd-journal-remote.socket systemd-journal-remote.service %service_add_post systemd-journal-upload.service