From nobody Thu Sep 19 00:18:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1715968859112301.12537717666135; Fri, 17 May 2024 11:00:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 075781BB1; Fri, 17 May 2024 14:00:58 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 01AB019DA; Fri, 17 May 2024 13:31:53 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8CA9B1B85; Fri, 17 May 2024 13:30:21 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3778E1A1A for ; Fri, 17 May 2024 13:30:13 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-54-PLS62zFPMRW0Jo2ogE1Vig-1; Fri, 17 May 2024 13:30:11 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 26FB2800994 for ; Fri, 17 May 2024 17:30:11 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.16.223]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10E7E40C6EB7 for ; Fri, 17 May 2024 17:30:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715967012; h=from:from: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; bh=wkw10VG3xsl71rBGMCapk3tXs3ywTRXncIivSBUDJKc=; b=furnVvOtiYYQHAiGa4aTSRr9MERuZTfnYnC1TSTQbwVgt+ADip1Miphex9MlNmpiDGq36v K67Ap9lv81XW587VqHp5j8wxlglGk0sZLrxUt+PxG2R3s1W7pK38kee+HvyMMgKuKFfSVt KfustBlBBYWqeAAFE+HA8YfL+cYsr2w= X-MC-Unique: PLS62zFPMRW0Jo2ogE1Vig-1 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH v5 23/30] meson: stop looking for iptables/ip6tables/ebtables at build time Date: Fri, 17 May 2024 13:30:00 -0400 Message-ID: <20240517173007.8125-24-laine@redhat.com> In-Reply-To: <20240517173007.8125-1-laine@redhat.com> References: <20240517173007.8125-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OUZ2LY54A5FRYVLZVUEA327LVCSOCFRM X-Message-ID-Hash: OUZ2LY54A5FRYVLZVUEA327LVCSOCFRM X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1715968859439100001 Content-Type: text/plain; charset="utf-8" This was the only reason we required the iptables and ebtables packages at build time, and many other external commands already have their binaries found at runtime by looking through $PATH (virCommand automatically does this), so we may as well do it for these commands as well. Since we no longer need iptables or iptables at build time, we can also drop the BuildRequires for them from the rpm specfile. Inspired-by: 6aa2fa38b04b802f137e51ebbeb4ca9b67487575 Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 2 -- meson.build | 3 --- src/network/bridge_driver_conf.c | 2 ++ src/util/virfirewall.h | 5 +++++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 0e8dc000f3..fce312c8ab 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -356,8 +356,6 @@ BuildRequires: sanlock-devel >=3D 2.4 BuildRequires: libpcap-devel >=3D 1.5.0 BuildRequires: libnl3-devel BuildRequires: libselinux-devel -BuildRequires: iptables -BuildRequires: ebtables # For modprobe BuildRequires: kmod BuildRequires: cyrus-sasl-devel diff --git a/meson.build b/meson.build index af3719a734..91211d7964 100644 --- a/meson.build +++ b/meson.build @@ -838,10 +838,7 @@ optional_test_programs =3D [ =20 optional_programs =3D [ 'dmidecode', - 'ebtables', 'ip', - 'ip6tables', - 'iptables', 'iscsiadm', 'mdevctl', 'mm-ctl', diff --git a/src/network/bridge_driver_conf.c b/src/network/bridge_driver_c= onf.c index 06abab516a..d0135fb12a 100644 --- a/src/network/bridge_driver_conf.c +++ b/src/network/bridge_driver_conf.c @@ -27,8 +27,10 @@ #include "virerror.h" #include "virfile.h" #include "virutil.h" +#include "virfirewall.h" /* for binary names */ #include "bridge_driver_conf.h" =20 + #define VIR_FROM_THIS VIR_FROM_NETWORK =20 VIR_LOG_INIT("network.bridge_driver"); diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h index 917745c315..4ac16f02b3 100644 --- a/src/util/virfirewall.h +++ b/src/util/virfirewall.h @@ -25,6 +25,11 @@ #include "virbuffer.h" #include "virxml.h" =20 +/* various external programs executed when applying firewalls */ +#define EBTABLES "ebtables" +#define IPTABLES "iptables" +#define IP6TABLES "ip6tables" + typedef struct _virFirewall virFirewall; =20 typedef struct _virFirewallCmd virFirewallCmd; --=20 2.45.0