-
Notifications
You must be signed in to change notification settings - Fork 97
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
Allow collections to install RPMs from other sources (like URLs) #369
Comments
Hey, thanks for opening the issue! I would suggest adding a custom build step as described in https://ansible-builder.readthedocs.io/en/stable/definition.html#additional-custom-build-steps here. This gives you the flexibility to add whatever however you like. If you would like to specifically add RPM via bindep I would suggest opening an issue with them since that they do not allow installing arbitrary RPMs. |
@eqrx I tested that, but that did not work. ansible-builder only uses |
Hi @felixfontein. I think I understand your use-case from a collection perspective. The ideal solution here would be to have Allowing collections to specify I can't really think of a good solution here, other than support at the bindep level. |
I created https://storyboard.openstack.org/#!/story/2010005 for this. |
Note that Bindep is not an installer. All Bindep does is check the current list of packages and tell you what you need to install to match the listed set. How you install the set and where you get those packages from is not part of what Bindep manages. To be clear I don't think this is something that Bindep would do as it doesn't install anything. |
@cboylan bindep does choke on URLs though:
So some minimal changes to bindep (namely: accept URLs for package names) are probably necessary. |
No, what you would do is list sops in your bindep file. Then bindep would check with the package manager to see if a package called sops is present or not. If not it would return it as a missing package. Then the process of installing it and where to install it from is external to bindep. It isn't valid to encode that in bindep. |
That would require ansible-builder to have some functionality where it is possible to specify that the |
I'm not familiar with ansible-builder so I'm not sure. But the bindep tool isn't set up to manage package sources or installation methods. Its primary utility is to compare list of packages against what is in the system and give an answer back as to what is missing. Then the process of reconciling that delta is something the bindep user needs to sort out. We primarily use it to express package dependencies across a number of platforms so that if I'm going to build software on Ubuntu then go to Rocky Linux then Tumbleweed I can easily determine what packages I am missing regardless of platform. |
I think that the main work is done by the scripts in https://github.com/ansible/python-builder-image/tree/main/scripts. These scripts seem to end up in the ansible-runner images (coming form the python-builder image built from that repository). Right now it looks like these files are tightly coupled to ansible-builder, and I guess any change in this repo that would help for this issue would need corresponding changes there as well. |
I'm trying to add EE support to community.sops (ansible-collections/community.sops#98). For that I want to install Mozilla's sops (https://github.com/mozilla/sops/) in the EE image. Sops RPMs are available from GitHub (https://github.com/mozilla/sops/releases).
If it is already possible to install an RPM from a file I didn't manage to figure out how (my first attempt of specifying the URL in the bindep requirements file failed miserably and triggered #90: https://github.com/ansible-collections/community.sops/runs/6039420137?check_suite_focus=true). But maybe I missed something?
The text was updated successfully, but these errors were encountered: