How to use packages with Poudriere Image

I have Poudriere Image under my belt for a while.

Now I am trying to add packages to my images.

Let me show my commands.
Create my jail:
poudriere jail -c -j mbm-mfs -v 13.5-RELEASE -K GENERIC -b -m src=/usr/src -J4

Create Ports Tree:
poudriere ports -c -p mbm_ports -m null -M /usr/ports
This seem to give me troubles with null. So I did not use /usr/ports/. Instead I installed git and poudriere built its own ports tree.
poudriere ports -c -p mbm_ports

Build pkglist:
poudriere bulk -j mbm-mfs -p mbm_ports -f mbm-pkglist
This all works but I really want to download packages instead of building them.
So I add the -b flag and quarterly setting.
poudriere bulk -j mbm-mfs -p mbm_ports -f mbm-pkglist -b quarterly
This gives me some packages but still tries to build some ports. I do not understand this logic. It acts like it cannot find some packages.
I am aware of pkg blacklist and whitelist in poudriere.conf.

Can anyone give me advice? Do I need to alter anything in poudiere.conf?

I did change my port name to default.
Code:
[mbm-mfs-default] Fetching xvinfo-1.1.5_1~6286b15567.pkg: 100%    7 KiB   7.2kB/s    00:01
[mbm-mfs-default] Fetching xorg-fonts-cyrillic-7.7~e5d1180597.pkg: 100%    1 KiB   1.1kB/s    00:01
[mbm-mfs-default] Fetching xlsclients-1.1.5_1~f22a195864.pkg: 100%    9 KiB   9.2kB/s    00:01
[mbm-mfs-default] Fetching xcmsdb-1.0.5_1~05a3402512.pkg: 100%   17 KiB  17.0kB/s    00:01
[mbm-mfs-default] Fetching xorg-fonts-truetype-7.7_1~8fb04bdd34.pkg: 100%    1 KiB   1.1kB/s    00:01
[mbm-mfs-default] Fetching autoconf-switch-20220527~a8a5bcd5ab.pkg: 100%    1 KiB   1.5kB/s    00:01
[mbm-mfs-default] Fetching xdriinfo-1.0.7~49180e07d8.pkg: 100%    5 KiB   5.6kB/s    00:01
[mbm-mfs-default] Fetching libGLU-9.0.3~d7327df97a.pkg: 100%  211 KiB 216.2kB/s    00:01
[mbm-mfs-default] Fetching lerc-4.0.0~8aa41412a1.pkg: 100%  164 KiB 167.7kB/s    00:01
[00:01:09] Package fetch: Using cached copy of aom-3.13.1
[00:01:09] Package fetch: Using cached copy of appres-1.0.7
[00:01:09] Package fetch: Using cached copy of autoconf-switch-20220527
[00:01:09] Package fetch: Using cached copy of bash-completion-zfs-2.3.3
[00:01:09] Package fetch: Using cached copy of bdftopcf-1.1_3
[00:01:09] Package fetch: Using cached copy of bitmap-1.1.1
[00:01:09] Package fetch: Using cached copy of dav1d-1.5.2
[00:01:09] Package fetch: Using cached copy of docbook-1.5
[00:01:09] Package fetch: Using cached copy of docbook-sgml-4.5_1
[00:01:09] Package fetch: Using cached copy of docbook-xml-5.0_3
So it acts like it is getting packages then starts building.
Here is right before it starts building ports:
Code:
[00:01:09] Package fetch: Using cached copy of xxhash-0.8.3
[00:01:09] Checking packages for incremental rebuild needs
[00:01:10] Deleting libXaw-1.0.16,2.pkg: missing dependency: libXpm-3.5.17_1
[00:01:10] Deleting x11perf-1.6.1_1.pkg: missing dependency: libXft-2.3.8
[00:01:10] Deleting vulkan-loader-1.4.327.pkg: missing dependency: wayland-1.24.0_2
[00:01:10] Deleting xcalc-1.1.2_1.pkg: missing dependency: font-adobe-100dpi-1.0.3_4
[00:01:10] Deleting xclock-1.0.9_1.pkg: missing dependency: libXaw-1.0.16,2
Deleting its work "for incremental rebuild needs".

How can I get this thing on all packages?

Code:
[00:01:10] Deleting stale symlinks... done
[00:01:10] Deleting empty directories... done
[00:01:10] Package fetch: Generating logs for fetched packages
[00:01:12] Unqueueing existing packages
[00:01:12] Unqueueing orphaned build dependencies
[00:01:12] Sanity checking build queue
[00:01:12] [mbm-mfs-default] [2025-12-18_17h45m56s] [pkgqueue_sanity_check] Time: 00:01:10
           Queued: 396 Inspected: 0 Ignored: 0 Built: 0 Failed: 0 Skipped: 0 Fetched: 156 Remaining: 240

poudriere image -t usb+mfs -s 1200m -j mbm-mfs -h mbm-mfs -n mbm-mfs -X excluded.files -c ./overlay/mbm-mfs -f mbm-pkglist
 
This is the crippler:
Code:
[01:07:09] [01] [00:00:00] Building   devel/llvm19@default | llvm19-19.1.7_1
Spent 8 hours on it last night building on a NUC7 and it seemed to be the wrong version with llvm15@default

I think I have it figured out. The ports I built last night were using "-M /usr/ports/" and then I switched to git and its download was newer by grabbing quarterly. 13.5 Installer ports were is older.

So I did delete the ports tree with poudriere ports -d but it looks like the were some lingering items in the /data/cache directory.
That might be causing this problem.. I need delete old files better next time.
 
I wiped the box and reinstalled from scratch. I wanted to start new.

One thing that I have trouble understanding is why if I am building an image with poudriere and I want all packages. Why do I need this step:
poudriere ports -c -p NAME
The reason it exists is to create a ports tree. I don't want that. I want packages. It seems you should be able to skip ports all-together with poudriere bulk and just download packages.

So hack in a variable name for poudriere bulk? The '-b BRANCH' seems to require the ports tree setting '-p NAME'. That is a problem.
There should be a way to just download everything with a pkglist.
-b option needs fixing I believe. Thoughts? Settings I am missing? Do you use the -b option with bulk?
poudriere bulk -j mbm -p mbm_ports -f mbm-pkglist -b quarterly
I am telling it to use a ports tree and packages. No wonder it is confused.

mbm-pkglist
Code:
misc/ytree
x11/xorg
x11-wm/openbox
11-fm/xfe
x11/tint
astro/gpsd
astro/gpxloggerd

I realize my usage of "packages for everything" goes against the whole concept of poudriere.
But for building MFS images, ports//packages//applicatons need to be pre-installed. I need no port options set. Default packages work for me.

So you can see from my pkglist that llvm19 and rust are needed as dependencies.
I have uncommented them in the poudriere whitelist for trial..

#PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"
Should I just add my 300 packages to this list? It seems excessive and probably won't work....
I have experimented with it and it does not handle dependent ports. So all would be required.
 
Here my two scripts i'm using,

poudriere_nice :
Code:
nice -n 31 idprio 31 ./poudriere_run
pkg update -f
pkg upgrade

poudriere_run:
Code:
#poudriere jail  -d          -j pjail2
poudriere jail  -c          -j pjail2 -v 15.0-RELEASE
poudriere ports -c                    -p default2 -m git+https -B 2025Q4
poudriere ports -u                    -p default2
poudriere options           -j pjail2 -p default2 -f ./packagelist.txt
poudriere bulk -b quarterly -j pjail2 -p default2 -f ./packagelist.txt
 
Back
Top