Skip to content

Repository Build Instructions

vajonam edited this page Jul 7, 2021 · 10 revisions

Base Setup

Install 12.2 FreeBSD

Mosly lifted from here. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-poudriere-build-system-to-create-packages-for-your-freebsd-servers

Install Poudriere-devel (need it for overlays) and portsnap

pkg install poudriere-devel portsnap 

Install Source

cd /tmp
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.2-RELEASE/src.txz
tar -C / -zxvf src.txz
rm /tmp/src.txz

Repo Setup

Creating Jails

amd64

poudriere jail -c -j freebsd_12-5x64 -v 12.2-RELEASE

Armv7

poudriere jails -c -a arm.armv7 -j freebsd_12-2_armv7 -M /usr/local/poudriere/jails/freebsd_12-2_armv7/ -m null -x

where -M is the path to the extracted generic img (when copying the image from the mnt to a folder us cp -a to keep permissions

Create Ports Trees

First we create our base ports trees, here we select ports tree from the netgate tree, but this can be from against the main FreeBSD source as well.

BASE Ports Tree - 2.5.1

Called ng_ports_251 for netgate base 251, against the RELENG_2_5_1 branch of of the

poudriere -v ports -c -p ng_ports_251 -m git -U https://github.com/pfsense/FreeBSD-ports -B RELENG_2_5_1

BASE Ports Tree - 2.6.x (devel)

Called ng_ports_devel for netgate base devel, against the devel branch of of the

poudriere -v ports -c -p ng_ports_devel -B devel -m git -U https://github.com/pfsense/FreeBSD-ports 

Create Overlay Tree for wireguard modules

poudriere -v ports -c -p wg_package -U https://github.com/theonemcdonald/pfSense-pkg-WireGuard -B main -m git

Update and Build Ports

2.5.1

poudriere ports -u wg_package ; poudriere ports -u ng_ports_251 
poudriere -v bulk -j freebsd_12-5x64  -p ng_ports_251 -O wg_package -f build.package

build.package is a file that contains one line net/pfSense-pkg-WireGuard

2.6.x

poudriere ports -u wg_package ; poudriere ports -u ng_ports_devel; 
poudriere -v bulk -j freebsd_12-5x64  -p ng_ports_devel -O wg_package -f build.package

build.package is a file that contains one line net/pfSense-pkg-WireGuard