action #56525
closedCreate rpm requires from cpanfile
Added by coolo about 5 years ago. Updated over 4 years ago.
0%
Description
Motivation¶
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
Acceptance criteria¶
- AC1: Less duplication in dependencies
- AC2: perl dependencies need to be specified manually in either cpanfile or .spec file, not both
Suggestions¶
- 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.
Updated by okurz about 5 years ago
- Blocks action #53546: Easier dependencies handling for packages, e.g. reduce duplication of build requirements in spec, documentation, Dockerfile added
Updated by okurz over 4 years ago
- Description updated (diff)
- Status changed from New to Workable
- Assignee deleted (
coolo)
Apparently you have no capacity to pick this up.
Updated description with "Motivation", "Acceptance criteria", "Suggestions
Updated by livdywan over 4 years ago
- Target version changed from Current Sprint to Ready
Updated by okurz over 4 years ago
- Target version changed from Ready to Current Sprint
Updated by tinita over 4 years 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
format.
Also cpanfile-dump
doesn't support module versions, at least cpanfile-dump --help
doesn't show anything regarding that.
Updated by tinita over 4 years ago
- Status changed from Workable to In Progress
- Assignee set to tinita
Updated by okurz over 4 years 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.
Updated by tinita over 4 years ago
Sorry, I was already working on something before I went into vacation/holiday.
https://github.com/perlpunk/openQA/tree/deps
https://github.com/perlpunk/openQA/blob/deps/dependencies.yaml
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.
https://github.com/perlpunk/openQA/blob/deps/dependencies.yaml#L72-L73
perl(DBD::Pg):
perl: '>= 3.007004'
rpm: '>= 3.7.4'
Updated by tinita over 4 years ago
Updated by tinita over 4 years ago
PR https://github.com/os-autoinst/openQA/pull/2934 was merged
Updated by okurz over 4 years 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
Updated by tinita over 4 years 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
Updated by tinita over 4 years 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.
Updated by tinita over 4 years ago
PR for removing dependencies: https://github.com/os-autoinst/os-autoinst/pull/1414 (merged)
Updated by tinita over 4 years ago
I disabled the build in https://build.opensuse.org/package/meta/devel:openQA/openqa_dev
Updated by tinita over 4 years ago
PR https://github.com/os-autoinst/os-autoinst/pull/1416 - Dependencies: add tools/update-deps
was merged.
Updated by tinita over 4 years ago
Created https://github.com/os-autoinst/os-autoinst/pull/1420 - Dependencies: Add code to update Dockerfile
Updated by tinita over 4 years ago
Created https://github.com/os-autoinst/os-autoinst/pull/1423 - CI: Install possibly new dependencies
Updated by livdywan over 4 years 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.