How to define package 'provides'

Tech Support support at
Wed Mar 22 14:32:51 UTC 2017

Thank you very much for your help. I am using rpmbuild version 4.11.3 and am
primarily building on CentOS 7. When built, it installs just fine. Here is
the output of "rpm -qp --provides VBSPerl-1.0-15.x86_64.rpm" command. This
is the package where the Perl modules are located.

rpm -qp --provides VBSPerl-1.0-15.x86_64.rpm 
VBSPerl = 1.0-15
VBSPerl(x86-64) = 1.0-15

This is what I have in my spec file up to the %prep section. 

Name: VBSPerl
Version: 1.0
Release: 15
Summary: Customized Perl 5.18.4 distribution for CentOS 7 x86_64
Source: VBSPerl-1.0.x86_64.tar.gz
License: GPL
Vendor: VoIP Business Solutions, LLC.
Packager: VBS Tech Support <support at>
Group: Application Dependencies
BuildArch: x86_64
BuildRoot: %{_tmppath}/%{name}-buildroot
This is a Perl 5.18.4 distribution with additional CPAN packages installed.
package installs in /opt/VBSPerl with the perl binary located at
Vendor: VoIP Business Solutions, LLC. <support at>

Provides: /opt/VBSPerl/bin/perl, perl(Asterisk::AMI), perl(Carp), perl(DBI),
perl(FindBin), perl(lib), perl(strict)

# Disable the stripping of binary files.
%global __os_install_post %{nil}

# Do not build the debuginfo package.
%define debug_package %{nil}


-----Original Message-----
From: Rpm-list [mailto:rpm-list-bounces at] On Behalf Of Tim
Sent: Tuesday, March 21, 2017 08:36 PM
To: General discussion about the RPM package manager
Subject: RE: How to define package 'provides'

In regard to: RE: How to define package 'provides', Tech Support said

> I guess that what I'm really asking is how do I get the rpm of Perl 
> modules to provide a list of specific CPAN modules? I tried adding  
> the following line to the spec file without success.
>    Provides: /opt/VBSPerl/bin/perl, perl(Asterisk::AMI), perl(Carp), 
> perl(DBI), perl(FindBin), perl(lib), perl(strict)

That should work.  The fact that it's not probably means something else is
going wrong.

What version of rpmbuild are you using when building your custom RPMs, and
on what platform?

You can leave out anything that would be company sensitive or private, but
what does the header for your spec file look like, up to and including the
Provides line you show above?


> From: Rpm-list [mailto:rpm-list-bounces at] On Behalf Of 
> Stuart Gathman
> Sent: Monday, March 20, 2017 10:17 AM
> To: rpm-list at
> Subject: Re: How to define package 'provides'
> On 03/20/2017 10:04 AM, Tech Support wrote:
> All;
>    What I'm trying to do is build two rpms. The first one is a local 
> library of Perl modules, and the second one is a fax application that 
> relies on the Perl modules. The problem that I am having is that I am 
> getting an error when I try to install the second application rpm like so:
> error: Failed dependencies:
>        /opt/VBSPerl/bin/perl is needed by fax-2.3-82.x86_64
>        perl(Asterisk::AMI) is needed by fax-2.3-82.x86_64
> The first rpm contains the path to the Perl interpreter and the 
> Asterisk::AMI Perl module so that's not the problem.  I can get around 
> the error by using the -nodeps option when trying to install the 
> module, but that really doesn't solve the problem. To me, I see two 
> solutions, the first one where I define the Perl module rpm as 
> providing the dependencies, and the second one where the application 
> rpm is built but doesn't check for dependencies. To me, the first 
> option is the better answer. I tried the first option in the Perl library
spec file but, but that didn't fix it.
> Provides: /opt/VBSPerl/bin/perl, perl(Asterisk::AMI), perl(Carp), 
> perl(DBI), perl(FindBin), perl(lib), perl(strict)
> I also tried the following in the application spec file without success.
> AutoReqProv: no
> Autoreq: no
> %define __find_requires %{nil}
> I'm really stumped here, and I know that the answer is probably going 
> to be something obvious. If anyone has any insight at all, I would 
> greatly appreciate it.
> The first step is to see what your rpms are actually requiring and
> providing:
> rpm -qp --provides fax-2.3-82.x86_64.rpm rpm -qp --requires 
> fax-2.3-82.x86_64.rpm
> repeat for your perl module rpm.

Tim Mooney                                             Tim.Mooney at
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building                  701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
Rpm-list mailing list
Rpm-list at

More information about the Rpm-list mailing list