GNOME Bugzilla – Bug 737687
build: Allow to build without firewalld support
Last modified: 2018-10-19 15:26:18 UTC
Not all distributions ship firewalld (e.g. openSUSE). The firewall zone configuration in nm-connection-editor gives warnings about dbus service not reachable. Add a --without-firewalld option to configure to build without those features. Default, if not specified, is to enable firewalld support, as-is.
Created attachment 287487 [details] [review] build: Allow to build without firewalld support
Actually, lots of people disable firewalld even on distros that do support it, so it would be better if we dealt with this better at runtime.
(In reply to comment #2) > Actually, lots of people disable firewalld even on distros that do support it, > so it would be better if we dealt with this better at runtime. Runtime detection would of course be even nicer, agreed.
Maybe do it similar to polkit authentication? Usually polkit support is compiled in. There is a configuration option [main] polkit-auth=yes|no If you omit the configuration value, the default value is used. The default value is a configure option: ./configure --enable-polkit=yes (set "yes" as default) ./configure --enable-polkit=no (set "no" as default) you can also ./configure --enable-polkit=disabled In this case, some code paths are excluded with #ifs, and trying to enable polkit-auth=yes will have no effect (except a warning in the log file). Compare: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=4cc3c6ab71cc9d89c3345752bd26262d60f636e4 Replace: s/polkit/firewalld/ If you disable firewalld via config option, NM should not try to do anything with the firewalld DBUS interface, but the user still could enable it. If you enable it, but there are failures (because firewalld is not running), NM should log an <error> message (as it does now).
Note that firewalld support has no additional dependencies. It uses plain D-Bus, so not compiling firewalld support at best saves a few bytes or binary size and runtime memory. I don't think it is worth it, because it doesn't reduce the dependency chain of NetworkManager. also, it does seem to me that firewalld is the only notable contender for this job. And NetworkManager would need to use it more for a good expirience. Hopefully, adoption of firewalld is increasing further (said, in 2018 :) ). Similarly, for polkit I removed the option to compile without polkit support, for the same reasons. See https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=41abf9f8e81423eff0ef888d17a5454d0b5750bf I am closing this as WONTFIX. Note, that the expirience of NetworkManager and not running firewalld, should be already good as-is. Please re-open if you disagree and we can discuss it more. Thanks.