So, I’ve built an rpm for centos from tar.gz dist using cpanspec
and rpmbuild
tools.
This module contains several embedded modules, the filesystem of dist looks like this:
lib/Module.pm
lib/Module/SubModule1.pm
lib/Module/SubModule1/SubSub1.pm
lib/Module/SubModule1/SubSub2.pm
lib/Module/SubModule2.pm
lib/Module/SubModule2/SubSub1.pm
… etc
When I try to install the rpm I see that part of these modules is required as a dependencies, like: "can’t get a module Module::SubModule2
from any repo" or so. But these modules are part of the current rpm I need to install. Looks like kind of recursion: need to install module from an rpm package but can’t install it because part of this module is in dependency list.
$ rpm -qp Module-1.0.rpm --provides
Shows not all files inside of the rpm.
$ rpd -qp Module-1.0.rpm –requires
Shows some modules that are the part of the rpm itself, which is weird because I expect all these modules should be installed as a whole module package.
MANIFEST contains all files. rpm itself contains all files even these that look like dependencies.
Please help me to figure out how to setup spec file or do another thing to provide a valid rpm package.
Thanks.
2
Answers
A quick workaround would be to add a "provides" line to your spec file.
You may want to read https://docs.fedoraproject.org/en-US/packaging-guidelines/Perl/#_build_dependencies
The dependency on
Module::SubModule2
is automatically created by the dependency generator (in packageperl-generators
). On the other hand, this generator should generate the provides as well.E.g.:
If you have only requires but no provides, then you have a broken Perl dependency generator.