If you upgrade to FC4

Bob Proulx bob at proulx.com
Sun Jul 3 17:49:18 UTC 2005


Kelson Vibber wrote:
> When RPM upgrades a package, if it notices that you (or another  
> program) have customized a config file, it will do one of two  
> things:  Either it will rename your existing file as  
> whatever.conf.rpmsave and create a new default config, or it will  
> leave your config in place and create the new config as  
> whatever.conf.rpmnew.
> 
> I'm not entirely sure how it decides which change to make.  It may be  
> something the person who builds the package can define.

The rules surrounding conffiles are rather complicated.  If the
packager marked the file as a config file then rpm has a default
behavior.  It checks the md5sum of three files, the old file, the new
file and the current file.

 * If the current file is not modified from the old package version
   then the file is replaced with the new version.
 * If the current file is modified from the old package version but
   the new package version matches the old package version then
   the new package version is placed as .rpmnew.
 * If the new package version is different from the old package
   version then the current file is renamed as .rpmsave and the new
   package version is installed.

Additionally a packager can mark the file not to ever replace the
current file with %config(noreplace) to override the default
behavior.

> rpm -U will output a message saying something like "/etc/profile  
> saved as /etc/profile.rpmsave", and in my experience, yum has always  
> output these messages as it installs each package.

Most packages don't handle upgrading configuration files very well.
The person doing the upgrade needs to be told of the file so that they
can manually walk through the configurations and fix up the
configuration as needed.

> So after you do a major upgrade, you should look through /etc for  
> files ending in .rpmsave and .rpmnew, compare them to the current  
> config file, and decide whether to accept the new config, stick with  
> the old one, or pick and choose between them.  Most of the time you  
> can get away with using the choice RPM made -- you don't *need* the  
> new command prompt for bash, or you want to keep your list of font  
> directories -- but sometimes something important has changed, and you  
> need to combine your customizations with the new config.

Agreed.

Bob




More information about the fedora-legacy-list mailing list