From nobody Wed May 14 21:24:00 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1515689177628865.3045195804938; Thu, 11 Jan 2018 08:46:17 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id C1BEB7AEBC; Thu, 11 Jan 2018 16:46:15 +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 B13D060CAA; Thu, 11 Jan 2018 16:46:11 +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 294611800B66; Thu, 11 Jan 2018 16:46:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0BGhn7J010775 for ; Thu, 11 Jan 2018 11:43:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 78CF26017B; Thu, 11 Jan 2018 16:43:49 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DB8C9098; Thu, 11 Jan 2018 16:43:48 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 16:43:35 +0000 Message-Id: <20180111164339.7788-4-berrange@redhat.com> In-Reply-To: <20180111164339.7788-1-berrange@redhat.com> References: <20180111164339.7788-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH python 3/7] Add checks for min supported distros 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 11 Jan 2018 16:46:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Be clear about which distros we aim to support with the specfile, so we know what we can cleanup in the spec later. Signed-off-by: Daniel P. Berrange --- libvirt-python.spec.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 1619e26..a98b902 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -1,3 +1,14 @@ +# This spec file assumes you are building on a Fedora or RHEL version +# that's still supported by the vendor. It may work on other distros +# or versions, but no effort will be made to ensure that going forward +%define min_rhel 6 +%define min_fedora 25 + +%if (0%{?fedora} && 0%{?fedora} >=3D %{min_fedora}) || (0%{?rhel} && 0%{?r= hel} >=3D %{min_rhel}) + %define supported_platform 1 +%else + %define supported_platform 0 +%endif =20 %define _with_python2 1 %define _with_python3 0 @@ -81,6 +92,11 @@ of recent versions of Linux (and other OSes). find examples -type f -exec chmod 0644 \{\} \; =20 %build +%if ! %{supported_platform} +echo "This RPM requires either Fedora >=3D %{min_fedora} or RHEL >=3D %{mi= n_rhel}" +exit 1 +%endif + %if %{with_python2} CFLAGS=3D"$RPM_OPT_FLAGS" %{__python} setup.py build %endif --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list