Inspired from: https://bsdrp.net/documentation/technical_docs/poudriere
System info:
# pkg info | grep poudriere
poudriere-devel-3.3.99.20200326 Port build and test system
# uname -a
FreeBSD robs-desktop 12.1-RELEASE-p5 FreeBSD 12.1-RELEASE-p5 3135379a043(releng/12.1) GENERIC amd64
Podriere config:
# cat /usr/local/etc/poudriere.conf | sed -e 's/#.*$//' -e '/^$/d'
FREEBSD_HOST=_PROTO_://_CHANGE_THIS_
RESOLV_CONF=/etc/resolv.conf
BASEFS=/usr/local/poudriere
USE_PORTLINT=no
USE_TMPFS=yes
DISTFILES_CACHE=/usr/ports/distfiles
ZPOOL=zroot
make file:
# cat /usr/local/etc/poudriere.d/make.conf
ALLOW_UNSUPPORTED_SYSTEM=yes
Shouldnt apply here but I might build systems on unsupported version of BSD in the future
Create my jail called router:
# poudriere jail -c -j router -v 12.1-RELEASE -K GENERIC
...
12.1-RELEASE-p5
[00:03:27] Recording filesystem state for clean... done
[00:03:27] Jail router 12.1-RELEASE-p5 amd64 is ready to be used
Create my ports tree:
# poudriere ports -c -p router-ports
...
Building new INDEX files... done.
Bulk build the ports I want:
# cat << EOF > poudriere-test/pkg-list
shells/bash
editors/vim-console
sysutils/tmux
sysutils/stow
security/doas
net/isc-dhcp44-server
net/isc-dhcp44-client
dns/coredns
security/ca_root_nss
sysutils/flashrom
EOF
# poudriere bulk -j router -p router-ports -f /root/poudriere-test/pkg-list -c
...
[00:11:03] Built ports: ports-mgmt/pkg devel/autoconf-wrapper print/indexinfo misc/pciids sysutils/dmidecode devel/pkgconf converters/libiconv devel/gettext-runtime devel/libtextstyle editors/vim-console devel/gmake security/doas devel/libpci sysutils/flashrom lang/go net/isc-dhcp44-client net/isc-dhcp44-server dns/coredns devel/gettext-tools lang/perl5.30 textproc/p5-Unicode-EastAsianWidth devel/p5-Clone converters/p5-Text-Unidecode devel/p5-Locale-gettext security/ca_root_nss devel/p5-Locale-libintl devel/p5-Clone-Choose misc/help2man textproc/p5-Hash-Merge sysutils/stow print/texinfo devel/m4 devel/libtool devel/autoconf devel/automake devel/bison devel/libevent shells/bash sysutils/tmux
[router-router-ports] [2020-05-27_08h52m58s] [committing:] Queued: 39 Built: 39 Failed: 0 Skipped: 0 Ignored: 0 Tobuild: 0 Time: 00:11:02
[00:11:03] Logs: /usr/local/poudriere/data/logs/bulk/router-router-ports/2020-05-27_08h52m58s
[00:11:03] Cleaning up
router-router-ports: removed
router-router-ports-n: removed
[00:11:03] Unmounting file systems
Build my usb image:
# poudriere image -t usb -j router -s 4g -p router-ports -h router -n router -f /root/poudriere-test/pkg-list -o ./router.img
dd it to a flash drive:
# dd if=router.img/router.img of=/dev/da0 bs=1M conv=sync
Two issues:
-
Reboot loop when booting from my lenovo TT450s off this usb image
-
Image is missing freebsd-dist for
bsdinstall
:
# ls -lah /media/router/usr/
total 96
drwxr-xr-x 13 root wheel 512B Oct 31 2019 .
drwxr-xr-x 18 root wheel 512B May 27 09:08 ..
drwxr-xr-x 2 root wheel 8.0K May 27 08:29 bin
drwxr-xr-x 57 root wheel 6.5K Oct 31 2019 include
drwxr-xr-x 10 root wheel 17K May 27 08:29 lib
drwxr-xr-x 5 root wheel 17K May 27 08:29 lib32
drwxr-xr-x 5 root wheel 512B Oct 31 2019 libdata
drwxr-xr-x 9 root wheel 1.5K May 27 08:28 libexec
drwxr-xr-x 11 root wheel 512B May 27 09:08 local
drwxr-xr-x 2 root wheel 512B Oct 31 2019 obj
drwxr-xr-x 2 root wheel 5.5K May 27 08:29 sbin
drwxr-xr-x 29 root wheel 512B Oct 31 2019 share
drwxr-xr-x 15 root wheel 512B Oct 31 2019 tests