Here are some notes on setting up to cross compile pfSense ports on a FreeBSD poudriere build box.
Use poudriere to build the qemu-user-static package. Add configuration to /etc/rc.conf:
qemu_user_static_enable="YES"
Run the rc.d script:
service qemu_user_static start
Add to /usr/local/etc/poudriere.conf:
GIT_URL=git://github.com/pfsense/FreeBSD-ports.git
Build the jail; use the Versions of pfSense and FreeBSD page, to map your pfsense target version to the FreeBSD version. For 22.05 it's "12.3-STABLE@5f81a4619dcf". You could also use "releng/12.3" to get the lastest version of 12.3.
poudriere jail -x -c -j 12pfsense -a arm64.aarch64 -m git+https -v 12.3-STABLE@5f81a4619dcf poudriere jail -x -u -j 12pfsense -a arm64.aarch64 -m git+https -v 12.3-STABLE@5f81a4619dcf
Check out the ports tree; poudriere defaults to master so specify the "devel" branch:
poudriere ports -v -c -m git+https -B devel -p pfsense
To update the ports tree use:
git stash poudriere ports -v -u -m git+https -B devel -p pfsense git stash pop
I like to tweak root's dot files in the jail:
# Edit dot files zfs list -t snapshot zfs destroy tank/poudriere/jails/12pfsense@clean vi /usr/local/poudriere/jails/12pfsense/root/.cshrc zfs snapshot tank/poudriere/jails/12pfsense@clean
Create a jail specific poudriere make.conf.
cd /usr/src && git clone https://github.com/pfsense/pfsense.git cp -i /usr/src/pfsense/tools/conf/pfPorts/make.conf \ /usr/local/etc/poudriere.d/pfsense-make.conf
Turn off warning sleep delays:
echo WARNING_WAIT=0 >> /usr/local/etc/poudriere.d/pfsense-make.conf echo DEV_WARNING_WAIT=0 >> /usr/local/etc/poudriere.d/pfsense-make.conf
Set the default Python versions to match for 22.05.1 use 3.8:
echo 'DEFAULT_VERSIONS+= python=2.7' >> /usr/local/etc/poudriere.d/pfsense-make.conf
For 2.4.5 and later use 3.7:
echo 'DEFAULT_VERSIONS+= python3=3.7' >> /usr/local/etc/poudriere.d/pfsense-make.conf echo 'DEFAULT_VERSIONS+= python=3.7' >> /usr/local/etc/poudriere.d/pfsense-make.conf
For 21.01 and later use 3.8:
echo 'DEFAULT_VERSIONS+= python3=3.8' >> /usr/local/etc/poudriere.d/pfsense-make.conf echo 'DEFAULT_VERSIONS+= python=3.8' >> /usr/local/etc/poudriere.d/pfsense-make.conf
Because 2.4.5 is built on 11.3-STABLE and 11.3 has pasted end-of-life you will also need to enable builds for unsupported systems: ALLOW_UNSUPPORTED_SYSTEM=1
echo 'ALLOW_UNSUPPORTED_SYSTEM=1' >> /usr/local/etc/poudriere.d/pfsense-make.conf
Build something:
poudriere bulk -C -j 12pfsense -p pfsense net-mgmt/pfSense-pkg-arpwatch
git clone -b devel git@github.com:leres/FreeBSD-ports.git leres-FreeBSD-ports
git remote -v git remote add upstream https://github.com/pfsense/FreeBSD-ports.git git remote -v
Copyright © 2019, 2020
Craig Leres