poudriere: Any way to re-use built packages across sets?

From: Pat Maddox <pat_at_patmaddox.com>
Date: Tue, 12 Dec 2023 09:00:33 UTC
I want to build two package repos: 1) the vanilla ports tree 2) ports tree + my overlay

The commands I use are:

  poudriere bulk -p main -j 132amd64 -b latest

and

  poudriere bulk -z maintain -j 132amd64 -p main -O maintain -b latest

Which produces /usr/local/poudriere/data/packages/132amd64-main and /usr/local/poudriere/data/packages/132amd64-main-maintain.

The problem is, the second command spends a lot of time re-building the same things (gcc, llvm, rust, etc) as the first. `-b` isn't particularly useful because I'm using a current ports tree, so I need to build a lot of packages at least once.

I'd like to have the second command re-use the packages built by the first command where possible.

Here are some things I tried:

1. -b file:///usr/local/.../132amd64-main - doesn't work because the jail can't access that path, which makes sense
2. serving packages via nginx, and passing the url as -b - doesn't work because FreeBSD.conf sets mirror_type=srv and signature_type=fingerprints
3. modifying the jail's FreeBSD.conf file directly - fails with "pkg: Error fetching http://localhost:8181/132amd64-main/Latest/pkg.pkg.sig: Not Found       A pre-built version of pkg could not be found for your system."

Is there a way to have poudriere build two separate package repos (one named with the set) where one uses pre-built packages from the first repo if possible?

Pat