From caa4026b8b32d0bc2b8241aa0ff5cdaa0be45906 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Dec 06 2022 19:17:37 +0000
Subject: Rename DBus service and conf files to match canonical name


See also https://gitlab.freedesktop.org/dbus/dbus/-/issues/168

BZ 2151243

Signed-off-by: Rob Crittenden <rcritten@redhat.com>

---

diff --git a/.gitignore b/.gitignore
index a736fb7..4f915cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,8 +51,8 @@ compile
 test-driver
 
 # output
-/dbus/certmonger.conf
-/dbus/certmonger.service
+/dbus/org.fedorahosted.certmonger.conf
+/dbus/org.fedorahosted.certmonger.service
 /src/certmonger
 /src/certmonger-session
 /src/certmonger.conf
diff --git a/configure.ac b/configure.ac
index 86164b3..df7e051 100644
--- a/configure.ac
+++ b/configure.ac
@@ -884,4 +884,4 @@ else
 fi
 
 AC_CONFIG_COMMANDS(src_introspect_sh,[chmod +x src/introspect.sh])
-AC_OUTPUT(Makefile src/Makefile dbus/Makefile systemd/Makefile sysvinit/Makefile sysvinit/certmonger tests/Makefile tests/tools/Makefile dbus/certmonger.conf dbus/certmonger.service src/introspect.sh src/certmonger.8 src/getcert.1 src/getcert-request.1 src/getcert-list.1 src/getcert-list-cas.1 src/getcert-start-tracking.1 src/getcert-stop-tracking.1 src/selfsign-getcert.1 src/ipa-getcert.1 src/getcert-resubmit.1 src/certmonger-certmaster-submit.8 src/certmonger-ipa-submit.8 src/certmonger-dogtag-ipa-renew-agent-submit.8 src/certmaster-getcert.1 src/certmonger.conf.5 po/Makefile.in src/certmonger.conf systemd/certmonger.service systemd/certmonger.conf systemd/org.fedorahosted.certmonger.service src/getcert-refresh.1 src/getcert-refresh-ca.1 src/local-getcert.1 src/certmonger-local-submit.8 src/getcert-status.1 src/certmonger-dogtag-submit.8 src/certmonger-scep-submit.8 src/getcert-add-ca.1 src/getcert-add-scep-ca.1 src/getcert-modify-ca.1 src/getcert-remove-ca.1 src/getcert-rekey.1)
+AC_OUTPUT(Makefile src/Makefile dbus/Makefile systemd/Makefile sysvinit/Makefile sysvinit/certmonger tests/Makefile tests/tools/Makefile dbus/org.fedorahosted.certmonger.conf dbus/org.fedorahosted.certmonger.service src/introspect.sh src/certmonger.8 src/getcert.1 src/getcert-request.1 src/getcert-list.1 src/getcert-list-cas.1 src/getcert-start-tracking.1 src/getcert-stop-tracking.1 src/selfsign-getcert.1 src/ipa-getcert.1 src/getcert-resubmit.1 src/certmonger-certmaster-submit.8 src/certmonger-ipa-submit.8 src/certmonger-dogtag-ipa-renew-agent-submit.8 src/certmaster-getcert.1 src/certmonger.conf.5 po/Makefile.in src/certmonger.conf systemd/certmonger.service systemd/certmonger.conf systemd/org.fedorahosted.certmonger.service src/getcert-refresh.1 src/getcert-refresh-ca.1 src/local-getcert.1 src/certmonger-local-submit.8 src/getcert-status.1 src/certmonger-dogtag-submit.8 src/certmonger-scep-submit.8 src/getcert-add-ca.1 src/getcert-add-scep-ca.1 src/getcert-modify-ca.1 src/getcert-remove-ca.1 src/getcert-rekey.1)
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index 036a1ef..9fd84ac 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -1,8 +1,8 @@
 if SESSIONBUS
 servicedir = @SESSIONBUSSERVICESDIR@
-service_DATA = certmonger.service
+service_DATA = org.fedorahosted.certmonger.service
 endif
 if SYSTEMBUS
 systemdbusdir = $(sysconfdir)/dbus-1/system.d
-systemdbus_DATA = certmonger.conf
+systemdbus_DATA = org.fedorahosted.certmonger.conf
 endif
diff --git a/dbus/certmonger.conf.in b/dbus/certmonger.conf.in
deleted file mode 100644
index 37f1a8e..0000000
--- a/dbus/certmonger.conf.in
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-
-  <!-- Only root can own and communicate with the service -->
-
-  <policy context="default">
-    <deny own="@CM_DBUS_NAME@"/>
-    <deny send_destination="@CM_DBUS_NAME@"/>
-  </policy>
-
-  <policy user="root">
-    <allow own="@CM_DBUS_NAME@"/>
-
-    <allow send_destination="@CM_DBUS_NAME@"
-           send_interface="@CM_DBUS_NAME@"/>
-    <allow send_destination="@CM_DBUS_NAME@"
-           send_interface="@CM_DBUS_NAME@.ca"/>
-    <allow send_destination="@CM_DBUS_NAME@"
-           send_interface="@CM_DBUS_NAME@.request"/>
-    <allow send_destination="@CM_DBUS_NAME@"
-           send_interface="org.freedesktop.DBus.Introspectable"/>
-    <allow send_destination="@CM_DBUS_NAME@"
-           send_interface="org.freedesktop.DBus.Properties"/>
-  </policy>
-
-</busconfig>
diff --git a/dbus/certmonger.service.in b/dbus/certmonger.service.in
deleted file mode 100644
index 74a8c55..0000000
--- a/dbus/certmonger.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=@CM_DBUS_NAME@
-Exec=@mylibexecdir@/certmonger-session
diff --git a/dbus/org.fedorahosted.certmonger.conf.in b/dbus/org.fedorahosted.certmonger.conf.in
new file mode 100644
index 0000000..37f1a8e
--- /dev/null
+++ b/dbus/org.fedorahosted.certmonger.conf.in
@@ -0,0 +1,28 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+  <!-- Only root can own and communicate with the service -->
+
+  <policy context="default">
+    <deny own="@CM_DBUS_NAME@"/>
+    <deny send_destination="@CM_DBUS_NAME@"/>
+  </policy>
+
+  <policy user="root">
+    <allow own="@CM_DBUS_NAME@"/>
+
+    <allow send_destination="@CM_DBUS_NAME@"
+           send_interface="@CM_DBUS_NAME@"/>
+    <allow send_destination="@CM_DBUS_NAME@"
+           send_interface="@CM_DBUS_NAME@.ca"/>
+    <allow send_destination="@CM_DBUS_NAME@"
+           send_interface="@CM_DBUS_NAME@.request"/>
+    <allow send_destination="@CM_DBUS_NAME@"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
+    <allow send_destination="@CM_DBUS_NAME@"
+           send_interface="org.freedesktop.DBus.Properties"/>
+  </policy>
+
+</busconfig>
diff --git a/dbus/org.fedorahosted.certmonger.service.in b/dbus/org.fedorahosted.certmonger.service.in
new file mode 100644
index 0000000..74a8c55
--- /dev/null
+++ b/dbus/org.fedorahosted.certmonger.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=@CM_DBUS_NAME@
+Exec=@mylibexecdir@/certmonger-session

