From owner-svn-src-all@freebsd.org Wed Sep 23 13:21:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D57D53F9409; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxJhz5KPhz4pPn; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9AFCA26509; Wed, 23 Sep 2020 13:21:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f177.google.com with SMTP id e7so18541863qtj.11; Wed, 23 Sep 2020 06:21:07 -0700 (PDT) X-Gm-Message-State: AOAM533K9pwMnPHo4jkb33OIxeUPMtbsJ7fRcjZVfmH+E42KTPdAyIiA hShLxPhkUB4ASwzQrryz2df+IWYd09+fc1FNnJU= X-Google-Smtp-Source: ABdhPJymm6/9NekP0WaWHHQw6G4U4fQgHaxrmb3dY85+EEAslZ6/JRDXJn39RHIoQjQ/IufJAko22t3qLf9CVa/A8w8= X-Received: by 2002:ac8:3f3d:: with SMTP id c58mr10054639qtk.53.1600867267109; Wed, 23 Sep 2020 06:21:07 -0700 (PDT) MIME-Version: 1.0 References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 23 Sep 2020 08:20:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365846 - head To: Ravi Pokala Cc: Ed Maste , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 13:21:07 -0000 On Mon, Sep 21, 2020 at 7:23 PM Ravi Pokala wrote: > > -----Original Message----- > From: on behalf of Ed Maste > Date: 2020-09-17, Thursday at 11:47 > To: , , > Subject: svn commit: r365846 - head > > Author: emaste > Date: Thu Sep 17 18:47:23 2020 > New Revision: 365846 > URL: https://svnweb.freebsd.org/changeset/base/365846 > > Log: > Cirrus-CI: build as an unprivileged user > > The Cirrus-CI-provided working tree is owned by root. Leave that a= s is > for simplicity but build as an unprivileged user; this tests buildi= ng > with an unmodifiable source tree as a side effect. > > Hi Ed, > > We're still generating the LINT kernconfs into the src tree though, right= ? Moving that to allow for universe/tinderboxing a r/o src tree seems like = an obvious idea. The fact that we don't already do that implies that there'= s a non-obvious complication with that idea; does anyone know why that is? > > Thanks, > > Ravi (rpokala@) So, the main limiting factor here is config(8) logistics. You've got two questions to sort out: 1. Where in .OBJDIR do you put LINT? 2. How do you tell config(8) to find that LINT? I think both of these are actually pretty easy to solve. For the former, sys/conf/makeLINT.mk would need to be directed to put them in ${OBJTOP}/${.CURDIR} instead of ${.CURDIR} so that it ends up in ${OBJTOP}/sys/${MACHINE}/conf -- this is kind of unusual since nothing else will get stored there, but ultimately not a big deal. There's an inline patch that gets us probably the most of the way, but universe would still need a little bit of love. I don't think that part would suck much either, and it probably would clean things up a little bit too- for MAKE_LINT_KERNELS you wouldn't need to bother searching the in-tree confdir. Thanks, Kyle Evans (as an aside, I re-read Ed's commit message after this and realized I had asked something almost verbatim as the commit message explained it... sorry) root@viper:/usr/src# git diff Makefile.inc1 sys/conf/makeLINT.mk diff --git a/Makefile.inc1 b/Makefile.inc1 index de4970efeef..2a095f2f903 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1591,9 +1591,11 @@ KERNCONF?=3D GENERIC INSTKERNNAME?=3D kernel KERNSRCDIR?=3D ${.CURDIR}/sys -KRNLCONFDIR=3D ${KERNSRCDIR}/${TARGET}/conf +KRNLRELCONFDIR=3D ${TARGET}/conf +KRNLCONFDIR=3D ${KERNSRCDIR}/${KRNLRELCONFDIR} KRNLOBJDIR=3D ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} KERNCONFDIR?=3D ${KRNLCONFDIR} +KERNCONFOBJDIR?=3D ${OBJTOP}/sys/${KRNLRELCONFDIR} BUILDKERNELS=3D INSTALLKERNEL=3D @@ -1602,8 +1604,14 @@ INSTALLKERNEL=3D BUILDKERNELS+=3D dummy .endif .for _kernel in ${KERNCONF} -.if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) +.if !defined(_MKSHOWCONFIG) && \ + (exists(${KERNCONFDIR}/${_kernel}) || exists(${KERNCONFOBJDIR}/${_kern= el})) BUILDKERNELS+=3D ${_kernel} +.if exists(${KERNCONFDIR}/${_kernel}) +KERNCONFDIR_${TARGET}_${_kernel}=3D${KERNCONFDIR} +.else +KERNCONFDIR_${TARGET}_${_kernel}=3D${KERNCONFOBJDIR} +.endif .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL=3D ${_kernel} .endif @@ -1661,7 +1669,7 @@ buildkernel: .MAKE .PHONY PATH=3D${TMPPATH} \ config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ - '${KERNCONFDIR}/${_kernel}' + '${KERNCONFDIR_${TARGET}_${_kernel}}/${_kernel}' .endif .if ${MK_CLEAN} =3D=3D "yes" && !defined(NO_KERNELCLEAN) @echo diff --git a/sys/conf/makeLINT.mk b/sys/conf/makeLINT.mk index b2fc256621b..edaea99750a 100644 --- a/sys/conf/makeLINT.mk +++ b/sys/conf/makeLINT.mk @@ -1,8 +1,5 @@ # $FreeBSD$ -# The LINT files need to end up in the kernel source directory. -.OBJDIR: ${.CURDIR} - all: @echo "make LINT only"