It is not clear from your description what exactly is going on (specific error messages would help or an example package spec that reproduces the problem) but it sounds like the RPM dependencies have gone awry, somehow. There are various options depending on what exactly the problem is.
Provide the Missing Package
Indicate that the package provides the missing module in the *.spec
file:
Provides: perl(Module::Name)
...
this could be done in the *.spec
file for the software. This may sometimes require a shim RPM that does nothing more than provide the missing dependency, notably when you have a third-party package you cannot or do not want to modify to fix the dependencies.
Disable Autoreq
A very big hammer is to turn off automatic requirements for the package;
Autoreq: 0
this may in turn require suitable BuildRequires
, Requires
and other statements in the *.spec
file to setup appropriate dependencies for the package (or you could instead handle that in your configuration management as to what packages need to be installed). I have had to set this flag in 4 of the 133 perl-*
module packages I maintain locally, for example in perl-File-ChangeNotify.spec
:
# KLUGE don't pull in IO::KQueue which in turn needs *BSD
Autoreq: 0
BuildRequires: perl(Carp)
...
Requires: perl(Carp)
...
Alter of Filter the Automatic Dependencies Scripts
This is more work as it requires altering or filtering the output of the code that RPM runs to determine the requirements; the RPM documentation appears to be out of date as my centos 7 test system no longer has the find-*
scripts mentioned on that page, so doubtless something has changed with this process, and who knows where or if it is now documented. I instead use one of the above two methods as I haven't had time to chase down what they've changed about the requirements scripts.