The libvirt-dbus daemon is not supposed to be invoked
explicitly by the user, but rather to be spawned on-demand
by the D-Bus daemon: as such, @sbindir@ is a more suitable
location in which to install it.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
data/Makefile.am | 4 ++--
data/session/org.libvirt.service.in | 2 +-
data/system/org.libvirt.service.in | 2 +-
libvirt-dbus.spec.in | 2 +-
src/Makefile.am | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/data/Makefile.am b/data/Makefile.am
index 7b523da..660a100 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -62,12 +62,12 @@ CLEANFILES = \
session/org.libvirt.service: session/org.libvirt.service.in
$(AM_V_GEN)$(MKDIR_P) session && \
- sed -e 's|[@]bindir[@]|$(bindir)|g' < $< > $@-t && \
+ sed -e 's|[@]sbindir[@]|$(sbindir)|g' < $< > $@-t && \
mv $@-t $@
system/org.libvirt.service: system/org.libvirt.service.in
$(AM_V_GEN)$(MKDIR_P) system && \
- sed -e 's|[@]bindir[@]|$(bindir)|g' \
+ sed -e 's|[@]sbindir[@]|$(sbindir)|g' \
-e 's|[@]SYSTEM_USER[@]|$(SYSTEM_USER)|' \
< $< > $@-t && mv $@-t $@
diff --git a/data/session/org.libvirt.service.in b/data/session/org.libvirt.service.in
index a8cb6a9..8a56b95 100644
--- a/data/session/org.libvirt.service.in
+++ b/data/session/org.libvirt.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.libvirt
-Exec=@bindir@/libvirt-dbus --session
+Exec=@sbindir@/libvirt-dbus --session
diff --git a/data/system/org.libvirt.service.in b/data/system/org.libvirt.service.in
index 0d3abdd..781a503 100644
--- a/data/system/org.libvirt.service.in
+++ b/data/system/org.libvirt.service.in
@@ -1,4 +1,4 @@
[D-BUS Service]
Name=org.libvirt
-Exec=@bindir@/libvirt-dbus --system
+Exec=@sbindir@/libvirt-dbus --system
User=@SYSTEM_USER@
diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in
index f99e041..626e2da 100644
--- a/libvirt-dbus.spec.in
+++ b/libvirt-dbus.spec.in
@@ -51,7 +51,7 @@ exit 0
%files
%doc README.md HACKING.md AUTHORS NEWS
%license COPYING
-%{_bindir}/libvirt-dbus
+%{_sbindir}/libvirt-dbus
%{_datadir}/dbus-1/services/org.libvirt.service
%{_datadir}/dbus-1/system-services/org.libvirt.service
%{_datadir}/dbus-1/system.d/org.libvirt.conf
diff --git a/src/Makefile.am b/src/Makefile.am
index b5bf129..bc13feb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,7 +28,7 @@ libutil_la_SOURCES = \
util.h \
$(NULL)
-bin_PROGRAMS = \
+sbin_PROGRAMS = \
libvirt-dbus \
$(NULL)
--
2.17.1