From 6bdc7a067a11f91daeda84ba6d00bcc8e7c55d7397685c8ee4f59991505f2d41 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 20 Jun 2023 15:55:18 +0000 Subject: [PATCH] - file-triggers: skip the call to systemd-tmpfiles in chroot too. That way we ensure that packages that really need the tmpfiles in advance to use the right API which is %tmpfiles_create_package. - file-triggers: to be consistent with what we already does with tmpfiles, we skip the call to systemd-sysusers and delay system user creations until the next reboot. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1397 --- systemd.changes | 19 +++++++++++++++++-- triggers.systemd | 8 ++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/systemd.changes b/systemd.changes index d0349f42..6e86b09a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jun 20 15:46:04 UTC 2023 - Franck Bui + +- file-triggers: skip the call to systemd-tmpfiles in chroot too. That way we + ensure that packages that really need the tmpfiles in advance to use the right + API which is %tmpfiles_create_package. + +- file-triggers: to be consistent with what we already does with tmpfiles, we + skip the call to systemd-sysusers and delay system user creations until the + next reboot. + ------------------------------------------------------------------- Tue Jun 20 07:05:34 UTC 2023 - Franck Bui @@ -10,8 +21,12 @@ Tue Jun 20 07:05:34 UTC 2023 - Franck Bui ------------------------------------------------------------------- Fri Jun 16 14:38:33 UTC 2023 - Franck Bui -- Make sure to skip the call to systemd-tmpfile in the file-triggers when - running on transaction systems +- file-triggers: make sure to skip the call to systemd-tmpfile in the + file-triggers when running on transaction systems (bsc#1212449) + + systemd-tmpfiles usually modifies paths that are not supposed to change during + transactional updates (e.g. /var, /run). On transaction systems changes will + happen on the next reboot. ------------------------------------------------------------------- Thu Jun 1 15:58:24 UTC 2023 - Franck Bui diff --git a/triggers.systemd b/triggers.systemd index 7792e8ac..74621f94 100644 --- a/triggers.systemd +++ b/triggers.systemd @@ -72,7 +72,10 @@ end -- This script will process files installed in /usr/lib/sysusers.d to create -- specified users automatically. The priority is set such that it -- will run before the tmpfiles file trigger. -assert(rpm.execute("systemd-sysusers")) +-- Note: /run is never mounted during transactional updates. +if posix.access("/run/systemd/system") then + assert(rpm.execute("systemd-sysusers")) +end %if %{without bootstrap} %transfiletriggerin -P 1000700 -n udev -p -- /usr/lib/udev/hwdb.d @@ -102,7 +105,8 @@ end -- This script will process files installed in /usr/lib/tmpfiles.d to create -- tmpfiles automatically. The priority is set such that it will run -- after the sysusers file trigger, but before any other triggers. -if os.getenv("TRANSACTIONAL_UPDATE") == nil then +-- Note: /run is never mounted during transactional updates. +if posix.access("/run/systemd/system") then assert(rpm.execute("systemd-tmpfiles", "--create")) endf