about summary refs log tree commit diff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog9
-rw-r--r--debian/patches/0001-Add-D-Bus-policy-for-group-netdev.patch79
-rw-r--r--debian/patches/0001-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch (renamed from debian/patches/0002-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch)4
-rw-r--r--debian/patches/0002-Force-online-state-with-unmanaged-devices.patch (renamed from debian/patches/0003-Force-online-state-with-unmanaged-devices.patch)114
-rw-r--r--debian/patches/0003-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch (renamed from debian/patches/0004-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch)30
-rw-r--r--debian/patches/0004-Use-symlinks-for-nmtui.patch36
-rw-r--r--debian/patches/0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch69
-rw-r--r--debian/patches/series9
8 files changed, 209 insertions, 141 deletions
diff --git a/debian/changelog b/debian/changelog
index 30e4151a..48b3b4cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,15 @@ network-manager (0.9.10.0-1) UNRELEASED; urgency=medium
     upgrades.
   * Specify the path to the pppd and pppoe binary via the corresponding
     configure switch.
+  * Update patches.
+    - Drop "Add D-Bus policy for group netdev" patch. Usage of D-Bus
+      "at_console" permissions has been removed upstream and access for
+      unprivleged users is now handled entirely with PolicyKit.
+    - Add patch to use symbolic links instead of hard links for
+      /usr/bin/nmtui-*.
+    - Add patch to treat virtual ethernet devices as unmanaged to avoid
+      interfering with VBox and VMware network interfaces.
+    - Refresh remaining patches.
 
  -- Michael Biebl <biebl@debian.org>  Sun, 06 Jul 2014 03:04:21 +0200
 
diff --git a/debian/patches/0001-Add-D-Bus-policy-for-group-netdev.patch b/debian/patches/0001-Add-D-Bus-policy-for-group-netdev.patch
deleted file mode 100644
index 4c55530c..00000000
--- a/debian/patches/0001-Add-D-Bus-policy-for-group-netdev.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From: Michael Biebl <biebl@debian.org>
-Date: Wed, 2 Apr 2014 03:15:53 +0200
-Subject: Add D-Bus policy for group netdev
-
-This is more or less a verbatim copy of the at_console section.
----
- src/org.freedesktop.NetworkManager.conf | 61 +++++++++++++++++++++++++++++++++
- 1 file changed, 61 insertions(+)
-
---- a/src/org.freedesktop.NetworkManager.conf
-+++ b/src/org.freedesktop.NetworkManager.conf
-@@ -87,6 +87,67 @@
-                        send_interface="org.freedesktop.NetworkManager"
-                        send_member="wake"/>
-         </policy>
-+        <policy group="netdev">
-+                <allow send_destination="org.freedesktop.NetworkManager"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.DBus.Introspectable"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.DBus.Properties"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.AccessPoint"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Connection.Active"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Device.Modem"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Device.Wired"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Device.Serial"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Device.Wireless"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.Device"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.DHCP4Config"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.IP4Config"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.VPN.Connection"/>
-+
-+                <allow send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager.AgentManager"/>
-+
-+                <deny send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager"
-+                       send_member="SetLogging"/>
-+
-+                <deny send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager"
-+                       send_member="Sleep"/>
-+
-+                <deny send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager"
-+                       send_member="sleep"/>
-+
-+                <deny send_destination="org.freedesktop.NetworkManager"
-+                       send_interface="org.freedesktop.NetworkManager"
-+                       send_member="wake"/>
-+        </policy>
-         <policy context="default">
-                 <deny own="org.freedesktop.NetworkManager"/>
- 
diff --git a/debian/patches/0002-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch b/debian/patches/0001-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch
index c6fedf14..fd9cf261 100644
--- a/debian/patches/0002-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch
+++ b/debian/patches/0001-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch
@@ -20,14 +20,14 @@ for network.target.
  1 file changed, 2 deletions(-)
 
 diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
-index ddc1627..526a56e 100644
+index 84a9c95..2fb510f 100644
 --- a/data/NetworkManager.service.in
 +++ b/data/NetworkManager.service.in
 @@ -1,7 +1,5 @@
  [Unit]
  Description=Network Manager
 -Wants=network.target
--Before=network.target
+-Before=network.target @DISTRO_NETWORK_SERVICE@
  
  [Service]
  Type=dbus
diff --git a/debian/patches/0003-Force-online-state-with-unmanaged-devices.patch b/debian/patches/0002-Force-online-state-with-unmanaged-devices.patch
index 7fe346bd..461944b7 100644
--- a/debian/patches/0003-Force-online-state-with-unmanaged-devices.patch
+++ b/debian/patches/0002-Force-online-state-with-unmanaged-devices.patch
@@ -8,12 +8,14 @@ online state to CONNECTED.
 
 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
 ---
