tmt
tmt copied to clipboard
Support easy context adjust for RHEL and all its derivatives
https://fmf.readthedocs.io/en/latest/context.html uses fedora
and centos
in its examples for relevancy filtering by distribution. I suppose rhel
is also among the allowed values. This fine-grained filtering is not so useful in practice, because CentOS should be essentially identical to RHEL and tests that can run on one but not on the other should be an exception, not the norm. One should therefore have an easy way to express that a test can run on a given version of RHEL and CentOS, without requiring the test writers to constantly write distro >= centos-8 or distro >= rhel-8
or the like.
I propose to inroduce a el
alias that would match both CentOS and RHEL (and possibly any other RHEL derivative that uses the same numbering scheme, like Scientific Linux). Prior art is Ansible Galaxy, which uses a distro name of EL
to mean RHEL and CentOS and probably others: see https://galaxy.ansible.com/docs/contributing/creating_role.html#role-metadata and note that RHEL and CentOS are even not in the list of supported platforms at https://galaxy.ansible.com/api/v1/platforms/ , but EL is.
Since I mention Ansible, I want to clarify that I am referencing the prior art in the platform field of role metadata for Galaxy and not any prior art among the facts that Ansible collects, because there is nothing suitable. While ansible_os_family
seems superficially similar, the problem with it is that it is set to RedHat
even on Fedora, despite the completely different numbering scheme. I.e. using this field, distro >= RedHat-8
would match not only RHEL, CentOS 8 and above, but also all Fedora versions starting with Fedora Core 8 - definitely not what we want. In other words, the basic requirement for a distribution to be covered by the el
alias is not only that it is sufficiently similar to RHEL, but that in addition the version numbers are compatible.