803fb7
From 33ee9624d4fb50f29f2e3c8ffd0c7efa95a03f02 Mon Sep 17 00:00:00 2001
803fb7
From: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
803fb7
Date: Tue, 17 Mar 2015 16:37:07 +0100
803fb7
Subject: [PATCH] resolved: Do not add .busname dependencies, when compiling
803fb7
 without kdbus.
803fb7
803fb7
(cherry picked from commit defa8e675b2903ad53e093bb2847c7256f0779a5)
803fb7
803fb7
Cherry-picked from: 33ff64c
803fb7
Resolves: #1222517
803fb7
---
803fb7
 Makefile.am                                                           | 2 +-
803fb7
 units/.gitignore                                                      | 1 +
803fb7
 units/{systemd-resolved.service.in => systemd-resolved.service.m4.in} | 2 ++
803fb7
 3 files changed, 4 insertions(+), 1 deletion(-)
803fb7
 rename units/{systemd-resolved.service.in => systemd-resolved.service.m4.in} (96%)
803fb7
803fb7
diff --git a/Makefile.am b/Makefile.am
803fb7
index 8474b2912..604eaf2f1 100644
803fb7
--- a/Makefile.am
803fb7
+++ b/Makefile.am
803fb7
@@ -5520,7 +5520,7 @@ dist_dbussystemservice_DATA += \
803fb7
 	src/resolve/org.freedesktop.resolve1.service
803fb7
 
803fb7
 EXTRA_DIST += \
803fb7
-	units/systemd-resolved.service.in
803fb7
+	units/systemd-resolved.service.m4.in
803fb7
 
803fb7
 SYSTEM_UNIT_ALIASES += \
803fb7
 	systemd-resolved.service dbus-org.freedesktop.resolve1.service
803fb7
diff --git a/units/.gitignore b/units/.gitignore
803fb7
index 638a7abc4..7f3e0d093 100644
803fb7
--- a/units/.gitignore
803fb7
+++ b/units/.gitignore
803fb7
@@ -58,6 +58,7 @@
803fb7
 /systemd-reboot.service
803fb7
 /systemd-remount-fs.service
803fb7
 /systemd-resolved.service
803fb7
+/systemd-resolved.service.m4
803fb7
 /systemd-hibernate-resume@.service
803fb7
 /systemd-rfkill@.service
803fb7
 /systemd-shutdownd.service
803fb7
diff --git a/units/systemd-resolved.service.in b/units/systemd-resolved.service.m4.in
803fb7
similarity index 96%
803fb7
rename from units/systemd-resolved.service.in
803fb7
rename to units/systemd-resolved.service.m4.in
803fb7
index b643da9a7..d133847d5 100644
803fb7
--- a/units/systemd-resolved.service.in
803fb7
+++ b/units/systemd-resolved.service.m4.in
803fb7
@@ -10,11 +10,13 @@ Description=Network Name Resolution
803fb7
 Documentation=man:systemd-resolved.service(8)
803fb7
 After=systemd-networkd.service network.service
803fb7
 
803fb7
+m4_ifdef(`ENABLE_KDBUS',
803fb7
 # On kdbus systems we pull in the busname explicitly, because it
803fb7
 # carries policy that allows the daemon to acquire its name.
803fb7
 Wants=org.freedesktop.resolve1.busname
803fb7
 After=org.freedesktop.resolve1.busname
803fb7
 
803fb7
+)m4_dnl
803fb7
 [Service]
803fb7
 Type=notify
803fb7
 Restart=always