This binary being static has nothing to do with "installer testing". You've got that completely wrong. It has nothing to do with reacharounds either, since instbin takes care of all that.
It has to do with people who may want to use it when their systems are broken in some way, to repair their systems. Yes they need to mount /usr, but their system may be too broken for dynamic linking to work, and there may be multiple steps to repair it, including the ld.so cache etc etc If you make this dynamic, I think someone will suffer. Klemens Nanni <[email protected]> wrote: > Spotted through failed attempts to test libutil/opendev(3) changes > with LD_LIBRARY_PATH. That test procedure makes no sense, first because it is a static binary, but secondly because that test procedure will always encounter other problems so that is just not now one does actual testing. > Regular installboot(8) has been linking statically since import in > 2013, which probably stems from when early reach arounds of the > installer to the installation's installboot binary. [...] > Index: Makefile > =================================================================== > RCS file: /cvs/src/usr.sbin/installboot/Makefile,v > retrieving revision 1.25 > diff -u -p -r1.25 Makefile > --- Makefile 15 Aug 2022 17:06:43 -0000 1.25 > +++ Makefile 25 Aug 2022 17:29:23 -0000 > @@ -8,8 +8,6 @@ CPPFLAGS= -I${.CURDIR} > LDADD= -lutil > DPADD= ${LIBUTIL} > > -LDSTATIC= ${STATIC} > - > .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" > CFLAGS += -DSOFTRAID > SRCS += i386_installboot.c >
