From nobody Thu Nov 16 17:59:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWSVM0n9jz50vvm; Thu, 16 Nov 2023 17:59:55 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWSVL6F63z3PHf; Thu, 16 Nov 2023 17:59:54 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-d9abc069c8bso1087080276.3; Thu, 16 Nov 2023 09:59:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700157593; x=1700762393; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dPvpKWADqpUjd+uefC7us9E1pXuEToV+zjE8TAIXguk=; b=fgXDClHFt7/9EW58OYOzYCOdHWKUjfe5wj+dlqNisidIKYU1zfqxZA8AVW9a7tQGU1 ElZKjr2rk3mJRKy1hGdudmsRql5BRptlMTaDFbkk//08YBmrVcWCMSvCwWriTc7RdsG3 xr5BAuKLBtdFr6AOYAMwX4/gjbDH618fgWbW6bu1f3BTJI3C9h+H61qrsha81ZFKff1v zcjH2vmjZgAg++dQT5Ac2tdKzW7dKl+kAQgMdviXWZB6WpCmc5hC2a1zXiaI02B8eBDr YVZcFX032s157bZhoDaR/5yIiqnL3mN76Oxnwf/CGQLpOH/SJqYpgeMhb8qwumjUCmEi vfEQ== X-Gm-Message-State: AOJu0YwkcKAim7+mK1S01v4LzZpLZz7xwELDk8YYVT9Gzbz2gjFvuWvC oFMVKwdGDqIi8+PWQY7uRNjv8TgFmRSQ0w== X-Google-Smtp-Source: AGHT+IHqFK6zqBG8sQBRxLQUILuQFgdA7Rk5s2v63Cxm6sOGqrI98RJ2WZPkXgv/TWvYkbNbDd/Pbw== X-Received: by 2002:a25:abb0:0:b0:d9c:66d1:958f with SMTP id v45-20020a25abb0000000b00d9c66d1958fmr14115334ybi.55.1700157593216; Thu, 16 Nov 2023 09:59:53 -0800 (PST) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id q15-20020a258e8f000000b00daf198ef6fbsm967165ybl.21.2023.11.16.09.59.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 09:59:52 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-daead9cde1eso1089396276.2; Thu, 16 Nov 2023 09:59:52 -0800 (PST) X-Received: by 2002:a25:3585:0:b0:da0:6734:8b76 with SMTP id c127-20020a253585000000b00da067348b76mr14438019yba.30.1700157592437; Thu, 16 Nov 2023 09:59:52 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Thu, 16 Nov 2023 12:59:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file To: Warner Losh , Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000005c148f060a48c906" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4SWSVL6F63z3PHf --0000000000005c148f060a48c906 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM Warner Losh wrote= : > > > On Thu, Nov 16, 2023 at 9:07=E2=80=AFAM Jessica Clarke wrote: > >> On 16 Nov 2023, at 15:07, Jonathan T. Looney wrote: >> >> > - cat "$temp/asserts" >> > + echo -e "${asserts}\c" >> >> This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s= sh, so breaks the >> build there. Please fix or revert promptly. >> > > echo "${asserts}" > > is semantically the same for C. A stray newline doesn't matter in this > context. It's not worth the effort to remove it. > > Sadly, echo -n doesn't work (it's not posix, and posix defines it > specifically as implementation defined). `echo "fred\c"' works on macos, > but not FreeBSD's shell echo built-in (but somehow does for /bin/echo). > macos doesn't implement -e at all (it's also not posix). FreeBSD's shell > echo build-in is not posix compliant. So, to be portable, just echo it, a= nd > cope with the extra newline. > > That's what I'd do :) > Thanks for the report and suggestions. I've committed a fix in 884eeff20ce9. Please let me know if there are further concerns which I should address. Jonathan --0000000000005c148f060a48c906 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM = Warner Losh <imp@bsdimp.com> wr= ote:


On Thu, Nov 16, 2023= at 9:07=E2=80=AFAM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 16 Nov 2023, at 15:07, Jonathan T.= Looney <jtl@FreeBSD.org> wrote:

> -=C2=A0 =C2=A0 cat "$temp/asserts"
> +=C2=A0 =C2=A0 echo -e "${asserts}\c"

This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s sh= , so breaks the
build there. Please fix or revert promptly.

=
echo "${asserts}"

is semantically t= he same for C. A stray newline doesn't matter in this context. It's= not worth the effort to remove it.

Sadly, echo -n= doesn't work (it's not posix, and posix defines it specifically as= implementation defined). `echo "fred\c"' works on macos, but= not FreeBSD's shell echo built-in (but somehow does for /bin/echo). ma= cos doesn't implement -e at all (it's also not posix). FreeBSD'= s shell echo build-in is not posix compliant. So, to be portable, just echo= it, and cope with the extra newline.

That's w= hat I'd do :)

Thanks for the rep= ort and suggestions. I've committed a fix in=C2=A0884eeff20ce9. Please = let me know if there are further concerns which I should address.

Jonathan=C2=A0
--0000000000005c148f060a48c906--