Adding the FreeBSD-src-16 base package to inferior versions of FreeBSD, for the FreeBSD-base 15 repo keys
For https://www.freebsd.org/releases/15.0R/relnotes/#upgrade-rc and the like.
Where a pair of cp commands involves these two paths – a file, and a directory file:
/usr/src/usr.sbin/pkg/FreeBSD.conf.quarterly-release
/usr/src/share/keys/pkgbase-15
If /usr/src/ is not populated:
/bin/shABI=FreeBSD:16:amd64 ; export ABIIGNORE_OSVERSION=yes ; export IGNORE_OSVERSIONfetch -o /tmp/FreeBSD-src-16.pkg https://pkg.freebsd.org/FreeBSD:16:$(uname -p)/base_weekly/FreeBSD-src-16.snap20251228082320.pkgpkg add /tmp/FreeBSD-src-16.pkg- ignore the bootstrap recommendation
- run the the two
cpcommands exitpkg delete --quiet --yes FreeBSD-src-16.snap20251228082320rm /usr/share/keys/pkgbase-15/Makefilerm /usr/share/keys/pkgbase-15/trusted/Makefile
The date part of the .snap20251228082320 part of the URL will change.
I had things such as this on hold during my popcorn-eating month in the run-up to 15.0-RELEASE.
Tested with an intentionally outdated installation of 14.3 on on Thursday 2026-01-01 🎉
Prior to testing:
blah@fourteen-three-minimal:~ % pkg which /usr/bin/uname
/usr/bin/uname was not found in the database
blah@fourteen-three-minimal:~ % freebsd-version -kru ; uname -mvKU
14.3-RELEASE
14.3-RELEASE
14.3-RELEASE
FreeBSD 14.3-RELEASE releng/14.3-n271432-8c9ce319fef7 GENERIC amd64 1403000 1403000
blah@fourteen-three-minimal:~ % pkg repos -el | sort -f ; sleep 5 ; pkg repos -e | grep -B 1 url
FreeBSD
FreeBSD-kmods
FreeBSD: {
url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly",
--
FreeBSD-kmods: {
url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3",
blah@fourteen-three-minimal:~ % pkg -v
2.4.2
blah@fourteen-three-minimal:~ % pkg iinfo ^pkg$
pkg-2.4.2
blah@fourteen-three-minimal:~ % du -hs /usr/src
512B /usr/src
blah@fourteen-three-minimal:~ % ls -hln /usr/src
total 0
blah@fourteen-three-minimal:~ %
I can not easily test 15.0 PRERELEASE, ALPHA, or BETA. Sorry.
I deleted all FreeBSD Project-provided snapshots, for that version range, after 15.0-RELEASE was announced.
The recent historic snapshots are no longer at https://download.freebsd.org/.
In practice, I would use net/gitup, as shown in my rough notes at https://www.reddit.com/r/freebsd/comments/1pdsyfo/comment/nty3dqx/. For this use case, it's much simpler. Two steps:
I documented the longer approach with
FreeBSD-src-16mainly because I'm curious about alternative workarounds to thepkgbase.freebsd.orgkeys situation.