HOWTO: Convert FreeBSD 12-RELEASE to 12-STABLE

1. Update your current 12-RELEASE
freebsd-update fetch && freebsd-update install
/usr/sbin/freebsd-update fetch
2. Install Subversion if you haven't already:
cd /usr/ports/devel/subversion
make install clean
pkg_add -r subversion
pkg install devel/subversion
3. Move, rename, or delete the existing /usr/ports and /usr/src:
mv /usr/ports /usr/ports.bak
mv /usr/src /usr/src.bak


rm -fr /usr/src/*
rm -fr /usr/ports/*
4. Checkout:
svn checkout /usr/src
svn checkout /usr/ports
5. Update:
svn up /usr/src
svn up /usr/ports

6. Rebuild and install world and kernel:

cd /usr/src/
cp sys/amd64/conf/GENERIC sys/amd64/conf/AGINK

vi /usr/src/sys/amd64/conf/AGINK
# :::
# $FreeBSD: releng/12.2/sys/amd64/conf/GENERIC 365733 2020-09-14 22:42:17Z erj $

ident AGINK

makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support

# PF
device pf
device pflog
device pfsync

# ALTQ for PF
options ALTQ
options ALTQ_CBQ # Class-Based Queuing (CBQ)
options ALTQ_RED # Random Early Detection (RED)
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
options ALTQ_PRIQ # Priority Queueing (PRIQ)
# :::

cd /usr/src && make buildkernel KERNCONF=AGINK && make installkernel KERNCONF=AGINK && echo SUCCESS


>>> [END] <<<