working on a better method to build FreeBSD base packages. now every package has its own subdirectory, e.g. src/packages/cron, with a normal Makefile using the new bsd.pkg.mk:

WORLDPACKAGE= cron
SUBPACKAGES= dbg

UCLSRC= common.ucl

.include <bsd.pkg.mk>

common.ucl (or whatever you call it) replaces the old UCL files in release/packages/ucl/, and if needed, you can do something like "URLSRC.dbg=dbg.ucl" to use a subpackage-specific UCL.

src/packages/Makefile builds all of these using bsd.subdir.mk, so everything is automatically parallelised and works much more like how we build the rest of the system. (if you want to see something fun, have a look at how Makefile.inc1 does this right now using ${_PKGS}...)

all the *.pkg files are created in <objdir>/packages/<package>/ (like you'd expect) and staged to the repo using a 'stagepackage' target. this means we can eventually support something like this:

% make -C packages/cron clean all installpackage

... to install/upgrade a package from source without having to build the repo first.

another advantage of this (and the reason i started on it now) is that it lets the package Makefile do any build-specific customisation required for the UCL, such as changing dependencies based on src.conf options, which will be required for an LLVM change Ed is working on. in future, this should also let us do other things like staging and building sets in a much cleaner way.

i've been meaning to do this for a long time, so hopefully i can actually get it landed...

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/lw/statuses/116212429898556873 on your instance and quote it. (Note that quoting is not supported in Mastodon.)