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

From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Tue, 12 Dec 2023 09:15:23 UTC
On Tue, Dec 12, 2023 at 01:00:33AM -0800, Pat Maddox wrote:
> 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?
> 
No it is not possible, yes this would be really great, this is a good feature
request for poudriere, the TOTO is long, in poudriere! I will try to not forget
about this proposal.

Bapt