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
Unknown Object (File)
Thu, Sep 25, 11:54 PM
Unknown Object (File)
Wed, Sep 24, 3:38 AM
Unknown Object (File)
Tue, Sep 23, 7:57 PM
Unknown Object (File)
Tue, Sep 16, 6:36 AM
Unknown Object (File)
Mon, Sep 15, 6:54 AM
Unknown Object (File)
Mon, Sep 15, 5:18 AM
Unknown Object (File)
Aug 26 2025, 2:49 AM
Unknown Object (File)
Aug 26 2025, 1:09 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.