Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1572361 - nagios-plugins-perl does not list all functionality provided
Summary: nagios-plugins-perl does not list all functionality provided
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen John Smoogen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1572518 1574886 1640810 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-26 19:45 UTC by Steven Joerger
Modified: 2018-10-18 21:27 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-25 15:20:46 UTC
Type: Bug


Attachments (Terms of Use)

Description Steven Joerger 2018-04-26 19:45:49 UTC
Description of problem:
Package nagios-plugins-perl does not list that it provides perl(utils) which other related packages are looking for. Prior version of nagios-plugins did list perl(utils) as provided.

Version-Release number of selected component (if applicable):
nagios-plugins-perl 2.2.1-9git5c7eb5b9.el7
nagios-plugins-2.1.1-1

How reproducible:
Every time.

Steps to Reproduce:
1. rpm -qp --provides nagios-plugins-2.1.1-1.x86_64.rpm
config(nagios-plugins) = 2.1.1-1
nagios-plugins
nagios-plugins = 2.1.1-1
nagios-plugins(x86-64) = 2.1.1-1
perl(utils)

2. rpm -qp --provides nagios-plugins-perl-2.2.1-9git5c7eb5b9.el7.x86_64.rpm 
nagios-plugins-perl = 2.2.1-9git5c7eb5b9.el7
nagios-plugins-perl(x86-64) = 2.2.1-9git5c7eb5b9.el7


Actual results:
Listed above.

Expected results:
The -perl package lists that it provides the perl(utils) functionality.

Additional info:
Hopefully I'm just doing something horribly wrong

Comment 1 Steven Joerger 2018-04-26 20:06:22 UTC
For additional comparison, from an EL6 host when running a "yum provides "perl(utils)" search:

nagios-plugins-perl-2.2.1-4git.el6.x86_64 : Nagios plugins perl dep.
Repo        : epel
Matched from:
Other       : perl(utils)

Comment 2 Stephen John Smoogen 2018-04-26 20:15:39 UTC
This was done on purpose by the perl maintainers

commit 77fc713491878bb3343b27173aa9c575201636e0
Author: Petr Písař <ppisar@redhat.com>
Date:   Tue Nov 14 17:11:56 2017 +0100

    Do not provide private Perl modules
    
    The nagios-plugins-perl subpackage installs utils.pm into a private
    location that is not available for other Perl code without pointing
    to that location. Therefore the perl(utils) module should not be
    provided on RPM level.
    
    This patch removes the provide.
    
    Depending packages should require nagios-plugins-perl instead as is
    already implemented among nagios-plugins subpackages.

Comment 3 Steven Joerger 2018-04-26 20:22:49 UTC
Yes that makes sense and I've tried rebuilding my package several times with a require for nagios-plugins-perl. However something is still requiring perl(utils) and I cannot figure out where:

rpm -qpR nagios-plugins-custom-1.0.0-201804262018.noarch.rpm 
/bin/bash
/bin/sh
/usr/bin/expect
/usr/bin/perl
bc
nagios-common
nagios-plugins-perl
perl >= 0:5.006
perl(Carp)
perl(Cwd)
perl(Data::Dumper)
perl(Digest::MD5)
perl(English)
perl(Exporter)
perl(File::Basename)
perl(File::Copy)
perl(File::Find)
perl(File::Spec)
perl(File::Temp)
perl(FindBin)
perl(Getopt::Long)
perl(IO::File)
perl(IO::Socket::SSL)
perl(IPC::Open2)
perl(Nagios::Plugin)
perl(Net::Ping)
perl(POSIX)
perl(Socket)
perl(Sys::Hostname)
perl(Time::HiRes)
perl(Time::Local)
perl(XML::Simple)
perl(constant)
perl(filetest)
perl(lib)
perl(strict)
perl(utf8)
perl(utils)
perl(vars)
perl(warnings)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


yum localinstall nagios-plugins-custom-1.0.0-201804262018.noarch.rpm
<snip>
Error: Package: nagios-plugins-custom-1.0.0-201804262018.noarch (/nagios-plugins-custom-1.0.0-201804262018.noarch)
           Requires: perl(utils)

Comment 4 Stephen John Smoogen 2018-04-26 20:30:28 UTC
That looks like the perl dep finder sees that some plugin is requiring perl(utils) inside it. Without seeing the code I have no idea myself what it is. You will need to look through the code to find what is require utils

Comment 5 Stephen John Smoogen 2018-04-27 14:28:17 UTC
*** Bug 1572518 has been marked as a duplicate of this bug. ***

Comment 6 Stephen John Smoogen 2018-04-27 14:33:22 UTC
I am contacting the Fedora perl maintainers to find out what the solution needs to be for both the packages and their children.

Comment 7 Petr Pisar 2018-04-27 15:06:58 UTC
Packages that require perl(utils), that is not provided by anything, should filter out the dependency from RPM metadata using:

%global __requires_exclude %{?__requires_exclude:%__requires_exclude}|}^perl\\(utils\\)

This is how auto-generated dependencies are filtered in Fedora and EPEL-7. Older EPELs use different syntax/methods for filtering. See <https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering> for more details.

