0

I am trying to package an application as an RPM using SPEC files and source code for CentOS 6.5. This application has a dependency on Perl(Bio::Perl). I have also packaged a specific version of Perl (5.14) and Bio::Perl that install to /opt/perl/.

When I proceed to install the application's RPM, yum indicates that the Perl(Bio::Perl) dependency is not resolved. It seems that yum is using the system perl (/usr/bin/perl) to try and resolve the dependency, but obviously /usr/bin/perl doesn't have Bio::Perl installed.

I know the perl module is installed:

$ rpm -qf /opt/perl/lib/site_perl/5.14.2/Bio/Perl.pm opt-perl-BioPerl-1.6.901-2.el6.noarch

$ yum list installed | grep opt-perl-BioPerl opt-perl-BioPerl.noarch

How do I make my SPEC file that it should resolve dependencies using /opt/perl/bin/perl

I still want autorequires to work - I just want it to use /opt/per/bin/perl instead of the system perl.

Iyad K
  • 266
  • 1
  • 8
  • 1
    If you want autorequires to still work then you will need to provide your own autorequire script and create your own namespace for your alternate interpreter. – Ignacio Vazquez-Abrams Oct 30 '15 at 20:54
  • Google : rpm spec file prefix=opt ...... https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=rpm+spec+file+prefix%3Dopt .......... → → http://www.rpm.org/max-rpm/s1-rpm-reloc-prefix-tag.html – Knud Larsen Oct 31 '15 at 06:03
  • I have "%global __requires_exclude ^perl" in my spec file to filter perl auto requires. – jira Oct 31 '15 at 08:15
  • @jira I still want autoreq to work as the various software I'm packaging is complex and contains a variety of Perl and Python scripts in addition to binaries. – Iyad K Nov 01 '15 at 11:39
  • @KnudLarsen I don't see how prefix resolves the dependency on perl module issue. – Iyad K Nov 01 '15 at 11:42

0 Answers0