- src/nm-manager.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 104 insertions(+)
+ src/nm-manager.c | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 121 insertions(+)
 
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 09a1985..9aff2a4 100644
 --- a/src/nm-manager.c
 +++ b/src/nm-manager.c
-@@ -78,6 +78,8 @@
+@@ -74,6 +74,8 @@
  #define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
  #define NM_AUTOIP_DBUS_IFACE   "org.freedesktop.nm_avahi_autoipd"
  
@@ -22,8 +24,8 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
  static gboolean impl_manager_get_devices (NMManager *manager,
                                            GPtrArray **devices,
                                            GError **err);
-@@ -250,6 +252,11 @@
- 	guint fw_monitor_id;
+@@ -209,6 +211,11 @@ typedef struct {
+ 	GFileMonitor *fw_monitor;
  	guint fw_changed_id;
  
 +	/* ifupdown state file monitor */
@@ -33,23 +35,47 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
 +
  	guint timestamp_update_id;
  
- 	GHashTable *nm_bridges;
-@@ -620,6 +627,14 @@
- 				}
- 			}
+ 	gboolean startup;
+@@ -648,6 +655,29 @@ find_best_device_state (NMManager *manager, gboolean *want_connectivity_check)
+ 	return best_state;
+ }
  
-+			if (state == NM_DEVICE_STATE_UNMANAGED) {
-+				const char *iface = nm_device_get_ip_iface (dev);
-+				if (priv->ifstate_force_online) {
-+					new_state = NM_STATE_CONNECTED;
-+					nm_log_dbg (LOGD_CORE, "Unmanaged device found: %s; state CONNECTED forced.", iface);
-+				}
++static NMState
++find_unmanaged_state (NMManager *manager, NMState current_state)
++{
++	NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
++	NMState new_state = current_state;
++	GSList *iter;
++	
++	for (iter = priv->devices; iter; iter = iter->next) {
++		NMDevice *dev = NM_DEVICE (iter->data);
++		NMDeviceState state = nm_device_get_state (dev);
++
++
++		if (state == NM_DEVICE_STATE_UNMANAGED) {
++			const char *iface = nm_device_get_ip_iface (dev);
++			if (priv->ifstate_force_online) {
++				new_state = NM_STATE_CONNECTED_GLOBAL;
++				nm_log_dbg (LOGD_CORE, "Unmanaged device found: %s; state CONNECTED forced.", iface);
 +			}
++		}
++	}
++	return new_state;
++}
 +
- 			if (nm_device_is_activating (dev))
- 				new_state = NM_STATE_CONNECTING;
- 			else if (new_state != NM_STATE_CONNECTING) {
-@@ -3963,6 +3978,65 @@
+ static void
+ nm_manager_update_state (NMManager *manager)
+ {
+@@ -663,6 +693,8 @@ nm_manager_update_state (NMManager *manager)
+ 		new_state = NM_STATE_ASLEEP;
+ 	else
+ 		new_state = find_best_device_state (manager, &want_connectivity_check);
++	if (new_state != NM_STATE_CONNECTED_GLOBAL)
++		new_state = find_unmanaged_state (manager, new_state);
+ 
+ 	if (new_state == NM_STATE_CONNECTING && want_connectivity_check) {
+ 		nm_connectivity_check_async (priv->connectivity,
+@@ -4071,6 +4103,65 @@ impl_manager_check_connectivity (NMManager *manager,
  	nm_auth_chain_add_call (chain, NM_AUTH_PERMISSION_NETWORK_CONTROL, TRUE);
  }
  
@@ -115,35 +141,17 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
  void
  nm_manager_start (NMManager *self)
  {
-@@ -4025,6 +4099,9 @@
- 	/* FIXME: remove when we handle bridges non-destructively */
- 	g_hash_table_unref (priv->nm_bridges);
- 	priv->nm_bridges = NULL;
+@@ -4114,6 +4205,9 @@ nm_manager_start (NMManager *self)
+ 	system_create_virtual_devices (self);
+ 
+ 	check_if_startup_complete (self);
 +
 +	/* Trigger ifupdown state file check */
 +	check_ifstate_file (self);
  }
  
  static gboolean
-@@ -4586,6 +4663,17 @@
- 		g_object_unref (priv->fw_monitor);
- 	}
- 
-+	if (priv->ifstate_monitor) {
-+		if (priv->ifstate_monitor_id)
-+			g_signal_handler_disconnect (priv->ifstate_monitor, priv->ifstate_monitor_id);
-+
-+		if (priv->ifstate_force_online)
-+			g_source_remove (priv->ifstate_force_online);
-+
-+		g_file_monitor_cancel (priv->ifstate_monitor);
-+		g_object_unref (priv->ifstate_monitor);
-+	}
-+
- 	g_slist_free (priv->factories);
- 
- 	if (priv->timestamp_update_id) {
-@@ -4945,6 +5033,22 @@
+@@ -4793,6 +4887,22 @@ nm_manager_init (NMManager *manager)
  		             KERNEL_FIRMWARE_DIR);
  	}
  
@@ -163,6 +171,24 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
 +		             IFUPDOWN_STATE_FILE);
 +	}
 +
- 	load_device_factories (manager);
- 
  	/* Update timestamps in active connections */
+ 	priv->timestamp_update_id = g_timeout_add_seconds (300, (GSourceFunc) periodic_update_active_connection_timestamps, manager);
+ }
+@@ -4984,6 +5094,17 @@ dispose (GObject *object)
+ 		g_clear_object (&priv->fw_monitor);
+ 	}
+ 
++	if (priv->ifstate_monitor) {
++		if (priv->ifstate_monitor_id)
++			g_signal_handler_disconnect (priv->ifstate_monitor, priv->ifstate_monitor_id);
++
++		if (priv->ifstate_force_online)
++			g_source_remove (priv->ifstate_force_online);
++
++		g_file_monitor_cancel (priv->ifstate_monitor);
++		g_object_unref (priv->ifstate_monitor);
++	}
++
+ 	for (iter = priv->factories; iter; iter = iter->next) {
+ 		NMDeviceFactory *factory = iter->data;
+ 
diff --git a/debian/patches/0004-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch b/debian/patches/0003-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch
index 4b19a331..fd566af0 100644
--- a/debian/patches/0004-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch
+++ b/debian/patches/0003-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch
@@ -17,9 +17,11 @@ Closes: #742933
  src/nm-sleep-monitor-systemd.c | 5 +++++
  3 files changed, 9 insertions(+), 1 deletion(-)
 
+diff --git a/configure.ac b/configure.ac
+index 94b0758..a77d55a 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -327,7 +327,8 @@
+@@ -351,7 +351,8 @@ fi
  case $with_suspend_resume in
      upower) ;;
      systemd)
