Date: Thu, 20 Nov 2025 14:56:46 +0000 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-current@freebsd.org Subject: Re: changing from pkgbase to regularbase Message-ID: <3a98225a-0f49-4010-9e6b-8f893a069ba1@FreeBSD.org> In-Reply-To: <aR8OTHleXSR4ysZ-@int21h> References: <aR3Rc_5llfvlEjIo@int21h> <aR8OTHleXSR4ysZ-@int21h>
next in thread | previous in thread | raw e-mail | index | archive | help
On 20/11/2025 12:49, void wrote:
> What I'm ultimately looking for, is a method of transforming
> a pkgbase system into a not-pkgbase one, that upgrades
> in the traditional source-based way.
This is how I would do it:
0) Make sure all packages are up-to-date and any no-longer required
automatic packages have been removed.
# pkg upgrade
# pkg autoremove -y
1) Make a list of all the packages you have installed that aren't
FreeBSD base packages. You can exclude anything automatically
installed as a dependency of anything else:
% pkg query -e '%a = 0' '%n' | grep -v ^FreeBSD > packages.list
2) Move aside the pkg database in /var/db/pkg
# mv /var/db/pkg /var/db/pkg.old
3) Re-install pkg(8) using pkg(7)
# pkg bootstrap -f
4) Re-install all of the non-base packages from step (1)
# xargs pkg install < packages.list
Untried, so may need refinement, but that's the gist of it. You do end
up having to overwrite all previously installed non-base software with
an identical copy of itself. The only other alternative would be
directly modifying the pkg sqlite database, but that's not something I
can easily describe how to do.
However, this does seems like a retrograde step to me. It is possible
to build your own packages from the source tree, and then update your
system from those, which gives you pretty much the benefits of both worlds:
# cd /usr/src
# git pull
# make buildworld buildkernel packages
# cat <<EOF > /usr/local/etc/pkg/repos/FreeBSD-base.conf
FreeBSD-base: {
url: file:///usr/obj/usr/src/repo
enabled: yes
priotiry: 1
}
EOF
# pkg upgrade
Again, untested and you'll probably have to flesh this sequence of
commands out a bit and work on the details, but that should give an idea
of how it would work.
Cheers,
Matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3a98225a-0f49-4010-9e6b-8f893a069ba1>
