From nobody Fri Sep 12 10:06:29 2025 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 4cNVT10zLFz67G0r for ; Fri, 12 Sep 2025 10:06:45 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cNVSz5RTKz3Pw2 for ; Fri, 12 Sep 2025 10:06:43 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=kev009.com header.s=google header.b=GXd4pR2k; dmarc=none; spf=pass (mx1.freebsd.org: domain of kevin.bowling@kev009.com designates 2607:f8b0:4864:20::82d as permitted sender) smtp.mailfrom=kevin.bowling@kev009.com Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-4b61161c30fso13124061cf.3 for ; Fri, 12 Sep 2025 03:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1757671601; x=1758276401; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YLHnL25kQgA5nRo+GYMbfghsCtmOYaZiDqXGUdjpuXo=; b=GXd4pR2kdN3P8gq8TNnRH3pKKd2tvLW2+4uz3AVeGuJyRY0XAFNZUihhxhuGN3lc0F rk6F6/k/S5XdKrJLLHyigiSWW6Aq7KZK8G/XdZnuzKYhKfl9tWNFnRhZ/3wNpYUE9bBd Z2CINmA2FDK5CXM2YY4RbMC1Fl/zByd977AgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757671601; x=1758276401; h=content-transfer-encoding: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=YLHnL25kQgA5nRo+GYMbfghsCtmOYaZiDqXGUdjpuXo=; b=iq2IWCCNAb5Kh2HV1Jf2bf484wpqzNqSHByorn2/XvHW/cAilCDLE58wMkCcbpJPjh cTUJa1hG02ieSVMNyOfLIqfWVsNW0sKog9L69k8zecZOQ1QXGV7wgt0ngFncF+8FA6aU OW1sF2TvumIijJj44i5oA/Ze3rLDVpSmxOnck/7XQw9rnkEmfjsl3wJE1lpKNnCPIERy 2DDpmbzw7U/I2hImAUqCRnNunNtFiX+S1PzTweFRgl/0KqVh1lnODqs5/dJjvLFaGs7m vb1Bqnmp0KXEEZDrcbIWjvtylf30ZurasGHDyJ26joVN2vQ0No0hGBfl4doJL5aAsetW jyng== X-Forwarded-Encrypted: i=1; AJvYcCVTjmvTr76EcFlJEeEI3KE9zbLJIYASW6bjAO7NZWOJE9XewL3I1ccDjnuRR48/053E7kdyb4joby/2xNFLSr8UQkabCA==@freebsd.org X-Gm-Message-State: AOJu0YzMkUHGLDumamMfev+yMJngKUV0Ui58gsIkG5MeX0Qxf5JZX9aC shWply62C5AjHKnaLXlDIxJeuQ0gn7MBRv2MNfH3Mp1bOTrLbzNFaFaTy8FXo8HYgdiAdkz3pBy /rcyeLFegay5NTk0ith35enxDQq2ZvQW9NeMozElHS5PQwSPVBcskqlqt X-Gm-Gg: ASbGncumFTGVsDGP8BcLmdPasGNEKBSHeK34H9B3XY57k8Mtl6F9+cjjSYwzuNyDkLz UmeKImUlZasgKvpZ486JCK44AtXHHEqIEvQkSsBwbtXBbocFIPRh6p6hKPgt3InpRpxU4TFQ11o o5h6KAH+7B4Oy9q50/unkgQj2qCJQcg0VV7Vy0UTljBvNAxMyAtDe4gR46DhoHhbwtRY7Z77vZI mnSNVWS+y1oD41JnDg= X-Google-Smtp-Source: AGHT+IF5JbuiUd6ac8DtIHbCSchoaWzjZ6JJ2dx23PRE79VSbOL+RpZduDM2sEpSXXjYGzp9MhbpX9IEhvatdD3kz7A= X-Received: by 2002:a05:622a:d1:b0:4b4:93c4:56bd with SMTP id d75a77b69052e-4b77cfc19bdmr38524151cf.13.1757671601011; Fri, 12 Sep 2025 03:06:41 -0700 (PDT) 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509101658.58AGwlFE061466@gitrepo.freebsd.org> In-Reply-To: <202509101658.58AGwlFE061466@gitrepo.freebsd.org> From: Kevin Bowling Date: Fri, 12 Sep 2025 03:06:29 -0700 X-Gm-Features: Ac12FXx7XqNGoiF2oXDnEQsNCT7ix1daL6dLYnn4TrwawqUV-EYh9bribFjUkpY Message-ID: Subject: Re: git: dd8c666d8b78 - main - src.sys.mk: Support src.conf in SRCTOP To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.983]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[kev009.com]; ARC_NA(0.00)[]; R_DKIM_PERMFAIL(0.00)[kev009.com:s=google]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_THREE(0.00)[4]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82d:from] X-Rspamd-Queue-Id: 4cNVSz5RTKz3Pw2 This turned out to be surprising and led to a puzzle and potentially unbootable system. I had a very bare bones src.conf in the root from a long time ago for MIPS hacking, and it got used as my src.conf after this commit instead of /etc/src.conf. I think the order should probably be inverted for POLA, keeping /etc/src.conf as the primary. It would also be nice to know the "why?" of this change in the commit message, it only describes "what". Regards, Kevin On Wed, Sep 10, 2025 at 9:58=E2=80=AFAM Dag-Erling Sm=C3=B8rgrav wrote: > > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddd8c666d8b78f6b9ddb691f050= 5837fa885ff3b4 > > commit dd8c666d8b78f6b9ddb691f0505837fa885ff3b4 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-09-10 16:57:26 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-09-10 16:58:30 +0000 > > src.sys.mk: Support src.conf in SRCTOP > > If SRCCONF is not defined and src.conf exists at the top level of the > source tree, use that instead of /etc/src.conf. > > MFC after: 3 days > Reviewed by: kevans, imp > Differential Revision: https://reviews.freebsd.org/D52470 > --- > .gitignore | 1 + > share/man/man5/src.conf.5 | 9 ++++++--- > share/mk/src.sys.mk | 4 ++++ > sys/conf/kern.pre.mk | 4 ++++ > tools/build/options/makeman | 7 +++++-- > 5 files changed, 20 insertions(+), 5 deletions(-) > > diff --git a/.gitignore b/.gitignore > index 3ed711f301ac..a53a26f16d4f 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -29,3 +29,4 @@ tags > .clangd > .ccls-cache > sys/*/compile > +/src.conf > diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 > index 2895c0cf4746..a1abbcbda01e 100644 > --- a/share/man/man5/src.conf.5 > +++ b/share/man/man5/src.conf.5 > @@ -1,5 +1,5 @@ > .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman= . > -.Dd August 20, 2025 > +.Dd September 10, 2025 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -29,8 +29,11 @@ variables that control the aspects of how the system b= uilds. > .Pp > The default location of > .Nm > -is > -.Pa /etc/src.conf , > +is the top level of the source tree, or > +.Pa /etc/src.conf > +if no > +.Nm > +is found in the source tree itself, > though an alternative location can be specified in the > .Xr make 1 > variable > diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk > index 2b9fc255a26d..ec035fb71e54 100644 > --- a/share/mk/src.sys.mk > +++ b/share/mk/src.sys.mk > @@ -6,7 +6,11 @@ > > .if !defined(_WITHOUT_SRCCONF) > # Allow user to configure things that only effect src tree builds. > +.if exists(${SRCTOP}/src.conf) > +SRCCONF?=3D ${SRCTOP}/src.conf > +.else > SRCCONF?=3D /etc/src.conf > +.endif > .if !empty(SRCCONF) && \ > (exists(${SRCCONF}) || ${SRCCONF} !=3D "/etc/src.conf") && \ > !target(_srcconf_included_) > diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk > index 1fcfd6467e7f..0251486247da 100644 > --- a/sys/conf/kern.pre.mk > +++ b/sys/conf/kern.pre.mk > @@ -8,7 +8,11 @@ > # the rest of /usr/src, but they still always process SRCCONF even thoug= h > # the normal mechanisms to prevent that (compiling out of tree) won't > # work. To ensure they do work, we have to duplicate thee few lines here= . > +.if exists(${SRCTOP}/src.conf) > +SRCCONF?=3D ${SRCTOP}/src.conf > +.else > SRCCONF?=3D /etc/src.conf > +.endif > .if (exists(${SRCCONF}) || ${SRCCONF} !=3D "/etc/src.conf") && !target(_= srcconf_included_) > .include "${SRCCONF}" > _srcconf_included_: > diff --git a/tools/build/options/makeman b/tools/build/options/makeman > index ddd08443e61c..88ee5884d180 100755 > --- a/tools/build/options/makeman > +++ b/tools/build/options/makeman > @@ -222,8 +222,11 @@ variables that control the aspects of how the system= builds. > .Pp > The default location of > .Nm > -is > -.Pa /etc/src.conf , > +is the top level of the source tree, or > +.Pa /etc/src.conf > +if no > +.Nm > +is found in the source tree itself, > though an alternative location can be specified in the > .Xr make 1 > variable