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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-07-28 19:24:58 +02:00
parent c6699598e2
commit 9ff28e312b

View File

@@ -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}