pkg base upgrade equivalent of freebsd-update

15.0 is very nearly here, and we will have the option of using pkg instead of freebsd-update.

With freebsd-update, it is clearly documented how to upgrade to
  • install security patches
  • upgrade minor versions
  • upgrade major versions
  • do that lot in jails.

How to do all that with pkg base?

Will it magically appear in the handbook the minute that 15.0-Release is released?

Is there anywhere else to find this information, and clearly too?
 
How to do all that with pkg base?
Well, for one thing, heeding the warning in the Handbook, the configuration for FreeBSD-base has changed, /etc/pkg/FreeBSD.conf 15.0-RCx should have:
Rich (BB code):
FreeBSD-base: {
  url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
  enabled: no
}
For a packaged base in /usr/local/etc/pkg/repos/FreeBSD.conf enable FreeBSD-base:
Code:
FreeBSD-base: {
  enabled: yes
}
Verify the pkg configuration with pkg -vv | sed -nE '/^Repositories:/,$ p'

This is, as yet, not documented in the Handbook. When installing 15.0-RC3, you should find /etc/pkg/FreeBSD.conf as mentioned here. However, when upgrading along releng from BETA5 to RC1 it could be that /etc/pkg/FreeBSD.conf isn't upgraded; this has happened to me.

As indicated, the Handbook needs to be updated; in my view the pkgbase wiki isn't very suitable for most 15.0-RCx and future 15.0-RELEASE users.
 
Well, for one thing, heeding the warning in the Handbook, the configuration for FreeBSD-base has changed, /etc/pkg/FreeBSD.conf 15.0-RCx should have:
Rich (BB code):
FreeBSD-base: {
  url: "pkg+https://pkgbase.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
  enabled: no
}
For a packaged base in /usr/local/etc/pkg/repos/FreeBSD.conf enable FreeBSD-base:
Code:
FreeBSD-base: {
  enabled: yes
}
Verify the pkg configuration with pkg -vv | sed -nE '/^Repositories:/,$ p'

This is, as yet, not documented in the Handbook. When installing 15.0-RC3, you should find /etc/pkg/FreeBSD.conf as mentioned here. However, when upgrading along releng from BETA5 to RC1 it could be that /etc/pkg/FreeBSD.conf isn't upgraded; this has happened to me.

As indicated, the Handbook needs to be updated; in my view the pkgbase wiki isn't very suitable for most 15.0-RCx and future 15.0-RELEASE users.
How do the trusted key directories get created? pkgbase-MAJOR_VERSION?

Does that happen automatically when upgrading from say 15-16?
 
How do the trusted key directories get created? pkgbase-MAJOR_VERSION?

Does that happen automatically when upgrading from say 15-16?
That, I don't know; the only thing I remember from somewhere in the commits or the MLs that there were some inital problems with the keys that were initially from the same (ports) location wrt to packages from ports to switch these keys to a more appropriate url location for base packages. This is not by any means my specialty. Perhaps you can search the stable and pkgbase MLs or ask there. AFAIK, based on what Colin Percival has said in the linked referenced video presentation, 15->16 will likely use the 'new' freebsd-update.
 
I have just this minute received one of them cheap mini boxes from China, and I intend to put on it 15.0 when it comes out.

But what should I put on it first?
  • 14.3 and then upgrade using freebsd-update to 15.0-Release
or
  • 15.0-RC3 with pkg base and then use pkg base to upgrade to 15.0-Release
The first is known, except I will not really learn about pkg base.
The second will give me pkg base, but without really knowing how it will work as in my first post.
 
Yes, it's been officially announced: FreeBSD 15.0-RC4 Now Available

But what should I put on it first?
Your basic choice for 15 is:
  • using a packaged base
  • not using a packaged base
A switch from a non-packaged base to a packaged base is foreseen; however, this is, for all intents and purposes a one-way street, that is: there isn't a (supported) "downgrade" path from a packaged base back to a non-packaged base.

If you want to use a packaged base (aka pkgbase), install 15.0-RC4, follow the instructions in the referenced link; a packaged base is fully supported on a 15 branch. Colin Percival, the lead release engineer, does not recommend upgrading from a packaged base 14.3-RELEASE to 15.0-RCx; note the absence in the anouncement description. I went from 14.2-RELEASE -> 15.0-BETAx -> pkgbasify -> stepwise upgrading by means of pkg upgrade to now 15.0-RC4.

Using a packaged base, you can also choose to run 15.0-STABLE. In a packaged base -STABLE you can also do binary update/upgrades, as opposed to a non-packaged ("traditional") base where you have to update from source. I tend to think that, unless you have distinct reasons to run 15.0-STABLE, using the releng/15 branch provides essentially the same experience: the 15.0-RC4 ... 15.0-RELEASE versus the 15.0-STABLE code bases are close to each other. Especially, after the official release version of 15.0-RELEASE, any updates/changes that are not EN-s or SA-s will go to stable/15, not into 15.0-RELEASE. The changes in stable/15 form the basis for the next release: 15.1-RELEASE.
 
For what it's worth, on a VM this morning which has been pkg basified, doing a package upgrade moved it from RC3 to RC4 with no issues. I just ran sudo pkg update, sudo pkg upgrade. Admittedly, this is a fairly minimal VM but it does run openbox, anyway,it was problem free.
 
Back
Top