0

I am making a package for RHEL7. When I try to install the package, I get

# yum localinstall mypackage-0.0-1.el7.rpm 
(...)
--> Running transaction check
---> Package webmin-GPI-init.noarch 0:0.0-1.el7 will be installed
--> Processing Dependency: perl(.::guardian-lib.pl) for package: webmin-GPI-init-0.0-1.el7.noarch
--> Processing Dependency: perl(.::hostconfig-lib.pl) for package: webmin-GPI-init-0.0-1.el7.noarch
--> Processing Dependency: perl(.::init-lib.pl) for package: webmin-GPI-init-0.0-1.el7.noarch

I have in mind that willing to get a perl module named .::init-lib.pl is not desirable. I the code, we can find something like

#! /usr/bin/perl
require './init-lib.pl';
require './guardian-lib.pl'; 
require './hostconfig-lib.pl';

I have managed to remove the win32 with the following option in my .spec file :

%{?perl_default_filter}
%global __requires_exclude perl\\(VMS|perl\\(Win32|perl\\(\\.

How can i get rid of the dependencies regarding the perl packages that start by a dot?

I have browsed the Internet and found https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering and other mailing lists I have not understood.

  • Also, I just found stackoverflow.com/questions/7715955/… which enables to disable totally this functionality. This is a bit overkill, but enables the package to be installed. – MUY Belgium Sep 16 '16 at 16:26
  • Do you have a link to the source RPM? In some fooling around I cannot get a test RPM to generate ./foo.pl provides or requires as yours is. – thrig Sep 16 '16 at 18:07
  • I do not think that generating pseudo/void dependencies is the answer, it is a programming trick. I do think that not to generate stupid dependencies is a good answer. – MUY Belgium Sep 17 '16 at 17:14
0

rpmbuild analyses the content of your rpm package to automatically determine what is required for your program to work. If you use certain perl modules; those need to be installed for your program to work.

However, if you don't want rpm to do all that work for you; you can add

AutoReqProv : no

to your spec file. For more information; read this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.