5

I've inherited some servers which have previously always had its software as custom compiled versions (apache, perl, mod_perl etc). I was thinking rather than compile every time, it may be better to put them into RPMs. I'm trying out some new ideas on Vagrant. This is also partly for a learning process.

One of these is a custom Perl version 5.14.2, we have a compile script, which I have run on a fresh Vagrant box and uses 'checkinstall' to create an RPM. It all works fine when compiled, 2 versions of Perl on the same box (custom version goes into /opt/perl).

However, I then have the perl RPM, if I take a fresh box and try and install via yum, I get...

yum -y install /vagrant/perl-5.14.2-1.x86_64.rpm

Examining /vagrant/perl-5.14.2-1.x86_64.rpm: perl-5.14.2-1.x86_64
/vagrant/perl-5.14.2-1.x86_64.rpm: does not update installed package.

Which maybe makes sense, so I thought I would try rpm...

rpm -ivh /vagrant/perl-5.14.2-1.x86_64.rpm 

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

So there's a couple of questions. Is creating an RPM of custom compiled scripts the correct thing to do (assuming it needs to be compiled and not a distributions own version), and would I install this via rpm or via yum ?

Why does the rpm -ivh say there are dependencies, when the orginal compile/checkinstall didn't shout about any and worked fine ?

Edit: Here's an output of rpm -qi

rpm -qi perl

Name        : perl                         Relocations: (not     relocatable)
Version     : 5.10.1                            Vendor: CentOS
Release     : 136.el6_6.1                   Build Date: Wed 12 Nov 2014 09:22:55 UTC
Install Date: Thu 14 May 2015 09:55:13 UTC      Build Host: c6b8.bsys.dev.centos.org
Group       : Development/Languages         Source RPM: perl-5.10.1-136.el6_6.1.src.rpm
Ian
  • 378
  • 2
  • 3
  • 12
  • Maybe in original package those perl modules are included in the package – Romeo Ninov May 14 '15 at 10:28
  • Show the output of `rpm -qi perl` -- just so we can see what version of perl is currently installed. If it's the same version that would explain the `does not update installed package` message – Aditya K May 14 '15 at 10:29
  • Ah, do you mean its looking at at its own repos version of the dependencies needed (rather than the rpm itself). Is there a way to avoid that (either when creating the rpm or after) ? Its a fresh install, so there is nothing I can break. I've added rpm -qi perl to the question. – Ian May 14 '15 at 10:30

0 Answers0