From nobody Tue Feb 10 16:18:25 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=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 --- 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