]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu-conf: add configurable dbus-daemon location
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 25 Feb 2020 09:55:06 +0000 (10:55 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Mar 2020 14:57:33 +0000 (15:57 +0100)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
m4/virt-driver-qemu.m4
src/qemu/libvirtd_qemu.aug
src/qemu/qemu.conf
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/test_libvirtd_qemu.aug.in

index a1d2c66bba51f368143d805bcb0f4f123d2f69e1..886261fce5c26ad2e271a7a3051704232b2909c4 100644 (file)
@@ -110,6 +110,12 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
                [/usr/bin:/usr/libexec])
   AC_DEFINE_UNQUOTED([QEMU_SLIRP_HELPER], ["$QEMU_SLIRP_HELPER"],
                      [QEMU slirp helper])
+
+  AC_PATH_PROG([QEMU_DBUS_DAEMON], [dbus-daemon],
+               [/usr/bin/dbus-daemon],
+               [/usr/bin:/usr/libexec])
+  AC_DEFINE_UNQUOTED([QEMU_DBUS_DAEMON], ["$QEMU_DBUS_DAEMON"],
+                     [QEMU dbus daemon])
 ])
 
 AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [
index 3014fa6b86c63ec8c96103f0b43c6e61d85c8a5d..404498b6113e9fd1b310998956da5d6df676aff1 100644 (file)
@@ -89,6 +89,7 @@ module Libvirtd_qemu =
                  | str_entry "bridge_helper"
                  | str_entry "pr_helper"
                  | str_entry "slirp_helper"
+                 | str_entry "dbus_daemon"
                  | bool_entry "set_process_name"
                  | int_entry "max_processes"
                  | int_entry "max_files"
index 815d2d78aef5c9f35d41adc532b4cfd71c62d7cb..abdbf07fec606850e96baaa0f08e464e11138a15 100644 (file)
 # Path to the SLIRP networking helper.
 #slirp_helper = "/usr/bin/slirp-helper"
 
+# Path to the dbus-daemon
+#dbus_daemon = "/usr/bin/dbus-daemon"
+
 # User for the swtpm TPM Emulator
 #
 # Default is 'tss'; this is the same user that tcsd (TrouSerS) installs
index d57ffdaeb595ccc92e80bf90b52cc21939f8e6f6..591bd557235e22a9c682784b582a705483d00982 100644 (file)
@@ -263,6 +263,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged,
     cfg->bridgeHelperName = g_strdup(QEMU_BRIDGE_HELPER);
     cfg->prHelperName = g_strdup(QEMU_PR_HELPER);
     cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER);
+    cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON);
 
     cfg->securityDefaultConfined = true;
     cfg->securityRequireConfined = false;
@@ -350,6 +351,7 @@ static void virQEMUDriverConfigDispose(void *obj)
     VIR_FREE(cfg->bridgeHelperName);
     VIR_FREE(cfg->prHelperName);
     VIR_FREE(cfg->slirpHelperName);
+    VIR_FREE(cfg->dbusDaemonName);
 
     VIR_FREE(cfg->saveImageFormat);
     VIR_FREE(cfg->dumpImageFormat);
@@ -641,6 +643,9 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
     if (virConfGetValueString(conf, "slirp_helper", &cfg->slirpHelperName) < 0)
         return -1;
 
+    if (virConfGetValueString(conf, "dbus_daemon", &cfg->dbusDaemonName) < 0)
+        return -1;
+
     if (virConfGetValueBool(conf, "set_process_name", &cfg->setProcessName) < 0)
         return -1;
     if (virConfGetValueUInt(conf, "max_processes", &cfg->maxProcesses) < 0)
index 82fea63fbc4df09a2f25edc289740c1c93bd98bd..a2efdef1e327d5a46c2fc4e3636f49eb73dfbc6a 100644 (file)
@@ -157,6 +157,7 @@ struct _virQEMUDriverConfig {
     char *bridgeHelperName;
     char *prHelperName;
     char *slirpHelperName;
+    char *dbusDaemonName;
 
     bool macFilter;
 
index fca9a942c9d5b6001cd8c535898f151b5d53d306..19da591aaefe0cb0b030df44162782f04fa6b473 100644 (file)
@@ -105,6 +105,7 @@ module Test_libvirtd_qemu =
 { "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
 { "pr_helper" = "/usr/bin/qemu-pr-helper" }
 { "slirp_helper" = "/usr/bin/slirp-helper" }
+{ "dbus_daemon" = "/usr/bin/dbus-daemon" }
 { "swtpm_user" = "tss" }
 { "swtpm_group" = "tss" }
 { "capability_filters"