From nobody Fri May 3 11:45:31 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560773688; cv=none; d=zoho.com; s=zohoarc; b=bwfECLhwoAvgpTUpN5ALx4OA/Q6r87TQc1NVO6scKuPlP6DgNENsawYqi6Eaw+0vAx1r7klMFwJMdo10R/77Dv2R2nsdZtrAvJJkHAZjhA8iPPKIyNeCU0FPZPmFz1dAC2AddvPvdsmn+RCuWsI9rXPz4VmfJ3Kn0Hp08a0dmU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560773688; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=jrFsKadz0D/dT5XxzBPvhbU2qoAyllGuilwFD6XxKpw=; b=GantM/WoLQY7ETf4HHuA2yt8EoCSiwrHll1F0uOpBwVQr/9qLf0ABnVM1Dki2Xbt+yflnX6sJS2LLvHraCMVUFslVJPEaSOtTcmp6aMtfzhM5t64701RG+vfuTAb7EuZpjxaooiJaLrsh7hJsnnlyYw/XbjXhYP3vlliDwBGMJg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560773688613807.0215510590078; Mon, 17 Jun 2019 05:14:48 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 9870130C31BC; Mon, 17 Jun 2019 12:14:10 +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 44A50179E8; Mon, 17 Jun 2019 12:13:47 +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 3DDF524B25; Mon, 17 Jun 2019 12:13:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5HCDG7F017159 for ; Mon, 17 Jun 2019 08:13:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0BA9D66066; Mon, 17 Jun 2019 12:13:16 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B0A4579AF for ; Mon, 17 Jun 2019 12:13:13 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 17 Jun 2019 14:13:11 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] Produce more verbose error if cppi not found 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: , 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 17 Jun 2019 12:14:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It's fairly easy (especially for new contributors) to not spot the 'cppi not installed' line in the syntax-check output. Turn it into a banner that is more visible and at the same time add it as a build dependency. Unfortunately, RHEL doesn't ship cppi so we can add the dependency only for Fedora. Signed-off-by: Michal Privoznik --- Diff to v1: - Instead of requiring cppi, produce more visible error - Require cppi in specfile cfg.mk | 9 +++++++-- libvirt.spec.in | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cfg.mk b/cfg.mk index 5074ef611a..2ee860a2c5 100644 --- a/cfg.mk +++ b/cfg.mk @@ -695,6 +695,11 @@ sc_require_whitespace_in_translation: { echo '$(ME): missing whitespace at line split' 1>&2; \ exit 1; } || : =20 +cppi_banner =3D \ + " *****************************************************\n" \ + "* cppi not installed, some checks have been skipped *\n" \ + "*****************************************************" + # Enforce recommended preprocessor indentation style. sc_preprocessor_indentation: @if cppi --version >/dev/null 2>&1; then \ @@ -702,7 +707,7 @@ sc_preprocessor_indentation: || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ exit 1; }; \ else \ - echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ + echo -e "$(ME): skipping test $@:\n"$(cppi_banner) 1>&2; \ fi =20 # Enforce similar spec file indentation style, by running cppi on a @@ -719,7 +724,7 @@ sc_spec_indentation: || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ exit 1; }; \ else \ - echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ + echo -e "$(ME): skipping test $@:\n"$(cppi_banner) 1>&2; \ fi =20 # Nested conditionals are easier to understand if we enforce that endifs diff --git a/libvirt.spec.in b/libvirt.spec.in index 59a2a0cb24..1a9e92c4bc 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -271,6 +271,10 @@ BuildRequires: perl %endif BuildRequires: %{python} BuildRequires: systemd-units +# For 'make syntax-check' +%if 0%{?fedora} +BuildRequires: cppi +%endif %if %{with_libxl} BuildRequires: xen-devel %endif --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list