Bug 1019354 - %config(noreplace) file is replaced.
%config(noreplace) file is replaced.
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-15 10:32 EDT by David Woodhouse
Modified: 2015-02-17 12:41 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-17 12:41:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Woodhouse 2013-10-15 10:32:08 EDT
See bug 1018856 — the Samba package screwed up and existing users lost their working pam_winbind module.

Even after manually installing the new samba-winbind-modules subpackage, it doesn't work because the config file is replaced. The original, working, config file is now renamed to /etc/security/pam_winbind.conf.rpmsave and a pristine version has been installed in its place.


Surely this shouldn't happen? Or is %config(noreplace) not actually what we thought it was, and should the config file have been marked differently?
Comment 1 Panu Matilainen 2013-10-16 04:36:30 EDT
Hmm, let me see if I got this right:

1) /etc/security/pam_winbind.conf lived in "samba-winbind" sub-package
2) the file had been modified
3) the file got split out to "samba-winbind-modules" sub-package in version 4.0.9-2
4) user does 'yum update' which does not pull in the newly split sub-package because nothing depends on it and no such package was previously installed
5) /etc/security/pam_winbind.conf is no longer owned by any installed package so its to be erased, but since its a %config file which has been modified it gets backed up instead
6) /etc/security/pam_winbind.conf no longer exists, and systems depending on it are screwed
7) user tries to recover by manually installing samba-winbind-modules, but this installs factory default config so it doesn't directly help at this point

I see no rpm bug in the above sequence, only a result of a packaging messup.
Comment 2 David Woodhouse 2013-10-16 05:47:11 EDT
Thank you for the assessment. If not a bug, how about a feature request for

Where removing the package and then re-installing the package (or, as in this case, a package which provides the same config file) would *not* move the existing, working, config out of the way?
Comment 3 David Woodhouse 2013-10-16 05:50:04 EDT
Failing that, what would you recommend as the least bad way of handling this screwup, now that it's happened.

For my internal users I have a $COMPANY-user-setup package which was responsible for pulling in and configuring Samba and a bunch of other things anyway, so I just added samba-winbind-modules to its Requires(post) and also the following %post script:

if [ -r /etc/security/pam_winbind.conf.rpmsave ] && \
     ! grep -q '^krb5_auth = yes' /etc/security/pam_winbind.conf; then
    mv -f /etc/security/pam_winbind.conf{.rpmsave,}

{C,Sh}ould we do something similar in the updated samba-winbind-modules package, as part of the update which fixes the dependencies? So that when people just do 'yum update' and get the fix for bug 1018856, it magically (but hackishly) reinstates their config file too?
Comment 4 Panu Matilainen 2013-10-16 06:52:06 EDT
I dont think this kind of packaging mistakes can be prevented by new flags - you dont want ALL config files to be left behind as-is, and which files are truly precious is system (configuration) dependent.

Rpm does need something to better integrate with externally managed (and locked down) configuration (company setups etc such as yours) though. There is/was similar request in bug 573320, also incidentally related to samba configuration.

As for papering over the mistake in samba-winbind-modules, I'm not going to make recommendations one way or the other. Well-intended repair attempts can easily end up being just as harmful as just leaving the thing alone.
Comment 5 Fedora End Of Life 2015-01-09 15:15:55 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2015-02-17 12:41:45 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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