From nobody Sat Apr 27 19:51:19 2024 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=1616611105; cv=none; d=zohomail.com; s=zohoarc; b=YOA/qYrTGQdDYTGNHESDqMUIBslUYg8iubT0xMFAQyN0J4Lxk7g1BOs3RUnW0nUwCSG+yfar+ucGj9ZkMpg7K3jy6U8CF5NuNzP+KbiL0VeMJq+modWBYy5xvhAB+tDqFM2Le0Fe0eLIhyGo/tq2gLIdm9JyIkTp8AFrGOkPWlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616611105; 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=RZJOWeThcKF7oOhWDWqELIZX8nwiziScrEQOo0p6kmg=; b=Ctyzf7n6fzyPtkZY+AeSDdJWqDz32MgWJT3aXGsgwsqPqJlkpX0X6XoaI88uqFN4ejRQtXTMQ0O05LAhs8ff3k8AdKbC1FGSA2PFV55Z0WFQ1fTGYt+AwHxU7f3QzZVrXUf+fnD/MfuGy9E0c6qjb2zlIDqb2o13avugPUKqpQE= 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 161661110582913.758416144107514; Wed, 24 Mar 2021 11:38:25 -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-188-nYW3uSmWODCTzC0t7pQ0Wg-1; Wed, 24 Mar 2021 14:38:17 -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 ECF6C1058C93; Wed, 24 Mar 2021 18:38: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 C84BB5D9CA; Wed, 24 Mar 2021 18:38:10 +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 5E09C4BB7C; Wed, 24 Mar 2021 18:38:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12OIc8ma017939 for ; Wed, 24 Mar 2021 14:38:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 747951002EE6; Wed, 24 Mar 2021 18:38:08 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACCA21002D71 for ; Wed, 24 Mar 2021 18:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616611100; 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=RZJOWeThcKF7oOhWDWqELIZX8nwiziScrEQOo0p6kmg=; b=RF82zhRf6s/tw1WJL1rzh6imvTxcmgEUzZwXe+U+4XRUomF5wnZyFdPObFRzdHdywXTLBY 1Co4u9yKx1YrJL7BSkYrHyZbzhLT9lLQxv0mRx6e4yHg/Pbc4vQZJP66MjP26s2GljAuDk SEu8bCwjcMG04RSaRt8WDpVhYbfgIOE= X-MC-Unique: nYW3uSmWODCTzC0t7pQ0Wg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed Date: Wed, 24 Mar 2021 19:37:57 +0100 Message-Id: <20210324183800.201678-2-abologna@redhat.com> In-Reply-To: <20210324183800.201678-1-abologna@redhat.com> References: <20210324183800.201678-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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" Currently, if GNU grep is not installed on a FreeBSD system the configuration step will fail with Program grep found: YES (/usr/bin/grep) Program /usr/local/bin/grep found: NO ERROR: Program '/usr/local/bin/grep' not found which is confusing and not very useful; after this change, the message will be Program grep found: YES (/usr/bin/grep) Program /usr/local/bin/grep found: NO ERROR: Problem encountered: GNU grep not found instead, which should do a better job helping the user figure out that they need to install GNU grep from ports to proceed. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index c44ed6821c..06b7a7c01f 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -18,7 +18,10 @@ if host_machine.system() =3D=3D 'freebsd' =20 grep_cmd =3D run_command(grep_prog, '--version') if grep_cmd.stdout().startswith('grep (BSD grep') - grep_prog =3D find_program('/usr/local/bin/grep') + grep_prog =3D find_program('/usr/local/bin/grep', required: false) + if not grep_prog.found() + error('GNU grep not found') + endif grep_cmd =3D run_command(grep_prog, '--version') if grep_cmd.stdout().startswith('grep (BSD grep') error('GNU grep not found') --=20 2.26.3 From nobody Sat Apr 27 19:51:19 2024 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=1616611106; cv=none; d=zohomail.com; s=zohoarc; b=krlaylR8LpWoPMM6RobTpLD8QR4xwGHV4BDdWb7hKgWGhge2l/ULzWIqPEh48YJH2dZhsMLILjnPkltXSmkjex7xy+a8LmtrMdmTI4GqKORAvQyZtgbFKGBphCHl+1uUJty+HcYwgdv6X7a9sMcV/s0NPudw9HT7lqgc9fAoYjU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616611106; 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=5e9gzQ7dYQuYWXUKGqQPqTvKUbE57Lm4cRJGv1JWVpU=; b=FZzm8qAV26TYo2RXOk/MBnUmuV8I2PMSAbMd1WKbINK90MfnUebraEW3JAuEWK2KL+TPApfd9eta3Pt+AsmMducvVJn3bgXT84vCsg5gNrpCGvykwoftGlEsRO1bjzghyDKxPxOvvKGXE8qwnEolg4ctpYSsPiJKiWC/FbhZSfU= 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 1616611106068436.04508411148447; Wed, 24 Mar 2021 11:38:26 -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-404-2LUnLP9ZNjqMKEPldH7b5w-1; Wed, 24 Mar 2021 14:38:17 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5F881058C63; Wed, 24 Mar 2021 18:38:12 +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 987BA10016FC; Wed, 24 Mar 2021 18:38:12 +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 560F14A7CB; Wed, 24 Mar 2021 18:38:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12OIc9Jk017945 for ; Wed, 24 Mar 2021 14:38:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 98D751002D71; Wed, 24 Mar 2021 18:38:09 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF64510016FC for ; Wed, 24 Mar 2021 18:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616611100; 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=5e9gzQ7dYQuYWXUKGqQPqTvKUbE57Lm4cRJGv1JWVpU=; b=Lt5XIseJzPghNpPjj7HY1E83GSFJCTrgYQr6ajsOiX148QIXxWqU0nbtuZYHD3eCnlttkI twrNnxpIqMOIJeIuB4ma+1yFVkT6WNPGgNSi36KId30Kv2N9sSEOby4hiC6ztdoPzP0HOS 0x76eTzwghYEsDLUAaMdno9wxewO1wI= X-MC-Unique: 2LUnLP9ZNjqMKEPldH7b5w-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/4] meson: Reorganize looking for programs Date: Wed, 24 Mar 2021 19:37:58 +0100 Message-Id: <20210324183800.201678-3-abologna@redhat.com> In-Reply-To: <20210324183800.201678-1-abologna@redhat.com> References: <20210324183800.201678-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.22 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" While this change doesn't look like it would improve things and actually introduces a tiny bit of duplication, it's necessary in order to prepares the stage for further changes. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index 06b7a7c01f..c56a348946 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -10,12 +10,14 @@ syntax_check_conf.set('flake8_path', flake8_path) syntax_check_conf.set('runutf8', ' '.join(runutf8)) syntax_check_conf.set('PYTHON3', python3_prog.path()) =20 - -grep_prog =3D find_program('grep') - if host_machine.system() =3D=3D 'freebsd' make_prog =3D find_program('gmake') +else + make_prog =3D find_program('make') +endif =20 +if host_machine.system() =3D=3D 'freebsd' + grep_prog =3D find_program('grep') grep_cmd =3D run_command(grep_prog, '--version') if grep_cmd.stdout().startswith('grep (BSD grep') grep_prog =3D find_program('/usr/local/bin/grep', required: false) @@ -28,7 +30,7 @@ if host_machine.system() =3D=3D 'freebsd' endif endif else - make_prog =3D find_program('make') + grep_prog =3D find_program('grep') endif =20 syntax_check_conf.set('GREP', grep_prog.path()) --=20 2.26.3 From nobody Sat Apr 27 19:51:19 2024 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=1616611109; cv=none; d=zohomail.com; s=zohoarc; b=j6x4tATabCUSnsldBEgnBxYoQ3pEX6Pd7WdLx8uUEuoUDacvV4yPbyWgyRbJL3y0eXuln9PIYzAKqle2bXZMz3kAeaPxB0uICDJdUMY27bP3OfRdX8NP0r3OVlQ728Emlq0Ke2mIroOl6CkzDHYFL4y3DOsxLuGH4s1KhRB1Wj8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616611109; 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=5FFyg6JN0KFK1ZAjyi8dOwOo6DJB/HNHCa7yWc4RM+8=; b=Qj9A1un3JbivFQ0YzQWKlGAviJECZb7u/OegqTQRsoVnODu26l70CZTbLd4HDfSW0J2XvD4ANCdaC0CnlHU2VM3QJtM1ATWBEBhEJG0YULs0dP/BfbCfgim0BPVxLr46aC5XA+lKgLo/e339KD30D0WGQb1VNwKzTOWXQjv9hwU= 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 1616611109238333.6554755266403; Wed, 24 Mar 2021 11:38:29 -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-228-LLacj6nsM9aCRZ8j3uKsDQ-1; Wed, 24 Mar 2021 14:38:24 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6225E8EC249; Wed, 24 Mar 2021 18:38:16 +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 3BEC77092E; Wed, 24 Mar 2021 18:38:16 +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 BD0F41809C83; Wed, 24 Mar 2021 18:38:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12OIcB5b017957 for ; Wed, 24 Mar 2021 14:38:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B6DD1002D71; Wed, 24 Mar 2021 18:38:11 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3403410016FC for ; Wed, 24 Mar 2021 18:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616611108; 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=5FFyg6JN0KFK1ZAjyi8dOwOo6DJB/HNHCa7yWc4RM+8=; b=aUpBM9o0Yc6E1FdMta9uuW8zsFoXZRS4w/C/CdsObAdzE6GDlJS1ghFGtw+WYNvb+ItJL9 Pv/lyrhBO3GHicXU42t56vFWe4JYU04sHWyHB2FvhsLynMElLhUWninsv3r/4xJ1uB9ZJ0 HT2oM1msaVZ1N8KbOvLXellS6CI41WM= X-MC-Unique: LLacj6nsM9aCRZ8j3uKsDQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 3/4] meson: Check GNU sed's availability Date: Wed, 24 Mar 2021 19:37:59 +0100 Message-Id: <20210324183800.201678-4-abologna@redhat.com> In-Reply-To: <20210324183800.201678-1-abologna@redhat.com> References: <20210324183800.201678-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.13 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" As explained in the comment in build-aux/Makefile.in, the version of sed included in the FreeBSD base system is not GNU sed, which our syntax-check rules expect; as a result, many checks will fail with gmake: gsed: No such file or directory /bin/sh: gsed: not found Similarly to what we're already doing with GNU make and GNU grep, look for GNU sed during the configuration step and fail early if it's not available. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/Makefile.in | 1 + build-aux/meson.build | 3 +++ build-aux/syntax-check.mk | 9 --------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/build-aux/Makefile.in b/build-aux/Makefile.in index 415a8df305..9ccbec7b1b 100644 --- a/build-aux/Makefile.in +++ b/build-aux/Makefile.in @@ -6,6 +6,7 @@ FLAKE8 =3D @flake8_path@ RUNUTF8 =3D @runutf8@ PYTHON =3D @PYTHON3@ GREP =3D @GREP@ +SED =3D @SED@ =20 # include syntax-check.mk file include $(top_srcdir)/build-aux/syntax-check.mk diff --git a/build-aux/meson.build b/build-aux/meson.build index c56a348946..fe88d6b736 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -12,8 +12,10 @@ syntax_check_conf.set('PYTHON3', python3_prog.path()) =20 if host_machine.system() =3D=3D 'freebsd' make_prog =3D find_program('gmake') + sed_prog =3D find_program('gsed') else make_prog =3D find_program('make') + sed_prog =3D find_program('sed') endif =20 if host_machine.system() =3D=3D 'freebsd' @@ -34,6 +36,7 @@ else endif =20 syntax_check_conf.set('GREP', grep_prog.path()) +syntax_check_conf.set('SED', sed_prog.path()) =20 configure_file( input: 'Makefile.in', diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 51a498a897..7f4a23c048 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -27,15 +27,6 @@ ME :=3D build-aux/syntax-check.mk # of the module description. But some packages import this file directly, # ignoring the module description. AWK ?=3D awk -# FreeBSD (and probably some other OSes too) ships own version of sed(1), = not -# compatible with the GNU sed. GNU sed is available as gsed(1), so use this -# instead -UNAME :=3D $(shell uname) -ifeq ($(UNAME),FreeBSD) -SED ?=3D gsed -else -SED ?=3D sed -endif =20 # Helper variables. _empty =3D --=20 2.26.3 From nobody Sat Apr 27 19:51:19 2024 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=1616611143; cv=none; d=zohomail.com; s=zohoarc; b=OTVRtSLHhl+NxTImItcuqSq+XgQIClPcdDvzH5COT4RNx9xIl6m8SOHv+zowUk7Mothz5WqfnENOjtp5XFxsOjeTl8ovsE9tuj1aJmacn8VsG4/xhEgNR3g4iTGZIqmwIzSL8S1/6ioftOWsrAjqFiwqEgXQrxampgxcEoURxao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616611143; 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=+2ScIS7TrA8rYkCEb80phL43FDVa6sMIR8cFCGK2Y24=; b=gUwaXZVfrcS5/tOUsTFHEcbTRcM8Ofp4Wx+NWlMAwByTk1MrBm9OmPkl7GErqSC8NfiQnqdbocU4PPzEu1W0Nmi7Vhz3gson1K84bjNUItCk65U2iIB9buJiqITVmNZD30toXervspMbtEBnpUbRJcosD+o1Rrh7AZXBhDoiKhQ= 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 1616611143740419.35911748856813; Wed, 24 Mar 2021 11:39:03 -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-322-SVfayFfOPoeNHSB-PzwXAg-1; Wed, 24 Mar 2021 14:39:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 20B67835BCC; Wed, 24 Mar 2021 18:38:17 +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 F0C865C230; Wed, 24 Mar 2021 18:38:16 +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 A83084A703; Wed, 24 Mar 2021 18:38:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12OIcChs017964 for ; Wed, 24 Mar 2021 14:38:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id A519D1002EE6; Wed, 24 Mar 2021 18:38:12 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9D0F1002D71 for ; Wed, 24 Mar 2021 18:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616611142; 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=+2ScIS7TrA8rYkCEb80phL43FDVa6sMIR8cFCGK2Y24=; b=XqHJ5ZUMFo8B7me4r4P9w5VGVHZS15qK+bIB46ioyR3dIRMxxbHj6ZM1+SijLbC7ktAAoa KW02No2VebEWZ5m+qLcxnrAp+H7v4tMhvm7a7dxT4iC3Set6pQ/cTH9MAJr/8txcugUhrJ +MwQcX2k+vDFC02JJL48H8WIj3w4OUU= X-MC-Unique: SVfayFfOPoeNHSB-PzwXAg-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] meson: Look for GNU tools on macOS too Date: Wed, 24 Mar 2021 19:38:00 +0100 Message-Id: <20210324183800.201678-5-abologna@redhat.com> In-Reply-To: <20210324183800.201678-1-abologna@redhat.com> References: <20210324183800.201678-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.16 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" macOS is similar to FreeBSD in that it ships non-GNU versions of several base utilities that we need in the base system. macOS actually includes GNU make already, but unfortunately due to licensing reasons the tool is permanently stuck in 2006, so even in that case users are better off installing a recent version from Homebrew along with the dozens of other libvirt dependencies that already need to be obtained that way. Note that, unlike FreeBSD ports, Homebrew is fully consistent in adding the 'g' prefix to the name of the GNU tools, so we can detect GNU grep without additional hacks. Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index fe88d6b736..1095982397 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -10,7 +10,7 @@ syntax_check_conf.set('flake8_path', flake8_path) syntax_check_conf.set('runutf8', ' '.join(runutf8)) syntax_check_conf.set('PYTHON3', python3_prog.path()) =20 -if host_machine.system() =3D=3D 'freebsd' +if host_machine.system() =3D=3D 'freebsd' or host_machine.system() =3D=3D = 'darwin' make_prog =3D find_program('gmake') sed_prog =3D find_program('gsed') else @@ -31,6 +31,8 @@ if host_machine.system() =3D=3D 'freebsd' error('GNU grep not found') endif endif +elif host_machine.system() =3D=3D 'darwin' + grep_prog =3D find_program('ggrep') else grep_prog =3D find_program('grep') endif --=20 2.26.3 From nobody Sat Apr 27 19:51:19 2024 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=1617279470; cv=none; d=zohomail.com; s=zohoarc; b=ZPVyFhiCZcT2GJ8XYdWX26NDYA+f0JFTnsQ5WsoI+ZJYWfv3AHsPFPcl4Mm1KTleRNCpVIkbx3u5dODH2SczdvG+mL6xJeDy1bMf1aFLClqpJdCOlTnnUjSEj5byXE/IB+V+bRqZIGFK3l0KeOHyKobmsF/PucO8+WGDUFkpqnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617279470; 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=FFrL8YQF2MFH2tRyeBK8QS2jtha+MCkVNPktDJKOHwY=; b=Jojentql9RfAPlvV4hlhR4CxCzjRa8AuRII5c/C77OOn/GxCYa0lUsWxQVHQYsN2xA39JjKIU9x0sftjnp3U1ehuE2J41GWKrhO5Pm3Q7x0wifMqmzzJO8clxm/zgImA2XYpgV3UBDo1vmzd0rrz/H9YkThP/Zf7cSxofWyDBas= 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 1617279470510788.8484530522254; Thu, 1 Apr 2021 05:17:50 -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-212-uU4ewTl0PV2K43J06TA_5A-1; Thu, 01 Apr 2021 08:17:47 -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 314EF107ACCD; Thu, 1 Apr 2021 12:17:42 +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 66FF52BFED; Thu, 1 Apr 2021 12:17:40 +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 5F4B04BB7C; Thu, 1 Apr 2021 12:17:38 +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 131CHaTw013777 for ; Thu, 1 Apr 2021 08:17:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8DC661B49D; Thu, 1 Apr 2021 12:17:36 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.193.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EAB7E60CCD for ; Thu, 1 Apr 2021 12:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617279469; 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=FFrL8YQF2MFH2tRyeBK8QS2jtha+MCkVNPktDJKOHwY=; b=jITuqmlvo79EiTAT0xZwlXWFt5WhS2kgUC0sFn1GP6ORVQGbtIJS4GKyDkEfj9HxcyxXqG KfiCsGpmy9bogHFOA5Oj/Qe3a1jLF3vGY+ytQzzgCIDHsS2STjPpJ1KWsCeY/P+AnkEV4C uyAMlwmxtRV7DXmPunjpvpqafXQyokM= X-MC-Unique: uU4ewTl0PV2K43J06TA_5A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/4] meson: Don't check whether /usr/local/bin/grep is GNU grep Date: Thu, 1 Apr 2021 14:17:14 +0200 Message-Id: <20210401121714.454243-1-abologna@redhat.com> In-Reply-To: <20210324183800.201678-1-abologna@redhat.com> References: <20210324183800.201678-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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" Since /usr/local is where ports live, it's reasonable to assume that a grep binary found in there will have been installed via ports and will thus be GNU grep. Suggested-by: Erik Skultety Signed-off-by: Andrea Bolognani Reviewed-by: Erik Skultety --- build-aux/meson.build | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build-aux/meson.build b/build-aux/meson.build index 1095982397..e491bdeebc 100644 --- a/build-aux/meson.build +++ b/build-aux/meson.build @@ -26,10 +26,6 @@ if host_machine.system() =3D=3D 'freebsd' if not grep_prog.found() error('GNU grep not found') endif - grep_cmd =3D run_command(grep_prog, '--version') - if grep_cmd.stdout().startswith('grep (BSD grep') - error('GNU grep not found') - endif endif elif host_machine.system() =3D=3D 'darwin' grep_prog =3D find_program('ggrep') --=20 2.26.3