From owner-svn-src-all@freebsd.org Wed Aug 29 19:21:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0229B1093872; Wed, 29 Aug 2018 19:21:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 471FF7D7AA; Wed, 29 Aug 2018 19:21:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id v61UfnZtpp5A1v61WfQ6ua; Wed, 29 Aug 2018 13:21:03 -0600 X-Authority-Analysis: v=2.3 cv=JLKPTPCb c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=dapMudl6Dx4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=7q0Mil2CJ7WIWtF3S7kA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 3AA89DA9; Wed, 29 Aug 2018 12:21:44 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w7TJKhHg047021; Wed, 29 Aug 2018 12:20:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w7TJKhKs047018; Wed, 29 Aug 2018 12:20:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201808291920.w7TJKhKs047018@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alex Richardson cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338098 - in head: . tools/build In-Reply-To: Message from Alex Richardson of "Mon, 20 Aug 2018 10:39:53 -0000." <201808201039.w7KAdrMM079556@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 29 Aug 2018 12:20:43 -0700 X-CMAE-Envelope: MS4wfHR24ilD5A5CPwnViMtZrtOOR4GXbTUMQynmbTbNL72i4+p280hoH3nLn5P40V1OCD6fHVTqFA2voke0Dc/JIyg18+AJr4VHYiEysjfhvd2bii4RDXFN VA9w5wRsBnyvDYMUlqTel8U4PdyonY3go+jsQBdi6i7lgp7dc6OQKZ6VcfEww17+n1SQ/qA4oVI1k4xL10xx8U801sry2MlaFqC5JraRbOWrZ+Ln6x+BE8CF EVRwDqCu2qwmWZq5FViz2swhS6wVIgroBBveC0nbleSjZNCgt53bA1cVgUug3qFO X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 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, 29 Aug 2018 19:21:11 -0000 In message <201808201039.w7KAdrMM079556@repo.freebsd.org>, Alex Richardson writ es: > Author: arichardson > Date: Mon Aug 20 10:39:53 2018 > New Revision: 338098 > URL: https://svnweb.freebsd.org/changeset/base/338098 > > Log: > Don't create directories in ${WORLDTMP}/legacy with mtree > > This has two advantages: > 1) We no longer create lots of empty directories that are not needed > 2) This is a requirement for building on non-FreeBSD hosts since mtree will > only exist after the bootstrap-tools phase there. > > Aproved By: jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D16773 > > Modified: > head/Makefile.inc1 > head/tools/build/Makefile > > Modified: head/Makefile.inc1 > ============================================================================= > = > --- head/Makefile.inc1 Mon Aug 20 10:39:48 2018 (r338097) > +++ head/Makefile.inc1 Mon Aug 20 10:39:53 2018 (r338098) > @@ -968,29 +968,10 @@ _worldtmp: .PHONY > .endif # !defined(NO_CLEAN) > @mkdir -p ${WORLDTMP} > @touch ${WORLDTMP}/${.TARGET} > - > -.for _dir in \ > - lib lib/casper lib/geom usr legacy/bin legacy/usr > - mkdir -p ${WORLDTMP}/${_dir} > -.endfor > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > - -p ${WORLDTMP}/legacy/usr >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > - -p ${WORLDTMP}/legacy/usr/include >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > - -p ${WORLDTMP}/usr >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > - -p ${WORLDTMP}/usr/include >/dev/null > - ln -sf ${.CURDIR}/sys ${WORLDTMP} > -.if ${MK_DEBUG_FILES} != "no" > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > - -p ${WORLDTMP}/legacy/usr/lib >/dev/null > - ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > - -p ${WORLDTMP}/usr/lib >/dev/null > -.endif > -.for _mtree in ${LOCAL_MTREE} > - ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null > -.endfor > +# We can't use mtree to create the worldtmp directories since it may not be > +# available on the target system (this happens e.g. when building on non-Fre > eBSD) > + cd ${.CURDIR}/tools/build; \ > + ${MAKE} DIRPRFX=tools/build/ DESTDIR=${WORLDTMP}/legacy installdirs > _legacy: > @echo > @echo "--------------------------------------------------------------" > @@ -1003,6 +984,19 @@ _bootstrap-tools: > @echo ">>> stage 1.2: bootstrap tools" > @echo "--------------------------------------------------------------" > ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools > + mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ > + -p ${WORLDTMP}/usr >/dev/null > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ > + -p ${WORLDTMP}/usr/include >/dev/null > + ln -sf ${.CURDIR}/sys ${WORLDTMP} > +.if ${MK_DEBUG_FILES} != "no" > + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ > + -p ${WORLDTMP}/usr/lib >/dev/null > +.endif > +.for _mtree in ${LOCAL_MTREE} > + ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null > +.endfor > _cleanobj: > .if !defined(NO_CLEAN) > @echo > > Modified: head/tools/build/Makefile > ============================================================================= > = > --- head/tools/build/Makefile Mon Aug 20 10:39:48 2018 (r338097) > +++ head/tools/build/Makefile Mon Aug 20 10:39:53 2018 (r338098) > @@ -59,4 +59,17 @@ SUBDIR= cross-build > # Needed to build config (since it uses libnv) > SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h > > + > +# Create all the directories that are needed during the legacy, bootstrap-to > ols > +# and cross-tools stages. We do this here using mkdir since mtree may not ex > ist > +# yet (this happens if we are crossbuilding from Linux/Mac). > +installdirs: > +.for _dir in bin sbin usr/bin usr/sbin usr/lib usr/include lib/geom lib/casp > er > + mkdir -p "${DESTDIR}/${_dir}" > +.endfor > + > +.for _group in ${INCSGROUPS:NINCS} > + mkdir -p "${DESTDIR}/${${_group}DIR}" > +.endfor > + > .include > This broke my krb5 project branch. The fix for me is easy but rather inelegant, adding yet another for loop. Would it not be better to guarantee that mtree is in $WORLDTEMP for platforms that don't have it naturally or unconditionally? And, before we use it? With this change it requires, depending on what any future patch changes, that etc/mtree and this fragment be updated. To me it feels klunky. I'll work around this for now but IMO long term we should use a different strategy and reduce redundancy. Thoughts? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.