Create poudriere git based repositories
WARNING: the following are my personal notes. Use at your own risk!
1. Install and configure Poudriere
https://docs.freebsd.org/en/books/handbook/ports/#ports-poudriere
Install Poudriere using the ports-mgmt/poudriere package or port and devel/ccache to use ccache to speed up the build process.
Poudriere configuration file: /usr/local/etc/poudriere.conf
For ZFS, uncomment "#ZPOOL=zroot"
To enable ccache uncomment "#CCACHE_DIR=/var/cache/ccache"
2. Building with Poudriere
2.1. Set git proxy (OPTIONAL)
# git config --global https.proxy http://localhost:8080 # git config --global http.proxy http://localhost:8080
2.2. Clone a repository
https://docs.freebsd.org/en/books/handbook/ports/#ports-using-installation-methods
# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/local/poudriere/ports/local/
2.3. Create poudriere locally managed port tree
# poudriere ports -c -p local -m null -M /usr/local/poudriere/ports/local/
2.4. Update git repo
# cd /usr/local/poudriere/ports/local # git pull
2.5. Create poudriere jail
# poudriere jail -c -j 13amd64 -v 13.3-RELEASE
2.6. Build with poudriere
Create a list of currently installed prime-origins:
pkg info -o `pkg prime-list` | awk '{print $2}' | sort > pkg-info-`date +%Y%m%d%H%M`
or
Create a list of all currently installed packages:
pkg info -o '*' | awk '{print $2}' | sort > pkg-info-`date +%Y%m%d%H%M`
Build packages
poudriere bulk -j 13amd64-local -p local -f pkg-info-202410041128
3. Build routine
3.1. Keep packages updated
Update git repo
# cd /usr/local/poudriere/ports/local # git pull
Build packages
poudriere bulk -j 13amd64-local -p local -f pkg-info-202410041128
3.2. Configure OPTIONS before building (OPTIONAL)
Configure options
poudriere options -j 13amd64-local -p local -f filename -c
Remove options
poudriere options -j 13amd64-local -p local -r -f filename
Show options non recursively
poudriere options -j 13amd64-local -p local -s -f filename -n
3.3. Cleanup old or unwanted packages (OPTIONAL)
Clean all packages
poudriere pkgclean -A -j 13amd64-local -p local