Bug 835621

Summary: nagios-common has a file conflict with nagios-plugins in rawhide
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: nagios-pluginsAssignee: Jose Pedro Oliveira <jose.p.oliveira.oss>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: affix, bruno, dougsland, jose.p.oliveira.oss, lemenkov, ondrejj, redhat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-27 09:35:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Wolff III 2012-06-26 15:43:26 UTC
Description of problem:
Transaction Check Error:
  file /usr/lib/nagios/plugins from install of nagios-common-3.4.1-1.fc18.i686 conflicts with file from package nagios-plugins-1.4.15-5.fc17.i686

Comment 1 Jose Pedro Oliveira 2012-06-26 16:22:42 UTC
This problem appeared during the upgrade to nagios-3.3.1-1. I'll request commit rights to the nagios-plugins package to fix it (the nagios-plugins package no longer needs to own /usr/lib{,64}/nagios/plugins since nagios 3.3.1-1; it already requires nagios-common that started owning it in 3.3.1-1).

/jpo

Comment 2 Jose Pedro Oliveira 2012-06-26 18:53:48 UTC
I've already updated the nagios-plugins specfile for rawhide (F18).

Unfortunately nagios-plugins now fails to build in F18 [1] with the following error (glibc related):

...
./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
...


* Koji build of nagios-plugins-1.4.15-6.fc18
  http://koji.fedoraproject.org/koji/buildinfo?buildID=327716

  Logs:
  http://kojipkgs.fedoraproject.org/work/tasks/8213/4198213/


/jpo

[1] - The same SRPM builds correctly in Fedora 17

Comment 3 Jose Pedro Oliveira 2012-06-26 19:06:11 UTC
(In reply to comment #2)
> 
> ...
> ./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
> ...
> 

Found the following notes at
http://comments.gmane.org/gmane.comp.gnu.coreutils.general/2525
---------
...
Newer glibcs don't declare gets() any more. The glibc ChangeLog has this:

2012-01-12  Marek Polacek  <polacek <at> redhat.com>

        * libio/bits/stdio2.h: Do not define gets for ISO C11, ISO C++11,
        and _GNU_SOURCE.

2012-01-07  Ulrich Drepper  <drepper <at> gmail.com>

        * libio/stdio.h: Do not declare gets at all for _GNU_SOURCE.

2011-12-23  Ulrich Drepper  <drepper <at> gmail.com>

        [BZ #13528]
        * libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.

The comments in glibc/libio/stdio.h now say:

   The function has been officially removed in ISO C11.  This opportunity
   is used to also remove it from the GNU feature list.  It is now only
   available when explicitly using an old ISO C, Unix, or POSIX standard.
...
---------

Comment 4 Bruno Wolff III 2012-06-26 19:29:47 UTC
Nothing should be using gets these days in any case. It is a security issue to use that function.

Comment 5 Jose Pedro Oliveira 2012-06-26 19:43:14 UTC
(In reply to comment #4)
> Nothing should be using gets these days in any case. It is a security issue
> to use that function.

And nothing is using it.  It appears to be the "#undef gets" in stdio.in.h that is causing the problem.

Comment 6 Jose Pedro Oliveira 2012-06-27 09:28:06 UTC
Built for Fedora 18 (with glibc 2.16)

RPMS:

 * nagios-plugins-1.4.15-7.fc18
   http://koji.fedoraproject.org/koji/buildinfo?buildID=327828


Patch applied:
----------
--- nagios-plugins-1.4.15-orig/gl/stdio.in.h	2010-07-27 21:47:15.000000000 +0100
+++ nagios-plugins-1.4.15/gl/stdio.in.h	2012-06-26 21:12:47.000000000 +0100
@@ -140,8 +140,10 @@
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
+#if defined gets
 #undef gets
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
 
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
----------

Comment 7 Jose Pedro Oliveira 2012-06-27 09:35:58 UTC
Closing (with ticket re-assigned to the nagios-plugins component).

Comment 8 Fedora Update System 2012-07-01 22:37:43 UTC
nagios-plugins-1.4.15-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-7.fc17

Comment 9 Fedora Update System 2012-07-01 22:38:45 UTC
nagios-plugins-1.4.15-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-7.fc16

Comment 10 Fedora Update System 2012-07-01 22:39:40 UTC
nagios-plugins-1.4.15-7.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/nagios-plugins-1.4.15-7.el6

Comment 11 Fedora Update System 2012-07-10 20:55:12 UTC
nagios-plugins-1.4.15-7.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-07-10 20:59:42 UTC
nagios-plugins-1.4.15-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2012-07-19 22:38:05 UTC
nagios-plugins-1.4.15-7.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.