Re: git: 7b936eee18 - main - 15.0/errata: Begin listing known open regressions

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Thu, 08 Jan 2026 15:50:59 UTC
On 05/01/2026 06:21, Alexander Ziaee wrote:
> +3. **man:pkgbase[7]** system upgrading from 14.3 to 15.0 is not supported +
> +**Workaround**: systems installed with man:pkgbase[7] must backup and reinstall +
> +**State**: works as intended, man:pkgbase[7] is an experimental preview +

Having just finished upgrading all my systems from 14.3-STABLE to 
15.0-STABLE using pkgbase, "must" backup and reinstall sounds a little 
heavy handed to me.

Yes, it's a bit tricky and there are a number of gotchas.  Also, I was 
using entirely self-built packages from my own repos, so my experience 
is not completely typical.  I did have to go through a bit of a 
rigmarole of building base packages from the command line in order to 
upgrade my jail server host, so I could then update the pkg builder jail 
on it, so I could then use poudriere to build FreeBSD-15 base and ports 
packages.  That sort of thing shouldn't be necesssary if you're using 
the standard FreeBSD repos.

My notes:

    * When upgrading physical hosts: creating a new BE, mounting that and
      then using `pkg-static -r /mnt ....` to perform the upgrade, before
      activating the new BE and rebooting is basically cheating and makes
      the whole process a lot smoother.

    * Install `compat14x-amd64` (or whatever your $ARCH is) before you
      begin.

    * Set environment variables like so:

        IGNORE_OSVERSION=yes
        ABI=FreeBSD:15:amd64
        OSVERSION=1500503

      rather than overriding the variables from the pkg command line,
      because, if you're like me the muscle memory will kick in at
      precisely the wrong point and you'll forget them.

      (OSVERSION will vary depending on exactly when the packages you're
       using were compiled, but the value only needs to be somewhere in
       the right ballpark)

    * Always use `pkg-static` for major OS version changes.  Even so, a
      simple minded invocation of

      # pkg-static upgrade

      will run into problems because some pkg scripts depend on
      /lib/libedit.so.8 (part of FreeBSD-runtime) and so won't run until
      FreeBSD-runtime has been upgraded.

    * On the other hand, while updating packages piecemeal does help
      avoid the problems with finding libedit.so.8, it does tend to
      result in pkg proposing the deletion of FreeBSD-rc,
      FreeBSD-periodic etc.  (Not noticing this and consequently trying
      to reboot without FreeBSD-rc installed... zero stars.  Can't
      recommend.)

      So, you need to examine the output pkg shows when you try and
      update a subset of packages and, for any important packages it
      wants to delete, either add them to the subset you're trying to
      upgrade initially, or note them down and make sure they get
      reinstalled later.

    * Once you've got an initial subset upgraded, including
      FreeBSD-runtime, you can just do a general 'pkg-static upgrade'
      which should run to completion.  It is normal, and expected, for
      all the FreeBSD-14 '-man' packages to be deleted.

    * Next you should install the 'FreeBSD-set' packages you require,
      which should pull in any missing base packages.  Optionally, at
      some point you can set any packages that are required by your
      FreeBSD-sets to 'automatic' but it's not critical right now. eg.

      # pkg query %dn FreeBSD-set-minimal | xargs pkg set -A 1 -y

      (repeat for all the FreeBSD-sets you have installed)

    * For physical hosts, check and update loader.efi or gptzfsboot as
      necessary.  For uefi machines that only boot into FreeBSD-15,
      \EFI\BOOT\BOOTX64.EFI can just be a copy of \EFI\FREEBSD\LOADER.EFI

    * There's also likely to be some FreeBSD-14 base packages still
      installed which don't have a matching FreeBSD-15 equivalent to
      upgrade to.  These can be summarily deleted:

      # pkg delete -x 'FreeBSD-.*-14'

    * At this point you can reboot into the new BE or restart your jail.
      You're pretty much done.

    * Once you're happy everything has worked correctly and you will not
      need to revert to an older BE you can `zpool upgrade -a` to enable
      any new feature flags.

I did find that `pkg autoremove` went into an infinite loop during the 
upgrade, but temporarily deleting FreeBSD-clang enabled autoremove to 
complete.  Possibly self-inflicted as I did spend some time fiddling 
about setting packages to automatic or not.

Once I'd worked out the process this was all pretty mechanical, and I 
tweaked some ansible playbooks I already had to do a lot of the grunt 
work given I had about 10 systems to handle.

If you aren't using boot environments, the process is going to be pretty 
similar, except you'll need to update kernels first, reboot, and then 
update userland only if the new kernel succeeds.

TL;DR: Pkgbase upgrades from 14.x to 15.x are doable, but not for beginners.

	Cheers,

	Matthew