Bug 739282 - zif.conf should be marked %config(noreplace)
Summary: zif.conf should be marked %config(noreplace)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: zif
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-17 09:11 UTC by Kevin Kofler
Modified: 2011-09-19 09:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-17 11:19:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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