Hi,

I am preparing replacement of versioned MODULE_COMPAT_ requires by dependency generators.
More details about the change can be found in mail thread [1].

The dependency generator, which I have prepared for Fedora, does not work for EPEL.

I would like to help maintainers who prefer one version of the spec file for all releases,
if it is possible.


Could be the following file added to the package epel-rpm-macros (or anything like this) for EPEL 9?
$ cat perlcompat.attr
%__perlcompat_requires() %{lua:
    local path = rpm.expand('%1')
    local perl_ver = rpm.expand('%{perl_version}')
    if path:match('.+%.so$') and perl_ver ~= "" then
       print('perl(:MODULE_COMPAT_' .. perl_ver .. ')')
    else
       print('perl-libs')
    end
}
%__perlcompat_path ^(%{perl_vendorarch}|%{perl_vendorlib}|%{perl_privlib}|%{perl_archlib})/.+

But I don't know how to do it for EPEL 7/8, because the above file doesn't work.
It ends with error [2]:
error: Couldn't exec perl-libs: No such file or directory

Do you have any idea if there is any other way how to provide
maintainers this functionality for EPEL 7/8?

Thanks for any advice,
Jitka


[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CGJYXUYNYRAFT5FOMEIJCCYAPXGTL3NY/
[2] https://download.copr.fedorainfracloud.org/results/jplesnik/perl-epel/centos-stream+epel-next-8-x86_64/05078720-perl-Data-Dumper/builder-live.log.gz
-- 
Jitka Plesnikova
Senior Software Engineer
Red Hat