8

After system packages are updated with "yum update", config files which could not be overwritten are not replaced, but we can find *.rpmnew files near by. By design system administrator must merge config files.

In Gentoo Linux there is a etc-update tool, which allow to merge config file changes interactively, like that:

Beginning of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf
[...]
End of differences between /etc/pear.conf and /etc/._cfg0000_pear.conf
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again

I wonder if there is a way to merge configs interactively in RHEL/Fedora/CentOS?

5

This yum plugin adds the "--merge-conf" command line option. With this option, Yum will ask you what to do with config files which have changed on updating a package.

https://apps.fedoraproject.org/packages/yum-plugin-merge-conf

5

The closest thing I've found to Gentoo's etc-update is rpmconf:

# yum install -y rpmconf    
# rpmconf -a
Configuration file `/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar'
-rw-r--r--. 1 root root 620 Oct  2 16:38 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar
-rw-r--r--. 1 root root 620 Dec 15 12:11 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-5.b18.fc21.x86_64/jre/lib/security/US_export_policy.jar.rpmnew
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      M     : merge configuration files
      Z     : background this process to examine the situation
      S     : skip this file
 The default action is to keep your current version.
*** aliases (Y/I/N/O/D/Z/S) [default=N] ? 
Your choice: Y
2

The only way I found so far is vimdiff:

vmdiff window with differing lines highlighted

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.