From nobody Sun May 19 02:38:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1611470690; cv=none; d=zohomail.com; s=zohoarc; b=KyURfqiY5b4AyfLK6NGuPlRf7NWBHXSuqrKWFqdUqowMRbbHPJQbyRmH2C5QFyK8AcO3t4941Ec2jGlCXP2rhD2m4jnrb82FLOnzWWvtjZAkaV3NRzqPequegvpEMP/Y8bc97diYDblscDuMWHDHJuqQUomqfUHkX8kPc5aYHfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611470690; 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=gwMT4wME/e/rhFrD2/8KhDAW81JFvka49SbxIktzCuY=; b=jNUT4SgEMIyFVWuRsIWMDZ2FdFLUZf/mvcIihxn7fg1IMbjvlE6Mm3eArpcG/bxJGURSpJZtCPIU+9o4bomZ6Oq01a4cGWF8McQLtMZpE/9Llb+fm6CKDd6+rxUsSANZ3YgCKG1mTV9LzIey0BoKQBqBQfWeVY+XVmwO1pT3W/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1611470690350634.2577152606783; Sat, 23 Jan 2021 22:44:50 -0800 (PST) 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-425-dhge1SGMPJOTgqKoG4fhjQ-1; Sun, 24 Jan 2021 01:44:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62764107ACE3; Sun, 24 Jan 2021 06:44:40 +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 37A8E71CA7; Sun, 24 Jan 2021 06:44:39 +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 811284BB7B; Sun, 24 Jan 2021 06:44:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10O6iWsF015737 for ; Sun, 24 Jan 2021 01:44:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5223C76E16; Sun, 24 Jan 2021 06:44:32 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-97.phx2.redhat.com [10.3.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B86B6F13D for ; Sun, 24 Jan 2021 06:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611470689; 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=gwMT4wME/e/rhFrD2/8KhDAW81JFvka49SbxIktzCuY=; b=iY9KNLoEEenrLwTY2KpBnXYbf36RHPBMjqzOhcKUuVANVt7QZfWuQRKsQt45pfKKKNEQe+ Zj8xgqzFGiEX4zGZjibbJL7Lh/DDvqzhWXdNyL0T16f5kYTvvQyKcjqF1tWapwv3w1GJqB fYMKSmk73tavFEFfwDIpWU6knAMGV3w= X-MC-Unique: dhge1SGMPJOTgqKoG4fhjQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/2] build: support explicitly disabling netcf Date: Sun, 24 Jan 2021 01:44:25 -0500 Message-Id: <20210124064427.678575-2-laine@redhat.com> In-Reply-To: <20210124064427.678575-1-laine@redhat.com> References: <20210124064427.678575-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.16 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) Content-Type: text/plain; charset="utf-8" placing "-Dnetcf=3Ddisabled" on the meson commandline was ignored, meaning that even with that option the build would get WITH_NETCF if the netcf-devel package was found - the only way to disable it was to uninstall netcf-devel. This patch adds the small bit of logic to check the netcf meson commandline option (in addition to whether netcf-devel is installed) before defining WITH_NETCF. Signed-off-by: Laine Stump Reviewed-by: Michal Privoznik Reviewed-by: Neal Gompa --- meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index d8a63baac9..bfdffb16d2 100644 --- a/meson.build +++ b/meson.build @@ -1155,8 +1155,10 @@ libm_dep =3D cc.find_library('m', required : false) =20 netcf_version =3D '0.1.8' netcf_dep =3D dependency('netcf', version: '>=3D' + netcf_version, require= d: get_option('netcf')) -if netcf_dep.found() - conf.set('WITH_NETCF', 1) +if not get_option('netcf').disabled() + if netcf_dep.found() + conf.set('WITH_NETCF', 1) + endif endif =20 have_gnu_gettext_tools =3D false @@ -1550,7 +1552,7 @@ elif get_option('driver_hyperv').enabled() error('openwsman is required for the Hyper-V driver') endif =20 -if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIR= TD') and (udev_dep.found() or netcf_dep.found()) +if not get_option('driver_interface').disabled() and conf.has('WITH_LIBVIR= TD') and (udev_dep.found() or conf.has('WITH_NETCF')) conf.set('WITH_INTERFACE', 1) elif get_option('driver_interface').enabled() error('Requested the Interface driver without netcf or udev and libvirtd= support') @@ -2355,7 +2357,7 @@ libs_summary =3D { 'libssh': libssh_dep.found(), 'libssh2': libssh2_dep.found(), 'libutil': libutil_dep.found(), - 'netcf': netcf_dep.found(), + 'netcf': conf.has('WITH_NETCF'), 'NLS': have_gnu_gettext_tools, 'numactl': numactl_dep.found(), 'openwsman': openwsman_dep.found(), --=20 2.29.2 From nobody Sun May 19 02:38:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1611470764; cv=none; d=zohomail.com; s=zohoarc; b=iPrftq6je/FY+g0T3dblsimCosnGw2BEM9aVhQ2xOYhldBGtxoVmlHRJp730g4K12CO39TfyHVL5gwJD5MSyJZ1vZPoPHb0A8a3C+R8dC1ecuOYeC2oi90Z7Ikvb0DRt0aZLXlL7pI60pTizbyljGDNwpAAfzfbT1RQCQdgnbqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611470764; 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=zMB7KFNl+tmudB5htwItHl9inAXcBhINpoGUdeyXXaE=; b=G4ywpgGl+PPJszg4rHuKbI6w//sz0oyMn2Bq7npTwp24GTZkJKaahGVkSJSof0nhk3LX52h/k0XOtC8Yxj83T+541bVrArL2YWIBVXt61X7pHmsQg+rhMfEQt805TVgIFwZp/kSL7bE9MT1+A1L/uwOfvZ967Zjcs+AVB8ADzM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611470764488537.1196261004357; Sat, 23 Jan 2021 22:46:04 -0800 (PST) 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-604-jYSZSui-On6D6jnHMC-oCA-1; Sun, 24 Jan 2021 01:45:06 -0500 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 16082107ACE4; Sun, 24 Jan 2021 06:45:01 +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 E8AA360C62; Sun, 24 Jan 2021 06:45:00 +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 B39AD1809CA0; Sun, 24 Jan 2021 06:45:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10O6iWV2015743 for ; Sun, 24 Jan 2021 01:44:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id AAF5076E16; Sun, 24 Jan 2021 06:44:32 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-97.phx2.redhat.com [10.3.112.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 744A26F13D for ; Sun, 24 Jan 2021 06:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611470763; 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=zMB7KFNl+tmudB5htwItHl9inAXcBhINpoGUdeyXXaE=; b=UZAokaW0UITJngz4A7LYpaFuwU8TKEfwHvTaMlAXcBYdrUAYekMNFR0zUFoZAlim0SGRYE p+Jbt8gVuiW6GXAbLcFkKh9xFbMjozY5QjwFFIX9j3KzQfxlcWEBXH6JiF8YY5Hbnnmdsp SAMx5OXYamLd4ItuEwjBVdqWzNyjVVA= X-MC-Unique: jYSZSui-On6D6jnHMC-oCA-1 From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] rpm: disable netcf for the interface driver in rpm build on new targets Date: Sun, 24 Jan 2021 01:44:26 -0500 Message-Id: <20210124064427.678575-3-laine@redhat.com> In-Reply-To: <20210124064427.678575-1-laine@redhat.com> References: <20210124064427.678575-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 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) Content-Type: text/plain; charset="utf-8" libvirt.spec currently adds a hardcoded -Dnetcf=3Denabled to the meson commandline, so just setting the default in the meson.build file won't have any effect for rpm builds - it will be overridden. This patch changes the meson commandline in the spec file from hardcoded -Dnetcf=3Denabled to %{arg_netcf}, which is itself set according to the value of %{with_netcf}; and *that* is normally set according to the distro release of the build target (1 for Fedora >=3D 34 and RHEL >=3D 9, 0 otherwise), but can be manually overridden by adding "-without netcf" to the rpmbuild commandline. Along with being used to determine what arg to pass to meson, %{with_netcf} is also checked when deciding on whether or not to add netcf build time / install time dependencies ("Requires: netcf-libs" and "BuildRequires: netcf-devel") Signed-off-by: Laine Stump Reviewed-by: Michal Privoznik Reviewed-by: Neal Gompa --- libvirt.spec.in | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index b5892987cf..f7c350db41 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -101,6 +101,7 @@ %define with_sanlock 0 %define with_numad 0 %define with_firewalld_zone 0 +%define with_netcf 0 %define with_libssh2 0 %define with_wireshark 0 %define with_libssh 0 @@ -145,6 +146,10 @@ %define with_firewalld_zone 0%{!?_without_firewalld_zone:1} %endif =20 +%if 0%{?fedora} < 34 || 0%{?rhel} < 9 + %define with_netcf 0%{!?_without_netcf:1} +%endif + =20 # fuse is used to provide virtualized /proc for LXC %if %{with_lxc} @@ -358,8 +363,9 @@ BuildRequires: fuse-devel >=3D 2.8.6 %if %{with_libssh2} BuildRequires: libssh2-devel >=3D 1.3.0 %endif - +%if %{with_netcf} BuildRequires: netcf-devel >=3D 0.2.2 +%endif %if %{with_esx} BuildRequires: libcurl-devel %endif @@ -528,13 +534,13 @@ capabilities. Summary: Interface driver plugin for the libvirtd daemon Requires: libvirt-daemon =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} +%if %{with_netcf} Requires: netcf-libs >=3D 0.2.2 +%endif =20 %description daemon-driver-interface The interface driver plugin for the libvirtd daemon, providing -an implementation of the network interface APIs using the -netcf library - +an implementation of the network interface APIs using udev. =20 %package daemon-driver-secret Summary: Secret driver plugin for the libvirtd daemon @@ -1100,6 +1106,12 @@ exit 1 %define arg_firewalld_zone -Dfirewalld_zone=3Ddisabled %endif =20 +%if %{with_netcf} + %define arg_netcf -Dnetcf=3Denabled +%else + %define arg_netcf -Dnetcf=3Ddisabled +%endif + %if %{with_wireshark} %define arg_wireshark -Dwireshark_dissector=3Denabled %else @@ -1170,7 +1182,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) %{?arg_numad} \ -Dcapng=3Denabled \ %{?arg_fuse} \ - -Dnetcf=3Denabled \ + %{?arg_netcf} \ -Dselinux=3Denabled \ %{?arg_selinux_mount} \ -Dapparmor=3Ddisabled \ --=20 2.29.2