Bug 597688

Summary: Pointless /etc/krb5.conf.rpmnew file created
Product: [Fedora] Fedora Reporter: D. Wagner <daw-redhatbugzilla>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 13CC: nalin, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-02 10:53:17 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
full log from "strace -e rename rpm --oldpackage -Uvv krb5-libs-1.7.1-10.*" none

Description D. Wagner 2010-05-30 00:51:41 EDT
Description of problem:

I upgraded from F12 to F13.  After the upgrade, I have a new file /etc/krb5.conf.rpmnew which is an identical duplicate of /etc/krb5.conf.

# ls -l /etc/krb5*
-rw-r--r--. 1 root root 449 Feb 16 14:38 /etc/krb5.conf
-rw-r--r--. 1 root root 449 Feb 16 14:38 /etc/krb5.conf.rpmnew
# sha1sum /etc/krb5*
e4dc65f41d4ba63532599447cc315e5e4bc9c5c1  /etc/krb5.conf
e4dc65f41d4ba63532599447cc315e5e4bc9c5c1  /etc/krb5.conf.rpmnew

There is no need to create a .rpmnew file in this case.  I suspect this is a RPM packaging error, perhaps related to multilib/multiarch support.

Version-Release number of selected component (if applicable):

# rpm -q -f /etc/krb5.conf
Comment 1 Nalin Dahyabhai 2010-06-01 14:24:59 EDT
The only thing RPM should be checking here is the permissions (vaguely -- it uses them to check if the type of the file has changed, for example from a regular file to a symlink or whatnot) and the checksum of the contents of the file when compared to what's already on the disk.

The default F-13 contents are different from those in F-12, so that would explain the presence of a .rpmnew file, but that doesn't explain krb5.conf.

Updating the packages manually with rpm with -vv and asking strace to show rename() calls turns up:
  D: fini      100644  1 (   0,   0)       449 /etc/krb5.conf;4c0547b4 
  rename("/etc/krb5.conf;4c0547b4", "/etc/krb5.conf") = 0
  D: fini      100644  1 (   0,   0)       449 /etc/krb5.conf;4c0547b4 altname
  rename("/etc/krb5.conf;4c0547b4", "/etc/krb5.conf.rpmnew") = 0
  warning: /etc/krb5.conf created as /etc/krb5.conf.rpmnew
  D: fini      100644  1 (   0,   0)       449 /etc/krb5.conf skip
  D: fini      100644  1 (   0,   0)       449 /etc/krb5.conf skip
which suggests that the 64-bit package's krb5.conf actually overwrites the one that's on the system (the files that go in right after are 64-bit, I'll attach the full log), and the i686 package's is treated as a conflict, so it gets created with the .rpmnew extension.
Comment 2 Nalin Dahyabhai 2010-06-01 14:26:41 EDT
Created attachment 418769 [details]
full log from "strace -e rename rpm --oldpackage -Uvv krb5-libs-1.7.1-10.*"
Comment 3 Nalin Dahyabhai 2010-06-01 14:27:31 EDT
Ccing the RPM maintainer.

Panu, can you help me to understand what I'm doing wrong with the packaging here?
Comment 4 Panu Matilainen 2010-06-02 01:11:53 EDT
Looks the same as bug 597689: an unnecessary backup of config files gets created on multilib upgrade when the default contents change. Feel free to close this as a dupe, rpm failing to deal with the multilib case correctly here is hardly a packaging bug.
Comment 5 Nalin Dahyabhai 2010-06-02 10:53:17 EDT
Okay, will do.  Thanks!

*** This bug has been marked as a duplicate of bug 597689 ***