Re: Tracking a custom build of -STABLE on pkgbase?

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sun, 08 Nov 2026 04:46:37 UTC
On 11/7/26 18:05, Eason Qin wrote:
> Greetings, people
> 
> These past few days marked the end of my FreeBSD hiatus; the last time I
> really daily drove this OS was when FreeBSD 14 was -CURRENT, and I have
> noticed that pkgbase is now a thing. Very cool! even less fragmentation
> as the base system itself is also packaged.
> 
> However, my tradition is to always build -STABLE with -march=native for
> my CPU and for the fun and games, but it seems like building that on a
> pkgbase system has a loooot of complications (it's effectively going
> from pkgbase back to distribution sets). How do I take the new world
> (and custom kernel!) that I just compiled and install it?
> 
> It seems as if I could:
> 1. Do some magic to package the world I just built
> 2. Somehow convert my pkgbase system into a distribution sets sytem
> 
> Could someone please tell me how?

My context/experience is limited and, so, my notes are possibly only
suggestive. See later below.

> 
> Thanks
> Eason
> 
> 
> 

There are no upstream pkgbase packages distributed that were based on
what -march=native would be likely locally produce. To use pkgbase style
installation/upgrading, you build your own custom repo to work with and
then use it.

I've not done it but a clue is probably:

# grep 'ORDER.*packages' /usr/src/Makefile
/usr/src/Makefile:.ORDER: buildworld packages
/usr/src/Makefile:.ORDER: buildworld update-packages
/usr/src/Makefile:.ORDER: buildkernel packages
/usr/src/Makefile:.ORDER: buildkernel update-packages

Looks to me that something like:

make buildlworld
make buildkernel
make packages # for from scratch (re)construction
make update-packages # for incremental (re)construction
# Duplicate the packages from, say, /usr/obj/usr/src/amd64.amd64/repo/
  to another place?
# Appropriate pkg repo command goes here to process the duplicate?
# pkgbase style upgrade sequence goes here that uses the result

The local FreeBSD-base could be based on something like:

FreeBSD-base: {
    url: "file:///path-to-pkg-repo-place",
    enabled: yes
}

(I've not been explicit for cryptographically signed contexts.)

It may have more overhead that you would want for personal builds and
installs.

-- 
===
Mark Millard
marklmi at yahoo.com