File network-manager-applet-no-firewalld.patch of Package NetworkManager-applet
From 13e9bee8d32dde4f59e23c054ed9a96ca10cd4b0 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Wed, 1 Oct 2014 00:30:38 +0200
Subject: [PATCH] build: Allow to build without firewalld support
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.
https://bugzilla.gnome.org/show_bug.cgi?id=737687
---
configure.ac | 5 +++++
src/connection-editor/page-general.c | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
Index: network-manager-applet-1.4.4/configure.ac
===================================================================
--- network-manager-applet-1.4.4.orig/configure.ac
+++ network-manager-applet-1.4.4/configure.ac
@@ -108,6 +108,11 @@ fi
AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes")
+AC_ARG_WITH([firewalld],
+ AS_HELP_STRING([--with-firewalld|--without-firewalld], [Enable firewalld integration support]),
+ with_firewalld="$withval",with_firewalld=yes)
+AM_CONDITIONAL(HAVE_FIREWALLD, test x"with_firewalld" = "xyes")
+
dnl ModemManager1 with libmm-glib for WWAN support
AC_ARG_WITH(wwan, AS_HELP_STRING([--with-wwan], [Enable WWAN support (default: yes)]))
if (test "${with_wwan}" == "no"); then
Index: network-manager-applet-1.4.4/src/connection-editor/page-general.c
===================================================================
--- network-manager-applet-1.4.4.orig/src/connection-editor/page-general.c
+++ network-manager-applet-1.4.4/src/connection-editor/page-general.c
@@ -60,6 +60,7 @@ enum {
N_COLUMNS
};
+#if 0
static void populate_firewall_zones_ui (CEPageGeneral *self);
static void
@@ -127,16 +128,18 @@ on_fw_proxy_acquired (GObject *object, G
(GAsyncReadyCallback) get_zones_cb,
self);
}
+#endif
static void
general_private_init (CEPageGeneral *self)
{
CEPageGeneralPrivate *priv = CE_PAGE_GENERAL_GET_PRIVATE (self);
GtkBuilder *builder;
- GtkWidget *vbox;
-
builder = CE_PAGE (self)->builder;
+#if 0
+ GtkWidget *vbox;
+
/*-- Firewall zone --*/
priv->firewall_zone = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
@@ -158,6 +161,7 @@ general_private_init (CEPageGeneral *sel
/* Set mnemonic widget for device Firewall zone label */
priv->firewall_zone_label = GTK_LABEL (gtk_builder_get_object (builder, "firewall_zone_label"));
gtk_label_set_mnemonic_widget (priv->firewall_zone_label, GTK_WIDGET (priv->firewall_zone));
+#endif
/*-- Dependent VPN connection --*/
priv->dependent_vpn_checkbox = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "dependent_vpn_checkbox"));
@@ -180,9 +184,9 @@ dispose (GObject *object)
g_clear_object (&priv->cancellable);
}
g_clear_object (&priv->fw_proxy);
-
+#if 0
g_clear_pointer (&priv->zones, g_strfreev);
-
+#endif
G_OBJECT_CLASS (ce_page_general_parent_class)->dispose (object);
}
@@ -211,6 +215,7 @@ autoconnect_checkbox_toggled (GtkToggleB
ce_page_changed (CE_PAGE (user_data));
}
+#if 0
static void
populate_firewall_zones_ui (CEPageGeneral *self)
{
@@ -248,6 +253,7 @@ populate_firewall_zones_ui (CEPageGenera
stuff_changed (NULL, self);
}
+#endif
static void
populate_ui (CEPageGeneral *self)
@@ -261,9 +267,11 @@ populate_ui (CEPageGeneral *self)
GtkTreeIter iter;
gboolean global_connection = TRUE;
+#if 0
/* Zones are filled when got them from firewalld */
if (priv->got_zones)
populate_firewall_zones_ui (self);
+#endif
/* Secondary UUID (VPN) */
vpn_uuid = nm_setting_connection_get_secondary (setting, 0);
@@ -332,7 +340,9 @@ finish_setup (CEPageGeneral *self, gpoin
populate_ui (self);
+#if 0
g_signal_connect (priv->firewall_zone, "changed", G_CALLBACK (stuff_changed), self);
+#endif
any_dependent_vpn = !!nm_setting_connection_get_num_secondaries (priv->setting);
gtk_toggle_button_set_active (priv->dependent_vpn_checkbox, any_dependent_vpn);