My Poudriere's definitive guide

Installing Poudriere

You can install poudriere from the packages using the following command :

$ pkg install poudriere

After installed, pkg leaves you a set of files and directories in the /usr/local/etc/ directory :

  • poudriere.conf
  • poudriered.conf
  • poudriere.d

poudriere.conf is the main configuration file for the poudriere, the place to define how and where poudriere will run.

poudriered.cond is the poudriere server, a tool allowing non root users to queue poudriere commands. This tool is considered EXPERIMENTAL.

poudiere.d is the directory where poudriere store the jails, ports and hooks persistent configuration.

Configuration

To run poudriere you need at least update the poudriere.conf file. Even if the file describes the options by itself here are some useful hints about configuring poudriere.

ZFS or not ZFS

ZFS is not mandatory to run poudriere, but it's highly recommended to enable it if you want to speed file operations in poudriere.

If you don't want to use poudriere with ZFS, uncomment the line

NO_ZFS=yes

If you want to use poudriere with zfs, set the ZPOOL parameter to an existing zpool and comment the NO_ZFS line.

ZPOOL=zroot
#NO_ZFS=yes

zroot is the default zfs pool created during the zfs on root installation.

Running poudriere for the first time

To run poudriere you need at least a jail and a ports tree.

Creating a jail

The jail creation syntax is the following :

poudriere jail -c -j <jailname> -v <version>

The arguments are :

  • -c : the command to create a jail
  • -j <jailname> : to specify the jail name (ie. 11amd64)
  • -a <arch> : the jail architecture (amd64, i386, arm, arm64, …) if not specified, the jail architecture will be the same as host.
  • -v <os-version> : which version of FreeBSD to use in the jail

Create a jail for the 11.0-RELEASE version of FreeBSD

$ poudriere jail -c -a amd64 -j 11amd64 -v 11.0-RELEASE

Create a jail for the 12.0-STABLE version of FreeBSD

$ poudriere jail -c -a amd64 -j 12amd64 -v 12.0-STABLE

Create a jail for the 13.0-CURRENT version of FreeBSD

$ poudriere jail -c -a amd64 -j 13amd64 -v 13.0-CURRENT

Creating a port tree

The minimal syntax to create a port is:

$ poudriere ports -c -p <portname>

The arguments are :

  • -c : create a port
  • -p <portname> : the port name

By default poudriere uses portsnap command to fetch the current version of he port tree in head branch , but other methods are available.
The full list of supported methods are :

  • portsnap
  • git
  • svn{,+http,+https,+file,+ssh}
  • null

If you use git or svn, you can use the -B flag to specify a specific branch.
Here is the command to create the port tree branch 2014Q1

$ poudriere ports -p local-2014Q1 -m svn -B 2014Q1

The null method is used to import and existing port tree.
If you have tour own copy of the port tree, you can add it using the -M option like that :

$ poudriere ports -c -m null -M /my/local/port/tree

List the registered ports and jails

The -l switch list the registered objects.

To see all the registerd jails type:

$ poudriere jails -l
JAILNAME VERSION         ARCH  METHOD TIMESTAMP           PATH
12amd64  12.0-RELEASE-p1 amd64 ftp    2018-12-24          /usr/local/poudriere/jails/12amd64

To see all the registered ports type :

$ poudriere ports -l
PORTSTREE METHOD TIMESTAMP           PATH
local     null   2018-11-04 17:22:39 /home/rodrigo/porttree/

Build a port using poudriere