The GDBus implementation requires XML files with interface description
and libvirt-dbus daemon needs to load them.
In order to run the daemon without installing it you can use the run
script to configure the environment variable for you.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
.gitignore | 1 +
configure.ac | 2 ++
run.in | 22 ++++++++++++++++++++++
3 files changed, 25 insertions(+)
create mode 100644 run.in
diff --git a/.gitignore b/.gitignore
index b468bbd..c6d9754 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ vgcore.*
/libvirt-dbus-*.tar.gz
/libvirt-dbus.spec
/m4/aclocal\.m4
+/run
/stamp-h1
/data/session/org.libvirt.service
diff --git a/configure.ac b/configure.ac
index 0e3bc01..36a4720 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,8 @@ LIBVIRT_ARG_WITH([SYSTEM_USER], [username to run system instance as],
SYSTEM_USER=$with_system_user
AC_SUBST([SYSTEM_USER])
+AC_CONFIG_FILES([run],
+ [chmod +x,-w run])
AC_OUTPUT(Makefile
data/Makefile
src/Makefile
diff --git a/run.in b/run.in
new file mode 100644
index 0000000..1e48dc8
--- /dev/null
+++ b/run.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# With this script you can run libvirt-dbus daemon without needing to
+# install it first. You just have to do for example:
+#
+# ./run ./src/libvirt-dbus [args ...]
+#
+# You can also run libvirt-dbus under valgrind like this:
+#
+# ./run valgrind [valgrind args ...] ./src/libvirt-dbus [args ...]
+#
+# or under gdb:
+#
+# ./run gdb --args ./src/libvirt-dbus [args ...]
+#
+
+# Find this script
+b=@abs_tob_builddir@
+
+export VIRT_DBUS_INTERFACES_DIR="$b/data"
+
+exec "$@"
--
2.14.3