From nobody Sun Feb 8 14:31:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1594893850; cv=none; d=zohomail.com; s=zohoarc; b=edDymhb+acYzwXV+CcfCV8EhmV/5KsJd4WvonUgBEDbmgal7xDQUx3YzRbgVOsuAK/m2dCCLj9PUXFoksaP/NGT7xjjaZ3FsuT7YEvegKHiQiKPux7NhCn5B7vJblW3uwZdJzVdQ5hJmWBAJLZXb+7R2ahsmEqFIfPIvAeaUKWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893850; 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=gwZ0fpMcLQPPBGmevYtaIL0HJxcpgOY/xs+q5f1ZlVQ=; b=nm12ZpDUWub/IzqOEyejFSQXK7iIkdW+3+Z7ujvQHeIioLcAWAI+DQon9Oh6vX5DCGwLEu74j4PFs6ZfmI5FirWxIt82AWR+St2tyzy/MoX58mWTSR3LzdDL+SKzuHVQwSGehALP9iUZciEwdreYReEpybSvGa3Hxi6RKb6IG2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594893850336240.0151882470807; Thu, 16 Jul 2020 03:04:10 -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-316-RcbqyjjcPeyyb-MMixaKtA-1; Thu, 16 Jul 2020 06:03:20 -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 06BA91014FEF; Thu, 16 Jul 2020 10:03:04 +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 D5EE96FEFB; Thu, 16 Jul 2020 10:03:03 +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 A2B7696222; Thu, 16 Jul 2020 10:03:03 +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 06GA2qHC016765 for ; Thu, 16 Jul 2020 06:02:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7AC552B6DB; Thu, 16 Jul 2020 10:02:52 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id E92562DE81 for ; Thu, 16 Jul 2020 10:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893849; 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=gwZ0fpMcLQPPBGmevYtaIL0HJxcpgOY/xs+q5f1ZlVQ=; b=InaCTsApI7YQpXUmFPjG3FZIsGB4Ovjq17OqZo4vt93h+upujhG0CEEJ6bt2u3iPr2bKWg Xt0q60135YxZRVKKe6KUAqPyUFolIafQqARBhvpvJsC8DdHv6WIdKxwdIrsNIjFSyZtN89 snzXXQKeF50GDRmucYCxA5sN8zvd/zY= X-MC-Unique: RcbqyjjcPeyyb-MMixaKtA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 094/351] meson: add network driver build option Date: Thu, 16 Jul 2020 11:55:30 +0200 Message-Id: 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-network.m4 | 51 --------------------------------------- meson.build | 11 +++++++++ meson_options.txt | 1 + 4 files changed, 12 insertions(+), 54 deletions(-) delete mode 100644 m4/virt-driver-network.m4 diff --git a/configure.ac b/configure.ac index fdc7755716c..2100beb582d 100644 --- a/configure.ac +++ b/configure.ac @@ -97,10 +97,8 @@ dnl dnl Virtualization drivers check dnl =20 -LIBVIRT_DRIVER_ARG_NETWORK LIBVIRT_DRIVER_ARG_INTERFACE =20 -LIBVIRT_DRIVER_CHECK_NETWORK LIBVIRT_DRIVER_CHECK_INTERFACE =20 =20 @@ -287,7 +285,6 @@ AC_MSG_NOTICE([=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Drivers]) AC_MSG_NOTICE([]) -LIBVIRT_DRIVER_RESULT_NETWORK LIBVIRT_DRIVER_RESULT_INTERFACE AC_MSG_NOTICE([]) AC_MSG_NOTICE([Storage Drivers]) diff --git a/m4/virt-driver-network.m4 b/m4/virt-driver-network.m4 deleted file mode 100644 index b98ce07c9cb..00000000000 --- a/m4/virt-driver-network.m4 +++ /dev/null @@ -1,51 +0,0 @@ -dnl The network driver -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -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_NETWORK], [ - LIBVIRT_ARG_WITH([NETWORK], [with virtual network driver], [yes]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_CHECK_NETWORK], [ - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_LIBVIRTD]) - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_QEMU]) - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_LXC]) - - dnl there's no use compiling the network driver without the libvirt - dnl daemon, nor compiling it for macOS, where it breaks the compile - - if test "$with_libvirtd" =3D "no" || test "$with_macos" =3D "yes"; then - with_network=3Dno - fi - - if test "$with_network" =3D "yes" ; then - AC_DEFINE_UNQUOTED([WITH_NETWORK], 1, [whether network driver is enabl= ed]) - fi - AM_CONDITIONAL([WITH_NETWORK], [test "$with_network" =3D "yes"]) - - with_bridge=3Dno - if test "$with_qemu:$with_lxc:$with_network" !=3D "no:no:no"; then - with_bridge=3Dyes - AC_DEFINE_UNQUOTED([WITH_BRIDGE], 1, [whether bridge code is needed]) - fi - AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" =3D "yes"]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_RESULT_NETWORK], [ - LIBVIRT_RESULT([Network], [$with_network]) -]) diff --git a/meson.build b/meson.build index eacfd57ee49..bbc74e32dd5 100644 --- a/meson.build +++ b/meson.build @@ -1683,6 +1683,12 @@ elif get_option('driver_lxc').enabled() error('linux and remote_driver are required for LXC') endif =20 +# there's no use compiling the network driver without the libvirt +# daemon, nor compiling it for macOS, where it breaks the compile +if not get_option('driver_network').disabled() and conf.has('WITH_LIBVIRTD= ') and host_machine.system() !=3D 'darwin' + conf.set('WITH_NETWORK', 1) +endif + if not get_option('driver_openvz').disabled() and host_machine.system() = =3D=3D 'linux' conf.set('WITH_OPENVZ', 1) elif get_option('driver_openvz').enabled() @@ -1836,6 +1842,10 @@ elif get_option('secdriver_selinux').enabled() error('You must install the libselinux development package in order to c= ompile libvirt.') endif =20 +if conf.has('WITH_QEMU') or conf.has('WITH_LXC') or conf.has('WITH_NETWORK= ') + conf.set('WITH_BRIDGE', 1) +endif + =20 # define top include directory =20 @@ -1868,6 +1878,7 @@ driver_summary =3D { 'Bhyve': conf.has('WITH_BHYVE'), 'Test': conf.has('WITH_TEST'), 'Remote': conf.has('WITH_REMOTE'), + 'Network': conf.has('WITH_NETWORK'), 'Libvirtd': conf.has('WITH_LIBVIRTD'), } summary(driver_summary, section: 'Drivers', bool_yn: true) diff --git a/meson_options.txt b/meson_options.txt index fd370244f56..045c211ca46 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -53,6 +53,7 @@ option('driver_hyperv', type: 'feature', value: 'auto', d= escription: 'Hyper-V dr option('driver_libvirtd', type: 'feature', value: 'auto', description: 'li= bvirtd driver') option('driver_libxl', type: 'feature', value: 'auto', description: 'libxe= nlight driver') option('driver_lxc', type: 'feature', value: 'auto', description: 'Linux C= ontainer driver') +option('driver_network', type: 'feature', value: 'auto', description: 'vir= tual network driver') option('driver_openvz', type: 'feature', value: 'auto', description: 'Open= VZ driver') option('driver_qemu', type: 'feature', value: 'auto', description: 'QEMU/K= VM driver') option('qemu_user', type: 'string', value: '', description: 'username to r= un QEMU system instance as') --=20 2.26.2