NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
263 stars 134 forks source link

RPM Spec Build of CentOS conflicts with Nagios 4.3.2-5.el7 #155

Closed russellvt closed 7 years ago

russellvt commented 7 years ago

Following a build of NRPE 3.2.0-1 from a default nrpe.spec, installing the RPM fails with a conflict on /etc/nagios with Nagios 4.3.2-5 from the EPEL7 repository.

To reproduce, I simply dropped the tar.gz in to my rpmbuild/SOURCES directory on a build server and untarred it, then ran the "./configure" with no arguments to produce the nrpe.spec. I moved the nrpe.spec to the SPECS folder and did an "rpmbuild -ba" to produce the RPM. The RPM was then uploaded to a repository server.

$ sudo yum install nrpe
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: some.host.net
Resolving Dependencies
--> Running transaction check
---> Package nrpe.x86_64 0:3.1.1-1.el7 will be updated
---> Package nrpe.x86_64 0:3.2.0-1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package    Arch         Version         Repository                        Size
================================================================================
Updating:
 nrpe       x86_64       3.2.0-1         my_reponame_x86_64_extras        54 k

Transaction Summary
================================================================================
Upgrade  1 Package

Total size: 54 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test

Transaction check error:
  file /etc/nagios from install of nrpe-3.2.0-1.x86_64 conflicts with file from package nagios-common-4.3.2-5.el7.x86_64

Error Summary
-------------
hedenface commented 7 years ago

I'll look into it, but I'm curious why you're building NRPE instead of installing from EPEL as well? 3.2.0 should be available.

hedenface commented 7 years ago

I can reproduce it - but there isn't anything to do about it.

If you want to install your RPM alongside of a different repos package - you'll need to download the RPM and install it with the following flags:

rpm --replacefiles -i nrpe.rpm