Modules with Copr packages
In the last article, we have talked about Fedora modularity project and how to submit a module to be built in Copr. If you choose to write a modulemd file manually, you may be puzzled on how to have a package which has been built in Copr as the part of the module. This is exactly what this article is going to be about.
Let’s assume that you have your modulemd yaml file created and you want to add a package from Copr into it. We are going to modify the
components section, which should so far look like this
components: rpms: ed: rationale: A build dependency of mksh. ref: master mksh: rationale: The main package of the module. buildorder: 1 ref: master
We can append a Copr package like this
hello: rationale: An example package built in Copr ref: 9d1ced1 repository: 'http://copr-dist-git.fedorainfracloud.org/git/frostyx/hello/hello.git'
wait, wait, wait … but, where can I find the
repository for my package? Follow this short image tutorial.
Open the builds tab in your project and find the build that should be a part of your module. Then click on its ID.
Scroll down the detail page to see the results box. In the “Dist Git Source” column, you can find the git hash, that is supposed to be used as
ref. Write it down and then click on it.
Now you can see the Copr dist git. Use the first part of the URL as the
repository, just replace
Simple as that. Go and try :-)