creating pkgng repositories

Install poudriere on the build host. This should be newer or the same version of all the target machines. Cross-building is supported with an amd64 host for i386 jails.

make -C /usr/ports/ports-mgmt/poudriere install clean

Create a default configuration in the ${LOCALBASE}/etc/poudriere.conf configuration file:

# Only 1 of the 2 following options is needed
# For ZFS:
# For NO ZFS:


poudriere is now ready to be used.

First create a ports tree to be used by poudriere:

poudriere ports -c

Create jails for the target versions you want to build packages for:

poudriere jail -c -j 91amd64 -v 9.1-RELEASE -a amd64
poudriere jail -c -j 10i386 -v head -a i386 -m svn

The first will create a 9.1-RELEASE amd64 jail from the official sets (fetched from FREEBSD_HOST) The second will create a current jail using svn and build from source for i386.

As poudriere works for both legacy pkg_* and pkgng you need to make it pkgng aware:

mkdir /usr/local/etc/poudriere.d
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/91amd64-make.conf
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/10i386-make.conf

Create the list of packages you want to see built by poudriere:

cat ~/mylist1
cat ~/mylist2

Start a poudriere build run:

poudriere bulk -f ~/mylist1 -j 91amd64
poudriere bulk -f ~/mylist2 -j 10i386

This will build two pkgng repositories:

Configure an http server to serve these directories.

On your user boxes: (if you use the automatic bootstrap it will take care of creating this file)

echo "packagesite: http://yoururl/10i386-default" >> /usr/local/etc/pkg.conf
echo "packagesite: http://yoururl/91amd64-default" >> /usr/local/etc/pkg.conf

From FreeBSD 9.1 and later it is possible to directly bootstrap from the base:

PACKAGESITE="http://yoururl/10i386-default" pkg update

Before FreeBSD 9.1, it is necessary to bootstrap by hand:

fetch http://yoururl/91amd64-default/Latest/pkg.txz
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
./pkg-static add ./pkg.txz

Normal operation after the needed build jails have been created looks like: * Update the poudriere ports tree:

poudriere ports -u
* Run an incremental build on both build jails:
poudriere bulk -f ~/mylist1 -j 91amd64
poudriere bulk -f ~/mylist2 -j 10i386

It might become necessary to do a full fresh build, use the -c flag to bulk to clear all packages and build fresh. This is normally not required though as poudriere, by default, supports incremental builds and will rebuild anything requiring to be rebuilt.