Page MenuHomeFreeBSD

release/Makefile should not use the host /usr/bin/install command, but the freshly built one
Needs ReviewPublic

Authored by wosch on Jul 20 2025, 2:58 PM.
Tags
Referenced Files
F137713673: D51443.diff
Tue, Nov 25, 3:31 AM
Unknown Object (File)
Fri, Nov 14, 11:23 PM
Unknown Object (File)
Tue, Nov 11, 3:49 PM
Unknown Object (File)
Mon, Nov 10, 10:32 AM
Unknown Object (File)
Mon, Nov 10, 10:32 AM
Unknown Object (File)
Mon, Nov 10, 7:04 AM
Unknown Object (File)
Thu, Oct 30, 5:48 AM
Unknown Object (File)
Wed, Oct 29, 3:57 AM

Details

Reviewers
None
Group Reviewers
releng
Summary

Discovered while trying to cross-build make ftp on macOS, it seems that we should not use the host's install(1) to make ftp tarballs, but use the freshly built one.

install(1) on macOS is much older than the FreeBSD version and missing some options. It does not work at all. On FreeBSD the host /usr/bin/install will usually work - except after a new required option was added.

This patch solves the problem on macOS.

see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288351

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wosch requested review of this revision.Jul 20 2025, 2:58 PM
wosch added a project: releng.

Why would we not do this unconditionally?

des added inline comments.
release/Makefile
57

Why is this conditional?

58

I find it odd that ${PATH} is quoted (:Q) but not ${.OBJDIR}. Also, long line.

To make this work in cheribuild I passed INSTALL="sh /path/to/src/tools/install.sh". Doing something automatically here that works would be good, though I'd want confirmation from someone like @sjg that ${.OBJDIR}/.. is definitely going to always be world's ${OBJTOP}.

To make this work in cheribuild I passed INSTALL="sh /path/to/src/tools/install.sh". Doing something automatically here that works would be good, though I'd want confirmation from someone like @sjg that ${.OBJDIR}/.. is definitely going to always be world's ${OBJTOP}.

IIRC world plays games with MAKEOBJDIRPREFIX at times, so I am *not* confident that world top-level makefile knows what the path to where tools were built.
Also what happens in the context of universe? which .OBJTOP refers to tools?

FWIW the reason I introduced the pseudo machine "host" to the Junos build - which is always cross-building was to make things like this easier.
In FreeBSD with DIRDEPS_BUILD we have the same setup - HOST_OBJTOP can be used consistently - and if tools were built under that I guess the "traditional" build could benefit too.

release/Makefile
58

FWIW ${.OBJDIR:H}/tmp is more efficient than using ../ as to use of :Q Apple love pathnames with spaces, but I seriously doubt the FreeBSD build will tolerate them.

Why would we not do this unconditionally?

I wanted to make sure that I don't break anything non-macOS related. Our Makefiles are fragile, and the FreeBSD 15.0 release is coming soon. If we are sure that this will not break some special setup we can make it unconditionally.

Shorter line and use the :H modifier instead ../