From nobody Wed Sep 13 13:54:28 2023 X-Original-To: dev-commits-src-main@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 4Rm257625tz4t2RF; Wed, 13 Sep 2023 13:54:51 +0000 (UTC) (envelope-from gallatin@fastmail.com) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rm2570SNcz4R9Q; Wed, 13 Sep 2023 13:54:51 +0000 (UTC) (envelope-from gallatin@fastmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=IHKkipGJ; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=UhI7yhVl; spf=pass (mx1.freebsd.org: domain of gallatin@fastmail.com designates 66.111.4.27 as permitted sender) smtp.mailfrom=gallatin@fastmail.com; dmarc=pass (policy=none) header.from=fastmail.com Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 118A65C0150; Wed, 13 Sep 2023 09:54:50 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 13 Sep 2023 09:54:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1694613290; x=1694699690; bh=AF Q1pn+j847q3MSDW8nbM3E6zzm9v3lhSD0YcwWcWn4=; b=IHKkipGJ9HPZ/XnHxp aBDsZ5BBzhbEpb4bv69Ktqo88E3q0T4XuFZ7C2V8aESuGkzR3HwlpYaqT05JWdXP GogSMH0kywJpr1I/RL6m+0MZRcX6dhPXJcHLDmW/fMMpMzxwuKVLOL6o8WbKDcpB cNW1B9Ijn8SANvYjFu2e0pmHX0Nia62+fivfaogSfLKd/LqTzlgdFmmVZap7HXoF OV4X8AM03T0/O/l9uoS6olc7SKUIbWZmT02SHfSLP/4uY0rtzJn1irYbGq2nK9iA Fw8Sd69c7H+yzLZi8iqV2ypW04B4ZE02dvWT0EqSYRGxJHSqHHRJ9cq6MohV9z3Q XX8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1694613290; x=1694699690; bh=AFQ1pn+j847q3 MSDW8nbM3E6zzm9v3lhSD0YcwWcWn4=; b=UhI7yhVlyySkOrD16eCj3NAwbHhiz DOlOE5rxucjUx5AXqAxRin0YqcX5RRRLXVfoZUaWWbVEybOKfc90EsemeHnHC0Vk xy7BP+pK/72SaVcj7uUQZVjLWeB5pW1J6lBtdt4R8kd+eThF0Ed1gfKZHAHTSZHH TShgM4HIXJAcdcKYEmKNZCKBVcm5W+C6hplH+YcDmpeOU7Y0OHgnHu2ZLRaHI4Tu ZC4Yrvsn82laMzJBh81LivTzWaupLxaBFG4T6jImt1LIX+NTfuzbJCEnZtWTMgPZ 6ofamFVR7jywIPHjDpA3sfuQZYrhLZT7WgwgzvoXQ/W5CZlwPN3MmPRVA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeikedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsegrtd erreerredtnecuhfhrohhmpedfffhrvgifucfirghllhgrthhinhdfuceoghgrlhhlrght ihhnsehfrghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepheegieeltdegue eiveekveevheeikedvleduledufeetkeelhfduheehteegleehnecuffhomhgrihhnpehf rhgvvggsshgurdhorhhgpdhifhdrtghsnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghgrlhhlrghtihhnsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i2f014658:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id C7F50B60089; Wed, 13 Sep 2023 09:54:49 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-745-g95dd7bea33-fm-20230905.001-g95dd7bea List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Message-Id: In-Reply-To: <7bb4a991-060d-415e-a188-192781c1f3c0@app.fastmail.com> References: <202307171904.36HJ4L1l013461@gitrepo.freebsd.org> <7bb4a991-060d-415e-a188-192781c1f3c0@app.fastmail.com> Date: Wed, 13 Sep 2023 08:54:28 -0500 From: "Drew Gallatin" To: "Simon J. Gerraty" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 89f361f742ae - main - kern.post.mk allow NEWVERS_{ENV,ARGS} Content-Type: multipart/alternative; boundary=18c6a348166849e0a8d1f1f95e8e1dbf X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.58 / 15.00]; URI_COUNT_ODD(1.00)[13]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.27:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.27:from]; XM_UA_NO_VERSION(0.01)[]; FREEFALL_USER(0.00)[gallatin]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; BLOCKLISTDE_FAIL(0.00)[66.111.4.27:server fail]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[fastmail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org] X-Rspamd-Queue-Id: 4Rm2570SNcz4R9Q --18c6a348166849e0a8d1f1f95e8e1dbf Content-Type: text/plain des seems to be addressing this in https://reviews.freebsd.org/D41845 On Wed, Sep 13, 2023, at 8:08 AM, Drew Gallatin wrote: > Simon. > > This changes the version strings of kernels built via the buildkernel target and adds a lot of redundancy. Eg: > > VERSTR changes from: > > "FreeBSD 14.0-ALPHA1 #0 main-n264839-91d0876a20ce-dirty: Wed Sep 13 08:17:25 EDT 2023\n gallatin@beast:/usr/src/sys/amd64/compile/GENERIC" > > To: > > "FreeBSD 14.0-ALPHA1 amd64 1400094 #0 main-n264839-91d0876a20ce-dirty: Wed Sep 13 08:21:13 EDT 2023\n gallatin@beast:/usr/obj/usr/src/amd64.amd64/sys/GENERIC" > > Note the extra "amd64 1400094" This screws up some of our (Netflix) tooling, as its reflected via uname -a > > It appears that when using the buildkernel target, VERSION is picked up from Makefile.inc1's VERSION, which I think is intended for CTFMERGE. Was this intention? > > Thanks, > Drew > > > > On Mon, Jul 17, 2023, at 2:04 PM, Simon J. Gerraty wrote: >> The branch main has been updated by sjg: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=89f361f742aeae11c8b2e28eae3d015882b6c0ee >> >> commit 89f361f742aeae11c8b2e28eae3d015882b6c0ee >> Author: Simon J. Gerraty >> AuthorDate: 2023-07-17 19:03:35 +0000 >> Commit: Simon J. Gerraty >> CommitDate: 2023-07-17 19:03:35 +0000 >> >> kern.post.mk allow NEWVERS_{ENV,ARGS} >> >> Allow makefiles better control of newvers.sh env and args. >> Also allow variable overrides on command line. >> >> Reviewed by: imp, stevek >> Sponsored by: Juniper Networks, Inc. >> Differential Revision: https://reviews.freebsd.org/D41012 >> --- >> sys/conf/kern.post.mk | 5 +++-- >> sys/conf/newvers.sh | 16 +++++++++++++--- >> 2 files changed, 16 insertions(+), 5 deletions(-) >> >> diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk >> index c368d5f40df8..45df83e2d16b 100644 >> --- a/sys/conf/kern.post.mk >> +++ b/sys/conf/kern.post.mk >> @@ -444,11 +444,12 @@ config.o env.o hints.o vers.o vnode_if.o: >> ${NORMAL_C} >> ${NORMAL_CTFCONVERT} >> >> +NEWVERS_ENV+= MAKE="${MAKE}" >> .if ${MK_REPRODUCIBLE_BUILD} != "no" >> -REPRO_FLAG="-R" >> +NEWVERS_ARGS+= -R >> .endif >> vers.c: .NOMETA_CMP $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP:Nvers.*} >> - MAKE="${MAKE}" sh $S/conf/newvers.sh ${REPRO_FLAG} ${KERN_IDENT} >> + ${NEWVERS_ENV} sh $S/conf/newvers.sh ${NEWVERS_ARGS} ${KERN_IDENT} >> >> vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src >> ${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -c >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh >> index 85346b1cdc29..e21b3f5ce2e2 100644 >> --- a/sys/conf/newvers.sh >> +++ b/sys/conf/newvers.sh >> @@ -58,13 +58,23 @@ BRANCH="CURRENT" >> if [ -n "${BRANCH_OVERRIDE}" ]; then >> BRANCH=${BRANCH_OVERRIDE} >> fi >> -RELEASE="${REVISION}-${BRANCH}" >> -VERSION="${TYPE} ${RELEASE}" >> >> if [ -z "${SYSDIR}" ]; then >> - SYSDIR=$(dirname $0)/.. >> + SYSDIR=$(dirname $0)/.. >> fi >> >> +# allow random overrides >> +while : >> +do >> + case "$1" in >> + *=*) eval "$1"; shift;; >> + *) break;; >> + esac >> +done >> + >> +RELEASE="${RELEASE:-${REVISION}-${BRANCH}}" >> +VERSION="${VERSION:-${TYPE} ${RELEASE}}" >> + >> RELDATE=$(awk '/^#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) >> >> if [ -r "${SYSDIR}/../COPYRIGHT" ]; then >> > --18c6a348166849e0a8d1f1f95e8e1dbf Content-Type: text/html Content-Transfer-Encoding: quoted-printable
des seems = to be addressing this in = https://reviews.freebsd.org/D41845

