The Cult of Gary

16 Apr

Perl+CPAN vs RPM: Fight!

I’m starting to work on some perl code for my current gig. In the past, I’ve set up my own CPAN mirror and added my code to make installing perl modules a snap.

This time around, I’ve standardized on using puppet for automation. I was really hoping to use RPM’s for software installations, since this is integrated very nicely into puppet. CPAN is another framework to manage and I get a lot less control and integration than I do with RPM’s.

Yesterday, I started building the perl modules I needed as RPM’s using cpan2rpm. It works well enough. I get RPM’s that I can install via yum/puppet.

The code I’m using  requires a newer version of Test::Simple than what comes with CentOS 5. Test::Simple is distributed with perl and is baked right into the perl-5.8.8 RPM. cpan2rpm built the newer Test::Simple. Installing the new RPM failed. There were conflicts with the perl RPM versions of the files. Rpm can deal with this using the –replacefiles flag. Unfortunately, yum doesn’t support this behavior, and based on the googling I’ve done, never will.

At this point, my options are:

  • Rebuild the perl RPM with newer versions of the stock Perl modules that I need. I’ll have to do this every time I need a newer version of a perl module that’s core.
  • Look into this puppet plugin. It looks a little stale.

I’ve started on building a new RPM package, but the perl test cases are failing during the build. I think I’m going to play with the CPAN puppet plugin today.

One Response to “Perl+CPAN vs RPM: Fight!”

  1. 1
    Tim Says:

    Have you tried the perl RPMs from rpmforge? I’ve just installed the perl-Test-Simple rpm without an issue.

Leave a Reply

© 2010 The Cult of Gary | Entries (RSS) and Comments (RSS)

GPSwordpress logo