RSS Feeds


These posts are the creation of Doran L. Barton (AKA Fozziliny Moo). To learn more about Doran, check out his website at

Right Side

This space reserved for future use.

Compensating for cpanspec

Posted: 25 March 2013 at 23:01:23

The 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.

However, 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 BuildRequires: line but cpanspec does not accomplish this.

  • CPAN modules which produce scripts which are installed in /usr/bin are not accounted for. cpanspec should add some lines to the %files section of the spec file for %{_bindir}/*.

  • Somewhat related to the previous issue, if there are man pages which are installed outside of %{_mandir}/man3/, cpanspec is oblivious to them. This often happens when a script is installed in /usr/bin and a man page needs to be installed in /usr/share/man/man1.

  • 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 %{_bindir}/* to %files section" and maintain a database of what packages need these routines run.