FreeBSD 15 pkgbase usage

After upgrading from FreeBSD 14.4 to 15.0 using freebsd-update, I would like to switch to pkgbase for future base system and userland updates.
Do I need to perform any additional conversion steps to enable pkgbase, or was support already enabled during the 15.0 upgrade?
Also, what pkg commands are recommended for:
  • minor updates (e.g. 15.0 → 15.1 or patch releases)
  • major upgrades (e.g. 15.x → 16.0)
 
Just doing pkg upgrade will update base+ports+kmods.

For upgrades the current recommendation is:

First, update pkg(8) itself to ensure you have the latest version:

# pkg upgrade -yr FreeBSD-ports pkg

Second, upgrade the base system. Create a temporary repository
configuration that points exactly to the 15.1-RC1 package repository:

# mkdir /tmp/upgrade-15.1
# echo 'FreeBSD-base: {
url: "pkg+https://pkg.freebsd.org/${ABI}/base_release_1_rc1"
}' > /tmp/upgrade-15.1/upgrade.conf

Then upgrade the base system:

# pkg -o REPOS_DIR=/etc/pkg,/usr/local/etc/pkg/repos,/tmp/upgrade-15.1 \
-o IGNORE_OSVERSION=yes upgrade -r FreeBSD-base

After the upgrade, review any messages printed by pkg(8). Some base
packages may require additional configuration steps (e.g., running
'service <name> setup'). Follow those instructions as needed.

Third, update any third-party kernel modules (kmods) that you may
have installed from packages (e.g. drm-kmod, acpi_call). Use the same
temporary repository configuration:

# pkg -o REPOS_DIR=/etc/pkg,/usr/local/etc/pkg/repos,/tmp/upgrade-15.1 \
upgrade -r FreeBSD-ports-kmods

Fourth, update the UEFI boot loader. Back up the existing loader
file (if any), then copy the new loader `/boot/loader.efi` to the
appropriate location on the EFI System Partition (ESP). Common default
destinations:

amd64: cp /boot/loader.efi /boot/efi/efi/boot/BOOTX64.EFI
aarch64: cp /boot/loader.efi /boot/efi/efi/boot/BOOTAA64.EFI
armv7: cp /boot/loader.efi /boot/efi/efi/boot/BOOTARM.EFI

If your system uses a non‑standard loader path (e.g.,
`/efi/freebsd/loader.efi`),
find the correct destination with `efibootmgr -v` and look for the
`File(...)` entry of the active boot option.

Fifth, check for configuration file updates that may have been
installed as `.pkgnew` files:

# find /etc /usr/local/etc -name '*.pkgnew' -ls

If such files exist, manually compare them with the originals (e.g.
`diff /etc/rc.conf /etc/rc.conf.pkgnew`) and merge any necessary changes.

After verifying the configuration files, remove the temporary repository
configuration:

# rm -r /tmp/upgrade-15.1

Finally, reboot to load the new kernel and userland:

# shutdown -r now

Later, when 15.1-RELEASE is out, a plain `pkg upgrade` will move you
from the BETA to the final RELEASE automatically.
 
Well, this is a solution to get non-RELEASE upgrade. If you want to stay in RELEASE, this is the general process until (perhaps) a tool appears in the base:

abi=FreeBSD:15:amd64 # Case arch=amd64 and major version = 15.
osversion=1501000 # Want to upgrade to 15.1
pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade

It's what I use in kjail-pkgbase. Note that, for the moment, I don't use pkgbase for my workstations nor my server and nor my jails.

If I was you, I will wait a little before to go to pkgbase. That said, it's useful to test it because it is said that this will become the default (and later freebsd-update should disappear).
 
Back
Top