tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Support custom beakerlib libraries location

Open sopos opened this issue 5 years ago • 4 comments

It should be possible to define a beakerlib libraries storage of the same structure as a github.com/beakerlib as part of the prepare step. This will allow to define downstream location for libraries which either cannot be upstreamed or their downstream versions if there's a specific internal reference, for example. Using such configuration should be possible to define a list of locations with a fallback to the upstream (current) one.

  • Currently, there is a need to have an internal version of epel/epel library which would contain a reference to an internal epel9 yum repository until there's an official one.
  • library(rhel-system-roles/basic) is an upstream library but if a test which use the library is executed internally, the library also needs to define internal repositories where the ansible packages can be installed from.

sopos avatar Dec 03 '20 19:12 sopos

The logic is: If I run tests on RHEL, the tests install packages from RHEL when they install some RPMS, not from Fedora, even if the tests are opensource and came from Fedora. The same tests would install packages from Fedora when running on Fedora. That's what one expects. The package names are relative w.r.t. some repository, which is implicit / was prepared for the environment. In the same spirit, it will be often needed to use libraries specified by only their name relative to some (implicit) root. The root will be different depending on whether we are testing on Fedora, on RHEL, on CentOS, on CentOS Stream... One reason is that the library will need to set up some specific repositories to provide additional packages so that the logic of the first paragraph continues to be valid even with non-default repositories, when those repositories are different for different distributions. (EPEL and Ansible fall in this category.) Probably there will be also other reasons when a library will want to do things differently on different systems, not in order to behave differently, but in order to behave in the same way from the user's point of view. Of course, in many cases, one would not need a separate location for the library code, it would be enough to use the same code with differing parameters (such as the location of the repositories). Still, the question would be, where to store those parameters.

pcahyna avatar Dec 08 '20 09:12 pcahyna

This may also help to libraries development as the developer may define a local store for the libraries so the local ones are picked first.

sopos avatar Mar 10 '21 09:03 sopos

Custom fallback location for beakerlib libraries makes sense. The issue was not raised for a long time though. Adding to the backlog with low priority.

psss avatar Sep 29 '25 08:09 psss

Might need to revisit this with the context of #4297. I guess main thing to figure out is how do we define which repo or git forge it is coming from?

LecrisUT avatar Nov 12 '25 10:11 LecrisUT