Create rpm requires from cpanfile
The cpanfile provides already perl dependencies and we should make use of it as good as we can to avoid duplication in the spec file
- AC1: Less duplication in dependencies
- AC2: perl dependencies need to be specified manually in either cpanfile or .spec file, not both
- Look into https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tools/update_spec how a spec file is updated from cpanfile including a check in self-tests that tells commiters if an update is needed
- Try to keep dependencies split per component, e.g. "worker", "client", etc.
#6 Updated by tinita over 1 year ago
How about creating a YAML or JSON file for the requirements and generate
cpanfile and rpm from that?
Seems easier especially regarding dependencies per component. Not sure if that is actually possible with the
cpanfile-dump doesn't support module versions, at least
cpanfile-dump --help doesn't show anything regarding that.
#8 Updated by okurz over 1 year ago
yes, a generic dependency format looks interesting but if this is the problem then it's a generic problem that I hope was already solved. Do you have experiences from other non-pure perl projects how it is handled there? How about META.json or so? Or does https://metacpan.org/pod/App::mymeta_requires help? Don't have experience in this field.
#9 Updated by tinita over 1 year ago
Sorry, I was already working on something before I went into vacation/holiday.
I think it's hard to solve with tools that target only perl, because we currently have different versions for perl and rpm, e.g.
perl(DBD::Pg): perl: '>= 3.007004' rpm: '>= 3.7.4'
#13 Updated by okurz over 1 year ago
As we see the approach useful for openQA we want to consider the same approach for os-autoinst. As discussed with tinita the specific problem of generating rpm requires from cpanfile should be solvable the same in os-autoinst. Open point is where to save the script that helps us generating the dependencies. We see the following options:
- put the script in os-autoinst and make openQA depend on os-autoinst -> we already depend on os-autoinst, e.g. for the full stack test, so this should be doable
- copy-paste into both repos – we obviously don't want that :)
- move the script into a 3rd location and link into both, either as package dependencies or with git submodules/subrepo
With tinita and mkittler and me we decided for option 1, so
- store dependency generation script in os-autoinst
- delete from openQA
- add dependencies.yaml and check in os-autoinst
after that we should be done with this ticket and can continue in #53546
#14 Updated by tinita over 1 year ago
I created https://github.com/os-autoinst/os-autoinst/pull/1401 to move the Dockerfile used for os-autoinst testing from the openQA repo.
After that we need to change the URL here: https://build.opensuse.org/package/view_file/devel:openQA/openqa_dev/_service?expand=1
#15 Updated by tinita over 1 year ago
We are using this package now: https://build.opensuse.org/package/show/devel:openQA/os-autoinst_dev
Now I'll remove the dependencies that were only used by openQA.
#17 Updated by tinita over 1 year ago
PR for removing dependencies: https://github.com/os-autoinst/os-autoinst/pull/1414 (merged)
#18 Updated by tinita over 1 year ago
I disabled the build in https://build.opensuse.org/package/meta/devel:openQA/openqa_dev
#19 Updated by tinita over 1 year ago
PR https://github.com/os-autoinst/os-autoinst/pull/1416 - Dependencies: add tools/update-deps
#20 Updated by tinita over 1 year ago
Created https://github.com/os-autoinst/os-autoinst/pull/1420 - Dependencies: Add code to update Dockerfile
#22 Updated by tinita over 1 year ago
Created https://github.com/os-autoinst/os-autoinst/pull/1423 - CI: Install possibly new dependencies
#23 Updated by cdywan about 1 year ago
- Status changed from Feedback to Resolved
The alternative PR https://github.com/os-autoinst/os-autoinst/pull/1430 got merged. The script is still evolving but in this the context of this ticket I think it can be considered done.