]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: stop hardcoding bhyve, bhyvectl, bhyveload paths
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 28 Apr 2025 10:47:34 +0000 (11:47 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 2 May 2025 08:31:27 +0000 (09:31 +0100)
Change the meson rules to always enable bhyve if on a FreeBSD host,
unless the meson options say not to.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build
src/bhyve/bhyve_command.c

index fd1800bbd9c8a3f116dc7748ec4b285066aab95f..a5a28e2c337bf357eaf51b8a5fe85dcb6c040646 100644 (file)
@@ -1495,16 +1495,7 @@ if not get_option('driver_libvirtd').disabled()
 endif
 
 if not get_option('driver_bhyve').disabled() and host_machine.system() == 'freebsd'
-  bhyve_prog = find_program('bhyve', required: get_option('driver_bhyve'))
-  bhyvectl_prog = find_program('bhyvectl', required: get_option('driver_bhyve'))
-  bhyveload_prog = find_program('bhyveload', required: get_option('driver_bhyve'))
-
-  if bhyve_prog.found() and bhyvectl_prog.found() and bhyveload_prog.found()
-    conf.set('WITH_BHYVE', 1)
-    conf.set_quoted('BHYVE', bhyve_prog.full_path())
-    conf.set_quoted('BHYVECTL', bhyvectl_prog.full_path())
-    conf.set_quoted('BHYVELOAD', bhyveload_prog.full_path())
-  endif
+  conf.set('WITH_BHYVE', 1)
 elif get_option('driver_bhyve').enabled()
   error('The bhyve driver cannot be enabled')
 endif
index 6578a4326cd450f46576ff8bc61d185c147981b0..44c66ea147bbdd5f951fb06ef2c8779a8785887f 100644 (file)
@@ -711,7 +711,7 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
      *            -S 31,uart,stdio \
      *            vm0
      */
-    g_autoptr(virCommand) cmd = virCommandNew(BHYVE);
+    g_autoptr(virCommand) cmd = virCommandNew("bhyve");
     size_t i;
     unsigned nusbcontrollers = 0;
     unsigned nisacontrollers = 0;
@@ -884,7 +884,7 @@ virCommand *
 virBhyveProcessBuildDestroyCmd(struct _bhyveConn *driver G_GNUC_UNUSED,
                                virDomainDef *def)
 {
-    virCommand *cmd = virCommandNew(BHYVECTL);
+    virCommand *cmd = virCommandNew("bhyvectl");
 
     virCommandAddArg(cmd, "--destroy");
     virCommandAddArgPair(cmd, "--vm", def->name);
@@ -907,7 +907,7 @@ virBhyveProcessBuildBhyveloadCmd(virDomainDef *def, virDomainDiskDef *disk)
 {
     virCommand *cmd;
 
-    cmd = virCommandNew(BHYVELOAD);
+    cmd = virCommandNew("bhyveload");
 
     if (def->os.bootloaderArgs == NULL) {
         VIR_DEBUG("bhyveload with default arguments");