Compensating for cpanspec
cpanspec utility has been an extremely valuable tool for me over the years, especially over the last few months as I've been working on Software Collections for newer versions of Perl in EL5 and EL6.
cpanspec has some drawbacks. Here's a list of some issues off the top of my head:
CPAN modules which rely on external libraries (e.g. GD, LibXML, GnuPG) are not properly identified. The spec files should have the dependent library identified as a
Requires:line and/or a
cpanspecdoes not accomplish this.
CPAN modules which produce scripts which are installed in
/usr/binare not accounted for.
cpanspecshould add some lines to the
%filessection of the spec file for
Somewhat related to the previous issue, if there are man pages which are installed outside of
cpanspecis oblivious to them. This often happens when a script is installed in
/usr/binand a man page needs to be installed in
There's no way to add the above to the spec file generation from the command line.
I've given some thought about how to best overcome these limitations of
cpanspec and, for now, I've developed a system involving patch files that record the changes made to a specific spec file so that future builds of the same package can be automated using the same relative changes.
Another thought I've had was to develop common routines like "add
%files section" and maintain a database of what packages need these routines run.