From nobody Thu May 9 11:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) 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 1708095136581466.1770302120792; Fri, 16 Feb 2024 06:52:16 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 87850136; Fri, 16 Feb 2024 09:52:15 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A117D1C78; Fri, 16 Feb 2024 09:48:35 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 92BAB1B92; Fri, 16 Feb 2024 09:48:11 -0500 (EST) 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 D790E1B8B for ; Fri, 16 Feb 2024 09:48:07 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-58-Xj4SeJ0vP4OV1IHJg27jxg-1; Fri, 16 Feb 2024 09:48:05 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 8D7B5848A64 for ; Fri, 16 Feb 2024 14:48:05 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.225.113]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24FFA40C9444 for ; Fri, 16 Feb 2024 14:48:05 +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.8 required=5.0 tests=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 X-MC-Unique: Xj4SeJ0vP4OV1IHJg27jxg-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [PATCH 1/3] all: Don't use 'grep -q' Date: Fri, 16 Feb 2024 15:48:00 +0100 Message-ID: <20240216144802.2443802-2-abologna@redhat.com> In-Reply-To: <20240216144802.2443802-1-abologna@redhat.com> References: <20240216144802.2443802-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: OPTVGEVYNRRDDT4TUWFSLR4UTBUUMJUW X-Message-ID-Hash: OPTVGEVYNRRDDT4TUWFSLR4UTBUUMJUW 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: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1708095137734100001 It's not portable. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander Reviewed-by: Michal Privoznik --- libvirt.spec.in | 2 +- tests/virsh-uriprecedence | 2 +- tests/virt-aa-helper-test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 49ce717e1b..794645c9cc 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -281,7 +281,7 @@ Release: 1%{?dist} License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-= 1.1 URL: https://libvirt.org/ =20 -%if %(echo %{version} | grep -q "\.0$"; echo $?) =3D=3D 1 +%if %(echo %{version} | grep "\.0$" >/dev/null; echo $?) =3D=3D 1 %define mainturl stable_updates/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz diff --git a/tests/virsh-uriprecedence b/tests/virsh-uriprecedence index fd6ce108c0..f141d08dfd 100755 --- a/tests/virsh-uriprecedence +++ b/tests/virsh-uriprecedence @@ -15,7 +15,7 @@ mock_xdg_ || framework_failure =20 is_uri_good() { - echo "$1" | grep -q -F "$good_uri" + echo "$1" | grep -F "$good_uri" >/dev/null } =20 test_uri_internal() diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test index 83f53acef6..9a97168330 100755 --- a/tests/virt-aa-helper-test +++ b/tests/virt-aa-helper-test @@ -139,7 +139,7 @@ testme() { =20 rule_missing=3D0 if [ -n "$checkrule" ]; then - if ! grep -q "$checkrule" "$tmpout"; then + if ! grep "$checkrule" "$tmpout" >/dev/null; then echo "FAIL: missing rule '$checkrule'" >"$output" rule_missing=3D1 fi --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Thu May 9 11:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) 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 170809498126376.3112650155573; Fri, 16 Feb 2024 06:49:41 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id EF0FC1BB9; Fri, 16 Feb 2024 09:49:39 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E748D1B92; Fri, 16 Feb 2024 09:48:14 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 820C31BB9; Fri, 16 Feb 2024 09:48:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 9B2171B92 for ; Fri, 16 Feb 2024 09:48:08 -0500 (EST) 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-537-uk6sH9DNNHidY4UHahNrHw-1; Fri, 16 Feb 2024 09:48:06 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 4359A3813F31 for ; Fri, 16 Feb 2024 14:48:06 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.225.113]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE9F740C9444 for ; Fri, 16 Feb 2024 14:48:05 +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.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: uk6sH9DNNHidY4UHahNrHw-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [PATCH 2/3] syntax-check: Sync with gnulib Date: Fri, 16 Feb 2024 15:48:01 +0100 Message-ID: <20240216144802.2443802-3-abologna@redhat.com> In-Reply-To: <20240216144802.2443802-1-abologna@redhat.com> References: <20240216144802.2443802-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: A6JHNWUOKWNSAXCJHIKN7XVPQD6LXDPD X-Message-ID-Hash: A6JHNWUOKWNSAXCJHIKN7XVPQD6LXDPD 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: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1708094982884100001 The most notable change is the new 'sc_unportable_grep_q' rule. While importing it from gnulib, the rule has been tweaked slightly by adding superflous quotes so that syntax-check.mk itself doesn't trip it. This is similar to the tricks employed for the 'sc_prohibit_close' and 'sc_copyright_usage' rules, among many others. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander Reviewed-by: Michal Privoznik --- build-aux/syntax-check.mk | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index eaeb6d4f23..359dcbc5fb 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1,13 +1,12 @@ # -# Rules for running syntax-check, derived from gnulib's -# maint.mk +# Rules for running syntax-check, derived from gnulib's top/maint.mk # # Specifically, all shared code should match gnulib commit # -# dd2503c8e73621e919e8e214a29c495ac89d8a92 (2022-05-21) +# d5191e456737661d4a0df5287f6c2064ab74dbbe (2024-02-15) # # Copyright (C) 2008-2019 Red Hat, Inc. -# Copyright (C) 2001-2022 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. =20 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1083,7 +1082,8 @@ sc_prohibit_stdio--_without_use: @h=3D'stdio--.h' re=3D'\<((f(re)?|p)open|tmpfile) *\(' \ $(_sc_header_without_use) =20 -_stddef_syms_re =3D NULL|offsetof|ptrdiff_t|size_t|wchar_t +_stddef_syms_re =3D \ + NULL|max_align_t|nullptr_t|offsetof|ptrdiff_t|size_t|unreachable|wchar_t # Prohibit the inclusion of stddef.h without an actual use. sc_prohibit_stddef_without_use: @h=3D'stddef.h' \ @@ -1310,6 +1310,10 @@ sc_prohibit_path_max_allocation: halt=3D'Avoid stack allocations of size PATH_MAX' \ $(_sc_search_regexp) =20 +sc_unportable_grep_q: + @prohibit=3D'grep ''-q' halt=3D"unportable 'grep ""-q', use >/dev/null in= stead" \ + $(_sc_search_regexp) + ifneq ($(_gl-Makefile),) syntax-check: sc_spacing-check \ sc_prohibit-duplicate-header sc_mock-noinline sc_group-qemu-caps \ --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org From nobody Thu May 9 11:08:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) 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 1708095222018382.6914617116536; Fri, 16 Feb 2024 06:53:42 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id E4D171CCE; Fri, 16 Feb 2024 09:53:37 -0500 (EST) Received: from lists.libvirt.org.85.43.8.in-addr.arpa (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 63D201CE3; Fri, 16 Feb 2024 09:48:39 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 1EDB11B8B; Fri, 16 Feb 2024 09:48:12 -0500 (EST) 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 011F51B9D for ; Fri, 16 Feb 2024 09:48:08 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-364-jxVdWC-5NLe8jIZTThWjYQ-1; Fri, 16 Feb 2024 09:48:07 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 ED5B685A58C for ; Fri, 16 Feb 2024 14:48:06 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.225.113]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 849A340C106C for ; Fri, 16 Feb 2024 14:48:06 +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.8 required=5.0 tests=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 X-MC-Unique: jxVdWC-5NLe8jIZTThWjYQ-1 From: Andrea Bolognani To: devel@lists.libvirt.org Subject: [PATCH 3/3] syntax-check: Drop 'syntax-check' target Date: Fri, 16 Feb 2024 15:48:02 +0100 Message-ID: <20240216144802.2443802-4-abologna@redhat.com> In-Reply-To: <20240216144802.2443802-1-abologna@redhat.com> References: <20240216144802.2443802-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: TSKYLWDTNPIJQ4PWVAWXHHQIQQI7NG2O X-Message-ID-Hash: TSKYLWDTNPIJQ4PWVAWXHHQIQQI7NG2O 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: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1708095224486100001 Our entry point for syntax-check rules is meson, which calls to each of them specifically; additionally, we have the 'all' target that warns users who try to use make directly. The 'syntax-check' target is not used by anything, and in fact it couldn't be even if one tried: its availability depends on the $(_gl-Makefile) variable, which in our case is never defined. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander Reviewed-by: Michal Privoznik --- build-aux/syntax-check.mk | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 359dcbc5fb..0a10259bd8 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1314,27 +1314,6 @@ sc_unportable_grep_q: @prohibit=3D'grep ''-q' halt=3D"unportable 'grep ""-q', use >/dev/null in= stead" \ $(_sc_search_regexp) =20 -ifneq ($(_gl-Makefile),) -syntax-check: sc_spacing-check \ - sc_prohibit-duplicate-header sc_mock-noinline sc_group-qemu-caps \ - sc_header-ifdef - @if ! cppi --version >/dev/null 2>&1; then \ - echo "*****************************************************" >&2; \ - echo "* cppi not installed, some checks have been skipped *" >&2; \ - echo "*****************************************************" >&2; \ - fi; \ - if [ -z "$(FLAKE8)" ]; then \ - echo "*****************************************************" >&2; \ - echo "* flake8 not installed, sc_flake8 has been skipped *" >&2; \ - echo "*****************************************************" >&2; \ - fi - if [ -z "$(BLACK)" ]; then \ - echo "*****************************************************" >&2; \ - echo "* black not installed, sc_black has been skipped *" >&2; \ - echo "*****************************************************" >&2; \ - fi -endif - # Don't include duplicate header in the source (either *.c or *.h) sc_prohibit-duplicate-header: $(AM_V_GEN)$(VC_LIST_EXCEPT) | $(GREP) '\.[chx]$$' | $(RUNUTF8) xargs \ --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org