-
Notifications
You must be signed in to change notification settings - Fork 169
download_from_repo: Only query and fetch from FreeBSD repo #1228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
LGTM @patmaddox how would this interact with #1025 where the url used introduces a different pkg repo? (IMO this bug you've reported here should be fixed first) |
Exactly my question! |
Good question. I don't know, because I haven't tested it. Based on my understanding of things, it would at least be able to pass the Basically, this PR just addresses the fact that poudriere makes a lot of assumptions regarding configuration, particularly around pre-fetching packages. More work would need to be done to support more varied configurations. For example, I had previously patched |
|
Hey, just applied this patch individually on my poudriere-devel, and can confirm it started to fetch existing packages again. |
|
Also, not sure if it counts but I use a |
|
I patched mine has well and please can you fix the typo at : https://github.com/freebsd/poudriere/pull/1228/files#diff-afbea33008c9478b94f3379278925c57204b3283411000094ee48d2388293a5fL4491
|
This update includes fix from freebsd/poudriere#1228 freebsd/poudriere#1228
#1239 answers it: either overwrite the FreeBSD config entirely with no checking, or disable it and parameterize the repo name throughout |
This update includes a fix from freebsd/poudriere#1228 freebsd/poudriere#1228 download_from_repo: Only query and fetch from FreeBSD repo Changelog: dsh2dsh/poudriere@3.4.99.20250725...3.4.99.20250802 PR: 288610 Approved by: yuri@ (Mentor)
| fi | ||
| # Don't trust pkg-update to return its error | ||
| if ! injail ${pkg_bin} rquery -U %n pkg >/dev/null; then | ||
| if ! injail ${pkg_bin} rquery -U -r FreeBSD %n pkg >/dev/null; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In FreeBSD 15.0, the "FreeBSD" repo was renamed "FreeBSD-ports":
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah going to need a matrix of repo names. A lot of complexity here now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can steamline the names in the repo configuration: on line 4495 above when we setup /etc/pkg/poudriere.conf, we can disable the FreeBSD default repositories (FreeBSD, FreeBSD-ports, FreeBSD-ports-kmods: enabled: no) and use custom poudriere ones only?
That way the only condition is "do we also need to setup a kmods repo or not?".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. We might need to define some of this other stuff too, which we need to consider the user can override the URL with PACKAGE_FETCH_URL which defaults to the srv type pkg+http://pkg.FreeBSD.org/\${ABI}. So will need a few more vars defaulting to the FreeBSD values.
FreeBSD-ports: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
Ugh.
I'm now thinking back to #1218 and why we even need the -r. Even a pkg -r FreeBSD* with glob support might simplify things a lot here and I think @bapt would be open to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now thinking back to #1218 and why we even need the
-r.
From what I understand, it was added to because of other repos that were enabled, and if we disable them it can be reverted (and this PR would be unneeded). I am currently in desperate need for poudriere working on FreeBSD 15.0-BETA1 when fetching latest packages, so am digging into this and will hopefully come back with a PR 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I am up and running with poudriere on FreeBSD 15.0-BETA1 and building in 14.3-RELEASE-p4 and 15.0-BETA1 jails \o/. I opened #1271 with my changes.
@patmaddox can you give it a try too?
d02b93c to
4319d02
Compare
Older versions of FreeBSD had a single package repository, named "FreeBSD". FreeBSD 14.3 introduced a second repository for kernel modules, named "FreeBSD-kmods". FreeBSD 15.0 add support for managing the base system with packages (aka pkgbase), and to avoid confusion for users and emphasis they are related to ports and not the base system, the mentioned repositories were respectively renamed "FreeBSD-ports" and "FreeBSD-ports-kmods". In order to fetch latest packages, poudriere tune the "FreeBSD" repo, and attempts were made to ignore the "FreeBSD-kmods" repository (freebsd#1218, freebsd#1228), unfortunately with the changes described above in FreeBSD 15, it is broken again. In order to avoid this issues, disable all known variations of the default FreeBSD repositories, and setup a single "Poudriere" repository configured to our wills. This will allow us to have full control of that repository without being impacted by changes on the FreeBSD side.
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. Change-Id: Ic9870a0efc9ab9545eecd2e10281ea746a6a6964
4319d02 to
e8e0292
Compare
e37cf98 changed
pkg updateto only update FreeBSD repo. 14.3 now ships with two repos configured - FreeBSD and FreeBSD-kmods. Later calls topkg rqueryandpkg fetchfailed with this multi-repo configuration.