Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Tuesday, December 9, 2025

Fresh poudriere

At first I thought how strange it is that I do not seem to have a blog post that details how I setup poudriere on the same box that uses its output, but that was because a number of posts do not have a 'poudriere' label for them.  I think that Poudriere for port update try seems to be what I need but I will work again at this setup and use that post as part of what guides me.

I have been having difficulties with porting software, more precisely, updating my unofficial ports of a few things, and this should be made easier if I had poudriere available to use once again.  There are not enough useful errors related to both the build/compile itself but also for the FreeBSD makefile end of things.  I can tell poudriere to do a bit more testing or scrutiny of things.  This is primarily what drove my decision to setup poudriere, but since I should have a clearer step by step for setting it up, this will help me take notes, blog about it.

Before I even began searching for a blog post, I added poudriere via pkg.  I could have built it from source but this takes quite a bit of time and the majority of the software on my present Ichigo box is via pkg.  It wasn't very long since I updated the OS to a version of stable-15 after FreeBSD 15 was released, so I won't need to worry about being current enough, nor as in the other blog post have a conflict of versions of the OS used.  I will use a slight change to the command from my distilled page, Poudriere quick tips because at the moment that describes updating rather than creating new.

poudriere jail -c -v stable/14 -a amd64 -j 14amd64 -b -m src=/usr/src

Above is what I eventually would use, but I realized that maybe I should modify the poudriere.conf file first, since there is a toggle for using ZFS, and it has also been a while since the last time I modified the configuration for my previous poudriere need.  I checked the poudriere manpage to find out more about it.

FILES
     POUDRIERE_ETC/poudriere.conf              See self-documented
                                               /usr/local/etc/poudriere.conf.sample
                                               for example.
     POUDRIERE_ETC/poudriere.d/poudriere.conf  The configuration can be stored
                                               in the poudriere.d directory as
                                               well.
     POUDRIERE_ETC/poudriere.d                 This directory contains various
                                               configuration files for the
                                               different jails.

I checked to be sure that the file was present and wondered about any local change, and chose to directly compare the two available files.

root@ichigo:/home/tigersharke # ls /usr/local/etc/poudriere.conf.sample
/usr/local/etc/poudriere.conf.sample
root@ichigo:/home/tigersharke # ls /usr/local/etc/poudriere.conf*
poudriere.conf         poudriere.conf.sample  
root@ichigo:/home/tigersharke # diff /usr/local/etc/poudriere.conf*
root@ichigo:/home/tigersharke # diff -y -W 170 /usr/local/etc/poudriere.conf* | more
root@ichigo:/home/tigersharke # head /usr/local/etc/poudriere.conf*
==> /usr/local/etc/poudriere.conf <==

# Poudriere can optionally use ZFS for its ports/jail storage.  For
# ZFS define ZPOOL, otherwise set NO_ZFS=yes
# 
#### ZFS
# The pool where poudriere will create all the filesystems it needs
# poudriere will use ${ZPOOL}/${ZROOTFS} as its root
#
# You need at least 7GB of free space in this pool to have a working
# poudriere.

==> /usr/local/etc/poudriere.conf.sample <==

# Poudriere can optionally use ZFS for its ports/jail storage.  For
# ZFS define ZPOOL, otherwise set NO_ZFS=yes
# 
#### ZFS
# The pool where poudriere will create all the filesystems it needs
# poudriere will use ${ZPOOL}/${ZROOTFS} as its root
#
# You need at least 7GB of free space in this pool to have a working
# poudriere.
root@ichigo:/home/tigersharke #

The changes to the configuration file that I have chosen to use this time are below, revisions on the left.  Obviously since ZFS would by default be used, I could have already created the poudriere jail, but maybe its still better to have checked and possibly good that the decisions below were made ahead of the jails.

root@ichigo:/usr/local/etc # diff -y --suppress-common-lines /usr/local/etc/poudriere.conf /usr/local/etc/poudriere.conf-orig
ZPOOL=zroot                                                   | #ZPOOL=zroot
ZROOTFS=/poudriere                                            | # ZROOTFS=/poudriere
#FREEBSD_HOST=_PROTO_://_CHANGE_THIS_                         | FREEBSD_HOST=_PROTO_://_CHANGE_THIS_
FREEBSD_HOST=https://download.FreeBSD.org                     <
POUDRIERE_DATA=${BASEFS}/data                                 | #POUDRIERE_DATA=${BASEFS}/data
#USE_TMPFS=yes                                                | USE_TMPFS=yes
USE_TMPFS=all                                                 <
CHECK_CHANGED_OPTIONS=verbose                                 | #CHECK_CHANGED_OPTIONS=verbose
CHECK_CHANGED_DEPS=yes                                        | #CHECK_CHANGED_DEPS=yes
BAD_PKGNAME_DEPS_ARE_FATAL=yes                                | #BAD_PKGNAME_DEPS_ARE_FATAL=yes
CCACHE_DIR=/var/cache/ccache                                  | #CCACHE_DIR=/var/cache/ccache
CCACHE_STATIC_PREFIX=/usr/local                               | #CCACHE_STATIC_PREFIX=/usr/local
PREPARE_PARALLEL_JOBS=10                                      <
ALLOW_MAKE_JOBS=yes                                           | # ALLOW_MAKE_JOBS=yes
PORTTESTING_FATAL=yes                                         | #PORTTESTING_FATAL=yes
DETERMINE_BUILD_FAILURE_REASON=yes                            | #DETERMINE_BUILD_FAILURE_REASON=yes
PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"                     | #PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"
root@ichigo:/usr/local/etc #

How things were to how things are now with relation to the poudriere setup of the build jail.

tigersharke@ichigo:~ % zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
zroot                   97.9G  1.65T   128K  /zroot
zroot/ROOT              54.5G  1.65T   128K  none
zroot/ROOT/default      54.5G  1.65T  54.5G  /
zroot/home              2.69G  1.65T   128K  /home
zroot/home/tigersharke  2.69G  1.65T  2.69G  /home/tigersharke
zroot/tmp               3.85M  1.65T  3.85M  /tmp
zroot/usr               29.7G  1.65T   128K  /usr
zroot/usr/ports         28.1G  1.65T  28.1G  /usr/ports
zroot/usr/src           1.61G  1.65T  1.61G  /usr/src
zroot/var               10.8G  1.65T   128K  /var
zroot/var/audit          128K  1.65T   128K  /var/audit
zroot/var/crash         9.93G  1.65T  9.93G  /var/crash
zroot/var/log            878M  1.65T   878M  /var/log
zroot/var/mail           709K  1.65T   709K  /var/mail
zroot/var/tmp            250K  1.65T   250K  /var/tmp
tigersharke@ichigo:~ % zfs list
NAME                            USED  AVAIL  REFER  MOUNTPOINT
zroot                          98.8G  1.65T   128K  /zroot
zroot/ROOT                     54.5G  1.65T   128K  none
zroot/ROOT/default             54.5G  1.65T  54.5G  /
zroot/home                     2.68G  1.65T   128K  /home
zroot/home/tigersharke         2.68G  1.65T  2.68G  /home/tigersharke
zroot/poudriere                 992M  1.65T   128K  /zroot/poudriere
zroot/poudriere/jails           992M  1.65T   128K  /zroot/poudriere/jails
zroot/poudriere/jails/15amd64   992M  1.65T   992M  /usr/local/poudriere/jails/15amd64
zroot/tmp                      3.86M  1.65T  3.86M  /tmp
zroot/usr                      29.7G  1.65T   128K  /usr
zroot/usr/ports                28.1G  1.65T  28.1G  /usr/ports
zroot/usr/src                  1.61G  1.65T  1.61G  /usr/src
zroot/var                      10.8G  1.65T   128K  /var
zroot/var/audit                 128K  1.65T   128K  /var/audit
zroot/var/crash                9.93G  1.65T  9.93G  /var/crash
zroot/var/log                   878M  1.65T   878M  /var/log
zroot/var/mail                  709K  1.65T   709K  /var/mail
zroot/var/tmp                   224K  1.65T   224K  /var/tmp
tigersharke@ichigo:~ %

I am not yet decided whether I will be using a custom make.conf with poudriere though I can change my mind about this in the future with a symbolic link or a duplicate in the appropriate poudriere directory.  One thing I do need to do, which I mentioned in the old blog post is to use the same /var/ports/db with poudriere as I would outside of it.  Another old blog post described many of the steps I used to setup poudriere, including the two symbolic links.  I show the same output here.

This worked in the past but does not now. -- investigating, will update.

root@ichigo:~ # ls /usr/local/etc/poudriere.d/
hooks jails ports
root@ichigo:~ # ln -s /var/db/ports /usr/local/etc/poudriere.d/options
root@ichigo:~ # ls -l /usr/local/etc/poudriere.d/options
lrwxr-xr-x  1 root wheel 13 Dec  9 00:41 /usr/local/etc/poudriere.d/options -> /var/db/ports

Now it seems that I am finished with a fresh setup of poudriere.  If you would like to setup poudriere for building on a local networked machine instead of the same machine via pkg repo, then read another previous blog post Remote poudriere build which tells how I did that.  Attempting to port or update my unofficial ports should be easier with poudriere doing all the work, hopefully finding flaws in my efforts, and enabling me to cure any build or execution errors or failures.

No comments:

Frequently viewed this week