From owner-svn-src-all@freebsd.org Tue Apr 7 10:37:43 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 1981E2B26C6; Tue, 7 Apr 2020 10:37:43 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48xP4Q3q0cz4RTY; Tue, 7 Apr 2020 10:37:42 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 037AbdW6091938; Tue, 7 Apr 2020 03:37:39 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 037Abd5T091937; Tue, 7 Apr 2020 03:37:39 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202004071037.037Abd5T091937@gndrsh.dnsmgr.net> Subject: Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb In-Reply-To: <202004070246.0372kNIx036216@repo.freebsd.org> To: Maxim Sobolev Date: Tue, 7 Apr 2020 03:37:39 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48xP4Q3q0cz4RTY X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.97 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 07 Apr 2020 10:37:43 -0000 > Author: sobomax > Date: Tue Apr 7 02:46:22 2020 > New Revision: 359685 > URL: https://svnweb.freebsd.org/changeset/base/359685 > > Log: > Normalize deployment tools usage and definitions by putting into one place > instead of sprinkling them out over many disjoint files. This is a follow-up > to achieve the same goal in an incomplete rev.348521. I have concerns that this factoring out of 5 values that have not changed in 25 years is a pessimization, it is one more file that make has to open on each invocation. > Approved by: imp > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D20520 > > Added: > head/share/mk/src.tools.mk (contents, props changed) > Modified: > head/Makefile.inc1 > head/etc/Makefile > head/lib/libc/gen/Makefile.inc > head/share/mk/sys.mk > head/share/termcap/Makefile > head/usr.bin/login/Makefile > head/usr.bin/vgrind/Makefile > head/usr.sbin/services_mkdb/Makefile > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Tue Apr 7 02:45:24 2020 (r359684) > +++ head/Makefile.inc1 Tue Apr 7 02:46:22 2020 (r359685) > @@ -57,6 +57,8 @@ _MKSHOWCONFIG= t > SRCDIR?= ${.CURDIR} > LOCALBASE?= /usr/local > > +.include "share/mk/src.tools.mk" > + > # Cross toolchain changes must be in effect before bsd.compiler.mk > # so that gets the right CC, and pass CROSS_TOOLCHAIN to submakes. > .if defined(CROSS_TOOLCHAIN) > @@ -874,8 +876,8 @@ MTREEFLAGS+= -W > INSTALLFLAGS+= -h sha256 > .endif > .if defined(DB_FROM_SRC) || defined(NO_ROOT) > -IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}" > -IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" > +IMAKE_INSTALL= INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}" > +IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" > .endif > > DESTDIR_MTREEFLAGS= -deU > @@ -887,12 +889,12 @@ WORLDTMP_MTREEFLAGS= -deUW > # that are created by mtree to be owned by root/wheel. > DESTDIR_MTREEFLAGS+= -W > .endif > -MTREE?= mtree > +DISTR_MTREE= ${MTREE_CMD} > .if ${BUILD_WITH_STRICT_TMPPATH} != 0 > -MTREE= ${WORLDTMP}/legacy/usr/sbin/mtree > +DISTR_MTREE= ${WORLDTMP}/legacy/usr/sbin/mtree > .endif > -WORLDTMP_MTREE= ${MTREE} ${WORLDTMP_MTREEFLAGS} > -DESTDIR_MTREE= ${MTREE} ${DESTDIR_MTREEFLAGS} > +WORLDTMP_MTREE= ${DISTR_MTREE} ${WORLDTMP_MTREEFLAGS} > +DESTDIR_MTREE= ${DISTR_MTREE} ${DESTDIR_MTREEFLAGS} > > # kernel stage > KMAKEENV= ${WMAKEENV:NSYSROOT=*} > @@ -1363,14 +1365,14 @@ distributeworld installworld stageworld: _installcheck > .endif > .endif > .if defined(NO_ROOT) > - ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ > + ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ > sed -e 's#^\./#./${dist}/#' >> ${METALOG} > - ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \ > + ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \ > sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} > - ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ > + ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ > sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} > .if defined(_LIBCOMPAT) > - ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ > + ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ > sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} > .endif > .endif > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Tue Apr 7 02:45:24 2020 (r359684) > +++ head/etc/Makefile Tue Apr 7 02:46:22 2020 (r359685) > @@ -2,11 +2,11 @@ > # $FreeBSD$ > > .include > +.include > > FILESGROUPS= FILES > NLS_ALIASES= POSIX C \ > en_US.US_ASCII C > -PWD_MKDB_CMD?= pwd_mkdb > > # No need as it is empty and just causes rebuilds since this file does so much. > UPDATE_DEPENDFILE= no > @@ -98,8 +98,6 @@ distribution: > ${DESTDIR}/boot/device.hints > .endif > .endif > - > -MTREE_CMD?= mtree > > MTREES= mtree/BSD.root.dist / \ > mtree/BSD.var.dist /var \ > > Modified: head/lib/libc/gen/Makefile.inc > ============================================================================== > --- head/lib/libc/gen/Makefile.inc Tue Apr 7 02:45:24 2020 (r359684) > +++ head/lib/libc/gen/Makefile.inc Tue Apr 7 02:46:22 2020 (r359685) > @@ -550,11 +550,13 @@ MLINKS+=vis.3 nvis.3 \ > > MLINKS+=wordexp.3 wordfree.3 > > +.include > + > afterinstallconfig: > .if ${MK_TCSH} == "no" > sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd > .endif > - pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd > + ${PWD_MKDB_CMD} -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd > .if defined(NO_ROOT) && defined(METALOG) > ( \ > echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ > > Added: head/share/mk/src.tools.mk > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/mk/src.tools.mk Tue Apr 7 02:46:22 2020 (r359685) > @@ -0,0 +1,25 @@ > +# Various tools used by the FreeBSD make installworld / distrib-dirs / > +# distribution / installkernel targets. Also called "bootstrap tools" > +# historically, however that name seemed to be ambiguous, as those tools > +# merely help distributing the OS build artefacts into staging / production > +# area. > +# > +# Very tiny subset of "itools", if you are old enough to know what it is. > +# > +# Please keep the list short, this file may and will be included from > +# many places within the source tree. Rule of thumb: if the above mentioned > +# targets survive with MYTOOL_CMD=false, then MYTOOL_CMD probably > +# does not belong here. Stick it somewhere else, thank you very much! > +# > +# $FreeBSD$ > + > +.if !target(____) > + > +INSTALL_CMD?= install > +MTREE_CMD?= mtree > +PWD_MKDB_CMD?= pwd_mkdb > +SERVICES_MKDB_CMD?= services_mkdb > +CAP_MKDB_CMD?= cap_mkdb > + > +____: > +.endif # !target(____) > > Modified: head/share/mk/sys.mk > ============================================================================== > --- head/share/mk/sys.mk Tue Apr 7 02:45:24 2020 (r359684) > +++ head/share/mk/sys.mk Tue Apr 7 02:46:22 2020 (r359685) > @@ -234,7 +234,7 @@ FFLAGS ?= -O > .endif > EFLAGS ?= > > -INSTALL ?= install > +INSTALL ?= ${INSTALL_CMD:Uinstall} > > LEX ?= lex > LFLAGS ?= > > Modified: head/share/termcap/Makefile > ============================================================================== > --- head/share/termcap/Makefile Tue Apr 7 02:45:24 2020 (r359684) > +++ head/share/termcap/Makefile Tue Apr 7 02:46:22 2020 (r359685) > @@ -14,9 +14,10 @@ CLEANFILES+= termcap.db > CONFS= termcap.small > > .include > +.include > > termcap.db: termcap > - cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} > + ${CAP_MKDB_CMD} ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} > > etc-termcap: > ${INSTALL_SYMLINK} -T "package=runtime" \ > > Modified: head/usr.bin/login/Makefile > ============================================================================== > --- head/usr.bin/login/Makefile Tue Apr 7 02:45:24 2020 (r359684) > +++ head/usr.bin/login/Makefile Tue Apr 7 02:46:22 2020 (r359685) > @@ -2,13 +2,13 @@ > # $FreeBSD$ > > .include > +.include > > CONFS= fbtab login.conf motd.template login.access > PROG= login > SRCS= login.c login_fbtab.c > CFLAGS+=-DLOGALL > LIBADD= util pam > -CAP_MKDB_CMD?= cap_mkdb > > WARNS?= 5 > > > Modified: head/usr.bin/vgrind/Makefile > ============================================================================== > --- head/usr.bin/vgrind/Makefile Tue Apr 7 02:45:24 2020 (r359684) > +++ head/usr.bin/vgrind/Makefile Tue Apr 7 02:46:22 2020 (r359685) > @@ -19,8 +19,9 @@ SCRIPTSDIR=/usr/bin > CLEANFILES= vgrindefs.src.db > > .include > +.include > > vgrindefs.src.db: vgrindefs.src > - cap_mkdb ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC} > + ${CAP_MKDB_CMD} ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC} > > .include > > Modified: head/usr.sbin/services_mkdb/Makefile > ============================================================================== > --- head/usr.sbin/services_mkdb/Makefile Tue Apr 7 02:45:24 2020 (r359684) > +++ head/usr.sbin/services_mkdb/Makefile Tue Apr 7 02:46:22 2020 (r359685) > @@ -6,11 +6,13 @@ CONFS= services > PROG= services_mkdb > MAN= services_mkdb.8 > SRCS= services_mkdb.c uniq.c extern.h > -SERVICES_MKDB_CMD?= ${PROG} > > .include > .include > .if ${MK_SERVICESDB} != "no" > +# SERVICES_MKDB_CMD defined here > +.include > + > afterinstallconfig: > ${SERVICES_MKDB_CMD} ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \ > ${DESTDIR}/etc/services > -- Rod Grimes rgrimes@freebsd.org