Bug 1153901 - NetworkManager-config-connectivity-fedora replaces its config file even if user changed it
Summary: NetworkManager-config-connectivity-fedora replaces its config file even if us...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-17 05:41 UTC by Branko Grubić
Modified: 2014-10-22 19:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-21 13:49:03 UTC
Type: Bug


Attachments (Terms of Use)
[PATCH] do not override modified configuration files on updates (2.12 KB, patch)
2014-10-20 08:37 UTC, Jirka Klimes
no flags Details | Diff

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


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