From nobody Sun Feb 8 18:19:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594893795; cv=none; d=zohomail.com; s=zohoarc; b=O9ySzx//BtbBWkeDZI5pi+Z6lWEYpx7Zt0EOdLuefScqvD5atyH68nVm4m4MoVGMcua0ShiuZxzsdQhLpedRPa9YAqGywsgkA4MO0X2LHsJkPSCk6DFmZjUy7K2x1/jDBIkYK/J3dYC5GBuBemgxt/6nv1o+4wSXUsv9X95jyvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893795; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Voc7b+MaGp3Rjsq1LrNkPv6QWBKfNESnT97IoEK6QiU=; b=dYUFvzAfQhcpc0BQFBmt+lSWRme9N+u9xpsS6Ly11pkcsFQadBoN2IvJhZ5rQJym9Kr9TuAHB732/0nw8WVsnkGWK72IvM/ALq/SvfQMO0tj+MUTbp6nfUj2spGJ5AcAdFbzQVxPbNLQSH5gW1YEaW1/5xqwoVLPg5e8hAJuaLc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594893795926907.115942707956; Thu, 16 Jul 2020 03:03:15 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-Drm40SyuO_6NOG0xghGI9g-1; Thu, 16 Jul 2020 06:03:12 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D7CC1006B0D; Thu, 16 Jul 2020 10:02:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC4FC610AF; Thu, 16 Jul 2020 10:02:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8548996237; Thu, 16 Jul 2020 10:02:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA2fBG016603 for ; Thu, 16 Jul 2020 06:02:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 921472B6E2; Thu, 16 Jul 2020 10:02:41 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0CABD2B6DB for ; Thu, 16 Jul 2020 10:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893794; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Voc7b+MaGp3Rjsq1LrNkPv6QWBKfNESnT97IoEK6QiU=; b=cALbQKNgUoXtSa7tzqQX4wnDc3ZwwzT2DvPQmlMdPFqXkwNjn9b4aBdgRJ7zoEuKN4h+yq qmFHlZAGNvCDjtJP3uRCaWy6WpM9IwzzXtqY/lzDmwMjYvC6OeDSmRGBDY+E4y7o6lrgM9 9Bky3gFUzfJtcolfSyiwUl/6VqB/tTE= X-MC-Unique: Drm40SyuO_6NOG0xghGI9g-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 082/351] meson: add BHyVe build option Date: Thu, 16 Jul 2020 11:55:18 +0200 Message-Id: <48f049f3522c50b46621e075ac3aad1a893cffef.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- configure.ac | 3 --- m4/virt-driver-bhyve.m4 | 56 ----------------------------------------- meson.build | 16 ++++++++++++ meson_options.txt | 1 + 4 files changed, 17 insertions(+), 59 deletions(-) delete mode 100644 m4/virt-driver-bhyve.m4 diff --git a/configure.ac b/configure.ac index 25250fd2c4c..155d7495840 100644 --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,6 @@ LIBVIRT_DRIVER_ARG_LIBXL LIBVIRT_DRIVER_ARG_VBOX LIBVIRT_DRIVER_ARG_LXC LIBVIRT_DRIVER_ARG_VZ -LIBVIRT_DRIVER_ARG_BHYVE LIBVIRT_DRIVER_ARG_ESX LIBVIRT_DRIVER_ARG_HYPERV LIBVIRT_DRIVER_ARG_TEST @@ -130,7 +129,6 @@ LIBVIRT_DRIVER_CHECK_LIBXL LIBVIRT_DRIVER_CHECK_VBOX LIBVIRT_DRIVER_CHECK_LXC LIBVIRT_DRIVER_CHECK_VZ -LIBVIRT_DRIVER_CHECK_BHYVE LIBVIRT_DRIVER_CHECK_ESX LIBVIRT_DRIVER_CHECK_HYPERV LIBVIRT_DRIVER_CHECK_TEST @@ -338,7 +336,6 @@ LIBVIRT_DRIVER_RESULT_LXC LIBVIRT_DRIVER_RESULT_ESX LIBVIRT_DRIVER_RESULT_HYPERV LIBVIRT_DRIVER_RESULT_VZ -LIBVIRT_DRIVER_RESULT_BHYVE LIBVIRT_DRIVER_RESULT_TEST LIBVIRT_DRIVER_RESULT_NETWORK LIBVIRT_DRIVER_RESULT_INTERFACE diff --git a/m4/virt-driver-bhyve.m4 b/m4/virt-driver-bhyve.m4 deleted file mode 100644 index 14b30c0b3e7..00000000000 --- a/m4/virt-driver-bhyve.m4 +++ /dev/null @@ -1,56 +0,0 @@ -dnl The bhyve driver -dnl -dnl Copyright (C) 2014 Roman Bogorodskiy -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_DRIVER_ARG_BHYVE],[ - LIBVIRT_ARG_WITH_FEATURE([BHYVE], [BHyVe], [check]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_CHECK_BHYVE],[ - if test "$with_bhyve" !=3D "no"; then - AC_PATH_PROG([BHYVE], [bhyve], [], [$PATH:/usr/sbin]) - AC_PATH_PROG([BHYVECTL], [bhyvectl], [], [$PATH:/usr/sbin]) - AC_PATH_PROG([BHYVELOAD], [bhyveload], [], [$PATH:/usr/sbin/]) - - if test -z "$BHYVE" || test -z "$BHYVECTL" || \ - test -z "$BHYVELOAD" || test "$with_freebsd" =3D "no"; then - if test "$with_bhyve" =3D "check"; then - with_bhyve=3D"no" - else - AC_MSG_ERROR([The bhyve driver cannot be enabled]) - fi - else - with_bhyve=3D"yes" - fi - fi - - if test "$with_bhyve" =3D "yes"; then - AC_DEFINE_UNQUOTED([WITH_BHYVE], 1, [whether bhyve driver is enabl= ed]) - AC_DEFINE_UNQUOTED([BHYVE], ["$BHYVE"], - [Location of the bhyve tool]) - AC_DEFINE_UNQUOTED([BHYVECTL], ["$BHYVECTL"], - [Location of the bhyvectl tool]) - AC_DEFINE_UNQUOTED([BHYVELOAD], ["$BHYVELOAD"], - [Location of the bhyveload tool]) - fi - AM_CONDITIONAL([WITH_BHYVE], [test "$with_bhyve" =3D "yes"]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_RESULT_BHYVE],[ - LIBVIRT_RESULT([Bhyve], [$with_bhyve]) -]) diff --git a/meson.build b/meson.build index 4aae01f62e5..5d9eb1142d0 100644 --- a/meson.build +++ b/meson.build @@ -1571,6 +1571,21 @@ if not get_option('driver_libvirtd').disabled() endif endif =20 +if not get_option('driver_bhyve').disabled() and host_machine.system() =3D= =3D 'freebsd' + bhyve_prog =3D find_program('bhyve', required: get_option('driver_bhyve'= )) + bhyvectl_prog =3D find_program('bhyvectl', required: get_option('driver_= bhyve')) + bhyveload_prog =3D find_program('bhyveload', required: get_option('drive= r_bhyve')) + + if bhyve_prog.found() and bhyvectl_prog.found() and bhyveload_prog.found= () + conf.set('WITH_BHYVE', 1) + conf.set_quoted('BHYVE', bhyve_prog.path()) + conf.set_quoted('BHYVECTL', bhyvectl_prog.path()) + conf.set_quoted('BHYVELOAD', bhyveload_prog.path()) + endif +elif get_option('driver_bhyve').enabled() + error('The bhyve driver cannot be enabled') +endif + =20 # define top include directory =20 @@ -1591,6 +1606,7 @@ configure_file(output: 'meson-config.h', configuratio= n: conf) # print configuration summary =20 driver_summary =3D { + 'Bhyve': conf.has('WITH_BHYVE'), 'Remote': conf.has('WITH_REMOTE'), 'Libvirtd': conf.has('WITH_LIBVIRTD'), } diff --git a/meson_options.txt b/meson_options.txt index 8731f78defe..0e1b43b8350 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -47,6 +47,7 @@ option('yajl', type: 'feature', value: 'auto', descriptio= n: 'yajl support') =20 =20 # build driver options +option('driver_bhyve', type: 'feature', value: 'auto', description: 'BHyVe= driver') option('driver_libvirtd', type: 'feature', value: 'auto', description: 'li= bvirtd driver') option('driver_remote', type: 'feature', value: 'enabled', description: 'r= emote driver') option('remote_default_mode', type: 'combo', choices: ['legacy', 'direct']= , value: 'legacy', description: 'remote driver default mode') --=20 2.26.2