Page MenuHomeFreeBSD

Makefile.inc1: push /usr/libexec into the BPATH/TMPPATH
ClosedPublic

Authored by kevans on Nov 20 2019, 7:03 PM.

Details

Summary

${WORLDTMP}/legacy/usr/libexec will only have libexec/ bits that we've pushed as bootstrap tools, so this is generally safe to include prior to PATH. The following are the ramifications of this change:

  • BPATH addition gets us at least bootstrap flua in WMAKEENV path for buildenv, for those earlier systems where it's bootstrapped still (< CURRENT)
  • TMPPATH addition gets the host flua path into WMAKEENV for !BUILD_WITH_STRICT_TMPPATH (the default) buildenv
  • Reworked the sysent target to just set PATH and let it get worked out in src.lua.mk or individual sysent makefiles -- this gives us back the ability to overwrite LUA_CMD and use a different/external lua for these targets

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kevans created this revision.Nov 20 2019, 7:03 PM
brooks accepted this revision.Nov 20 2019, 7:39 PM
brooks added a reviewer: arichardson.

LTGM. Adding Alex in case he has concerns about bootstrapping on MacOS/Linux.

This revision is now accepted and ready to land.Nov 20 2019, 7:39 PM
imp accepted this revision.Nov 20 2019, 7:42 PM

LGTM

arichardson accepted this revision.Nov 20 2019, 9:32 PM

LGTM. Only concern might be that adding /usr/libexec to PATH adds too much stuff.

Hopefully I can get the strict tmppath usable by default soon so it shouldn't matter anymore then.

LGTM. Only concern might be that adding /usr/libexec to PATH adds too much stuff.
Hopefully I can get the strict tmppath usable by default soon so it shouldn't matter anymore then.

Yeah, so what I really wanted here with flua was some way to indicate that flua can/should be symlinked in from the host (preferably to the same location that I've added to BPATH) on the versions it's *not* being bootstrapped (__FreeBSD_version after I added it) to simplify this, since I don't really want to add /usr/libexec. Any advice on making that happen (or just getting flua into one of the standard BPATH/XPATH paths while leaving it installing to /usr/libexec) is quite welcome. =)

LGTM. Only concern might be that adding /usr/libexec to PATH adds too much stuff.
Hopefully I can get the strict tmppath usable by default soon so it shouldn't matter anymore then.

Yeah, so what I really wanted here with flua was some way to indicate that flua can/should be symlinked in from the host (preferably to the same location that I've added to BPATH) on the versions it's *not* being bootstrapped (__FreeBSD_version after I added it) to simplify this, since I don't really want to add /usr/libexec. Any advice on making that happen (or just getting flua into one of the standard BPATH/XPATH paths while leaving it installing to /usr/libexec) is quite welcome. =)

It should be possible to modify tools/build/Makefile and change the host-symlinks target to add a flua symlink if it exists on the host.
Something like (untested):

.if exists(/usr/libexec/flua)
    mkdir -p ${DESTDIR}/usr/libexec
    ln -sf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
.endif

LGTM. Only concern might be that adding /usr/libexec to PATH adds too much stuff.
Hopefully I can get the strict tmppath usable by default soon so it shouldn't matter anymore then.

Yeah, so what I really wanted here with flua was some way to indicate that flua can/should be symlinked in from the host (preferably to the same location that I've added to BPATH) on the versions it's *not* being bootstrapped (__FreeBSD_version after I added it) to simplify this, since I don't really want to add /usr/libexec. Any advice on making that happen (or just getting flua into one of the standard BPATH/XPATH paths while leaving it installing to /usr/libexec) is quite welcome. =)

It should be possible to modify tools/build/Makefile and change the host-symlinks target to add a flua symlink if it exists on the host.
Something like (untested):

.if exists(/usr/libexec/flua)
    mkdir -p ${DESTDIR}/usr/libexec
    ln -sf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
.endif

Yeah, I like that, thanks! I think the mkdir -p can safely be omitted -- we create it in the installdirs target now in case it's bootstrapped, which should always be run prior to host-symlinks if I understand correctly. If we later determine flua needs to be bootstrapped, that just gets built+installed over the symlink, right?

LGTM. Only concern might be that adding /usr/libexec to PATH adds too much stuff.
Hopefully I can get the strict tmppath usable by default soon so it shouldn't matter anymore then.

Yeah, so what I really wanted here with flua was some way to indicate that flua can/should be symlinked in from the host (preferably to the same location that I've added to BPATH) on the versions it's *not* being bootstrapped (__FreeBSD_version after I added it) to simplify this, since I don't really want to add /usr/libexec. Any advice on making that happen (or just getting flua into one of the standard BPATH/XPATH paths while leaving it installing to /usr/libexec) is quite welcome. =)

It should be possible to modify tools/build/Makefile and change the host-symlinks target to add a flua symlink if it exists on the host.
Something like (untested):

.if exists(/usr/libexec/flua)
    mkdir -p ${DESTDIR}/usr/libexec
    ln -sf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
.endif

Yeah, I like that, thanks! I think the mkdir -p can safely be omitted -- we create it in the installdirs target now in case it's bootstrapped, which should always be run prior to host-symlinks if I understand correctly. If we later determine flua needs to be bootstrapped, that just gets built+installed over the symlink, right?

Yes it will overwrite the link.

This revision was automatically updated to reflect the committed changes.