From nobody Tue May 7 09:58:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1596643406; cv=none; d=zohomail.com; s=zohoarc; b=nOssfXG1vsR0D5/4gHa2AVfafcYrzyzxqlo1xFD4XzuVozi8kSNQCg7uCpNQ6M647/kXIcbDQeZqQUsRmPr+bN6SgUW9npo9/GHTxkJWoYdI8Ji/qtDC6NCg4xgebHrIvwXG3KgfM8WxMjLAtZqgNiPpyIHZTJhCE0KR0SlMEys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596643406; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=49IcRoxZZ1xSJxH5GiaBhW3B8VD4HVSlnq74X+ayUAM=; b=JMzS7a32v0aQvOa83rg/+8gBPUp0LU0areK5H68If12jYHnXvq+yDddCrGOkpDuZQt5d/xwFC3tPISYQ1aghwUja09x4dXK535/7Ki31v4AUllt3grHomdGkGzYJGFT//QnkOa12/AqwWdf5SPFvnoTdSe/8YeV50eWdrTRRGgc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1596643406687759.401102465687; Wed, 5 Aug 2020 09:03: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-335-77Pk5QyfOVWLX6ArMClb4w-1; Wed, 05 Aug 2020 12:03:23 -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 C5E9B8015CE; Wed, 5 Aug 2020 16:03:16 +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 7A8C15D9E2; Wed, 5 Aug 2020 16:03:15 +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 8DAB596916; Wed, 5 Aug 2020 16:03:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 075G39c4012818 for ; Wed, 5 Aug 2020 12:03:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3FCD320316D8; Wed, 5 Aug 2020 16:03:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2917320316D6 for ; Wed, 5 Aug 2020 16:03:07 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CF3361859162 for ; Wed, 5 Aug 2020 16:03:06 +0000 (UTC) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-WSp9HR1INvCZAmsB2QuaKw-1; Wed, 05 Aug 2020 12:03:02 -0400 Received: by mail-lf1-f68.google.com with SMTP id d2so18918596lfj.1 for ; Wed, 05 Aug 2020 09:03:01 -0700 (PDT) Received: from kloomba.my.domain ([31.29.247.181]) by smtp.gmail.com with ESMTPSA id p25sm1055146ljn.58.2020.08.05.09.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 09:02:58 -0700 (PDT) X-MC-Unique: 77Pk5QyfOVWLX6ArMClb4w-1 X-MC-Unique: WSp9HR1INvCZAmsB2QuaKw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=49IcRoxZZ1xSJxH5GiaBhW3B8VD4HVSlnq74X+ayUAM=; b=jlx6OprLlSnAwwdmFiY4qDisZ/UCEksZ5rDeaXSwXkXFCTPKeCxoSsLdusWKIgg358 GqOa4rtz0k70zKmzvnN9athGo37aTjLJJcOvzX3TlDXullkS273NR5h04m02CsFilZM3 1drejQGtKsIhz7pDuAphqZ5A8YT7DO6PuUfrgIxHaVypE1sskj/4WCKWJnJT4ltzct8w h+qvP7+FqDSr+1Yn1tP7kPJc4KjpSWGvcZA/RdiMRqV1G6UYuewQCEOKJxLrJZ6bDwBd qgTBSQLdadXi262Jlm9XZEF1wCxNwXwfLLGZy7JCgPSJiNwX50TvwOe8dkiTwm5PTtaH kf0Q== X-Gm-Message-State: AOAM5327wY7zZPwfFkIQgPgsvLCzlNvYfHlA1KQjf1uDrTJLtfmreV4r jyLNIy416rdsRPk/zALgy7Djw61VMC0= X-Google-Smtp-Source: ABdhPJwnhmZExN5pqfrO1AM5PqeYlsc5CZhEaR52A2bXQ+UKJGwzq77eI5rdsDcet17S4J5M5eobzA== X-Received: by 2002:a05:6512:3b7:: with SMTP id v23mr1939820lfp.10.1596643379508; Wed, 05 Aug 2020 09:02:59 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Subject: [PATCH] build-aux: use GNU sed for syntax-check on FreeBSD Date: Wed, 5 Aug 2020 20:02:41 +0400 Message-Id: <20200805160241.17603-1-bogorodskiy@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy 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 Content-Type: text/plain; charset="utf-8" BSD sed(1) and GNU sed(1) syntax are not compatible, and as syntax-check.mk uses the GNU flavor, set SED variable to 'gsed' by default. Signed-off-by: Roman Bogorodskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- build-aux/syntax-check.mk | 8 ++++++++ 1 file changed, 8 insertions(+) I'm not sure if this requires a more comprehensive solution. I have mixed feeling about this. If we try to just use gsed like in this patch, it'll fail because we don't require gsed to be installed. OTOH, an alternative solution like checking for gsed in meson.build, and probably even generation of some files with variables to be sourced by .mk files feels like too much of a hassle, esp. in this context. diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 6eb59cf90e..bbfcb63152 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -28,7 +28,15 @@ ME :=3D build-aux/syntax-check.mk # ignoring the module description. AWK ?=3D awk GREP ?=3D grep +# 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.27.0