summaryrefslogtreecommitdiffstats
path: root/src/rpm
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-07-28 19:24:58 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-08-07 12:15:54 +0200
commit9ff28e312bffe7567aa5d3f2c41303dd456f1691 (patch)
treef3274e7933de0fc075d2ddd76fe15871e9ff1834 /src/rpm
parentrpm: use rpm.execute() in more cases (diff)
downloadsystemd-9ff28e312bffe7567aa5d3f2c41303dd456f1691.tar.xz
systemd-9ff28e312bffe7567aa5d3f2c41303dd456f1691.zip
rpm: add %systemd_user_daemon_reexec
This macros wraps the call to daemon-reexec in all user managers. It would be called for example from systemd %post right after the call to systemctl daemon-reexec. This will be used in the Fedora systemd package to fix a long-standing FIXME. Tested via building and reinstalling the systemd package with the patches.
Diffstat (limited to 'src/rpm')
-rw-r--r--src/rpm/macros.systemd.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index f05553f557..241e4b9c49 100644
--- a/src/rpm/macros.systemd.in
+++ b/src/rpm/macros.systemd.in
@@ -117,6 +117,13 @@ if [ $1 -ge 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
fi \
%{nil}
+%systemd_user_daemon_reexec() \
+if [ $1 -ge 1 ] && [ -x "{{SYSTEMD_UPDATE_HELPER_PATH}}" ]; then \
+ # Package upgrade, not uninstall \
+ {{SYSTEMD_UPDATE_HELPER_PATH}} user-reexec || : \
+fi \
+%{nil}
+
%udev_hwdb_update() %{nil}
%udev_rules_update() %{nil}