From: Zbigniew Jędrzejewski-Szmek Date: Fri, 28 Jul 2023 17:24:58 +0000 (+0200) Subject: rpm: add %systemd_user_daemon_reexec X-Git-Tag: v255-rc1~801^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28521%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in index f05553f557e..241e4b9c49b 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}