From nobody Fri Oct 18 06:21:52 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 1717412694904338.0340565510953; Mon, 3 Jun 2024 04:04:54 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 84FFB1C22; Mon, 3 Jun 2024 07:04:53 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D9D5C1AC2; Mon, 3 Jun 2024 07:04:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id CCE5C1A71; Mon, 3 Jun 2024 07:04:17 -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 5BABB1892 for ; Mon, 3 Jun 2024 07:04:17 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-62-X9S1BFAJOp6ToTWsxbVTZQ-1; Mon, 03 Jun 2024 07:04:15 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 A13FA1C05129 for ; Mon, 3 Jun 2024 11:04:15 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.226.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FE1A1C0654B for ; Mon, 3 Jun 2024 11:04:14 +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.6 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,T_SCC_BODY_TEXT_LINE 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=1717412657; 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; bh=1w2YHzSvguv6gJftEQgb82Seh14tcmepx01Shu3ddrw=; b=Xde53zJoDIewBnrXPtc1n/CwM3LU4/PByHhyYeV+zT2wTXEVdJIR9XZ8qYPA7lMZq7n8g+ KIINHokdYFNAwIC4tIHYY24KjnEKVBhMOaKUAqKpcMDySDJpHv6LeWVLf3fOg1Tg+eYNPX wLTl8V6eX0bBQ8MyXJKQl0CVGs9zc5U= X-MC-Unique: X9S1BFAJOp6ToTWsxbVTZQ-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [PATCH] rpm: Don't default to nftables on existing distros Date: Mon, 3 Jun 2024 13:04:13 +0200 Message-ID: <20240603110413.766900-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CU255HFZUAIFXZTTG5WPQ5VQMJPVZTIT X-Message-ID-Hash: CU255HFZUAIFXZTTG5WPQ5VQMJPVZTIT X-MailFrom: abologna@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: 1717412695536100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 4381dbe30c..5ca7b95e6c 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -205,6 +205,18 @@ %define with_modular_daemons 1 %endif =20 +# Prefer nftables for future OS releases but keep using iptables +# for existing ones +%if 0%{?rhel} >=3D 10 || 0%{?fedora} >=3D 41 + %define prefer_nftables 1 + %define firewall_backend_priority nftables,iptables +%else + %define prefer_nftables 0 + %define firewall_backend_priority iptables,nftables +%endif + + + # Force QEMU to run as non-root %define qemu_user qemu %define qemu_group qemu @@ -592,7 +604,7 @@ Summary: Network driver plugin for the libvirtd daemon Requires: libvirt-daemon-common =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} Requires: dnsmasq >=3D 2.41 - %if 0%{?rhel} >=3D 10 || 0%{?fedora} >=3D 41 + %if %{prefer_nftables} Requires: nftables %else Requires: iptables @@ -1387,7 +1399,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/libvirt.spec) %{?enable_werror} \ -Dexpensive_tests=3Denabled \ -Dinit_script=3Dsystemd \ - -Dfirewall_backend_priority=3Dnftables,iptables \ + -Dfirewall_backend_priority=3D%{firewall_backend_priority} \ -Ddocs=3Denabled \ -Dtests=3Denabled \ -Drpath=3Ddisabled \ --=20 2.45.1