From nobody Mon Feb 9 12:25:11 2026 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=1620746530; cv=none; d=zohomail.com; s=zohoarc; b=WNmE3Y+a+tr9bwpbNcDPKKjy878h4wDGyv4cBY+zpC+jp/oIRvm7byDrhhVGerUhqB7bEiHcZQHaq0MSE3wS9HrswQEyWTkg0K4ITm/q11GBDegOuTChP9diQKB0OfKdAEXrRliq5jL1JRgSmFjlvynIXesUpPzh3/VlDDyDZxU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620746530; 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=T7k4Oe1C2D3vd9yi7N3tSSwM3REiNPOZ86Xsx6UKMbM=; b=G8wMFyPQTuVNcgz0GL8l+11DSWn0CghkGYRcaUlCWpeunO9KtSbwSYVD6pLgrifdy/O+dxa20NoQmfhUVdG5dJb94IO8yRtcK5157rdkuf47wCXOzYE86PVamlRBMcYnrJGfNNSzAguVXxxmXPIpdp+ycSyuIjUvQaNH8/CzlDM= 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) header.from= 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 1620746530702410.5157639182379; Tue, 11 May 2021 08:22:10 -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-596-WKaEMxf2PrGKkYWQ0fy5IA-1; Tue, 11 May 2021 11:22:05 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B818D186840E; Tue, 11 May 2021 15:21:58 +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 927E71962D; Tue, 11 May 2021 15:21:58 +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 5E6D2180B464; Tue, 11 May 2021 15:21:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14BFLkrB007690 for ; Tue, 11 May 2021 11:21:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1838C5D762; Tue, 11 May 2021 15:21:46 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E8C15D6A8 for ; Tue, 11 May 2021 15:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620746528; 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=T7k4Oe1C2D3vd9yi7N3tSSwM3REiNPOZ86Xsx6UKMbM=; b=abF7UULrA1xm4KKg+LjQpuBx/hArQ4PTm0Gslnb7bcOasezywl4LjfZfzPonUtixc6vJ3I 2Kkj/pSDyL8eIdT+fjQCJKa9vhxA/b+bsFjH631/6bzax8Cty1b9CTPB1ydJto3eojyNeA BGleLNC2NhRZPF1/bKsGxsdxnJQfbic= X-MC-Unique: WKaEMxf2PrGKkYWQ0fy5IA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] spec: Move definition of supported_platform variable Date: Tue, 11 May 2021 17:21:30 +0200 Message-Id: <20210511152131.48111-3-abologna@redhat.com> In-Reply-To: <20210511152131.48111-1-abologna@redhat.com> References: <20210511152131.48111-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.11 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" It's only used in one place, and it's nicer to keep the error message close to the check that causes it to be emitted. Signed-off-by: Andrea Bolognani --- libvirt.spec.in | 12 ++++++------ mingw-libvirt.spec.in | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 013c7742a2..5766af2255 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -6,12 +6,6 @@ %define min_rhel 8 %define min_fedora 33 =20 -%if 0%{?fedora} >=3D %{min_fedora} || 0%{?rhel} >=3D %{min_rhel} - %define supported_platform 1 -%else - %define supported_platform 0 -%endif - %define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s= 390x %if 0%{?rhel} %define arches_qemu_kvm x86_64 aarch64 s390x @@ -929,6 +923,12 @@ Libvirt plugin for NSS for translating domain names in= to IP addresses. %autosetup -S git_am =20 %build +%if 0%{?fedora} >=3D %{min_fedora} || 0%{?rhel} >=3D %{min_rhel} + %define supported_platform 1 +%else + %define supported_platform 0 +%endif + %if ! %{supported_platform} echo "This RPM requires either Fedora >=3D %{min_fedora} or RHEL >=3D %{mi= n_rhel}" exit 1 diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in index 84b8998f74..3068607908 100644 --- a/mingw-libvirt.spec.in +++ b/mingw-libvirt.spec.in @@ -5,12 +5,6 @@ # or versions, but no effort will be made to ensure that going forward. %define min_fedora 33 =20 -%if 0%{?fedora} && 0%{?fedora} >=3D %{min_fedora} - %define supported_platform 1 -%else - %define supported_platform 0 -%endif - Name: mingw-libvirt Version: @VERSION@ Release: 1%{?dist} @@ -95,6 +89,12 @@ MinGW Windows libvirt virtualization library. %setup -q -n libvirt-%{version} =20 %build +%if 0%{?fedora} && 0%{?fedora} >=3D %{min_fedora} + %define supported_platform 1 +%else + %define supported_platform 0 +%endif + %if ! %{supported_platform} echo "This RPM requires Fedora >=3D %{min_fedora}" exit 1 --=20 2.26.3