Comment 8 Stephen John Smoogen 2018-05-04 13:22:11 UTC
*** Bug 1574886 has been marked as a duplicate of this bug. ***

Comment 9 Stephen John Smoogen 2018-07-25 15:20:46 UTC
Because of the filtering requirements and the above fix from Petr, I am closing this as CANTFIX versus NOTABUG.

Comment 10 carlos 2018-08-02 10:28:07 UTC
How does Peter Pisar fixes that? So, I wont be able to update nagios plugins ever again as nobodoy will no longer "providing" perl(utils)?

Comment 11 almudena.montiel@uam.es 2018-08-02 10:33:37 UTC
The only way I found to be able to update the system (I haven't tried reinstallation) is to manually do:

rpm -Uvh --nodeps $(repoquery --location nagios-plugins-perl)

But of course, this is a poor way to solving it. 
I would expect some definite solution.

Comment 12 Petr Pisar 2018-08-02 10:44:15 UTC
You need fix the package that requires 'perl(utils)'. Unfortunately you did not write what package it is.

Comment 13 carlos 2018-08-02 11:04:57 UTC
Thanks Almudena but when I tried what you say yum missed install many packages. (It just didn't install many of them) My scenario is that I use centreon-poller-centreon-engine and it seems to require that package. 
I have version 2.8.18 but when I try to update my centreon pacakage I cannot.

Centreon official solution es that they do not support EPEL and I have to downgrade their repos (older nagios-plugins 1.4). That worked but I wish to use nagios plugins 2.2.
Petr Pisar. how may I fix package?

Comment 14 Petr Pisar 2018-08-02 11:13:00 UTC
You need to obtain a source package for centreon-poller-centreon-engine, unpack it,  insert the __requires_exclude line from comment #7 into the package's spec file and build the package using rpmbuild tool. That will produce a new binary centreon-poller-centreon-engine pacakge that won't contain the bogus 'perl(utils)' dependency.

Comment 15 carlos 2018-08-06 07:39:44 UTC
Thanks Petr, I'll think about it. Solution sure works, but I don't feel it's sustainable and I haven't found that source code available.

Comment 16 almudena.montiel@uam.es 2018-09-11 10:02:12 UTC
The solution provided in comment #7 does not work for me.
I have the following spec
Summary: Nagios plugins outside nagios-plugins package
Name: nagios-uam-plugins
Version:1.1
[..]

%prep
%setup -q

%build
%global __requires_exclude %{?__requires_exclude:%__requires_exclude}|}^perl\\(utils\\)
%install
rm -rf $RPM_BUILD_ROOT
%ifarch x86_64
BASEDIR=/usr/lib64/nagios/plugins
%else
BASEDIR=/usr/lib/nagios/plugins
%endif
mkdir -p $RPM_BUILD_ROOT/$BASEDIR
install -m 0755 check_* $RPM_BUILD_ROOT/$BASEDIR
ls $RPM_BUILD_ROOT/$BASEDIR/check* | grep -v *pyc> files.txt
sed -i "s:$RPM_BUILD_ROOT/::" files.txt

%clean
rm -rf $RPM_BUILD_ROOT

%files -f files.txt
%defattr(-,root,root,-)
%ifarch x86_64
/usr/lib64/nagios/plugins/*py[co]
%else
/usr/lib/nagios/plugins/*py[co]
%endif
%doc


Then I build:  rpmbuild -v -bb nagios-uam-plugins.spec. This is a excerpt of the output: 
[...]
Processing files: nagios-uam-plugins-1.1-0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/bash /bin/sh /usr/bin/env /usr/bin/perl nagios-plugins perl perl(CGI) perl(Config::General) perl(DBI) perl(File::Basename) perl(Getopt::Long) perl(Getopt::Std) perl(LWP::Simple) perl(LWP::UserAgent) perl(Logger::NagiosConnect) perl(Nagios::Plugin) perl(Nagios::Plugin::Threshold) perl(Net::Domain) perl(Net::SNMP) perl(Pod::Usage) perl(Switch) perl(Sys::Hostname) perl(Time::HiRes) perl(Time::Local) perl(constant) perl(lib) perl(strict) perl(utils) perl(vars) perl(warnings) python
[...]

When I try to install, again: 
Error: Package: nagios-uam-plugins-1.1-0.x86_64 (site)
           Requires: perl(utils)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest


Please, could you help me with this?

Comment 17 almudena.montiel@uam.es 2018-09-11 10:44:09 UTC
I forgot to mention: this is done from EPEL 6

Comment 18 Petr Pisar 2018-09-11 10:53:09 UTC
That's because EPEL 6 has a different rpm and a different way of filtering generated dependencies. See <https://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering> for EPEL 6 syntax.

Comment 19 almudena.montiel@uam.es 2018-09-11 11:10:57 UTC
Thanks a lot Petr.
Solved it by using the tag 
AutoReqProv: no

Comment 20 Stephen John Smoogen 2018-10-18 21:27:32 UTC
*** Bug 1640810 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.