-
Notifications
You must be signed in to change notification settings - Fork 6
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
main: add --use-librepo
to support librepo downloads
#51
Conversation
02c5f2b
to
ccf24c9
Compare
--use-librepo
to support librepo downloads--use-librepo
to support librepo downloads
This commit switches to the librepo enabled `images` library via: ``` go mod -replace github.com/osbuild/iamges=github.com/mvo5/images@librepo-sources-osbuild1974 ``` which in turn needs osbuild PR#1974. With that it then adds a new `--use-librepo` switch that will enable librepo based downloading so that people can play with the new backend.
This commit adds a new manifestOptions struct that is passed to generateManifest. to cleanup the signature of generateManifest(). This can then also be used to carry a new e.g. `--rpmmd/--cachedir` option.
This commit changes the signature of depsolve in `manifestgen` to return the full `dnfjson.DepsolveResult`. This gives us access to the sbom and also is a preparation for images PR#1142 where we will need this anyway.
@@ -185,6 +199,7 @@ operating sytsems like centos and RHEL with easy customizations support.`, | |||
manifestCmd.Flags().String("ostree-ref", "", `OSTREE reference`) | |||
manifestCmd.Flags().String("ostree-parent", "", `OSTREE parent`) | |||
manifestCmd.Flags().String("ostree-url", "", `OSTREE url`) | |||
manifestCmd.Flags().Bool("use-librepo", true, `use librepo to download packages (disable if you use old versions of osbuild)`) |
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.
We can 'just' bump the minimum required osbuild
version instead of this remark; let's do that.
This commit switches the default to librepo. We do not have many users yet so this is a great place to test the new librepo functionality. It also is much more stable for fedora/centos systems that often have flaky mirrors. This also bumps the minimum required version of osbuild.
This commit adds a (smoke) integration test for librepo based manifests. It needs a flanking test that also ensures that --use-librepo really generates librepo sources.
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.
Cool, thank you :)
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.
The first two commits could be squashed. The commit message for the second one seems like it's talking about both.
Not a big issue though.
Tiny comment about a comment below. Overall LGTM.
# The minimum required osbuild version, note that this used to be 129 | ||
# but got bumped to 138 for librepo support which is not strictly | ||
# required. So if this needs backport to places where there is no | ||
# recent osbuild available we could simply make --use-librepo false | ||
# and go back to 129. |
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.
Is this a realistic issue? I guess it might be if you're go install
ing ib-cli, but in that case, you're on your own and the spec file doesn't matter.
I mean, there's no way this spec file will be used to officially build ib-cli in a distro where a new enough osbuild wont be, so I think this note isn't relevant.
I might be missing something though.
With that it then adds a new
--use-librepo
switch that willenable librepo based downloading so that people can use
the new backend.
It is on by default currently, the risk is that it got no real testing
with secrets (but there code is there and similar to what curl
is doing) but the upside is that it will help with the centos/fedora
cases as there the mirror retry feature is import important.