GNOME Bugzilla – Bug 738853
[RFE] Cope with missing configuration/state files and ensure proper separation between /etc,/var,/usr
Last modified: 2020-11-12 14:34:27 UTC
NetworkManager should work correctly in face of pruning /etc or /var. That is for example relevant in the context of factory reset and stateless systems (e.g. systemd). But it is desirable in general. That means: - NM should be happy starting with no files in /etc or /var. If it needs some missing files or directories, it should create them as needed. Even better: not requiring any files in the first place. Missing configuration should be (silently) accepted and compile time defaults apply. One thing that comes in mind is that currently we don't have a compile time default for main.plugins setting (although we enable plugins at compile time). See bug 738611 for a patch. - ensure that we properly split between configuration, state and resources. One issue that comes to mind are files like /etc/NetworkManager/VPN/nm-*-service.name . In fact, these files are not really user configuration, but configuration of the NM installation. It shouldn't be in /etc in the first place. Instead we should install these files to /usr/lib/NetworkManager/VPN/* or similar. To provide backward compatibility however, NM should accept files /etc/NetworkManager/VPN/X to shaddow the corresponding /usr/lib/NetworkManager/VPN/X file. Although these files are not user-configuration, this gives the user a possibility to overwrite the configuration without changing the files in /usr. If the user wants to remove a plugin, removing the files from /etc will no longer work as it does now. That seems non-intuitive, but again, the user isn't really expected to edit these files. The user should instead uninstall the plugin. We should accept an empty file as "file does not exist". Note, that also nm-applet reads these files (search: VPN_NAME_FILES_DIR). Actually, new VPN plugin packages should install the same file under both /etc and /usr/lib. That gives us compatibility towards older nm-applet/NM while still supporting the scenario of clearing /etc (maybe we should add a comment '# this file shaddows /usr/lib/NetworkManager/VPN/X'). The VPN plugin files are just an example. TODO: check, if the same applies in other cases.
merged one part of the work to master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=05db3ee08a30edc503e2b9033993ee3d2cbf019f Now we can install configuration snippets to /usr/lib/NetworkManager/conf.d and leave /etc/NetworkManager/NetworkManager.conf and /etc/NetworkManager/conf.d empty.
bugzilla.gnome.org is being shut down in favor of a GitLab instance. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).