Bug 782742

Summary: Upgrading from pnp 0.4 to 0.6 overwrites Apache config
Product: [Fedora] Fedora EPEL Reporter: Jonathan Gazeley <bugzilla>
Component: pnp4nagiosAssignee: Jan ONDREJ <ondrejj>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: linux, ondrejj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-18 10:57:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jonathan Gazeley 2012-01-18 10:43:14 UTC
Description of problem:

I had installed pnp4nagios 0.4.x from the EPEL repo some time ago, and customised the /etc/httpd/conf.d/pnp4nagios.conf to suit my needs. When pnp4nagios 0.6.16 was pushed out, the pnp4nagios.conf was overwritten and my graphing broke.

Can the pnp4nagios.conf be marked in the specfile as a %config so it would not be overwritten, but the new config created as pnp4nagios.conf.rpmnew

Version-Release number of selected component (if applicable):

pnp4nagios-0.6.16-1.el6

How reproducible:


Steps to Reproduce:
1. Install pnp4nagios-0.4.x
2. Customise pnp4nagios.conf
3. Upgrade to pnp4nagios-0.6.x
  
Actual results:

pnp4nagios.conf gets overwritten with factory default; edited version is lost

Expected results:

pnp4nagios.conf gets created as pnp4nagios.conf.rpmnew; edited version is retained

Additional info:

Comment 1 Jan ONDREJ 2012-01-18 10:57:22 UTC
pnp4nagios configuration of apache in marked as config(noreplace) in rpm spec file, so this is already done:

%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf

But after update of pnp4nagios from version 0.4 to 0.6 you need to fix your URL's, so you need new version, you can't use your old version. May be problem is, that your pnp4nagios.conf has NOT been replaced.

There was no pnp4nagios-0.4 in EPEL-6 repository. If you used pnp4nagios-0.4 on your RedHat/CentOS 6, this package must be from any other repository (or from EPEL-5). Because there was no pnp4nagios in EL-6, I released version 0.6, which is current stable branch. Version 0.4 is not developed long time ago.

Comment 2 Jonathan Gazeley 2012-01-18 11:05:37 UTC
Sorry, my mistake. My version of pnp4nagios-0.4.14 came from a third-party repo.

If %config(noreplace) was already used, I don't know why my old config was overwritten and not moved. I lost my apache auth config and had to restore for backup.

Never mind - thanks for checking this out.