Re: changing from pkgbase to regularbase
- In reply to: Emmanuel Vadot : "Re: changing from pkgbase to regularbase"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 Dec 2025 17:09:08 UTC
On Dec 2, 2025, at 7:27 AM, Emmanuel Vadot <manu@bidouilliste.com> wrote:
>
> And with https://github.com/freebsd/pkg/pull/2563 the shortcut for
> step 2-4 will just be 'pkg unregister FreeBSD-\*'
This is much better!
I tried a simpler (& riskier) depkgbasify compared to what DES suggests!
# zfs snapshot zroot/ROOT/default@depkgbasify
# pkg info | awk '{print $1;}'|grep FreeBSD-|xargs pkg list|\
tar -zcf /tmp/fbsd-pkgs.tgz --fflags --xattrs -I /dev/stdin
# pkg info | awk '{print $1;}'|grep FreeBSD-|xargs pkg delete -y -f
# cd /
# /.zfs/snaphot/depkgbasify/rescue/tar -xpvf /tmp/fbsd-pkgs.tgz
The key idea is to
1. to make sure you have a copy of the statically linked tar (zfs snapshot not really needed)
2. make a tar of everything installed by FreeBSD-* packages
3. forcibly blowing away all the FreeBSD-* installed files (so no /bin, /sbin....)
4. untar from root restoring all permissions, flags etc.
Probably a good idea to delete FreeBSD-src, FreeBSD-src-sys packages before
saving a snapshot since you will want a fresh copy if compiling locally.