Gib has asked for the wisdom of the Perl Monks concerning the following question:
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
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