From nobody Wed Feb 22 06:04:05 2023 X-Original-To: freebsd-stable@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 4PM5G070twz3sb62 for ; Wed, 22 Feb 2023 06:04:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-25.consmr.mail.gq1.yahoo.com (sonic312-25.consmr.mail.gq1.yahoo.com [98.137.69.206]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PM5Fz6pXkz4549 for ; Wed, 22 Feb 2023 06:04:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=R472elKQ; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677045862; bh=rBFdsiWLgv3rU9jYgOIFSNoO+h0EOSD8IZHG1/Gx7FE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=R472elKQqND856/6l/C6ehUuIoj31S8Pc+JLqGAJCXvMnBiMbX+DUIu8kM5EKqlkc8YxzN2rw9vZnTkUfDPz27xwU7SJY84AO8Cu30fIAnn6nQTfN+LJ+cETWlYwYF3Qu9AHA/vh7vNs8/X1TAk9xniTppYBGbBqJYmkvOZEUmumDEeTPyDKOFkd4O3pRIx91aTztrbF+T49pRe6ZGeFJuo9tvwhlytr1t7Uziw6pq1xKi4PCn7Gwwtcsfu0NXUb4Edtvh9QipMgsZx4iJdCljCjWbyRa3j6ETd6FTK6fXU/C1+g7sHInZiybV+TjafkiuMp4a/UaKsX10U10D35VA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677045862; bh=HcLVrU7b+rlzEaVdRvCVrJsTi5mown0o3C/2c4ktKCk=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=q3T0554LJtPjeVQipCBI/FItJbolkLAlQHXNsPsgwCFfWqBjvLiPeYLmT3Pj0V5kBdogYgKO0JyF4WrcbtqUssLhJzMvU8I9+PsPfTiftxcpSsLAuamI6Z1/8u1Hshz5FKh6ENGX951enr2MwRyHptJ9069BtEAMrEaCW/UnS0h+lyDSa+/ElXbG9G/MimULEuZLtLWz6Vb9LwB0F5kcDh28PgMHuqiQL+yxi4rcGMaTiBE8vw8UU97AcGVqTV/7MmDPW9uqsQ1+KpcS4g9AX1iKcY8FvxReBPNBqwXUpJ4Z/By4BJ1JkY0q3LRONrELOGR8BArIuya/PbrZHtObpQ== X-YMail-OSG: xoA.FAYVM1mTzsIuzZTsdSD8OTEjwlpuh6pCjNt7zUd9_u_p_L7eEGsoKVAYmBp sH8ZoW2LZr_dEhDiv0GzgNFJv8ZIj.ciCKMRQgKfg61YN71salsNiaQqw6pEenVETJ.G9zgn7wXT TqT4NzcTsdfjWL6UBjMcw8wi_LmReBNyz_XAbL_V.Wz6ATPCla2NkdBoyISjjAp1E97kFfkoU8kN FPU3NrXCO.nSCtbZtxu9NsTGwhoXmpnTC3Q6xy784fn6LobhIO7ocQxEoeFuQEy8ejMd3zg6nfHd 6ktBSYSsnXr15BgvRtosnHd_w8X3ubGVjZKHRqXGyCT0KdbaiyBYax.lwDISjOyH6G0NaSifoTWR JpL6f91EM3gSZDT3FQNg715Fl7cq7xUKQaRLvj7P.ADfJ26f8R9FDNxssz.iU.q9i959cfh0qESI 6Gey3Jmz5MNxUjQXtexJnSso6KjdVzja5GVI.yLBfBjTkjTqmxYv5CKYQ1enzteotWiYjj9izuOO UQcuU5r4_2r0K6hyc7OgSvTf15xKoeWFuOUYWQIrG5bM7R.IG7pG7IxOrePV969AWIJ755noKfSP A77DfYNqX9XL2JPyyA.fLllW8i6aiNIIC6P3QUzPg7N48Fksl0nLK0XU62DTspJ.FuWsX0XDExbi rM2xgPqTKZrssctR.Oq4h2nJfA_gICzwyV_ihgqG1Oq5EwXz7aKLzXshF5TAAr0wb687CInwDAJd Vgtsiyx471gwAjeBbtNV9CuB9n_zI1Dwsn_PfmwcJXQjQbIqM5JzHHo40A4PFcN5.yvlyND.bjOw IhYPdSHIH81VpEgNUTtL_jvmKhL_L5wE9XlcJcgn2iFnzzYUz1IwfU3ouotmkmreT8eYccpqGBiE dpPP5PXMWRLrNX7UdfVlGnH4ZPeUtBoiswzfIQL3Ktx_NEdRbjmxEhsJNYEZtjxkcQ0D3nlFgt1i ZtcBhB6m5a3lylKyaoQJ15iVPPT0xQTUXXS43gw2sHUUYea7GpDsWxrmkp5ykKLyEVTKWJ3l8YAk NUli_xisF0xedUR.M5ki8VjlsWV.vjhEIl9wJctTmIqOGLbU6CZLIqlSDt678SSa.o6D4SFgMx3V Z53M4wcroEOXNWV4iQv1c8UUhciVIftu062c8EY.nqcZsacGIIALX7IH.KyV3JDvnkWnDDSZ6EZz Ac3JKULcxWOdksqbOMnYVNDqwWGpmzKJVQpqFuaqzpHH4It0B644rE7jJC6Sx0hkbedbRetpd2xI WhxZgtl07lQayc9tr6yhyxMmDWzrUz_PU_akGkluT8ZyWFBAVzxpde_ycEumlwARj2ZViUqdnMrl u0N9gKZnvDzkRHESN46vS5ycH2FR6LGkYFwVZXRkdaMvZxSY29habZoEW1d1eUMIPhf2dTTr8Jz3 a_608awgXvheckTjdoXK1jW7I6a.zAsKs60Jo7I.tSaH8WkzTAYPjVbX4KhPF5GB65tdrh4.euBV 9yrVPhL8lIiaJIWbRPs5aIWe8Fa_7yWu4EOZn_3V.5s9L_lrOPjQYerZamiWNFw2AU2lZPGl5UL4 xzhtURthu2T1sjhqI0f2N__PKHC__U2Sct2dbZfzKBPWHcK_t91eMKdtx41zy0XQRldzeduvYn98 DJjeEgx5NLItUv6ROc2Y0OHUZTm2th4Z.lSnu_H7zpja7E.rdov_Q6FDBgX7mIJ1xxyjibFABxVj xNbHRTXJkNROxWAFxOTZXZfsBwUCL7Pe5Da.p11feXsQ7DKP0JSfaYUqoSOO8ST7IW3LXDZ6vCw3 yq7bFvXwh_pcZR0u.J5pRTtBcu0GGeMyRgwc4no4oMxV4DQ1oM0VOGI34aykAvY9EINfn7eZgmnJ kf51AgKTOIVmjUVEqK8XCElN_I1iokxRTe7eO8PttDs0HpOJunWGEZd62l.rkgkJiY_FBGPQBm37 wkjBWlon5QWjGi9Nh3cHjeFSKoMx8g.fXsYcMxh7tVYrA8s.IPv3FDc9brJVeaAWbSRP7TyltCVp cMP2Icdl0b0TX_C5o6BxyhEKymF.FWx5t454Ro0JjgZ8EWvnLYxLjJqDKJITcgNkXzq851U5C4ns dyy3hV1pnEMaWr2H6quB5bzE5t2K29f9bnT0NxJ7J5eCp9YvZsYqwctt4nD_aaK326QVZVJ5CbXS WLyD.3DJcOJ7SWam7yWhWwk2uZ2OuciCWcZ8keDOpOytSjHZzZ7A2C5nOAa9OyGRosSIfwDMsYVE 0qHzEgBcA78r4BozbUl9IXFetafPwppWUR4qxMfv8.ogZSScTiyW_oiAU1RfGdVvwdlr_5hsvmLI aUzM- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Wed, 22 Feb 2023 06:04:22 +0000 Received: by hermes--production-bf1-57c96c66f6-lmv78 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3f1ffb3b0238c09439b22cb3798cc8f0; Wed, 22 Feb 2023 06:04:18 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: 13.2 BETA2: how do debug META_MODE? From: Mark Millard In-Reply-To: Date: Tue, 21 Feb 2023 22:04:05 -0800 Cc: FreeBSD-STABLE Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <45A1D65C-22F2-44B2-8B3D-5B6FECA76D0A@yahoo.com> References: <41B536B0-DA66-449E-96BB-E11A8750471A.ref@yahoo.com> <41B536B0-DA66-449E-96BB-E11A8750471A@yahoo.com> To: Peter X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.206:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_TLS_LAST(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.206:from] X-Rspamd-Queue-Id: 4PM5Fz6pXkz4549 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Feb 21, 2023, at 21:53, Mark Millard wrote: > On Feb 21, 2023, at 20:51, Mark Millard wrote: >=20 >> On Feb 21, 2023, at 19:11, Peter wrote: >>=20 >>> On Tue, Feb 21, 2023 at 06:44:09PM -0800, Mark Millard wrote: >>> ! On Feb 21, 2023, at 18:10, Peter = wrote: >>> !=20 >>> ! > On Tue, Feb 21, 2023 at 11:56:13AM -0800, Mark Millard wrote: >>> ! > ! On Feb 21, 2023, at 04:55, Peter = wrote: >>> ! > !=20 >>> ! > ! > ! # cd /usr/src/ >>> ! > ! > ! # env WITH_META_MODE=3Dyes make buildworld >>> ! > ! > ! # env WITH_META_MODE=3Dyes make installworld >>> ! > ! > ! # env WITH_META_MODE=3Dyes make buildworld (again #0) >>> ! > ! > ! ## no more rebuilds below? >>> ! > ! > ! # env WITH_META_MODE=3Dyes make buildworld (again #1) >>> ! > ! > ! # env WITH_META_MODE=3Dyes make buildworld (again #2) >>> ! > ! >=20 >>> ! > ! > But what is the difference between #0 and #1? >>> ! > !=20 >>> ! > ! awk, cp, ln, rm, sed, and many more from >>> ! > ! . . ./tmp/legacy/usr/sbin/have new dates >>> ! > ! for rebuilds after installworld (that targets >>> ! > ! the running system). Not true for #1 and #2. >>> ! > !=20 >>> ! > ! The dates on these tools being more recent than >>> ! > ! the files that they were involved in producing >>> ! > ! leads to rebuilding those files. That in turn >>> ! > ! leads to other files being rebuilt. >>> ! > !=20 >>> ! > ! make with -dM reports the likes of: >>> ! > !=20 >>> ! > ! file '. . ./tmp/legacy/usr/sbin/awk' is newer than the = target... >>> ! > !=20 >>> ! > ! explicitly as it goes. As I remember tmp/legacy/usr/sbin/ >>> ! > ! was always part of the path for what I found. >>> ! >=20 >>> ! > Mark, thanks a lot for the proper input at the right time! >>> ! >=20 >>> ! > This put me on the right track and I mananged to analyze and >>> ! > understand what is actually happening. >>> ! >=20 >>> ! > It looks like my issue does resolve itself somehow, and things >>> ! > start to behave as expected again after four builds. >>> !=20 >>> ! Intersting. >>> !=20 >>> ! > ! I did not do the analysis of how (e.g.) = tmp/legacy/usr/sbin/awk >>> ! > ! ended up being newer than such a target and, so, causing a >>> ! > ! rebuild of that target. I was going the direction: that >>> ! > ! it is newer really is unlikely to justify the rebuild for >>> ! > ! the target(s) in question. The other direction about how >>> ! > ! it got to be newer is also relevant. >>> ! >=20 >>> ! > I have now analyzed some parts of it. META_MODE typically finds = some >>> ! > build-tools to rebuild, but then if the result is not different >>> ! > from what was there before, then "install" will not copy it to = the >>> ! > bin-dir, and so the avalanche gets usually avoided. >>> ! >=20 >>> !=20 >>> ! The implication is that "install -C" is in use, quoting the >>> ! man page: >>> !=20 >>> ! -C Copy the file. If the target file already exists and = the files >>> ! are the same, then do not change the modification = time of the >>> ! target. If the target's file flags and mode need not = to be >>> ! changed, the target's inode change time is also = unchanged. >>> !=20 >>> ! -c Copy the file. This is actually the default. The -c = option is >>> ! only included for backwards compatibility. >>> !=20 >>> ! -C might have more of an effect in a reproducible-build >>> ! style build process than on a non-reproducible-build >>> ! style one. >>>=20 >>> Yepp. "install -p" is used, see /usr/src/tools/install.sh >=20 > That may be incorrect about what is happening for > _bootstap_tools_links and other things. Why do I > say that? Several points . . . I missed looking for a obvious type of evidence: -rw-r--r-- 1 root wheel 2355 Apr 28 15:20:53 2021 = /usr/main-src/tools/install.sh The script is not executable, which explains the use of an explicit sh in: INSTALL=3D"sh ${.CURDIR}/tools/install.sh" This tends to nail down that the likes of: install -o root -g wheel -m 555 . . . in the output is not an example of using the script. > I do not see "tools" in any PATH=3D so far, making implicit > use unlikely. >=20 > /usr/main-src/share/mk/sys.mk:INSTALL ?=3D = ${INSTALL_CMD:Uinstall} > /usr/main-src/share/mk/src.tools.mk:INSTALL_CMD?=3D install >=20 > vs. >=20 > /usr/main-src/Makefile: INSTALL=3D"sh = ${.CURDIR}/tools/install.sh" > /usr/main-src/Makefile.inc1:BMAKEENV=3D INSTALL=3D"sh = ${.CURDIR}/tools/install.sh" \ > /usr/main-src/Makefile.inc1:KTMAKEENV=3D INSTALL=3D"sh = ${.CURDIR}/tools/install.sh" \ >=20 > Also: >=20 > # kernel-tools stage > KTMAKEENV=3D INSTALL=3D"sh ${.CURDIR}/tools/install.sh" \ >=20 > vs. >=20 > # world stage > WMAKEENV=3D ${CROSSENV} \ > INSTALL=3D"${INSTALL_CMD} -U" \ > and: > .if defined(DB_FROM_SRC) || defined(NO_ROOT) > IMAKE_INSTALL=3D INSTALL=3D"${INSTALL_CMD} ${INSTALLFLAGS}" >=20 > So: explicitly varying styles for various contexts. >=20 > It looks to me like the make output would show: >=20 > install . . .=20 > vs. > sh . . ./tools/install.sh . . . >=20 > based on if the script is not-in-use vs. is-in-use > (respectively). >=20 > Looking at some of my logs I see the likes of: >=20 > install -o root -g wheel -m 555 cap_mkdb = /FBSDFSSDroot-mnt//usr/bin/cap_mkdb >=20 > which looks to not be using the script and not using > either -C or -p as well. cap_mkdb is an example from > the _bootstap_tools_links list. >=20 > Some of the below do have -C use, others do not. >=20 > # grep -r '\-o.*-g.*-m' /usr/main-src/Makefile* /usr/main-src/share/ | = more > /usr/main-src/share/sendmail/Makefile: ${INSTALL} -T = package=3D${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m = 755 -d ${DDIR}/${dir} > /usr/main-src/share/sendmail/Makefile: ${INSTALL} -T = package=3D${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m = 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file} > /usr/main-src/share/mk/bsd.info.mk: ${INSTALL} -o ${INFOOWN} -g = ${INFOGRP} -m ${INFOMODE} \ > /usr/main-src/share/mk/bsd.info.mk: ${INSTALL} -o ${INFOOWN} -g = ${INFOGRP} -m ${INFOMODE} \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dev} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} = \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dev} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} = \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} ${TAG_ARGS} = ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m = ${LIBMODE} \ > /usr/main-src/share/mk/bsd.lib.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > /usr/main-src/share/mk/bsd.doc.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ > /usr/main-src/share/mk/bsd.doc.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},docs} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ > /usr/main-src/share/mk/bsd.incs.mk: ${INSTALL} ${${group}TAG_ARGS} = -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ > /usr/main-src/share/mk/bsd.incs.mk: ${INSTALL} ${${group}TAG_ARGS} = -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ > /usr/main-src/share/mk/bsd.man.mk:MINSTALL?=3D ${INSTALL} = ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} > /usr/main-src/share/mk/bsd.man.mk:MINSTALL?=3D ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} > /usr/main-src/share/mk/bsd.prog.mk: ${INSTALL} ${TAG_ARGS} = ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ > /usr/main-src/share/mk/bsd.prog.mk: ${INSTALL} = ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${BINOWN} -g ${BINGRP} -m ${DEBUGMODE} \ > /usr/main-src/share/mk/bsd.own.mk:HRDLINK?=3D -l h -o ${_LINKOWN} = -g ${_LINKGRP} -m ${_LINKMODE} > /usr/main-src/share/mk/bsd.own.mk:MANHRDLINK?=3D -l h -o ${MANOWN} -g = ${MANGRP} -m ${MANMODE} > /usr/main-src/share/mk/bsd.own.mk:SYMLINK?=3D -l s -o = ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE} > /usr/main-src/share/mk/bsd.own.mk:LSYMLINK?=3D -l s -o ${LIBOWN} -g = ${LIBGRP} -m ${LIBMODE} > /usr/main-src/share/mk/bsd.own.mk:RSYMLINK?=3D -l rs -o = ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE} > /usr/main-src/share/zoneinfo/Makefile: -o ${BINOWN} -g ${BINGRP} = -m ${NOBINMODE} \ > /usr/main-src/share/zoneinfo/Makefile: ${INSTALL} ${TAG_ARGS} -o = ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ > /usr/main-src/share/zoneinfo/Makefile: ${INSTALL} ${TAG_ARGS} -o = ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ >=20 > Thus it looks to me like installworld produces a new > date for cap_mkdb and, in the material below, > ${WORLDTMP}/legacy/bin/cap_mkdb ends up having a > copy of that new date in the next buildworld . >=20 >> The code for the _bootstap_tools_links uses "cp -pf", >> not install, to establish part of . . ./tmp/legacy/bin/ . >> (Note: . . ./tmp/legacy/sbin -> ../bin so is a via a >> symbolic link.) Before the "cp -pf" there is a "rm -f" >> deleting the target file before the copy: the prior >> file in . . ./tmp/legacy/bin/ is never directly >> preserved. (The new copy might still be identical >> to the old one: the source path one might happen to >> be identical as well.) >>=20 >> # Link the tools that we need for building but don't need to = bootstrap because >> # the host version is known to be compatible into ${WORLDTMP}/legacy >> # We do this before building any of the bootstrap tools in case they = depend on >> # the presence of any of the links (e.g. as m4/lex/awk) >> ${_bt}-links: .PHONY >>=20 >> .for _tool in ${_bootstrap_tools_links} >> ${_bt}-link-${_tool}: .PHONY >> @rm -f "${WORLDTMP}/legacy/bin/${_tool}"; \ >> source_path=3D`which ${_tool}`; \ >> if [ ! -e "$${source_path}" ] ; then \ >> echo "Cannot find host tool '${_tool}'"; false; \ >> fi; \ >> cp -pf "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}" >> ${_bt}-links: ${_bt}-link-${_tool} >> .endfor >>=20 >> Note: This is for the !defined(BOOTSTRAP_ALL_TOOLS) case. >> Note: the code uses the abbreviation: _bt=3D = _bootstrap-tools >>=20 >> _bootstrap_tools_links is built mostly in terms of >> _basic_bootstrap_tools and _basic_bootstrap_tools_multilink from >> earlier logic. For reference, showing what ends up handled >> this way: >>=20 >> # grep -r "_bootstrap_tools" /usr/main-src/Makefile* = /usr/main-src/share/ | more >> /usr/main-src/Makefile.inc1:# _bootstrap_tools_links variable. >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dm4 lex >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dmtree >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dcat >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dcrunchide >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dcrunchgen >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dmkimg >> /usr/main-src/Makefile.inc1:_kerberos5_bootstrap_tools=3D \ >> /usr/main-src/Makefile.inc1:.ORDER: = ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} >> /usr/main-src/Makefile.inc1:.for _tool in = ${_kerberos5_bootstrap_tools} >> /usr/main-src/Makefile.inc1:# The tools listed in = _basic_bootstrap_tools will generally not be >> /usr/main-src/Makefile.inc1:# case we use the = _basic_bootstrap_tools_multilink variable which is a list of >> = /usr/main-src/Makefile.inc1:_basic_bootstrap_tools_multilink=3Dusr.bin/gre= p grep,egrep,fgrep >> = /usr/main-src/Makefile.inc1:_basic_bootstrap_tools_multilink+=3Dbin/test = test,[ >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/cut = bin/expr usr.bin/gencat usr.bin/join \ >> = /usr/main-src/Makefile.inc1:_basic_bootstrap_tools_multilink+=3Dusr.bin/aw= k awk,nawk >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/file2c >> = /usr/main-src/Makefile.inc1:_basic_bootstrap_tools_multilink+=3Dusr.bin/bi= ntrans uuencode,uudecode >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/xargs >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/cap_mkdb >> = /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.sbin/services_mk= db usr.sbin/pwd_mkdb >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/ldd >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dbin/chflags >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3Dsysctl >> = /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3Dtools/build/cross-bu= ild/fake_chflags >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/mkfifo >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.bin/jot >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dsbin/md5 >> /usr/main-src/Makefile.inc1:_basic_bootstrap_tools+=3Dusr.sbin/tzsetup >> = /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3D${_basic_bootstrap_t= ools} >> /usr/main-src/Makefile.inc1:.for _subdir _links in = ${_basic_bootstrap_tools_multilink} >> /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3D${_subdir} >> /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3Dusr.bin/bmake >> /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3Dlib/libbz2 >> /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3Dlib/libz >> /usr/main-src/Makefile.inc1:_other_bootstrap_tools+=3Dlib/libcrypt >> /usr/main-src/Makefile.inc1:# All tools in _basic_bootstrap_tools = have the same name as the subdirectory >> = /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3D${_basic_bootstrap_t= ools:T} >> /usr/main-src/Makefile.inc1:.for _subdir _links in = ${_basic_bootstrap_tools_multilink} >> /usr/main-src/Makefile.inc1:_bootstrap_tools_links+=3D${_links:S/,/ = /g} >> /usr/main-src/Makefile.inc1:.for _tool in ${_bootstrap_tools_links} >> /usr/main-src/Makefile.inc1: ${_kerberos5_bootstrap_tools} \ >> /usr/main-src/Makefile.inc1: ${_other_bootstrap_tools} \ >>=20 >> What the prior installworld did for the analogous files is >> a separate issue. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com