TLDR; What is the best way to build a custom FreeBSD release based on pkgbase?
Background: I currently build a customized FreeBSD release. I build the isos from my own branch, then I run a private freebsd-update server to distribute updates, from my own branch. Trust that I have a good reason for doing this. I also use Poudriere to build all of my own packages. Now I must migrate everything to pkgbase.
Plan so far: I think I can create on my pkg server a dedicated pkgbase workspace. I'll use a bare git repository for freebsd-src, and create a separate worktree for each release branch (14.3, 15.0, etc). Then I can use "make packages" and "make update-packages" as appropriate in each worktree whenever I have an update to distribute. Finally, I'll symlink /usr/obj/path/to/worktree/repo/${ABI} to a place where nginx can find and serve it. On the client side, I'll create a /usr/local/etc/pkg/repos/MY_NAME.conf file pointing to my own nginx server. I'll have to set signature_type and mirror_type to "none", of course.
Questions:
Background: I currently build a customized FreeBSD release. I build the isos from my own branch, then I run a private freebsd-update server to distribute updates, from my own branch. Trust that I have a good reason for doing this. I also use Poudriere to build all of my own packages. Now I must migrate everything to pkgbase.
Plan so far: I think I can create on my pkg server a dedicated pkgbase workspace. I'll use a bare git repository for freebsd-src, and create a separate worktree for each release branch (14.3, 15.0, etc). Then I can use "make packages" and "make update-packages" as appropriate in each worktree whenever I have an update to distribute. Finally, I'll symlink /usr/obj/path/to/worktree/repo/${ABI} to a place where nginx can find and serve it. On the client side, I'll create a /usr/local/etc/pkg/repos/MY_NAME.conf file pointing to my own nginx server. I'll have to set signature_type and mirror_type to "none", of course.
Questions:
- Are there any existing tools to help automate this process? Poudriere doesn't look helpful.
- Should I worry about serving the packages from the zroot/usr/obj dataset? That dataset is often treated as "temporary". Maybe I should create a separate dataset for the built packages. But I don't see any environment variables in make.conf(5) that can be used to change the pkg repos directory.
- "make packages" puts all of the packages into a directory named "latest". For consistency with the way vanilla FreeBSD works, I should probably name that "base_release_0". But I don't see any make.conf variables to control that, and the "latest" string seems to be hardcoded in Makefile.inc1. What am I missing?
- Is there anything else that I've completely overlooked?