@@ -29,35 +31,39 @@ Closes: #742933
          ;;
      *)
  	AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 2929e18..85f761b 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -304,6 +304,7 @@
- 	$(LIBNL_CFLAGS) \
+@@ -322,6 +322,7 @@ AM_CPPFLAGS += \
+ 	$(LIBSOUP_CFLAGS) \
  	$(POLKIT_CFLAGS) \
  	$(SYSTEMD_LOGIN_CFLAGS) \
 +	$(SYSTEMD_INHIBIT_CFLAGS) \
- 	$(LIBSOUP_CFLAGS) \
- 	$(AM_CPPFLAGS) \
+ 	\
  	-DBINDIR=\"$(bindir)\" \
-@@ -346,6 +347,7 @@
+ 	-DDATADIR=\"$(datadir)\" \
+@@ -364,6 +365,7 @@ libNetworkManager_la_LIBADD = \
  	$(LIBNL_LIBS) \
  	$(POLKIT_LIBS) \
  	$(SYSTEMD_LOGIN_LIBS) \
 +	$(SYSTEMD_INHIBIT_LIBS) \
- 	$(LIBSOUP_LIBS) \
- 	$(LIBM) \
- 	$(LIBDL)
+ 	$(LIBDL) \
+ 	$(LIBM)
+ 
+diff --git a/src/nm-sleep-monitor-systemd.c b/src/nm-sleep-monitor-systemd.c
+index 55134c4..9bbcd4c 100644
 --- a/src/nm-sleep-monitor-systemd.c
 +++ b/src/nm-sleep-monitor-systemd.c
-@@ -25,6 +25,7 @@
- #include <dbus/dbus-glib.h>
+@@ -26,6 +26,7 @@
+ #include <glib/gi18n.h>
  #include <gio/gio.h>
  #include <gio/gunixfdlist.h>
 +#include <systemd/sd-daemon.h>
  
  #include "nm-logging.h"
  #include "nm-dbus-manager.h"
