Bug 739282

Summary: zif.conf should be marked %config(noreplace)
Product: [Fedora] Fedora Reporter: Kevin Kofler <kevin>
Component: zifAssignee: Richard Hughes <hughsient>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: hughsient, mads, metherid
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-17 11:19:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Kofler 2011-09-17 09:11:33 UTC
Description of problem:
zif.conf is currently marked only %config, which means it gets trashed on each package update. But it contains settings such as keepcache and installonly_limit which really have to be tweakable by the local admin. Please respect user settings.

Version-Release number of selected component (if applicable):
zif-0.2.3-1.fc17

How reproducible:
Always

Steps to Reproduce:
1. Install an old version of zif.
2. Edit zif.conf.
3. Upgrade zif.
  
Actual results:
zif.conf saved as zif.conf.rpmsave.

Expected results:
zif.conf created as zif.conf.rpmnew.

Comment 1 Richard Hughes 2011-09-17 10:38:51 UTC
So just:

@@ -70,7 +70,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libzif*.la
 %{_mandir}/man1/*.1.gz
 %dir %{_sysconfdir}/zif
 %config %{_sysconfdir}/bash_completion.d/*-completion.bash
-%config %{_sysconfdir}/zif/zif.conf
+%config(noreplace) %{_sysconfdir}/zif/zif.conf

?

Comment 2 Rahul Sundaram 2011-09-17 10:40:16 UTC
Yes.  As recommended in the packaging guidelines files in /etc should be always marked that unless there is a incompatible file format change or something of that sort.

Comment 3 Kevin Kofler 2011-09-17 11:04:20 UTC
Yes, that one-line change is all that's needed.

Comment 4 Richard Hughes 2011-09-17 11:19:38 UTC
I've applied this upstream:

commit fd5727307d3f1eaf86e2eb85958f493334cefecb
Author: Richard Hughes <richard>
Date:   Sat Sep 17 12:17:55 2011 +0100

    Mark the config file %config(noreplace) in the spec file example
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=739282

The next upstream release is in about 2 weeks, and I'll sync the upstream .spec file with the Fedora one then. Thanks.