Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??

Hi all, we currently have some servers where there are lots of software that has been custom compiled (perl, apache, mod_perl etc). Each time everything is compiled from source.

I'm experimenting and trying to learn to see if there's a better way to do this in future, but getting stuck on packaging Perl, and maybe I'm trying to do something that doesn't make sense.

Currently we compile Perl into /opt/perl and everything runs fine. I was thinking, maybe I could package this into an RPM (using checkinstall), and then install via rpm -ivh or yum whenever we want to provision a new server in future.

So I'm starting with a new virtualised box in vagrant. Compiling perl, and make install via checkinstall, so it packages it all up. This all looks fine, perl runs, its version 5.14.2 it creates a custom perl rpm.

I try and reproduce the steps (installing a fresh duplicate virtualbox) but instead of compiling perl, install the rpm I've just made.

Here, I get some dependency errors...

rpm -ivh perl-custom-5.14.2-1.x86_64.rpm

error: Failed dependencies: perl(DBD::SQLite) is needed by perl-custom-5.14.2-1.x86_64
perl(DBIx::Simple) is needed by perl-custom-5.14.2-1.x86_64
perl(FCGI) is needed by perl-custom-5.14.2-1.x86_64
perl(Mac::BuildTools) is needed by perl-custom-5.14.2-1.x86_64
perl(Mac::InternetConfig) is needed by perl-custom-5.14.2-1.x86_64
perl(Tk) is needed by perl-custom-5.14.2-1.x86_64
perl(Tk::Pod) is needed by perl-custom-5.14.2-1.x86_64
perl(Your::Module::Here) is needed by perl-custom-5.14.2-1.x86_64

This is confusing me. When I compile and run Perl, it doesn't complain about missing depencies like perl(DBD::SQLite)

However, installing the rpm it does. Where did those dependencies appear from ?

Am I going about this the wrong way anyway, and shouldn't try to create an rpm as it will conflict with other stuff (eg there is another perl 5.10.1 on there, but we currently run alongside it fine) ?

(This is on a Centos 6.5 install inside Vagrant/virtualbox)
Edit: rpm -qpR perl-custom-5.14.2-1.x86_64.rpm shows lots of dependencies including the missing ones, but I'm wondering why they get added in there in the first place

In reply to Create an RPM for custom compiled Perl ? by Gib

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.