Upgrade BastilleBSD jails from source

Using bastille upgrade 12.1-RELEASE 12.2-RELEASE is the prefered way of upgrading. If you need to do that air-gapped or with a special release (like -HEAD) you can use this tutorial.

before you start: make sure your host system is not behind the jails release

svnlite checkout https://svn.freebsd.org/base/head /usr/src

If you want to fetch a special branch you can svnlite checkout one of the following branches: ‘release/12.2.0’ ‘releng/12.2’ ‘stable/12’ e.g. svnlite checkout https://svn.freebsd.org/base/releng/12.2 /usr/src

or update via svnlite update /usr/src if you already fetched it (if you want to switch the branch you can simply rm -r /usr/src/* )

-j is the number of parallel tasks (you don’t want to set that higher than the number of CPU cores)

make buildworld -j 16 -C /usr/src

Create the release dir (HEAD, 12-STABLE or 12.2-RELENG). If you use XX.X-RELEASE it will overwrite/break the releases fetched by bastille.

make installworld -C /usr/src DESTDIR=/usr/local/bastille/releases/HEAD
bastille stop {yourjailname}
vim /usr/local/basille/jails/{yourjailname}/fstab

and replace the the moutpoint with the one you just created. (e.g. sed -i '' "s/12.2-RELEASE/HEAD/g" /usr/local/bastille/jails/bleeding_edge/fstab)

and upgrade your packages

bastille start {yourjailname}
echo "IGNORE_FILES='/boot/device.hints /etc/motd /etc/hosts'" >> ~/.mergemasterrc
mergemaster -Ui -D /usr/local/bastille/jails/{jailname}/root
bastille restart {yourjailname}
bastille pkg {yourjailname} upgrade