On Wed, = Sep 13, 2023, at 8:08 AM, Drew Gallatin wrote:
Simon.

= This changes the version strings of kernels built via the buildkernel ta= rget and adds a lot of redundancy.  Eg:

VERSTR changes from:
"FreeBSD 14.0-ALPHA1 #0 main-n=
264839-91d0876a20ce-dirty: Wed Sep 13 08:17:25 EDT 2023\n    gallatin@be=
ast:/usr/src/sys/amd64/compile/GENERIC"

To:=

"FreeBSD 14.0-A=
LPHA1 amd64 1400094 #0 main-n264839-91d0876a20ce-dirty: Wed Sep 13 08:21=
:13 EDT 2023\n    gallatin@beast:/usr/obj/usr/src/amd64.amd64/sys/GENERI=
C"

Note the extra "amd64 1400094" &nbs= p; This screws up some of our (Netflix) tooling, as its reflected via un= ame -a

It appears that when using the build= kernel target, VERSION is picked up from Makefile.inc1's VERSION, which = I think is intended for CTFMERGE.    Was this intention?<= br>

Thanks,
Drew


On Mon, Jul 17, 2023, at 2:04= PM, Simon J. Gerraty wrote:
The branch main has been updated by sjg:
<= div>
URL: https://cgit.FreeBSD= .org/src/commit/?id=3D89f361f742aeae11c8b2e28eae3d015882b6c0ee

