Skip to content

Conversation

patmaddox
Copy link
Contributor

This supports a promotion workflow, where you have e.g. two different ports trees, dev and main. One can fetch from the other without having to rebuild all of the common packages.

poudriere bulk -j 143 -p dev -C sysutils/quickjail # always builds
poudriere bulk -j 143 -p main -C -b https://mypkgrepo.dev/pkg/143-dev/ sysutils/quickjail # fetches

The only commit that's actually necessary to support this is d87adf0, because it will simply configure the FreeBSD repo to not do all the other verification. However, by disabling the FreeBSD repo and setting the name to custom, it simplifies the config a bit.

Note that this includes the commit from #1228 so that this PR can work on 14.3 which ships with FreeBSD and FreeBSD-kmod configured.

e37cf98 changed `pkg update` to only update FreeBSD repo. 14.3 now
ships with two repos configured - FreeBSD and FreeBSD-kmods. Later
calls to `pkg rquery` and `pkg fetch` failed with this multi-repo
configuration.
The default config for FreeBSD expects SRV records, which will typically
not be present if you provide a custom URL. If the URL is not FreeBSD,
assume the user knows what they're doing and wants to fetch from this
repo.
This way a package fetched from a custom repo won't appear to have come
from FreeBSD.
@michael-o
Copy link
Contributor

This has one serious drawback I have already likely expressed elsewhere: Hwn your top layer repo uses this one and needs a dependency not present here it won't pull from upstream FreeBSD, but build again and waste cycles.

@bdrewery bdrewery self-assigned this Aug 9, 2025
@patmaddox
Copy link
Contributor Author

I get what you’re saying… though it seems to me that multiple repos is an enhancement and a bit trickier (though not necessarily by much - perhaps could simply pass -b multiple times and iterate over them).

I’m using this myself and am happy with it for the time being, because the drawback of not having it is that it doesn’t work at all :)

Personally I’ve not been using -b latest because various things that depend on llvm keep breaking when I do that, so I suck it up and rebuild. But I want to share the results of my builds since they use the same jail and ports tree.


Has anyone thought through the interface of multiple repos? Here are some ideas:

-b latest # implies FreeBSD, as now
-b https://foo # implies custom, as in this patch
-b latest -b https://foo # implies both
-b latest -b foo=https://foo -b bar=https://bar # implies FreeBSD, explicit name the other two

As soon as you have more than one, you need to ask about priority. Perhaps implied by order?

If the config is any more complex than this, then you prob want to define a conf file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants