Bug 1153901

Summary: NetworkManager-config-connectivity-fedora replaces its config file even if user changed it
Product: [Fedora] Fedora Reporter: Branko Grubić <bitlord0xff>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: danw, dcbw, jklimes, lrintel, psimerda, thaller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-21 13:49:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
[PATCH] do not override modified configuration files on updates none

Description Branko Grubić 2014-10-17 05:41:29 UTC
Description of problem:
After updating to 'NetworkManager-config-connectivity-fedora-0.9.10.0-7.git20140704.fc21.x86_64' I saw that package replaced my custom config file and saved it as .rpmsave. I think new file should be .rpmnew instead of replacing user edited config?

1 warning: /etc/NetworkManager/conf.d/20-connectivity-fedora.conf saved as /etc/NetworkManager/conf.d/20-connectivity-fedora.conf.rpmsave

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jirka Klimes 2014-10-20 08:37:05 UTC
Created attachment 948461 [details]
[PATCH] do not override modified configuration files on updates

Proposed change for rpm spec file.

Comment 2 Dan Winship 2014-10-20 14:57:40 UTC
I'm no rpm guru, but I believe that is correct

Comment 3 Jirka Klimes 2014-10-21 12:57:09 UTC
Change for upstream RPM spec in jk/rpm-config.

Comment 4 Lubomir Rintel 2014-10-21 13:14:52 UTC
Two small points there:

* User shouldn't touch those files. If they mind the configuration, they shouldn't install the package in the first place.
* We shouldn't put files user is not supposed to touch into /etc. They really belong into /lib (what udev, modprobe, systemd, etc. do these days)

However, now that they're in /etc, noreplace makes sense to me. No problem if we decide to move them away either.

Comment 5 Thomas Haller 2014-10-21 13:19:05 UTC
(In reply to Lubomir Rintel from comment #4)
> Two small points there:
> 
> * User shouldn't touch those files. If they mind the configuration, they
> shouldn't install the package in the first place.

Note, that the files in /etc/NetworkManager/config.d/ take precedence over /etc/NetworkManager/NetworkManager.config . So, the user would have to remove the package if he wants to change the options.

> * We shouldn't put files user is not supposed to touch into /etc. They
> really belong into /lib (what udev, modprobe, systemd, etc. do these days)

Yesterday I opened: https://bugzilla.gnome.org/show_bug.cgi?id=738853

Comment 6 Dan Winship 2014-10-21 13:32:04 UTC
(In reply to Thomas Haller from comment #5)
> Note, that the files in /etc/NetworkManager/config.d/ take precedence over
> /etc/NetworkManager/NetworkManager.config . So, the user would have to
> remove the package if he wants to change the options.

well, he could also add /etc/NetworkManager/config.d/99-no-connectivity or something; the files are loaded in order

Comment 7 Jirka Klimes 2014-10-21 13:49:03 UTC
(In reply to Dan Winship from comment #6)
> (In reply to Thomas Haller from comment #5)
> > Note, that the files in /etc/NetworkManager/config.d/ take precedence over
> > /etc/NetworkManager/NetworkManager.config . So, the user would have to
> > remove the package if he wants to change the options.
> 
> well, he could also add /etc/NetworkManager/config.d/99-no-connectivity or
> something; the files are loaded in order

Yeah, it might be better to use own override config files.

Fedora 21:
http://pkgs.fedoraproject.org/cgit/NetworkManager.git/commit/?h=f21&id=5717faa588c8154fed4ccba33c1c2f47bd50624a

Upstream:
5d66f91 contrib/rpm: do not override configuration files on updates (rh #1153901)

Comment 8 Branko Grubić 2014-10-22 19:00:30 UTC
Thanks for fixing this!

(In reply to Lubomir Rintel from comment #4)
> Two small points there:
> 
> * User shouldn't touch those files. If they mind the configuration, they
> shouldn't install the package in the first place.
Currently I see no other way to do this, if you look at f21 workstation, removing the package isn't possible without breaking things, two other packages currently depend on this.
I was against this feature being enabled by default and without easy way to disable it, but that is discussed on IRC, mailing list, and in https://fedorahosted.org/fesco/ticket/1337