From nobody Mon Feb 9 09:33:08 2026 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=1602235632; cv=none; d=zohomail.com; s=zohoarc; b=i2r0Rw+8Th51V/54ckCtjpbQNunoVunk1EXrhCpvcdZ73cnKEWkxcC332kExEmB6gJgC1+F/IJ40PSGsKtp93L/dAH1yPBAIjZLokds8/Y0bjVhADGOKDAAMPjS+cGrw9XCkCav+4K2TzX5yYkxw7vbOEJPIm0KQvdQIja85atk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602235632; 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=4bc/Ul5Gx0iOevvC5tMepmJ9qoi1MV4+bOEDbpCbtw4=; b=OaKaErI/z1Q3zrQu/wfLKsk6pKGuXdOdk/LfUpE8uXr+fgC+7EAmkYs0mdRL5qrs5YkVh+OiViXylQNgyHb1iakyMcn0lc53do1qDo/j62TUWIJ5RFWrKm6VCkB5fphDjLZpdScuiG+3Zj2CVb4idpstwBYLbhYeAqWzAuUWplw= 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 1602235632766571.2945521722976; Fri, 9 Oct 2020 02:27:12 -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-539-zd5z2JSnN3CN_g8IxnuPOA-1; Fri, 09 Oct 2020 05:26:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E05A51029D30; Fri, 9 Oct 2020 09:26:21 +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 BF7EB5D9F1; Fri, 9 Oct 2020 09:26:21 +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 8C8568C7D7; Fri, 9 Oct 2020 09:26:21 +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 0999Q5GH009482 for ; Fri, 9 Oct 2020 05:26:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 93C7C196FE; Fri, 9 Oct 2020 09:26:05 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.195.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D890921E95 for ; Fri, 9 Oct 2020 09:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602235631; 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=4bc/Ul5Gx0iOevvC5tMepmJ9qoi1MV4+bOEDbpCbtw4=; b=bbXFK1ikPieAydcPYexqenIOMBIFMxQwgWvS3hlo30GT4wDsdiW/l2O0lcM+HbJ6Dm1vxS Qb3LS8QY9NOtBIYO91o00WF5erlT8rzKVS9FZyQYJh2gc75z+wfKxenJtwiOQsuTW9hGp4 UYada/jN/oZw0kY4oPK76r4OYX72sg4= X-MC-Unique: zd5z2JSnN3CN_g8IxnuPOA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 9/9] spec: Introduce arches_* Date: Fri, 9 Oct 2020 11:25:46 +0200 Message-Id: <20201009092546.15546-10-abologna@redhat.com> In-Reply-To: <20201009092546.15546-1-abologna@redhat.com> References: <20201009092546.15546-1-abologna@redhat.com> 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.14 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" With this commit, all architecture lists that we base feature enablement decisions on are defined within a few lines of each other, increasing maintainability. Additionally, generic architecture lists that appear in the conditions for multiple features are defined, so that repetition is reduced. Note that a few checks (numactl, zfs, ceph) have been changed from %ifarch to %ifnarch for consistency: while doing so, the corresponding list of architectures has also been replaced with the complement of the original one to ensure the overall behavior would be preserved. Signed-off-by: Andrea Bolognani --- libvirt.spec.in | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index a0cd5ce5af..cbcf7dcc60 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -17,18 +17,30 @@ %define _vpath_builddir %{_target_platform} %endif =20 -%define qemu_kvm_arches %{ix86} x86_64 %{power64} %{arm} aarch64 s= 390x +%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s= 390x %if 0%{?rhel} - %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x + %define arches_qemu_kvm x86_64 %{power64} aarch64 s390x %endif =20 +%define arches_64bit x86_64 %{power64} aarch64 s390x riscv64 +%define arches_x86 %{ix86} x86_64 + +%define arches_systemtap_64bit %{arches_64bit} +%define arches_dmidecode %{arches_x86} +%define arches_xen %{arches_x86} aarch64 +%define arches_vbox %{arches_x86} +%define arches_ceph %{arches_64bit} +%define arches_zfs %{arches_x86} %{power64} %{arm} +%define arches_numactl %{arches_x86} %{power64} aarch64 +%define arches_numad %{arches_x86} %{power64} aarch64 + # The hypervisor drivers that run in libvirtd %define with_qemu 0%{!?_without_qemu:1} %define with_lxc 0%{!?_without_lxc:1} %define with_libxl 0%{!?_without_libxl:1} %define with_vbox 0%{!?_without_vbox:1} =20 -%ifarch %{qemu_kvm_arches} +%ifarch %{arches_qemu_kvm} %define with_qemu_kvm %{with_qemu} %else %define with_qemu_kvm 0 @@ -60,7 +72,7 @@ %endif =20 %define with_storage_gluster 0%{!?_without_storage_gluster:1} -%ifnarch %{qemu_kvm_arches} +%ifnarch %{arches_qemu_kvm} # gluster is only built where qemu driver is enabled on RHEL 8 %if 0%{?rhel} >=3D 8 %define with_storage_gluster 0 @@ -97,28 +109,20 @@ =20 # Finally set the OS / architecture specific special cases =20 -# Xen is available only on some architectures -%ifnarch %{ix86} x86_64 aarch64 +# Architecture-dependent features +%ifnarch %{arches_xen} %define with_libxl 0 %endif - -# vbox is available only on i386 x86_64 -%ifnarch %{ix86} x86_64 +%ifnarch %{arches_vbox} %define with_vbox 0 %endif - -# Numactl is not available on many non-x86 archs -%ifarch s390x %{arm} riscv64 +%ifnarch %{arches_numactl} %define with_numactl 0 %endif - -# zfs-fuse is not available on some architectures -%ifarch s390x aarch64 riscv64 +%ifnarch %{arches_zfs} %define with_storage_zfs 0 %endif - -# Ceph dropped support for 32-bit hosts -%ifarch %{arm} %{ix86} +%ifnarch %{arches_ceph} %define with_storage_rbd 0 %endif =20 @@ -154,7 +158,7 @@ %define with_sanlock 0%{!?_without_sanlock:1} %endif %if 0%{?rhel} - %ifarch %{qemu_kvm_arches} + %ifarch %{arches_qemu_kvm} %define with_sanlock 0%{!?_without_sanlock:1} %endif %endif @@ -178,12 +182,12 @@ %if %{with_qemu} || %{with_lxc} # numad is used to manage the CPU and memory placement dynamically, # it's not available on many non-x86 architectures. - %ifnarch s390x %{arm} riscv64 + %ifnarch %{arches_numad} %define with_numad 0%{!?_without_numad:1} %endif %endif =20 -%ifarch %{ix86} x86_64 +%ifarch %{arches_dmidecode} %define with_dmidecode 0%{!?_without_dmidecode:1} %endif =20 @@ -1256,7 +1260,7 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/= test_libvirtd_libxl.aug # Copied into libvirt-docs subpackage eventually mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt libvirt-docs =20 -%ifarch %{power64} s390x x86_64 aarch64 riscv64 +%ifarch %{arches_systemtap_64bit} mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp =20 --=20 2.26.2