Fedora Linux Support Community & Resources Center
Old 26th February 2012, 07:50 PM
action_owl Offline
Registered User
Join Date: Feb 2009
Posts: 47
Question [SOLVED] RPM's handling of config files, not working for me

I am not seeing the handling of config files as described the "Maximum RPM" guide, and I'm hoping an experience packager can lend me some brain cycles.

I have a file scenario as described by http://www.rpm.org/max-rpm/ch-rpm-up...FIG-FILE-MAGIC:

Original file = X, Current file = Y, New file = X

Here we have a file that was changed at some point. However, the new file is identical to the existing file prior to the local modifications.

In this case, RPM takes the viewpoint that since the original file and the new file are identical, the modifications made to the original version must still be valid for the new version. It leaves the existing, modified file in place.
What is happening to me, is that RPM is overwriting the the current configuration file that has been modified, there is not an ".rpmsave" or ".rpmorig" version of the file or any warnings when I update.

The file is that is being overwritten is defined in the %files section of my specfile, I have no warnings when building the rpm and I have tried bumping both the Version and the Release.

Last edited by action_owl; 26th February 2012 at 08:08 PM. Reason: added .rpmorig
Reply With Quote
Old 26th February 2012, 08:04 PM
PabloTwo Offline
"Registered User" T-Shirt Winner
Join Date: Mar 2007
Location: Seville, FL
Posts: 7,562
Re: RPM's handling of config files, not working for me

Here is an example from one of my rpm packages on how to use the %config(noreplace) declaration on the configuration files that you do not want to be "replaced" or overwritten.
%dir %{_sysconfdir}/rmsgw
%config(noreplace) %{_sysconfdir}/%{name}/gateway.conf
%config(noreplace) %{_sysconfdir}/%{name}/channels.xml
%config(noreplace) %{_sysconfdir}/%{name}/banner
%config(noreplace) %{_sysconfdir}/%{name}/hosts
In the example above, any update to this package would install the "new" config files as "filename.rpmnew" if the currently installed config file was modified from it's original state and leave the modified config file untouched.
Reply With Quote
Old 26th February 2012, 08:07 PM
action_owl Offline
Registered User
Join Date: Feb 2009
Posts: 47
Smile Re: RPM's handling of config files, not working for me

Thanks PabloTwo!
That appears to be the piece I was missing!
Reply With Quote

config, files, handling, rpm, working

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI iptables "apply" differes from boot config - iptables config files load order? anocelot Security and Privacy 3 23rd August 2008 06:06 AM
building rpm's from odd files ianmac Using Fedora 2 4th April 2005 06:06 PM

Current GMT-time: 16:19 (Saturday, 23-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat