Project

General

Profile

action #56525

Create rpm requires from cpanfile

Added by coolo about 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Organisational
Target version:
Start date:
2019-09-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
medium

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


Related issues

Blocks openQA Project - action #53546: Easier dependencies handling for packages, e.g. reduce duplication of build requirements in spec, documentation, DockerfileNew2019-06-27

History

#1 Updated by okurz almost 2 years ago

  • Blocks action #53546: Easier dependencies handling for packages, e.g. reduce duplication of build requirements in spec, documentation, Dockerfile added

#2 Updated by coolo almost 2 years ago

not started, just blocking

#3 Updated by okurz over 1 year 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

#4 Updated by cdywan over 1 year ago

  • Target version changed from Current Sprint to Ready

#5 Updated by okurz over 1 year ago

  • Target version changed from Ready to Current Sprint

#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 format.

Also cpanfile-dump doesn't support module versions, at least cpanfile-dump --help doesn't show anything regarding that.

#7 Updated by tinita over 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to tinita

#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.
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'

#11 Updated by tinita over 1 year ago

  • Status changed from In Progress to Feedback

#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:

  1. 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
  2. copy-paste into both repos – we obviously don't want that :)
  3. 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.

#16 Updated by tinita over 1 year ago

  • Status changed from Feedback to In Progress

#17 Updated by tinita over 1 year ago

PR for removing dependencies: https://github.com/os-autoinst/os-autoinst/pull/1414 (merged)

#19 Updated by tinita over 1 year ago

PR https://github.com/os-autoinst/os-autoinst/pull/1416 - Dependencies: add tools/update-deps
was merged.

#20 Updated by tinita over 1 year ago

Created https://github.com/os-autoinst/os-autoinst/pull/1420 - Dependencies: Add code to update Dockerfile

#21 Updated by tinita over 1 year ago

  • Status changed from In Progress to Feedback

#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.

Also available in: Atom PDF