Project

General

Profile

Actions

action #56525

closed

Create rpm requires from cpanfile

Added by coolo about 5 years ago. Updated over 4 years ago.

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

0%

Estimated time:

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 1 (1 open0 closed)

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

Actions
Actions #1

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
Actions #2

Updated by coolo about 5 years ago

not started, just blocking

Actions #3

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

Actions #4

Updated by livdywan over 4 years ago

  • Target version changed from Current Sprint to Ready
Actions #5

Updated by okurz over 4 years ago

  • Target version changed from Ready to Current Sprint
Actions #6

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.

Actions #7

Updated by tinita over 4 years ago

  • Status changed from Workable to In Progress
  • Assignee set to tinita
Actions #8

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.

Actions #9

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'
Actions #11

Updated by tinita over 4 years ago

  • Status changed from In Progress to Feedback
Actions #13

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:

  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

Actions #14

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

Actions #15

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.

Actions #16

Updated by tinita over 4 years ago

  • Status changed from Feedback to In Progress
Actions #17

Updated by tinita over 4 years ago

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

Actions #19

Updated by tinita over 4 years ago

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

Actions #20

Updated by tinita over 4 years ago

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

Actions #21

Updated by tinita over 4 years ago

  • Status changed from In Progress to Feedback
Actions #22

Updated by tinita over 4 years ago

Created https://github.com/os-autoinst/os-autoinst/pull/1423 - CI: Install possibly new dependencies

Actions #23

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.

Actions

Also available in: Atom PDF