-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
use case
- user is targeting either future jail, or empty boot env
context
Previously it was possible to bootstrap a FreeBSD system by unpacking base.txz into
a directory and then pkg(8) would figure out what ABI/OSVERSION was being targeted
when it bootstrapped inside the chroot/rootdir/jail. If dist sets are not going
to be provided, an alternative needs to be found.
example
pkg bootstrap -fshould install the requested ABI/OSVERSION into the root dir
$ mkdir /tmp/foo && cd /tmp/foo
$ uname -a
FreeBSD wintermute 15.0-ALPHA4 FreeBSD 15.0-ALPHA4 stable/15-n280351-b15ef791f91f GENERIC amd64
## attempt to bootstrap into empty directory
$ env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg \
-o ABI=FreeBSD:14:aarch64 \
-o OSVERSION=1403000 \
-o AUTOCLEAN=yes \
-o INSTALL_AS_USER=yes \
-r FreeBSD-ports \
--rootdir . \
bootstrap -f
pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended
pkg(8) is already installed. Forcing reinstallation through pkg(7).
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/latest, please wait...
^C
- but instead we get the ABI/OSVERSION from the host
partial workaround
- pre-copy certs & FreeBSD-*.conf pkg repo files
- use
pkg install ...as this will respect ABI/OSVERSION
But with rootdir ... it will still attempt some operations on the host, not inside.
Some more notes & experiments at https://docs.skunkwerks.at/s/zG3lEhtP_#
Metadata
Metadata
Assignees
Labels
No labels