Page MenuHomeFreeBSD

release: Add support for building on non-FreeBSD

Authored by jrtc27 on Jan 22 2022, 1:19 AM.



This requires two sets of changes. Firstly, for non-FreeBSD, we do not
know where tools are in PATH (and it is likely that some are not in
system directories and have been built as bootstrap tools during the
build), so we should leave PATH alone and trust the user. Secondly,
makefs needs a master.passwd for building images from a METALOG file, so
pass the directory in the image tree to makefs's -N option in order to
pick up a valid FreeBSD master.passwd; this is unnecessary on FreeBSD
(except in the edge case of building an image that refers to users or
groups not present in the host's database, which is unlikely but
technically possible) but harmless so can be done unconditionally.

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I have been able to use this patch series applied to CheriBSD to build working Morello (arm64+CHERI) installer images; specifically I have tested both disc1 and memstick. The bootonly/mini-memstick images likely work but don't have anywhere to download media from in my simple testing environment. The dvd image should "work", but pkg-stage will need fixing to add everything to the METALOG when NOPKG isn't set, so it'd effectively just be another disc1 (but with a slightly fatter installation); this is not something we care about downstream so I have not done this.

This revision is now accepted and ready to land.Jan 22 2022, 7:09 PM