systemd/0812-rpm-add-systemd_user_daemon_reexec.patch
Jan Macku 75aa201631 systemd-252-37
Resolves: RHEL-13159,RHEL-20322,RHEL-27512,RHEL-30372,RHEL-31070,RHEL-31219,RHEL-33890,RHEL-35703,RHEL-38864,RHEL-40878,RHEL-6589
2024-06-13 16:16:12 +02:00

39 lines
1.2 KiB
Diff

From 2400e5c6395459fa3629747168c36df8ef543811 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 28 Jul 2023 19:24:58 +0200
Subject: [PATCH] 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.
(cherry picked from commit 9ff28e312bffe7567aa5d3f2c41303dd456f1691)
Resolves: RHEL-40878
---
src/rpm/macros.systemd.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in
index fc607346e3..8d5895eba1 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}