From nobody Mon Apr 29 10:48:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1638540062; cv=none; d=zohomail.com; s=zohoarc; b=MoMYfhy+YVIQPruiXRFna4QjtbWXzYCsx0NSlt8kDK2gtbA/YV7ewDBxLYtzTE39OFJD4tUVO9NgyYexjwiw6DbxK5h5+5R2F2gnO4RlqQbuzOCUcdQ7Zt2BW8EAoc9PLpu2HbzPX1vCaf9HPoL8B/HqGCRemdbs8Z8hLVUsp2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638540062; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2xdeLufAzj6wyv9jiwVAuTHgJP29We085ZZU5nsnU64=; b=P+pi9tJQp2j4ZZIKhpKJ0OA6vBusTTe3A7JENpYC/F350nIFaiHwn8NAMD9eczHzo03Ro31UKyYqW830h4mnGehv1nks/er+pYPhwuwNt8LPEUPSxnUbUe/clAIid/cIab8dUQzqcT5inNYcqu6xv1qNnTTL7sMnXAypYAYL2Os= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1638540062581747.3595119799836; Fri, 3 Dec 2021 06:01:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-338-Vcf9KmunOX6LgTy6__MktQ-1; Fri, 03 Dec 2021 09:00:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D265F1023F64; Fri, 3 Dec 2021 14:00:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3803D10016F5; Fri, 3 Dec 2021 14:00:49 +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 9B5E71809CB8; Fri, 3 Dec 2021 14:00:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B3Dtt4s024714 for ; Fri, 3 Dec 2021 08:55:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id C559360C7F; Fri, 3 Dec 2021 13:55:55 +0000 (UTC) Received: from kinshicho.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.194.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B68060C4A for ; Fri, 3 Dec 2021 13:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638540061; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2xdeLufAzj6wyv9jiwVAuTHgJP29We085ZZU5nsnU64=; b=GUelqpvea8Xv5hXMLl02kzboUDp+biTFJIOIZEMkMIKvdlixKupwNWfTNMqW+aGsn6lhZU O/CIfs9/ttO8XUNlwTo1x+NdYNORtJQxjFlOTlGdsAgZqbGwRD94kHDFugOBlfPN8TEkt3 Aft2pYiCEe4NvpbacDiMeakH+OGVcZk= X-MC-Unique: Vcf9KmunOX6LgTy6__MktQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] meson: Improve network driver enablement logic Date: Fri, 3 Dec 2021 14:55:52 +0100 Message-Id: <20211203135552.20507-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638540073458100001 Content-Type: text/plain; charset="utf-8" The Homebrew package explicitly enables this driver despite us disabling it by default on macOS, so it must be functional to at least some extent and certainly can't be causing any build failures. Additionally, if the user has explicitly asked for the network driver to be enabled but libvirtd is disabled for whatever reason, we should error out instead of silently disabling the network driver. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- Homebrew formula showing that the network driver is explicitly enabled in the package: https://github.com/Homebrew/homebrew-core/blob/3aff61292a3ed16bc715ba23fc2f= a74251d82aa4/Formula/libvirt.rb#L58 Test pipeline showing that enabling the network driver by default on macOS doesn't result in build failures: https://gitlab.com/abologna/libvirt/-/pipelines/421956249 meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index ba2f0d21de..cea8bbfa0c 100644 --- a/meson.build +++ b/meson.build @@ -1645,10 +1645,10 @@ if not get_option('driver_ch').disabled() and host_= machine.system() =3D=3D 'linux' a endif 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' +if not get_option('driver_network').disabled() and conf.has('WITH_LIBVIRTD= ') conf.set('WITH_NETWORK', 1) +elif get_option('driver_network').enabled() + error('libvirtd must be enabled to build the network driver') endif =20 if udev_dep.found() and conf.has('WITH_LIBVIRTD') --=20 2.31.1