commit 89f361f742aeae11c8b2e28eae3d015882b6c0ee<= br>
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
Auth= orDate: 2023-07-17 19:03:35 +0000
Commit:   = ;  Simon J. Gerraty <sjg@Free= BSD.org>
CommitDate: 2023-07-17 19:03:35 +0000
<= /div>

    kern.post.mk allow NEWVERS_{= ENV,ARGS}
    
 &nb= sp;  Allow makefiles better control of newvers.sh env and args.
=
    Also allow variable overrides on command l= ine.
    
  &n= bsp; Reviewed by:    imp, stevek
 &nbs= p;  Sponsored by:   Juniper Networks, Inc.
=     Differential Revision:  https://reviews.freebsd.org/D41012
---
sys/conf/kern.post.mk |  5 +++--
sys/conf/newvers.sh   | 16 +++++++++++++---
2 files changed, 16 insertions(+), 5 deletions(-)

<= /div>
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
=
index c368d5f40df8..45df83e2d16b 100644
--- a/s= ys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
=
@@ -444,11 +444,12 @@ config.o env.o hints.o vers.o vnode_if.o:
=
${NORMAL_C}
${NORMAL_CTFCONVERT}
=  
+NEWVERS_ENV+=3D MAKE=3D"${MAKE}"
.if= ${MK_REPRODUCIBLE_BUILD} !=3D "no"
-REPRO_FLAG=3D"-R"
=
+NEWVERS_ARGS+=3D -R
.endif
vers.= c: .NOMETA_CMP $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP:Nvers.*}
- MAKE=3D"${MAKE}" sh $S/conf/newvers.sh ${REPRO_FLAG} ${KE= RN_IDENT}
+ ${NEWVERS_ENV} sh $S/conf/newvers.sh ${NEWVERS= _ARGS} ${KERN_IDENT}
 
vnode_if.c: $S/t= ools/vnode_if.awk $S/kern/vnode_if.src
${AWK} -f $S/tools/= vnode_if.awk $S/kern/vnode_if.src -c
diff --git a/sys/conf= /newvers.sh b/sys/conf/newvers.sh
index 85346b1cdc29..e21b= 3f5ce2e2 100644
--- a/sys/conf/newvers.sh
++= + b/sys/conf/newvers.sh
@@ -58,13 +58,23 @@ BRANCH=3D"CURR= ENT"
if [ -n "${BRANCH_OVERRIDE}" ]; then
BR= ANCH=3D${BRANCH_OVERRIDE}
fi
-RELEASE=3D"${R= EVISION}-${BRANCH}"
-VERSION=3D"${TYPE} ${RELEASE}"
 
if [ -z "${SYSDIR}" ]; then
-=     SYSDIR=3D$(dirname $0)/..
+ SYSDIR=3D$(= dirname $0)/..
fi
 
+# al= low random overrides
+while :
+do
<= div>+ case "$1" in
+ *=3D*) eval "$1"; shift;;
+ *) break;;
+ esac
+done
+=
+RELEASE=3D"${RELEASE:-${REVISION}-${BRANCH}}"
<= div>+VERSION=3D"${VERSION:-${TYPE} ${RELEASE}}"
+
RELDATE=3D$(awk '/^#define[[:space:]]*__FreeBSD_version/ {print $3= }' ${PARAMFILE:-${SYSDIR}/sys/param.h})
 
if [ -r "${SYSDIR}/../COPYRIGHT" ]; then



--18c6a348166849e0a8d1f1f95e8e1dbf--