From owner-svn-src-head@freebsd.org Wed Sep 23 14:30:18 2020 Return-Path: Delivered-To: svn-src-head@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 317FA3FB410 for ; Wed, 23 Sep 2020 14:30:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BxLDn2sP6z4tKp for ; Wed, 23 Sep 2020 14:30:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x842.google.com with SMTP id c18so7120qtw.5 for ; Wed, 23 Sep 2020 07:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k9MxJtNnpqmW6X3FLUfTCe4yCFzpkNQHyfm79CWwVB0=; b=Oa+ISq16Q01ZdwiWVwzRCg9pWSoeJMXcllbf2TM6OeHgko2SU3f/6xNAfkuJdBLxr/ 6IYkWjWi9Bcnhiw1KoFqeGFIE+9aM3kW3JA91tz4jUhsxR/u66HUlevBti/XVNhTvT5B 58jMwjm35N/dwz0SwoT3ZF9m5JTek6R3E5ur0GXqeH/UxXrCrehnfsCXxVAQHhZy+Dqy NJNh6t01PRUyk8jzRmk/ZnKiYjW/2vd/Jut0tMzaQBVW4sX9Djmv7dx9FshZyLKuAsuX dq3DCJdxqZ6OXIEGetsTN8UXojxuOdpj71ne5Y5G92e2PQj/fR1hR87KEu5hey6pyaNU r6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k9MxJtNnpqmW6X3FLUfTCe4yCFzpkNQHyfm79CWwVB0=; b=odu74cazQw0oS4ONIcRg9olsDaC+TVPx2Z4gMRy7o+tWNjUYF34l1ecKV13LeB5Ldm p+4OKbN1VqBQreR4jpoTpfrnbx99n46zphxizoLJttMgFVrMnP4GT8NgaFMetJqgwPg8 3FPzfxQ49sdleBJmcFrP7OJwiA7F1pkCUnMhtUX1Srhc66HFVCiLdx2zV7kBW+cLYkmx AAVME2OZKei2YiaNuAYKdGcosVWEJGkNtCYh1Ducx0xQHpLnSavHRX6upXFUmHb+RRE1 EXLNE3KMSew0/EqPTXj9IfMAlfq4SYA3MPVDYNI4e0ZtCVOTkxVNizQkzii7VBAGrjaE otkg== X-Gm-Message-State: AOAM533ZJvMbG/NaKsK0BMaJJ69Ze9EAUvL9769mKmyj2/h7FoyY+Oz2 pcjRQtMaJHDehtXe/Muti9HO00UoJ7XmOl3a1JeBrw== X-Google-Smtp-Source: ABdhPJz2Q0HtFi6PT0EdoN82/+mzIhnEFc0H0DZG7WU3hO3SgCK8hsicxMHhOMLXYHybuhneUk8LubidhD8ERuF2RDE= X-Received: by 2002:ac8:4cd0:: with SMTP id l16mr252506qtv.175.1600871416131; Wed, 23 Sep 2020 07:30:16 -0700 (PDT) MIME-Version: 1.0 References: <202009171847.08HIlNXa015641@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 23 Sep 2020 08:30:03 -0600 Message-ID: Subject: Re: svn commit: r365846 - head To: Kyle Evans Cc: Ravi Pokala , Ed Maste , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4BxLDn2sP6z4tKp X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Oa+ISq16; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::842) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.06 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.97)[-0.974]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.10)[-0.099]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::842:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-head]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 14:30:18 -0000 Won't this break non LINT builds? Maybe we should fix the crazy way we generate lint? On Wed, Sep 23, 2020, 7:21 AM Kyle Evans wrote: > 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: , , < > svn-src-head@freebsd.org> > > 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 > as is > > for simplicity but build as an unprivileged user; this tests > building > > 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?= GENERIC > INSTKERNNAME?= kernel > > KERNSRCDIR?= ${.CURDIR}/sys > -KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf > +KRNLRELCONFDIR= ${TARGET}/conf > +KRNLCONFDIR= ${KERNSRCDIR}/${KRNLRELCONFDIR} > KRNLOBJDIR= ${OBJTOP}${KERNSRCDIR:C,^${.CURDIR},,} > KERNCONFDIR?= ${KRNLCONFDIR} > +KERNCONFOBJDIR?= ${OBJTOP}/sys/${KRNLRELCONFDIR} > > BUILDKERNELS= > INSTALLKERNEL= > @@ -1602,8 +1604,14 @@ INSTALLKERNEL= > BUILDKERNELS+= dummy > .endif > .for _kernel in ${KERNCONF} > -.if !defined(_MKSHOWCONFIG) && exists(${KERNCONFDIR}/${_kernel}) > +.if !defined(_MKSHOWCONFIG) && \ > + (exists(${KERNCONFDIR}/${_kernel}) || > exists(${KERNCONFOBJDIR}/${_kernel})) > BUILDKERNELS+= ${_kernel} > +.if exists(${KERNCONFDIR}/${_kernel}) > +KERNCONFDIR_${TARGET}_${_kernel}=${KERNCONFDIR} > +.else > +KERNCONFDIR_${TARGET}_${_kernel}=${KERNCONFOBJDIR} > +.endif > .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) > INSTALLKERNEL= ${_kernel} > .endif > @@ -1661,7 +1669,7 @@ buildkernel: .MAKE .PHONY > PATH=${TMPPATH} \ > config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} \ > -I '${KERNCONFDIR}' -I '${KRNLCONFDIR}' \ > - '${KERNCONFDIR}/${_kernel}' > + '${KERNCONFDIR_${TARGET}_${_kernel}}/${_kernel}' > .endif > .if ${MK_CLEAN} == "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" >