-@@ -304,6 +305,10 @@
+@@ -164,6 +165,10 @@ sleep_setup (NMSleepMonitor *self)
  static void
  nm_sleep_monitor_init (NMSleepMonitor *self)
  {
diff --git a/debian/patches/0004-Use-symlinks-for-nmtui.patch b/debian/patches/0004-Use-symlinks-for-nmtui.patch
new file mode 100644
index 00000000..bdb55fdb
--- /dev/null
+++ b/debian/patches/0004-Use-symlinks-for-nmtui.patch
@@ -0,0 +1,36 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Thu, 10 Jul 2014 03:33:18 +0200
+Subject: Use symlinks for nmtui
+
+Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui.
+---
+ configure.ac    | 2 ++
+ tui/Makefile.am | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a77d55a..3c216a2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -46,6 +46,8 @@ AM_PROG_CC_C_O
+ # C++ only required if --enable-qt=yes
+ AC_PROG_CXX
+ 
++AC_PROG_LN_S
++
+ dnl Initialize libtool
+ LT_PREREQ([2.2])
+ LT_INIT([disable-static])
+diff --git a/tui/Makefile.am b/tui/Makefile.am
+index 755b689..7f4e7d6 100644
+--- a/tui/Makefile.am
++++ b/tui/Makefile.am
+@@ -24,7 +24,7 @@ links = nmtui-edit nmtui-connect nmtui-hostname
+ 
+ install-exec-hook:
+ 	for link in $(links); do \
+-		ln -f $(DESTDIR)$(bindir)/nmtui $(DESTDIR)$(bindir)/$$link; \
++		cd $(DESTDIR)$(bindir) && $(LN_S) -f nmtui $$link; \
+ 	done
+ 
+ uninstall-hook:
diff --git a/debian/patches/0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch b/debian/patches/0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch
new file mode 100644
index 00000000..8cc4c813
--- /dev/null
+++ b/debian/patches/0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch
@@ -0,0 +1,69 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Thu, 10 Jul 2014 03:38:42 +0200
+Subject: Mark virtual ethernet interfaces as unmanaged
+
+We do not want to interfere with VBox and VMware network interfaces, so ignore
+any virtual ethernet interfaces and mark them as unmanaged.
+---
+ src/devices/nm-device-ethernet.c | 41 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
+index f4a90c7..bed6b33 100644
+--- a/src/devices/nm-device-ethernet.c
++++ b/src/devices/nm-device-ethernet.c
+@@ -265,6 +265,45 @@ out:
+ 	g_object_unref (client);
+ }
+ 
++static void
++nm_device_check_virtual (NMDeviceEthernet *self)
++{
++	GUdevDevice *dev = NULL;
++	GUdevClient *client = NULL;
++	const char *iface = NULL;
++	const char *subsystems[] = { "net", NULL };
++	const char *sysfs_path;
++	const char *virtual = "/sys/devices/virtual/net";
++
++	iface = nm_device_get_iface (NM_DEVICE (self));
++
++	client = g_udev_client_new (subsystems);
++	if (!client) {
++		nm_log_warn (LOGD_DEVICE | LOGD_HW, "(%s): failed to initialize GUdev client", iface);
++		goto out;
++	}
++
++	dev = g_udev_client_query_by_subsystem_and_name (client, "net", iface);
++	if (!dev) {
++		nm_log_warn (LOGD_DEVICE | LOGD_HW, "(%s): failed to find device with udev", iface);
++		goto out;
++	}
++
++	sysfs_path = g_udev_device_get_sysfs_path (dev);
++
++	if (g_ascii_strncasecmp (sysfs_path, virtual, strlen (virtual)) == 0) {
++		nm_log_info (LOGD_DEVICE | LOGD_HW, "(%s): device is virtual, marking as unmanaged", iface);
++		nm_device_set_initial_unmanaged_flag (NM_DEVICE (self), NM_UNMANAGED_DEFAULT, TRUE);
++	}
++
++out:
++	if (client)
++		g_object_unref (client);
++	if (dev)
++		g_object_unref (dev);
++}
++
++
+ static GObject*
+ constructor (GType type,
+              guint n_construct_params,
+@@ -290,6 +329,8 @@ constructor (GType type,
+ 
+ 		/* s390 stuff */
+ 		_update_s390_subchannels (NM_DEVICE_ETHERNET (self));
++
++		nm_device_check_virtual (NM_DEVICE_ETHERNET (self));
+ 	}
+ 
+ 	return object;
diff --git a/debian/patches/series b/debian/patches/series
index 43a216a5..196ff3f7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
-0001-Add-D-Bus-policy-for-group-netdev.patch
-0002-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch
-0003-Force-online-state-with-unmanaged-devices.patch
-0004-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch
+0001-Debian-specific-tweaks-for-NetworkManager-systemd-se.patch
+0002-Force-online-state-with-unmanaged-devices.patch
+0003-Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch
+0004-Use-symlinks-for-nmtui.patch
+0005-Mark-virtual-ethernet-interfaces-as-unmanaged.patch