On 6/1/2016 10:27 AM, Bryan Drewery wrote:
> On 5/31/2016 5:17 PM, Simon J. Gerraty wrote:
>>> Another reported issue just now is that right after an installworld,
>>> everything rebuilds due to changed /bin/sh (-dM flag to make tells you
>>> why things rebuild).  I'll look into some mitigations for this.
>> It is probably sufficient to just add
> Yes but I need to test it fully to see if things like rtld and
> libmap.conf, etc, get caught up in the problem too.

Yup, it's not really simple to fix.  This problem defeats the goal of
the feature too. I had not ran into this case in all of my testing since
I wasn't installing to /.

For /bin/sh it uses libc.so.7, libedit.so.7, libncursesw.so.8, rtld, and
/usr/share/locale.  We could use /rescue/sh if it exists to remove a lot
of that and still ignore __MAKE_SHELL and /usr/share/locale.

The next problem is everything else.  expr(1), awk(1), sed(1), rm(1).
There's a /rescue version for those except for awk(1).  Solving that we
could add /rescue into the default PATH for the build, or build all of
these tools in build-tools.  Though any use of them to bootstrap
building them could cause the same rebuild problem and a chain reaction
of rebuilds.

Even adding all of the build tools as static wouldn't be enough.  Any
tool that is used that is not easily changed to static still leaks in
all of rtld and dynamic libraries.  My build is running ccache which
finds that /lib/libm.so.5 is newer.

We can't just ignore /lib /usr/lib /bin, etc, because we need the
compiler tools and other obscure tools to be considered in case they do
get changes or fixes to them.  If awk(1) gets a fix it may actually
impact the build.  It's too bad bmake is only doing a simple mtime
comparison and not a content comparison like ccache does.  That wouldn't
solve much anyhow since a change to __FreeBSD_version would modify the
hash of all of the binaries.  Of course doing a content comparison means
filemon needs to calculate and store that which is not ideal.

Bryan Drewery

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to