From 600901815105354f0a226a4970074e2b8431c4f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= <wferi@debian.org>
Date: Sun, 26 May 2024 11:57:40 +0200
Subject: [PATCH] Move corosync-notifyd policy file into
 $(datadir)/dbus-1/system.d
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

As per dbus-daemon(1):

> Third-party packages would historically install XML files into
> /etc/dbus-1/system.d, but this practice is now considered to be
> deprecated: that directory should be treated as reserved for the
> system administrator.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
---
 conf/Makefile.am | 2 +-
 corosync.spec.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/conf/Makefile.am b/conf/Makefile.am
index 44581eb3..d02cd21d 100644
--- a/conf/Makefile.am
+++ b/conf/Makefile.am
@@ -60,7 +60,7 @@ mib_DATA		= COROSYNC-MIB.txt
 endif
 
 if INSTALL_DBUSCONF
-dbusdir			= $(sysconfdir)/dbus-1/system.d
+dbusdir			= $(datadir)/dbus-1/system.d
 dbus_DATA		= corosync-signals.conf
 endif
 
diff --git a/corosync.spec.in b/corosync.spec.in
index 256442ba..f8dda8d0 100644
--- a/corosync.spec.in
+++ b/corosync.spec.in
@@ -126,7 +126,7 @@ make install DESTDIR=%{buildroot}
 
 %if %{with dbus}
 mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
-install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
+install -m 644 %{_builddir}/%{name}-%{version}%{?gittarver}/conf/corosync-signals.conf %{buildroot}/%{_datadir}/dbus-1/system.d/corosync-signals.conf
 %endif
 
 ## tree fixup
@@ -195,7 +195,7 @@ fi
 %config(noreplace) %{_sysconfdir}/sysconfig/corosync
 %config(noreplace) %{_sysconfdir}/logrotate.d/corosync
 %if %{with dbus}
-%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
+%{_datadir}/dbus-1/system.d/corosync-signals.conf
 %endif
 %if %{with snmp}
 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
-- 
2.25.1

