From 0ef63b77db31f41895c4335e4c54d6684d7aa1ac Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Thu, 9 Feb 2006 20:16:17 +0000 Subject: - removed debian/network-manager.dbus-conf debian/nm-applet.conf git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@575 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/dbus_access_network_manager.patch | 11 +++++++++++ debian/patches/dbus_access_nm_applet.patch | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 debian/patches/dbus_access_network_manager.patch create mode 100644 debian/patches/dbus_access_nm_applet.patch (limited to 'debian/patches') diff --git a/debian/patches/dbus_access_network_manager.patch b/debian/patches/dbus_access_network_manager.patch new file mode 100644 index 00000000..06886be3 --- /dev/null +++ b/debian/patches/dbus_access_network_manager.patch @@ -0,0 +1,11 @@ +--- src/NetworkManager.conf.orig 2006-02-07 04:24:38.000000000 +0100 ++++ src/NetworkManager.conf 2006-02-07 04:25:00.000000000 +0100 +@@ -8,7 +8,7 @@ + + + +- ++ + + + diff --git a/debian/patches/dbus_access_nm_applet.patch b/debian/patches/dbus_access_nm_applet.patch new file mode 100644 index 00000000..94053ea2 --- /dev/null +++ b/debian/patches/dbus_access_nm_applet.patch @@ -0,0 +1,11 @@ +--- gnome/applet/nm-applet.conf.orig 2006-02-07 04:22:39.000000000 +0100 ++++ gnome/applet/nm-applet.conf 2006-02-07 04:23:00.000000000 +0100 +@@ -8,7 +8,7 @@ + + + +- ++ + + + -- cgit 1.3.0-6-gf8a5 From 71890c14a8bacfaf817264e5f7845354014a7351 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Sat, 4 Mar 2006 20:20:20 +0000 Subject: removed useless patches git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@712 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/01-STOLEN_FROM_HEAD-dbus_60.patch | 11 -------- debian/patches/01_NMDevice.c.patch | 23 ----------------- debian/patches/02_nm-netlink-monitor.patch | 11 -------- debian/patches/if_fix.patch | 33 ++++++++++++++++++++++++ debian/patches/timeout.patch | 11 ++++++++ 5 files changed, 44 insertions(+), 45 deletions(-) delete mode 100644 debian/patches/01-STOLEN_FROM_HEAD-dbus_60.patch delete mode 100644 debian/patches/01_NMDevice.c.patch delete mode 100644 debian/patches/02_nm-netlink-monitor.patch create mode 100644 debian/patches/if_fix.patch create mode 100644 debian/patches/timeout.patch (limited to 'debian/patches') diff --git a/debian/patches/01-STOLEN_FROM_HEAD-dbus_60.patch b/debian/patches/01-STOLEN_FROM_HEAD-dbus_60.patch deleted file mode 100644 index 9b6b3aad..00000000 --- a/debian/patches/01-STOLEN_FROM_HEAD-dbus_60.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome/applet/applet-dbus.c.old 2005-12-21 14:19:38.000000000 +0100 -+++ gnome/applet/applet-dbus.c 2005-12-21 14:20:12.000000000 +0100 -@@ -388,7 +388,7 @@ - } - - dbus_error_init (&error); -- acquisition = dbus_bus_request_name (connection, NMI_DBUS_SERVICE, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, &error); -+ acquisition = dbus_bus_request_name (connection, NMI_DBUS_SERVICE, DBUS_NAME_FLAG_REPLACE_EXISTING, &error); - if (dbus_error_is_set (&error)) - { - nm_warning ("nmwa_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'", error.message); diff --git a/debian/patches/01_NMDevice.c.patch b/debian/patches/01_NMDevice.c.patch deleted file mode 100644 index a776d3ec..00000000 --- a/debian/patches/01_NMDevice.c.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- NetworkManagerDevice.c 2005-10-19 16:19:53.000000000 +0200 -+++ src/NetworkManagerDevice.c 2006-01-11 12:14:53.000000000 +0100 -@@ -4283,7 +4283,7 @@ - - strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name)-1); - edata.cmd = ETHTOOL_GLINK; -- ifr.ifr_data = (char *) &edata; -+ ifr.ifr_data = (void __user *) &edata; - #ifdef IOCTL_DEBUG - nm_info ("%s: About to ETHTOOL\n", nm_device_get_iface (dev)); - #endif -@@ -4305,8 +4305,9 @@ - /**************************************/ - /* MII capability detection */ - /**************************************/ --#include -- -+#define _LINUX_IF_H -+ #include -+#undef _LINUX_IF_ - static int mdio_read (NMDevice *dev, NMSock *sk, struct ifreq *ifr, int location) - { - struct mii_ioctl_data *mii; diff --git a/debian/patches/02_nm-netlink-monitor.patch b/debian/patches/02_nm-netlink-monitor.patch deleted file mode 100644 index 4389059d..00000000 --- a/debian/patches/02_nm-netlink-monitor.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nm-netlink-monitor.c 2005-08-12 21:06:09.000000000 +0200 -+++ src/nm-netlink-monitor.c 2006-01-11 12:18:52.000000000 +0100 -@@ -30,7 +30,7 @@ - #include - #include - #include --#include -+#include - #include - #include - diff --git a/debian/patches/if_fix.patch b/debian/patches/if_fix.patch new file mode 100644 index 00000000..379e9b38 --- /dev/null +++ b/debian/patches/if_fix.patch @@ -0,0 +1,33 @@ +Index: src/nm-device-802-3-ethernet.c +=================================================================== +RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v +retrieving revision 1.3 +diff -u -r1.3 nm-device-802-3-ethernet.c +--- src/nm-device-802-3-ethernet.c 3 Jan 2006 17:47:38 -0000 1.3 ++++ src/nm-device-802-3-ethernet.c 4 Jan 2006 17:13:33 -0000 +@@ -328,7 +328,9 @@ + /**************************************/ + /* MII capability detection */ + /**************************************/ ++#define _LINUX_IF_H + #include ++#undef _LINUX_IF_H + + static int + mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) +Index: src/nm-netlink-monitor.c +=================================================================== +RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v +retrieving revision 1.17 +diff -u -r1.17 nm-netlink-monitor.c +--- src/nm-netlink-monitor.c 12 Aug 2005 19:06:09 -0000 1.17 ++++ src/nm-netlink-monitor.c 4 Jan 2006 17:13:33 -0000 +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + diff --git a/debian/patches/timeout.patch b/debian/patches/timeout.patch new file mode 100644 index 00000000..0723c83a --- /dev/null +++ b/debian/patches/timeout.patch @@ -0,0 +1,11 @@ +--- src/nm-device-802-11-wireless.c.orig 2006-02-13 11:46:50.000000000 +0100 ++++ src/nm-device-802-11-wireless.c 2006-02-13 11:47:08.000000000 +0100 +@@ -2205,7 +2205,7 @@ + } + + +-#define NM_SUPPLICANT_TIMEOUT 20 /* how long we wait for wpa_supplicant to associate (in seconds) */ ++#define NM_SUPPLICANT_TIMEOUT 60 /* how long we wait for wpa_supplicant to associate (in seconds) */ + + static unsigned int + get_supplicant_timeout (NMDevice80211Wireless *self) -- cgit 1.3.0-6-gf8a5 From e0225a101acf158a95bc2ac9a41ed73a896ee23f Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Mon, 6 Mar 2006 11:27:34 +0000 Subject: added NMDebian.patch which add the support for resolvconf git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@736 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/NetworkManagerDebian.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 debian/patches/NetworkManagerDebian.patch (limited to 'debian/patches') diff --git a/debian/patches/NetworkManagerDebian.patch b/debian/patches/NetworkManagerDebian.patch new file mode 100644 index 00000000..8e55c8fa --- /dev/null +++ b/debian/patches/NetworkManagerDebian.patch @@ -0,0 +1,20 @@ +--- src/backends/NetworkManagerDebian.c 2006-02-28 22:24:22.000000000 +0100 ++++ ../NetworkManager-0.6.0.patched/src/backends/NetworkManagerDebian.c 2006-03-06 12:19:34.000000000 +0100 +@@ -37,6 +37,7 @@ + #include "nm-utils.h" + + #define ARPING "/usr/sbin/arping" ++#define RESOLVCONF "resolvconf" + + /* + * nm_system_init +@@ -679,5 +680,8 @@ + */ + gboolean nm_system_should_modify_resolv_conf (void) + { +- return TRUE; ++ if (g_find_program_in_path(RESOLVCONF) != NULL) ++ return FALSE; ++ else ++ return TRUE; + } -- cgit 1.3.0-6-gf8a5 From 23ad753bcd5c3f1d7206be0d55816b6a7f76cf60 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 27 Mar 2006 20:29:12 +0000 Subject: New upstream release. Updated if_fix.patch and removed unnecessary lines. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@764 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/if_fix.patch | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/if_fix.patch b/debian/patches/if_fix.patch index 379e9b38..b5667c53 100644 --- a/debian/patches/if_fix.patch +++ b/debian/patches/if_fix.patch @@ -15,19 +15,3 @@ diff -u -r1.3 nm-device-802-3-ethernet.c static int mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) -Index: src/nm-netlink-monitor.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v -retrieving revision 1.17 -diff -u -r1.17 nm-netlink-monitor.c ---- src/nm-netlink-monitor.c 12 Aug 2005 19:06:09 -0000 1.17 -+++ src/nm-netlink-monitor.c 4 Jan 2006 17:13:33 -0000 -@@ -30,7 +30,7 @@ - #include - #include - #include --#include -+#include - #include - #include - -- cgit 1.3.0-6-gf8a5 From 15792ef7e8756e253133524a47e255c65cd6e768 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 1 Apr 2006 13:31:41 +0000 Subject: Apply an ordering for the packages and choose better names where applicable. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@775 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/01-supplicant_timeout.patch | 11 +++++++++++ debian/patches/02-dbus_access_network_manager.patch | 11 +++++++++++ debian/patches/03-dbus_access_nm_applet.patch | 11 +++++++++++ debian/patches/04-if_fix.patch | 17 +++++++++++++++++ debian/patches/05-resolvconf.patch | 20 ++++++++++++++++++++ debian/patches/NetworkManagerDebian.patch | 20 -------------------- debian/patches/dbus_access_network_manager.patch | 11 ----------- debian/patches/dbus_access_nm_applet.patch | 11 ----------- debian/patches/if_fix.patch | 17 ----------------- debian/patches/timeout.patch | 11 ----------- 10 files changed, 70 insertions(+), 70 deletions(-) create mode 100644 debian/patches/01-supplicant_timeout.patch create mode 100644 debian/patches/02-dbus_access_network_manager.patch create mode 100644 debian/patches/03-dbus_access_nm_applet.patch create mode 100644 debian/patches/04-if_fix.patch create mode 100644 debian/patches/05-resolvconf.patch delete mode 100644 debian/patches/NetworkManagerDebian.patch delete mode 100644 debian/patches/dbus_access_network_manager.patch delete mode 100644 debian/patches/dbus_access_nm_applet.patch delete mode 100644 debian/patches/if_fix.patch delete mode 100644 debian/patches/timeout.patch (limited to 'debian/patches') diff --git a/debian/patches/01-supplicant_timeout.patch b/debian/patches/01-supplicant_timeout.patch new file mode 100644 index 00000000..0723c83a --- /dev/null +++ b/debian/patches/01-supplicant_timeout.patch @@ -0,0 +1,11 @@ +--- src/nm-device-802-11-wireless.c.orig 2006-02-13 11:46:50.000000000 +0100 ++++ src/nm-device-802-11-wireless.c 2006-02-13 11:47:08.000000000 +0100 +@@ -2205,7 +2205,7 @@ + } + + +-#define NM_SUPPLICANT_TIMEOUT 20 /* how long we wait for wpa_supplicant to associate (in seconds) */ ++#define NM_SUPPLICANT_TIMEOUT 60 /* how long we wait for wpa_supplicant to associate (in seconds) */ + + static unsigned int + get_supplicant_timeout (NMDevice80211Wireless *self) diff --git a/debian/patches/02-dbus_access_network_manager.patch b/debian/patches/02-dbus_access_network_manager.patch new file mode 100644 index 00000000..06886be3 --- /dev/null +++ b/debian/patches/02-dbus_access_network_manager.patch @@ -0,0 +1,11 @@ +--- src/NetworkManager.conf.orig 2006-02-07 04:24:38.000000000 +0100 ++++ src/NetworkManager.conf 2006-02-07 04:25:00.000000000 +0100 +@@ -8,7 +8,7 @@ + + + +- ++ + + + diff --git a/debian/patches/03-dbus_access_nm_applet.patch b/debian/patches/03-dbus_access_nm_applet.patch new file mode 100644 index 00000000..94053ea2 --- /dev/null +++ b/debian/patches/03-dbus_access_nm_applet.patch @@ -0,0 +1,11 @@ +--- gnome/applet/nm-applet.conf.orig 2006-02-07 04:22:39.000000000 +0100 ++++ gnome/applet/nm-applet.conf 2006-02-07 04:23:00.000000000 +0100 +@@ -8,7 +8,7 @@ + + + +- ++ + + + diff --git a/debian/patches/04-if_fix.patch b/debian/patches/04-if_fix.patch new file mode 100644 index 00000000..b5667c53 --- /dev/null +++ b/debian/patches/04-if_fix.patch @@ -0,0 +1,17 @@ +Index: src/nm-device-802-3-ethernet.c +=================================================================== +RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v +retrieving revision 1.3 +diff -u -r1.3 nm-device-802-3-ethernet.c +--- src/nm-device-802-3-ethernet.c 3 Jan 2006 17:47:38 -0000 1.3 ++++ src/nm-device-802-3-ethernet.c 4 Jan 2006 17:13:33 -0000 +@@ -328,7 +328,9 @@ + /**************************************/ + /* MII capability detection */ + /**************************************/ ++#define _LINUX_IF_H + #include ++#undef _LINUX_IF_H + + static int + mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) diff --git a/debian/patches/05-resolvconf.patch b/debian/patches/05-resolvconf.patch new file mode 100644 index 00000000..8e55c8fa --- /dev/null +++ b/debian/patches/05-resolvconf.patch @@ -0,0 +1,20 @@ +--- src/backends/NetworkManagerDebian.c 2006-02-28 22:24:22.000000000 +0100 ++++ ../NetworkManager-0.6.0.patched/src/backends/NetworkManagerDebian.c 2006-03-06 12:19:34.000000000 +0100 +@@ -37,6 +37,7 @@ + #include "nm-utils.h" + + #define ARPING "/usr/sbin/arping" ++#define RESOLVCONF "resolvconf" + + /* + * nm_system_init +@@ -679,5 +680,8 @@ + */ + gboolean nm_system_should_modify_resolv_conf (void) + { +- return TRUE; ++ if (g_find_program_in_path(RESOLVCONF) != NULL) ++ return FALSE; ++ else ++ return TRUE; + } diff --git a/debian/patches/NetworkManagerDebian.patch b/debian/patches/NetworkManagerDebian.patch deleted file mode 100644 index 8e55c8fa..00000000 --- a/debian/patches/NetworkManagerDebian.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/backends/NetworkManagerDebian.c 2006-02-28 22:24:22.000000000 +0100 -+++ ../NetworkManager-0.6.0.patched/src/backends/NetworkManagerDebian.c 2006-03-06 12:19:34.000000000 +0100 -@@ -37,6 +37,7 @@ - #include "nm-utils.h" - - #define ARPING "/usr/sbin/arping" -+#define RESOLVCONF "resolvconf" - - /* - * nm_system_init -@@ -679,5 +680,8 @@ - */ - gboolean nm_system_should_modify_resolv_conf (void) - { -- return TRUE; -+ if (g_find_program_in_path(RESOLVCONF) != NULL) -+ return FALSE; -+ else -+ return TRUE; - } diff --git a/debian/patches/dbus_access_network_manager.patch b/debian/patches/dbus_access_network_manager.patch deleted file mode 100644 index 06886be3..00000000 --- a/debian/patches/dbus_access_network_manager.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/NetworkManager.conf.orig 2006-02-07 04:24:38.000000000 +0100 -+++ src/NetworkManager.conf 2006-02-07 04:25:00.000000000 +0100 -@@ -8,7 +8,7 @@ - - - -- -+ - - - diff --git a/debian/patches/dbus_access_nm_applet.patch b/debian/patches/dbus_access_nm_applet.patch deleted file mode 100644 index 94053ea2..00000000 --- a/debian/patches/dbus_access_nm_applet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome/applet/nm-applet.conf.orig 2006-02-07 04:22:39.000000000 +0100 -+++ gnome/applet/nm-applet.conf 2006-02-07 04:23:00.000000000 +0100 -@@ -8,7 +8,7 @@ - - - -- -+ - - - diff --git a/debian/patches/if_fix.patch b/debian/patches/if_fix.patch deleted file mode 100644 index b5667c53..00000000 --- a/debian/patches/if_fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: src/nm-device-802-3-ethernet.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v -retrieving revision 1.3 -diff -u -r1.3 nm-device-802-3-ethernet.c ---- src/nm-device-802-3-ethernet.c 3 Jan 2006 17:47:38 -0000 1.3 -+++ src/nm-device-802-3-ethernet.c 4 Jan 2006 17:13:33 -0000 -@@ -328,7 +328,9 @@ - /**************************************/ - /* MII capability detection */ - /**************************************/ -+#define _LINUX_IF_H - #include -+#undef _LINUX_IF_H - - static int - mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location) diff --git a/debian/patches/timeout.patch b/debian/patches/timeout.patch deleted file mode 100644 index 0723c83a..00000000 --- a/debian/patches/timeout.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/nm-device-802-11-wireless.c.orig 2006-02-13 11:46:50.000000000 +0100 -+++ src/nm-device-802-11-wireless.c 2006-02-13 11:47:08.000000000 +0100 -@@ -2205,7 +2205,7 @@ - } - - --#define NM_SUPPLICANT_TIMEOUT 20 /* how long we wait for wpa_supplicant to associate (in seconds) */ -+#define NM_SUPPLICANT_TIMEOUT 60 /* how long we wait for wpa_supplicant to associate (in seconds) */ - - static unsigned int - get_supplicant_timeout (NMDevice80211Wireless *self) -- cgit 1.3.0-6-gf8a5 From f7e18eab4786f1e1be4b25c7231074d66d3e430a Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 5 Apr 2006 17:29:39 +0000 Subject: Integration work. Scripts in /etc/network/if-*.d/ are now called properly by NetworkManagerDispatcher. Thanks to the Ubuntu guys for this works. It's mostly copied from their package. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@790 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/06-dispatch_more_events.patch | 104 +++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 debian/patches/06-dispatch_more_events.patch (limited to 'debian/patches') diff --git a/debian/patches/06-dispatch_more_events.patch b/debian/patches/06-dispatch_more_events.patch new file mode 100644 index 00000000..e8b30810 --- /dev/null +++ b/debian/patches/06-dispatch_more_events.patch @@ -0,0 +1,104 @@ +diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c network-manager-0.6.2/dispatcher-daemon/NetworkManagerDispatcher.c +--- network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c 2006-03-13 16:51:57.000000000 +0000 ++++ network-manager-0.6.2/dispatcher-daemon/NetworkManagerDispatcher.c 2006-04-03 18:14:06.000000000 +0100 +@@ -44,6 +44,8 @@ enum NMDAction + NMD_DEVICE_DONT_KNOW, + NMD_DEVICE_NOW_INACTIVE, + NMD_DEVICE_NOW_ACTIVE, ++ NMD_DEVICE_GOING_INACTIVE, ++ NMD_DEVICE_GOING_ACTIVE, + }; + typedef enum NMDAction NMDAction; + +@@ -95,6 +97,10 @@ static void nmd_execute_scripts (NMDActi + if (action == NMD_DEVICE_NOW_ACTIVE) + char_act = "up"; + else if (action == NMD_DEVICE_NOW_INACTIVE) ++ char_act = "post-down"; ++ else if (action == NMD_DEVICE_GOING_ACTIVE) ++ char_act = "pre-up"; ++ else if (action == NMD_DEVICE_GOING_INACTIVE) + char_act = "down"; + else + return; +@@ -217,9 +223,13 @@ static DBusHandlerResult nmd_dbus_filter + } + + if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")) +- action = NMD_DEVICE_NOW_INACTIVE; ++ action = NMD_DEVICE_GOING_INACTIVE; + else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")) + action = NMD_DEVICE_NOW_ACTIVE; ++ else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating")) ++ action = NMD_DEVICE_GOING_ACTIVE; ++ else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceDeactivated")) ++ action = NMD_DEVICE_NOW_INACTIVE; + + if (action != NMD_DEVICE_DONT_KNOW) + { +@@ -234,8 +244,10 @@ static DBusHandlerResult nmd_dbus_filter + if (dev_object_path && dev_iface_name) + { + nm_info ("Device %s (%s) is now %s.", dev_object_path, dev_iface_name, +- (action == NMD_DEVICE_NOW_INACTIVE ? "down" : +- (action == NMD_DEVICE_NOW_ACTIVE ? "up" : "error"))); ++ (action == NMD_DEVICE_NOW_INACTIVE ? "going down" : ++ (action == NMD_DEVICE_NOW_ACTIVE ? "up" : ++ (action == NMD_DEVICE_GOING_INACTIVE ? "going down" : ++ (action == NMD_DEVICE_GOING_ACTIVE ? "going up" : "error"))))); + + nmd_execute_scripts (action, dev_iface_name); + } +diff -ruNp network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in network-manager-0.6.2/man/NetworkManagerDispatcher.1.in +--- network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in 2006-04-03 18:10:32.000000000 +0100 ++++ network-manager-0.6.2/man/NetworkManagerDispatcher.1.in 2006-04-03 18:14:06.000000000 +0100 +@@ -13,10 +13,14 @@ The \fINetworkManagerDispatcher\fP daemo + directory in response to interfaces coming up and down. The scripts are run + alphabetically. The first parameter is the network interface name. The second + parameter is ++.I pre\-up ++before bringing the interface up, + .I up +-if the interface is now up and ++after bringing the interface up, + .I down +-if the interface is now down. ++before taking the interface down and ++.I post\-down ++after taking the interface down. + .SH OPTIONS + The following options are supported: + .TP +diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.c network-manager-0.6.2/src/NetworkManagerDbus.c +--- network-manager-0.6.2~/src/NetworkManagerDbus.c 2006-02-24 18:59:03.000000000 +0000 ++++ network-manager-0.6.2/src/NetworkManagerDbus.c 2006-04-03 18:14:06.000000000 +0100 +@@ -193,6 +193,7 @@ static DeviceStatusSignals dev_status_si + { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, + { DEVICE_ACTIVATING, "DeviceActivating" }, + { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, ++ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, + { DEVICE_ADDED, "DeviceAdded" }, + { DEVICE_REMOVED, "DeviceRemoved" }, + { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, +diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.h network-manager-0.6.2/src/NetworkManagerDbus.h +--- network-manager-0.6.2~/src/NetworkManagerDbus.h 2005-12-31 08:21:22.000000000 +0000 ++++ network-manager-0.6.2/src/NetworkManagerDbus.h 2006-04-03 18:14:06.000000000 +0100 +@@ -40,6 +40,7 @@ typedef enum + DEVICE_ACTIVATING, + DEVICE_ACTIVATION_FAILED, + DEVICE_ACTIVATION_CANCELED, ++ DEVICE_DEACTIVATED, + DEVICE_ADDED, + DEVICE_REMOVED, + DEVICE_CARRIER_ON, +diff -ruNp network-manager-0.6.2~/src/nm-device.c network-manager-0.6.2/src/nm-device.c +--- network-manager-0.6.2~/src/nm-device.c 2006-03-21 17:56:34.000000000 +0000 ++++ network-manager-0.6.2/src/nm-device.c 2006-04-03 18:14:06.000000000 +0100 +@@ -1445,6 +1445,7 @@ nm_device_deactivate (NMDevice *self) + NM_DEVICE_GET_CLASS (self)->deactivate (self); + + nm_schedule_state_change_signal_broadcast (self->priv->app_data); ++ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); + } + + -- cgit 1.3.0-6-gf8a5 From 44a31b5773ec83522ba8047b0cd19ef975808e42 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 5 May 2006 16:59:12 +0000 Subject: - Standards-Version 3.7.2 - Make libnm_glib wait between connection attempts to dbus (07-libnm_glib_reconnect_dbus.patch) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@811 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/07-libnm_glib_reconnect_dbus.patch | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 debian/patches/07-libnm_glib_reconnect_dbus.patch (limited to 'debian/patches') diff --git a/debian/patches/07-libnm_glib_reconnect_dbus.patch b/debian/patches/07-libnm_glib_reconnect_dbus.patch new file mode 100644 index 00000000..371813b2 --- /dev/null +++ b/debian/patches/07-libnm_glib_reconnect_dbus.patch @@ -0,0 +1,65 @@ +Index: gnome/libnm_glib/libnm_glib.c +=================================================================== +RCS file: /cvs/gnome/NetworkManager/gnome/libnm_glib/libnm_glib.c,v +retrieving revision 1.11 +diff -u -p -r1.11 libnm_glib.c +--- gnome/libnm_glib/libnm_glib.c 21 Feb 2006 06:25:50 -0000 1.11 ++++ gnome/libnm_glib/libnm_glib.c 5 May 2006 15:35:55 -0000 +@@ -39,6 +39,7 @@ struct libnm_glib_ctx + GMainLoop * g_main_loop; + DBusConnection * dbus_con; + guint dbus_watcher; ++ guint dbus_watch_interval; + gboolean thread_done; + gboolean thread_inited; + +@@ -347,14 +348,29 @@ libnm_glib_dbus_watcher (gpointer user_d + + g_return_val_if_fail (ctx != NULL, FALSE); + ++ ctx->dbus_watcher = 0; ++ + if (!ctx->dbus_con) + ctx->dbus_con = libnm_glib_dbus_init ((gpointer)ctx, ctx->g_main_ctx); + + if (ctx->dbus_con) +- return (FALSE); /* Don't reschedule ourselves if we have a connection to dbus */ ++ { ++ /* Get NM's state right away after we reconnect */ ++ libnm_glib_get_nm_state (ctx); ++ ctx->dbus_watch_interval = 1000; ++ } ++ else ++ { ++ /* Wait 3 seconds longer each time we fail to reconnect to dbus, ++ * with a maximum wait of one minute. ++ */ ++ ctx->dbus_watch_interval = MIN(ctx->dbus_watch_interval + 3000, 60000); + +- /* Reschule ourselves if we _still_ don't have a connection to dbus */ +- return (TRUE); ++ /* Reschule ourselves if we _still_ don't have a connection to dbus */ ++ libnm_glib_schedule_dbus_watcher (ctx); ++ } ++ ++ return FALSE; + } + + +@@ -372,7 +388,7 @@ libnm_glib_schedule_dbus_watcher (libnm_ + + if (ctx->dbus_watcher == 0) + { +- GSource *source = g_idle_source_new (); ++ GSource * source = g_timeout_source_new (ctx->dbus_watch_interval); + g_source_set_callback (source, libnm_glib_dbus_watcher, (gpointer) ctx, NULL); + ctx->dbus_watcher = g_source_attach (source, ctx->g_main_ctx); + g_source_unref (source); +@@ -453,6 +469,7 @@ libnm_glib_ctx_new (void) + goto error; + if (!(ctx->callbacks_lock = g_mutex_new ())) + goto error; ++ ctx->dbus_watch_interval = 1000; + + return ctx; + -- cgit 1.3.0-6-gf8a5 From 5e049c924e41f2099c65be0cf9e6e441bdd84dc2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 5 May 2006 21:40:48 +0000 Subject: Lots of integration work. NM behaves like a good citizen now and is ready for "testing". git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@815 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/08-disabled_devices.patch | 52 +++++++++++++++++++++++ debian/patches/09-nm_bad_mutex_free.patch | 69 +++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 debian/patches/08-disabled_devices.patch create mode 100644 debian/patches/09-nm_bad_mutex_free.patch (limited to 'debian/patches') diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch new file mode 100644 index 00000000..9ffe22ce --- /dev/null +++ b/debian/patches/08-disabled_devices.patch @@ -0,0 +1,52 @@ +--- src/backends/NetworkManagerDebian.c.orig 2006-05-05 19:59:18.000000000 +0200 ++++ src/backends/NetworkManagerDebian.c 2006-05-05 20:04:34.000000000 +0200 +@@ -521,7 +521,48 @@ + */ + gboolean nm_system_device_get_disabled (NMDevice *dev) + { +- return FALSE; ++ const char *iface; ++ if_block *curr_device, *curr_b; ++ if_data *curr_d; ++ gboolean blacklist = TRUE; ++ ++ g_return_val_if_fail (dev != NULL, TRUE); ++ ++ iface = nm_device_get_iface (dev); ++ ++ ifparser_init (); ++ ++ /* If the interface isn't listed in /etc/network/interfaces then ++ * it's considered okay to control it. ++ */ ++ curr_device = ifparser_getif (iface); ++ if (curr_device == NULL) { ++ blacklist = FALSE; ++ goto out; ++ } ++ ++ /* If the interface is listed and isn't marked "auto" then it's ++ * definitely not okay to control it. ++ */ ++ for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { ++ if (!strcmp (curr_b->type, "auto") ++ && !strcmp (curr_b->name, iface)) ++ blacklist = FALSE; ++ } ++ ++ /* If the interface has no options other than just "inet dhcp" ++ * it's probably ok to fiddle with it. ++ */ ++ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { ++ if (strcmp (curr_d->key, "inet") ++ || strcmp (curr_d->data, "dhcp")) ++ blacklist = TRUE; ++ } ++ ++out: ++ ifparser_destroy (); ++ ++ return blacklist; + } + + diff --git a/debian/patches/09-nm_bad_mutex_free.patch b/debian/patches/09-nm_bad_mutex_free.patch new file mode 100644 index 00000000..9da4cce0 --- /dev/null +++ b/debian/patches/09-nm_bad_mutex_free.patch @@ -0,0 +1,69 @@ +--- network-manager-0.6.2.orig/src/nm-device-802-11-wireless.c 2006-05-05 02:13:37.000000000 -0500 ++++ network-manager-0.6.2/src/nm-device-802-11-wireless.c 2006-05-05 02:20:23.000000000 -0500 +@@ -60,7 +60,7 @@ + + struct _NMDevice80211WirelessPrivate + { +- gboolean dispose_has_run; ++ gboolean is_initialized; + + struct ether_addr hw_addr; + +@@ -242,7 +242,7 @@ + nm_device_802_11_wireless_init (NMDevice80211Wireless * self) + { + self->priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self); +- self->priv->dispose_has_run = FALSE; ++ self->priv->is_initialized = FALSE; + + memset (&(self->priv->hw_addr), 0, sizeof (struct ether_addr)); + self->priv->supplicant.pid = -1; +@@ -256,6 +256,7 @@ + guint32 caps; + NMSock * sk; + ++ self->priv->is_initialized = TRUE; + self->priv->scan_mutex = g_mutex_new (); + nm_register_mutex_desc (self->priv->scan_mutex, "Scan Mutex"); + +@@ -2988,24 +2989,22 @@ + NMDevice80211WirelessClass * klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (object); + NMDeviceClass * parent_class; + +- if (self->priv->dispose_has_run) +- /* If dispose did already run, return. */ +- return; +- +- /* Make sure dispose does not run twice. */ +- self->priv->dispose_has_run = TRUE; +- +- /* +- * In dispose, you are supposed to free all types referenced from this +- * object which might themselves hold a reference to self. Generally, +- * the most simple solution is to unref all members on which you own a +- * reference. +- */ +- +- nm_device_802_11_wireless_ap_list_clear (self); +- if (self->priv->ap_list) +- nm_ap_list_unref (self->priv->ap_list); +- g_mutex_free (self->priv->scan_mutex); ++ /* Only do this part of the cleanup if the object is initialized */ ++ if (self->priv->is_initialized) { ++ self->priv->is_initialized = FALSE; ++ ++ /* ++ * In dispose, you are supposed to free all types referenced from this ++ * object which might themselves hold a reference to self. Generally, ++ * the most simple solution is to unref all members on which you own a ++ * reference. ++ */ ++ ++ nm_device_802_11_wireless_ap_list_clear (self); ++ if (self->priv->ap_list) ++ nm_ap_list_unref (self->priv->ap_list); ++ g_mutex_free (self->priv->scan_mutex); ++ } + + /* Chain up to the parent class */ + parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); -- cgit 1.3.0-6-gf8a5 From 63b3f3f48fb827a50b82d46c358dbedea4060770 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 10 May 2006 00:33:27 +0000 Subject: Use strstr, because auto can have multiple interfaces, e.g. auto lo eth0 git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@819 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/08-disabled_devices.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/patches') diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch index 9ffe22ce..d5392c9f 100644 --- a/debian/patches/08-disabled_devices.patch +++ b/debian/patches/08-disabled_devices.patch @@ -30,7 +30,7 @@ + */ + for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { + if (!strcmp (curr_b->type, "auto") -+ && !strcmp (curr_b->name, iface)) ++ && strstr (curr_b->name, iface)) + blacklist = FALSE; + } + -- cgit 1.3.0-6-gf8a5 From a5a5d5671a0c793b4d45373947178fa77fec9a16 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 10 May 2006 00:36:14 +0000 Subject: Fix the /etc/network/interfaces parser: - Only add data to an existing block (prevents segfault) - Support mapping and allow-* stanzas. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@820 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/10-interface_parser_fixes.patch | 90 ++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 debian/patches/10-interface_parser_fixes.patch (limited to 'debian/patches') diff --git a/debian/patches/10-interface_parser_fixes.patch b/debian/patches/10-interface_parser_fixes.patch new file mode 100644 index 00000000..e751e359 --- /dev/null +++ b/debian/patches/10-interface_parser_fixes.patch @@ -0,0 +1,90 @@ +Index: src/backends/interface_parser.c +=================================================================== +RCS file: /cvs/gnome/NetworkManager/src/backends/interface_parser.c,v +retrieving revision 1.6 +diff -u -3 -p -r1.6 interface_parser.c +--- src/backends/interface_parser.c 24 Oct 2005 15:04:28 -0000 1.6 ++++ src/backends/interface_parser.c 9 May 2006 23:06:35 -0000 +@@ -50,6 +50,10 @@ void add_block(const char *type, const c + + void add_data(const char *key,const char *data) + { ++ // Check if there is a block where we can attach our data ++ if (first == NULL) ++ return; ++ + if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data)); + ret->key = g_strdup(key); + ret->data = g_strdup(data); +@@ -73,6 +77,10 @@ void ifparser_init(void) + { + FILE *inp = fopen(INTERFACES,"r"); + int ret = 0; ++ char *line; ++ char *space; ++ char rline[255]; ++ + if (inp == NULL) + { + nm_warning ("Error: Can't open %s\n",INTERFACES); +@@ -81,10 +89,16 @@ void ifparser_init(void) + first = last = NULL; + while(1) + { +- char *line,rline[255],*space; ++ line = space = NULL; + ret = fscanf(inp,"%255[^\n]\n",rline); + if (ret == EOF) + break; ++ // If the line did not match, skip it ++ if (ret == 0) { ++ fgets(rline, 255, inp); ++ continue; ++ } ++ + line = rline; + while(line[0] == ' ') + line++; +@@ -94,18 +108,19 @@ void ifparser_init(void) + SPACE_OR_TAB(line,space) + if (space == NULL) + { +- nm_warning ("Error: Can't parse interface line '%s'\n",line); ++ nm_warning ("Error: Can't parse interface line '%s'\n",line); + continue; + } + space[0] = '\0'; + +- ++ // There are four different stanzas: ++ // iface, mapping, auto and allow-*. Create a block for each of them. + if (strcmp(line,"iface")==0) + { + char *space2 = strchr(space+1,' '); + if (space2 == NULL) + { +- nm_warning ("Error: Can't parse iface line '%s'\n",space+1); ++ nm_warning ("Error: Can't parse iface line '%s'\n",space+1); + continue; + } + space2[0]='\0'; +@@ -116,7 +131,7 @@ void ifparser_init(void) + space = strchr(space2+1,' '); + if (space == NULL) + { +- nm_warning ("Error: Can't parse data '%s'\n",space2+1); ++ nm_warning ("Error: Can't parse data '%s'\n",space2+1); + continue; + } + space[0] = '\0'; +@@ -124,6 +139,10 @@ void ifparser_init(void) + } + } + else if (strcmp(line,"auto")==0) ++ add_block(line,space+1); ++ else if (strcmp(line,"mapping")==0) ++ add_block(line,space+1); ++ else if (strncmp(line,"allow-",6)==0) + add_block(line,space+1); + else + add_data(line,space+1); -- cgit 1.3.0-6-gf8a5 From c1a83915903d35e1e6296359c2b194de213a78d5 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 15 May 2006 22:32:59 +0000 Subject: Support cards which can't do carrier detect. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@841 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/11-carrier_detection.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 debian/patches/11-carrier_detection.patch (limited to 'debian/patches') diff --git a/debian/patches/11-carrier_detection.patch b/debian/patches/11-carrier_detection.patch new file mode 100644 index 00000000..ff7d1ecf --- /dev/null +++ b/debian/patches/11-carrier_detection.patch @@ -0,0 +1,17 @@ +=================================================================== +RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v +retrieving revision 1.13.2.1 +retrieving revision 1.13.2.2 +diff -u -r1.13.2.1 -r1.13.2.2 +--- src/nm-device-802-3-ethernet.c 2006/03/09 21:39:15 1.13.2.1 ++++ src/nm-device-802-3-ethernet.c 2006/05/13 19:06:05 1.13.2.2 +@@ -207,8 +207,7 @@ + if (supports_ethtool_carrier_detect (self) || supports_mii_carrier_detect (self)) + caps |= NM_DEVICE_CAP_CARRIER_DETECT; + +- if (caps) +- caps |= NM_DEVICE_CAP_NM_SUPPORTED; ++ caps |= NM_DEVICE_CAP_NM_SUPPORTED; + + return caps; + } -- cgit 1.3.0-6-gf8a5 From 622f751812d193facaa79f10421f5950a558c389 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 8 Jun 2006 13:43:48 +0000 Subject: - New upstream (bugfix) release 0.6.3 - Removed patches which were merged upstream: 07-libnm_glib_reconnect_dbus.patch 09-nm_bad_mutex_free.patch 10-interface_parser_fixes.patch. 11-carrier_detection.patch - Added watch file. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@846 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/07-libnm_glib_reconnect_dbus.patch | 65 ---------------- debian/patches/09-nm_bad_mutex_free.patch | 69 ----------------- debian/patches/10-interface_parser_fixes.patch | 90 ----------------------- debian/patches/11-carrier_detection.patch | 17 ----- 4 files changed, 241 deletions(-) delete mode 100644 debian/patches/07-libnm_glib_reconnect_dbus.patch delete mode 100644 debian/patches/09-nm_bad_mutex_free.patch delete mode 100644 debian/patches/10-interface_parser_fixes.patch delete mode 100644 debian/patches/11-carrier_detection.patch (limited to 'debian/patches') diff --git a/debian/patches/07-libnm_glib_reconnect_dbus.patch b/debian/patches/07-libnm_glib_reconnect_dbus.patch deleted file mode 100644 index 371813b2..00000000 --- a/debian/patches/07-libnm_glib_reconnect_dbus.patch +++ /dev/null @@ -1,65 +0,0 @@ -Index: gnome/libnm_glib/libnm_glib.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/gnome/libnm_glib/libnm_glib.c,v -retrieving revision 1.11 -diff -u -p -r1.11 libnm_glib.c ---- gnome/libnm_glib/libnm_glib.c 21 Feb 2006 06:25:50 -0000 1.11 -+++ gnome/libnm_glib/libnm_glib.c 5 May 2006 15:35:55 -0000 -@@ -39,6 +39,7 @@ struct libnm_glib_ctx - GMainLoop * g_main_loop; - DBusConnection * dbus_con; - guint dbus_watcher; -+ guint dbus_watch_interval; - gboolean thread_done; - gboolean thread_inited; - -@@ -347,14 +348,29 @@ libnm_glib_dbus_watcher (gpointer user_d - - g_return_val_if_fail (ctx != NULL, FALSE); - -+ ctx->dbus_watcher = 0; -+ - if (!ctx->dbus_con) - ctx->dbus_con = libnm_glib_dbus_init ((gpointer)ctx, ctx->g_main_ctx); - - if (ctx->dbus_con) -- return (FALSE); /* Don't reschedule ourselves if we have a connection to dbus */ -+ { -+ /* Get NM's state right away after we reconnect */ -+ libnm_glib_get_nm_state (ctx); -+ ctx->dbus_watch_interval = 1000; -+ } -+ else -+ { -+ /* Wait 3 seconds longer each time we fail to reconnect to dbus, -+ * with a maximum wait of one minute. -+ */ -+ ctx->dbus_watch_interval = MIN(ctx->dbus_watch_interval + 3000, 60000); - -- /* Reschule ourselves if we _still_ don't have a connection to dbus */ -- return (TRUE); -+ /* Reschule ourselves if we _still_ don't have a connection to dbus */ -+ libnm_glib_schedule_dbus_watcher (ctx); -+ } -+ -+ return FALSE; - } - - -@@ -372,7 +388,7 @@ libnm_glib_schedule_dbus_watcher (libnm_ - - if (ctx->dbus_watcher == 0) - { -- GSource *source = g_idle_source_new (); -+ GSource * source = g_timeout_source_new (ctx->dbus_watch_interval); - g_source_set_callback (source, libnm_glib_dbus_watcher, (gpointer) ctx, NULL); - ctx->dbus_watcher = g_source_attach (source, ctx->g_main_ctx); - g_source_unref (source); -@@ -453,6 +469,7 @@ libnm_glib_ctx_new (void) - goto error; - if (!(ctx->callbacks_lock = g_mutex_new ())) - goto error; -+ ctx->dbus_watch_interval = 1000; - - return ctx; - diff --git a/debian/patches/09-nm_bad_mutex_free.patch b/debian/patches/09-nm_bad_mutex_free.patch deleted file mode 100644 index 9da4cce0..00000000 --- a/debian/patches/09-nm_bad_mutex_free.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- network-manager-0.6.2.orig/src/nm-device-802-11-wireless.c 2006-05-05 02:13:37.000000000 -0500 -+++ network-manager-0.6.2/src/nm-device-802-11-wireless.c 2006-05-05 02:20:23.000000000 -0500 -@@ -60,7 +60,7 @@ - - struct _NMDevice80211WirelessPrivate - { -- gboolean dispose_has_run; -+ gboolean is_initialized; - - struct ether_addr hw_addr; - -@@ -242,7 +242,7 @@ - nm_device_802_11_wireless_init (NMDevice80211Wireless * self) - { - self->priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self); -- self->priv->dispose_has_run = FALSE; -+ self->priv->is_initialized = FALSE; - - memset (&(self->priv->hw_addr), 0, sizeof (struct ether_addr)); - self->priv->supplicant.pid = -1; -@@ -256,6 +256,7 @@ - guint32 caps; - NMSock * sk; - -+ self->priv->is_initialized = TRUE; - self->priv->scan_mutex = g_mutex_new (); - nm_register_mutex_desc (self->priv->scan_mutex, "Scan Mutex"); - -@@ -2988,24 +2989,22 @@ - NMDevice80211WirelessClass * klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (object); - NMDeviceClass * parent_class; - -- if (self->priv->dispose_has_run) -- /* If dispose did already run, return. */ -- return; -- -- /* Make sure dispose does not run twice. */ -- self->priv->dispose_has_run = TRUE; -- -- /* -- * In dispose, you are supposed to free all types referenced from this -- * object which might themselves hold a reference to self. Generally, -- * the most simple solution is to unref all members on which you own a -- * reference. -- */ -- -- nm_device_802_11_wireless_ap_list_clear (self); -- if (self->priv->ap_list) -- nm_ap_list_unref (self->priv->ap_list); -- g_mutex_free (self->priv->scan_mutex); -+ /* Only do this part of the cleanup if the object is initialized */ -+ if (self->priv->is_initialized) { -+ self->priv->is_initialized = FALSE; -+ -+ /* -+ * In dispose, you are supposed to free all types referenced from this -+ * object which might themselves hold a reference to self. Generally, -+ * the most simple solution is to unref all members on which you own a -+ * reference. -+ */ -+ -+ nm_device_802_11_wireless_ap_list_clear (self); -+ if (self->priv->ap_list) -+ nm_ap_list_unref (self->priv->ap_list); -+ g_mutex_free (self->priv->scan_mutex); -+ } - - /* Chain up to the parent class */ - parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); diff --git a/debian/patches/10-interface_parser_fixes.patch b/debian/patches/10-interface_parser_fixes.patch deleted file mode 100644 index e751e359..00000000 --- a/debian/patches/10-interface_parser_fixes.patch +++ /dev/null @@ -1,90 +0,0 @@ -Index: src/backends/interface_parser.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/backends/interface_parser.c,v -retrieving revision 1.6 -diff -u -3 -p -r1.6 interface_parser.c ---- src/backends/interface_parser.c 24 Oct 2005 15:04:28 -0000 1.6 -+++ src/backends/interface_parser.c 9 May 2006 23:06:35 -0000 -@@ -50,6 +50,10 @@ void add_block(const char *type, const c - - void add_data(const char *key,const char *data) - { -+ // Check if there is a block where we can attach our data -+ if (first == NULL) -+ return; -+ - if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data)); - ret->key = g_strdup(key); - ret->data = g_strdup(data); -@@ -73,6 +77,10 @@ void ifparser_init(void) - { - FILE *inp = fopen(INTERFACES,"r"); - int ret = 0; -+ char *line; -+ char *space; -+ char rline[255]; -+ - if (inp == NULL) - { - nm_warning ("Error: Can't open %s\n",INTERFACES); -@@ -81,10 +89,16 @@ void ifparser_init(void) - first = last = NULL; - while(1) - { -- char *line,rline[255],*space; -+ line = space = NULL; - ret = fscanf(inp,"%255[^\n]\n",rline); - if (ret == EOF) - break; -+ // If the line did not match, skip it -+ if (ret == 0) { -+ fgets(rline, 255, inp); -+ continue; -+ } -+ - line = rline; - while(line[0] == ' ') - line++; -@@ -94,18 +108,19 @@ void ifparser_init(void) - SPACE_OR_TAB(line,space) - if (space == NULL) - { -- nm_warning ("Error: Can't parse interface line '%s'\n",line); -+ nm_warning ("Error: Can't parse interface line '%s'\n",line); - continue; - } - space[0] = '\0'; - -- -+ // There are four different stanzas: -+ // iface, mapping, auto and allow-*. Create a block for each of them. - if (strcmp(line,"iface")==0) - { - char *space2 = strchr(space+1,' '); - if (space2 == NULL) - { -- nm_warning ("Error: Can't parse iface line '%s'\n",space+1); -+ nm_warning ("Error: Can't parse iface line '%s'\n",space+1); - continue; - } - space2[0]='\0'; -@@ -116,7 +131,7 @@ void ifparser_init(void) - space = strchr(space2+1,' '); - if (space == NULL) - { -- nm_warning ("Error: Can't parse data '%s'\n",space2+1); -+ nm_warning ("Error: Can't parse data '%s'\n",space2+1); - continue; - } - space[0] = '\0'; -@@ -124,6 +139,10 @@ void ifparser_init(void) - } - } - else if (strcmp(line,"auto")==0) -+ add_block(line,space+1); -+ else if (strcmp(line,"mapping")==0) -+ add_block(line,space+1); -+ else if (strncmp(line,"allow-",6)==0) - add_block(line,space+1); - else - add_data(line,space+1); diff --git a/debian/patches/11-carrier_detection.patch b/debian/patches/11-carrier_detection.patch deleted file mode 100644 index ff7d1ecf..00000000 --- a/debian/patches/11-carrier_detection.patch +++ /dev/null @@ -1,17 +0,0 @@ -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v -retrieving revision 1.13.2.1 -retrieving revision 1.13.2.2 -diff -u -r1.13.2.1 -r1.13.2.2 ---- src/nm-device-802-3-ethernet.c 2006/03/09 21:39:15 1.13.2.1 -+++ src/nm-device-802-3-ethernet.c 2006/05/13 19:06:05 1.13.2.2 -@@ -207,8 +207,7 @@ - if (supports_ethtool_carrier_detect (self) || supports_mii_carrier_detect (self)) - caps |= NM_DEVICE_CAP_CARRIER_DETECT; - -- if (caps) -- caps |= NM_DEVICE_CAP_NM_SUPPORTED; -+ caps |= NM_DEVICE_CAP_NM_SUPPORTED; - - return caps; - } -- cgit 1.3.0-6-gf8a5 From 676c97361205d04db307bf9350fe372e69499904 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 14 Jun 2006 01:04:14 +0000 Subject: hal must be able to send events about hotplugged devices to NM. Added user hal to /etc/dbus-1/system.d/NetworkManager.conf. Should git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@854 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/02-dbus_access_network_manager.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/02-dbus_access_network_manager.patch b/debian/patches/02-dbus_access_network_manager.patch index 06886be3..afa3bc3b 100644 --- a/debian/patches/02-dbus_access_network_manager.patch +++ b/debian/patches/02-dbus_access_network_manager.patch @@ -1,10 +1,14 @@ ---- src/NetworkManager.conf.orig 2006-02-07 04:24:38.000000000 +0100 -+++ src/NetworkManager.conf 2006-02-07 04:25:00.000000000 +0100 -@@ -8,7 +8,7 @@ +--- src/NetworkManager.conf.orig 2006-06-14 02:47:10.000000000 +0200 ++++ src/NetworkManager.conf 2006-06-14 02:48:31.000000000 +0200 +@@ -8,7 +8,11 @@ - ++ ++ ++ ++ + -- cgit 1.3.0-6-gf8a5 From a449bc5835aeca913c8ccc5e378ec3b06fcdde2f Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Wed, 2 Aug 2006 17:56:24 +0000 Subject: - allow "auto-hotplug" iface to be managed by NM. (closes: #381017) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@910 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/08-disabled_devices.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch index d5392c9f..37e2d727 100644 --- a/debian/patches/08-disabled_devices.patch +++ b/debian/patches/08-disabled_devices.patch @@ -29,17 +29,17 @@ + * definitely not okay to control it. + */ + for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { -+ if (!strcmp (curr_b->type, "auto") ++ if (!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug") + && strstr (curr_b->name, iface)) + blacklist = FALSE; + } + + /* If the interface has no options other than just "inet dhcp" -+ * it's probably ok to fiddle with it. ++ * it's probably ok to fiddle with it. + */ + for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { + if (strcmp (curr_d->key, "inet") -+ || strcmp (curr_d->data, "dhcp")) ++ || strcmp (curr_d->data, "dhcp" )|| strcmp ( currd->key, "iface")) + blacklist = TRUE; + } + -- cgit 1.3.0-6-gf8a5 From 420f5e82421755940f3d1b3f3145e7bf9da20299 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Wed, 2 Aug 2006 18:04:11 +0000 Subject: fixed an error in debian/patch/08.patch git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@911 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/08-disabled_devices.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch index 37e2d727..50a4e4c2 100644 --- a/debian/patches/08-disabled_devices.patch +++ b/debian/patches/08-disabled_devices.patch @@ -29,7 +29,7 @@ + * definitely not okay to control it. + */ + for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { -+ if (!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug") ++ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug")) + && strstr (curr_b->name, iface)) + blacklist = FALSE; + } @@ -39,7 +39,7 @@ + */ + for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { + if (strcmp (curr_d->key, "inet") -+ || strcmp (curr_d->data, "dhcp" )|| strcmp ( currd->key, "iface")) ++ || strcmp (curr_d->data, "dhcp" )|| strcmp ( curr_d->key, "iface")) + blacklist = TRUE; + } + -- cgit 1.3.0-6-gf8a5 From 28d56c2421a32c149cc62a7ab14ab18f05bd042e Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Mon, 7 Aug 2006 08:36:38 +0000 Subject: - allow "auto-hotplug" iface to be managed by NM. (closes: #381017) * Added 09_fix_bigendian_sha1.patch wich will fix the WPA+plaint text pw auth method on powerpc (and in other bigendian arch) (closes: #381464) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@913 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/09_fix_bigendian_sha1.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 debian/patches/09_fix_bigendian_sha1.patch (limited to 'debian/patches') diff --git a/debian/patches/09_fix_bigendian_sha1.patch b/debian/patches/09_fix_bigendian_sha1.patch new file mode 100644 index 00000000..07d2f2ae --- /dev/null +++ b/debian/patches/09_fix_bigendian_sha1.patch @@ -0,0 +1,14 @@ +--- configure.old 2006-08-07 10:31:07.000000000 +0200 ++++ configure 2006-08-07 10:31:14.000000000 +0200 +@@ -25440,6 +25440,11 @@ + echo "${ECHO_T}no" >&6; } + fi + ++## Enable bigendian stuff for sha1 hash code ++if "$target_cpu" = "powerpc"; then ++ CPU_CFLAGS="-DWORDS_BIGENDIAN $CPU_CFLAGS" ++fi ++ + ac_config_files="$ac_config_files Makefile include/Makefile utils/Makefile src/Makefile src/named-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile dispatcher-daemon/Makefile gnome/Makefile gnome/applet/Makefile gnome/applet/icons/Makefile gnome/libnm_glib/libnm_glib.pc gnome/libnm_glib/Makefile gnome/vpn-properties/Makefile test/Makefile test/test-common/Makefile test/libnm-util/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/RedHat/NetworkManagerDispatcher initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/Slackware/rc.networkmanager-dispatcher initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/SUSE/networkmanager-dispatcher initscript/Arch/Makefile initscript/Arch/networkmanager initscript/Arch/networkmanager-dispatcher man/Makefile man/NetworkManager.1 man/NetworkManagerDispatcher.1 man/nm-tool.1 po/Makefile.in NetworkManager.pc" + + cat >confcache <<\_ACEOF -- cgit 1.3.0-6-gf8a5 From 0eca7a8c9c4bafc2cb977306aa0d6c1b4774b315 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Mon, 7 Aug 2006 11:22:31 +0000 Subject: fixed some typo in README.Debian, removed 09.patch (better solution are coming), fixed 08.patch git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@914 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/08-disabled_devices.patch | 2 +- debian/patches/09_fix_bigendian_sha1.patch | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 debian/patches/09_fix_bigendian_sha1.patch (limited to 'debian/patches') diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch index 50a4e4c2..07b87d9a 100644 --- a/debian/patches/08-disabled_devices.patch +++ b/debian/patches/08-disabled_devices.patch @@ -39,7 +39,7 @@ + */ + for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { + if (strcmp (curr_d->key, "inet") -+ || strcmp (curr_d->data, "dhcp" )|| strcmp ( curr_d->key, "iface")) ++ || strcmp (curr_d->data, "dhcp" )) + blacklist = TRUE; + } + diff --git a/debian/patches/09_fix_bigendian_sha1.patch b/debian/patches/09_fix_bigendian_sha1.patch deleted file mode 100644 index 07d2f2ae..00000000 --- a/debian/patches/09_fix_bigendian_sha1.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- configure.old 2006-08-07 10:31:07.000000000 +0200 -+++ configure 2006-08-07 10:31:14.000000000 +0200 -@@ -25440,6 +25440,11 @@ - echo "${ECHO_T}no" >&6; } - fi - -+## Enable bigendian stuff for sha1 hash code -+if "$target_cpu" = "powerpc"; then -+ CPU_CFLAGS="-DWORDS_BIGENDIAN $CPU_CFLAGS" -+fi -+ - ac_config_files="$ac_config_files Makefile include/Makefile utils/Makefile src/Makefile src/named-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile src/backends/Makefile libnm-util/libnm-util.pc libnm-util/Makefile dispatcher-daemon/Makefile gnome/Makefile gnome/applet/Makefile gnome/applet/icons/Makefile gnome/libnm_glib/libnm_glib.pc gnome/libnm_glib/Makefile gnome/vpn-properties/Makefile test/Makefile test/test-common/Makefile test/libnm-util/Makefile initscript/Makefile initscript/RedHat/Makefile initscript/RedHat/NetworkManager initscript/RedHat/NetworkManagerDispatcher initscript/Gentoo/Makefile initscript/Gentoo/NetworkManager initscript/Debian/Makefile initscript/Slackware/Makefile initscript/Slackware/rc.networkmanager initscript/Slackware/rc.networkmanager-dispatcher initscript/SUSE/Makefile initscript/SUSE/networkmanager initscript/SUSE/networkmanager-dispatcher initscript/Arch/Makefile initscript/Arch/networkmanager initscript/Arch/networkmanager-dispatcher man/Makefile man/NetworkManager.1 man/NetworkManagerDispatcher.1 man/nm-tool.1 po/Makefile.in NetworkManager.pc" - - cat >confcache <<\_ACEOF -- cgit 1.3.0-6-gf8a5 From a67dce3c363667f5efea4519b9b1178a5597a266 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Mon, 7 Aug 2006 15:07:07 +0000 Subject: * Added 09_fix_bigendian_words.patch wich will fix the WPA+plaint text pw git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@915 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/09_fix_bigendian_words.patch | 310 ++++++++++++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 debian/patches/09_fix_bigendian_words.patch (limited to 'debian/patches') diff --git a/debian/patches/09_fix_bigendian_words.patch b/debian/patches/09_fix_bigendian_words.patch new file mode 100644 index 00000000..736103b9 --- /dev/null +++ b/debian/patches/09_fix_bigendian_words.patch @@ -0,0 +1,310 @@ +--- configure.orig 2006-08-07 17:02:37.000000000 +0200 ++++ configure 2006-08-07 17:03:56.000000000 +0200 +@@ -23030,6 +23030,293 @@ + < $srcdir/po/POTFILES.in > po/POTFILES + + ++{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 ++echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } ++if test "${ac_cv_c_bigendian+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # See if sys/param.h defines the BYTE_ORDER macro. ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++#include ++ ++int ++main () ++{ ++#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN ++ bogus endian macros ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ # It does; now see whether it defined to BIG_ENDIAN or not. ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include ++#include ++ ++int ++main () ++{ ++#if BYTE_ORDER != BIG_ENDIAN ++ not big endian ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_c_bigendian=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_cv_c_bigendian=no ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ # It does not; compile a test program. ++if test "$cross_compiling" = yes; then ++ # try to guess the endianness by grepping values into an object file ++ ac_cv_c_bigendian=unknown ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; ++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; ++void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } ++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; ++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; ++void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } ++int ++main () ++{ ++ _ascii (); _ebcdic (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ++ ac_cv_c_bigendian=yes ++fi ++if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ++ if test "$ac_cv_c_bigendian" = unknown; then ++ ac_cv_c_bigendian=no ++ else ++ # finding both strings is unlikely to happen, but who knows? ++ ac_cv_c_bigendian=unknown ++ fi ++fi ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++ ++ /* Are we little or big endian? From Harbison&Steele. */ ++ union ++ { ++ long int l; ++ char c[sizeof (long int)]; ++ } u; ++ u.l = 1; ++ return u.c[sizeof (long int) - 1] == 1; ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_c_bigendian=no ++else ++ echo "$as_me: program exited with status $ac_status" >&5 ++echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++( exit $ac_status ) ++ac_cv_c_bigendian=yes ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++fi ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 ++echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } ++case $ac_cv_c_bigendian in ++ yes) ++ ++cat >>confdefs.h <<\_ACEOF ++#define WORDS_BIGENDIAN 1 ++_ACEOF ++ ;; ++ no) ++ ;; ++ *) ++ { { echo "$as_me:$LINENO: error: unknown endianness ++presetting ac_cv_c_bigendian=no (or yes) will help" >&5 ++echo "$as_me: error: unknown endianness ++presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} ++ { (exit 1); exit 1; }; } ;; ++esac ++ ++ + + # Check whether --with-distro was given. + if test "${with_distro+set}" = set; then +--- configure.in.org 2006-08-07 17:02:45.000000000 +0200 ++++ configure.in 2006-08-07 17:03:37.000000000 +0200 +@@ -50,6 +50,11 @@ + AC_PROG_INTLTOOL([0.27.2]) + AM_GLIB_GNU_GETTEXT + ++dnl ++dnl Make sha1.c happy on big endian systems ++dnl ++AC_C_BIGENDIAN ++ + AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch or slackware])) + if test "z$with_distro" = "z"; then + AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") -- cgit 1.3.0-6-gf8a5 From 369c275e40eb385976eecd781b5d2c1a1b640443 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 8 Aug 2006 02:10:36 +0000 Subject: - Merge the patches resolvonf+disabled_devices into a single patch debian_backend. This one patch should hold all modifications to the Debian backend. - Do not handle mapped devices. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@924 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 123 +++++++++++++++++++++++++++++++ debian/patches/05-resolvconf.patch | 20 ----- debian/patches/08-disabled_devices.patch | 52 ------------- 3 files changed, 123 insertions(+), 72 deletions(-) create mode 100644 debian/patches/05-debian_backend.patch delete mode 100644 debian/patches/05-resolvconf.patch delete mode 100644 debian/patches/08-disabled_devices.patch (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch new file mode 100644 index 00000000..84c7238e --- /dev/null +++ b/debian/patches/05-debian_backend.patch @@ -0,0 +1,123 @@ +diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c +index 740572a..8090696 100644 +--- a/src/backends/NetworkManagerDebian.c ++++ b/src/backends/NetworkManagerDebian.c +@@ -37,6 +37,7 @@ #include "interface_parser.h" + #include "nm-utils.h" + + #define ARPING "/usr/sbin/arping" ++#define RESOLVCONF "resolvconf" + + /* + * nm_system_init +@@ -514,13 +515,60 @@ gboolean nm_system_device_get_use_dhcp ( + /* + * nm_system_device_get_disabled + * +- * Return whether the distro-specific system config tells us to use +- * dhcp for this device. ++ * Return whether the distro-specific system config tells us to disable ++ * this device. + * + */ + gboolean nm_system_device_get_disabled (NMDevice *dev) + { +- return FALSE; ++ const char *iface; ++ if_block *curr_device, *curr_b; ++ if_data *curr_d; ++ gboolean blacklist = TRUE; ++ ++ g_return_val_if_fail (dev != NULL, TRUE); ++ ++ iface = nm_device_get_iface (dev); ++ ++ ifparser_init (); ++ ++ /* If the device is listed in a mapping, do not control it */ ++ if (ifparser_getmapping (iface) != NULL) { ++ blacklist = TRUE; ++ goto out; ++ } ++ ++ /* If the interface isn't listed in /etc/network/interfaces then ++ * it's considered okay to control it. ++ */ ++ curr_device = ifparser_getif (iface); ++ if (curr_device == NULL) { ++ blacklist = FALSE; ++ goto out; ++ } ++ ++ /* If the interface is listed and isn't marked "auto" then it's ++ * definitely not okay to control it. ++ */ ++ for (curr_b = ifparser_getfirst (); curr_b; curr_b = curr_b->next) { ++ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug")) ++ && strstr (curr_b->name, iface)) ++ blacklist = FALSE; ++ } ++ ++ /* If the interface has no options other than just "inet dhcp" ++ * it's probably ok to fiddle with it. ++ */ ++ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { ++ if (strcmp (curr_d->key, "inet") ++ || strcmp (curr_d->data, "dhcp" )) ++ blacklist = TRUE; ++ } ++ ++out: ++ ifparser_destroy (); ++ ++ return blacklist; + } + + +@@ -679,7 +727,10 @@ void nm_system_set_hostname (NMIP4Config + */ + gboolean nm_system_should_modify_resolv_conf (void) + { +- return TRUE; ++ if (g_find_program_in_path(RESOLVCONF) != NULL) ++ return FALSE; ++ else ++ return TRUE; + } + + +diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c +index 53d6487..aa81134 100644 +--- a/src/backends/interface_parser.c ++++ b/src/backends/interface_parser.c +@@ -198,6 +198,18 @@ if_block *ifparser_getif(const char* ifa + return NULL; + } + ++if_block *ifparser_getmapping(const char* iface) ++{ ++ if_block *curr = first; ++ while(curr!=NULL) ++ { ++ if (strcmp(curr->type,"mapping")==0 && strcmp(curr->name,iface)==0) ++ return curr; ++ curr = curr->next; ++ } ++ return NULL; ++} ++ + const char *ifparser_getkey(if_block* iface, const char *key) + { + if_data *curr = iface->info; +diff --git a/src/backends/interface_parser.h b/src/backends/interface_parser.h +index 075f454..8914283 100644 +--- a/src/backends/interface_parser.h ++++ b/src/backends/interface_parser.h +@@ -44,6 +44,7 @@ void ifparser_init(void); + void ifparser_destroy(void); + + if_block *ifparser_getif(const char* iface); ++if_block *ifparser_getmapping(const char* iface); + if_block *ifparser_getfirst(void); + const char *ifparser_getkey(if_block* iface, const char *key); + diff --git a/debian/patches/05-resolvconf.patch b/debian/patches/05-resolvconf.patch deleted file mode 100644 index 8e55c8fa..00000000 --- a/debian/patches/05-resolvconf.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/backends/NetworkManagerDebian.c 2006-02-28 22:24:22.000000000 +0100 -+++ ../NetworkManager-0.6.0.patched/src/backends/NetworkManagerDebian.c 2006-03-06 12:19:34.000000000 +0100 -@@ -37,6 +37,7 @@ - #include "nm-utils.h" - - #define ARPING "/usr/sbin/arping" -+#define RESOLVCONF "resolvconf" - - /* - * nm_system_init -@@ -679,5 +680,8 @@ - */ - gboolean nm_system_should_modify_resolv_conf (void) - { -- return TRUE; -+ if (g_find_program_in_path(RESOLVCONF) != NULL) -+ return FALSE; -+ else -+ return TRUE; - } diff --git a/debian/patches/08-disabled_devices.patch b/debian/patches/08-disabled_devices.patch deleted file mode 100644 index 07b87d9a..00000000 --- a/debian/patches/08-disabled_devices.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- src/backends/NetworkManagerDebian.c.orig 2006-05-05 19:59:18.000000000 +0200 -+++ src/backends/NetworkManagerDebian.c 2006-05-05 20:04:34.000000000 +0200 -@@ -521,7 +521,48 @@ - */ - gboolean nm_system_device_get_disabled (NMDevice *dev) - { -- return FALSE; -+ const char *iface; -+ if_block *curr_device, *curr_b; -+ if_data *curr_d; -+ gboolean blacklist = TRUE; -+ -+ g_return_val_if_fail (dev != NULL, TRUE); -+ -+ iface = nm_device_get_iface (dev); -+ -+ ifparser_init (); -+ -+ /* If the interface isn't listed in /etc/network/interfaces then -+ * it's considered okay to control it. -+ */ -+ curr_device = ifparser_getif (iface); -+ if (curr_device == NULL) { -+ blacklist = FALSE; -+ goto out; -+ } -+ -+ /* If the interface is listed and isn't marked "auto" then it's -+ * definitely not okay to control it. -+ */ -+ for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) { -+ if ((!strcmp (curr_b->type, "auto") || !strcmp (curr_b->type, "allow-hotplug")) -+ && strstr (curr_b->name, iface)) -+ blacklist = FALSE; -+ } -+ -+ /* If the interface has no options other than just "inet dhcp" -+ * it's probably ok to fiddle with it. -+ */ -+ for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) { -+ if (strcmp (curr_d->key, "inet") -+ || strcmp (curr_d->data, "dhcp" )) -+ blacklist = TRUE; -+ } -+ -+out: -+ ifparser_destroy (); -+ -+ return blacklist; - } - - -- cgit 1.3.0-6-gf8a5 From 911c1f8ef6f9eb7f52f5bdf7c973f8f528549726 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 12 Aug 2006 15:37:12 +0000 Subject: Improve the dial-up configuration handling: - Display the provider name instead of a cryptic number - Check the return value of ifupdown - Add a new section to README.Debian about how to set up a dial-up connection git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@927 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 92 +++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index 84c7238e..c8006623 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -1,5 +1,5 @@ diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c -index 740572a..8090696 100644 +index 740572a..3a2fdd6 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -37,6 +37,7 @@ #include "interface_parser.h" @@ -74,7 +74,95 @@ index 740572a..8090696 100644 } -@@ -679,7 +727,10 @@ void nm_system_set_hostname (NMIP4Config +@@ -563,12 +611,18 @@ gboolean nm_system_deactivate_dialup (GS + if (strcmp (dialup, config->name) == 0) + { + char *cmd; ++ int status; + + nm_info ("Deactivating dialup device %s (%s) ...", dialup, (char *) config->data); + cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data); + nm_spawn_process (cmd); + g_free (cmd); +- ret = TRUE; ++ if (status == 0) { ++ ret = TRUE; ++ } else { ++ nm_warning ("Couldn't deactivate dialup device %s (%s) - %d", dialup, (char *) config->data, status); ++ ret = FALSE; ++ } + break; + } + } +@@ -587,12 +641,18 @@ gboolean nm_system_activate_dialup (GSLi + if (strcmp (dialup, config->name) == 0) + { + char *cmd; ++ int status; + + nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data); + cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data); + nm_spawn_process (cmd); + g_free (cmd); +- ret = TRUE; ++ if (status == 0) { ++ ret = TRUE; ++ } else { ++ nm_warning ("Couldn't activate dialup device %s (%s) - %d", dialup, (char *) config->data, status); ++ ret = FALSE; ++ } + break; + } + } +@@ -603,23 +663,26 @@ gboolean nm_system_activate_dialup (GSLi + GSList * nm_system_get_dialup_config (void) + { + const char *buf; +- unsigned int i = 0; ++ const char *provider; + GSList *list = NULL; + if_block *curr; + ifparser_init(); + + /* FIXME: get all ppp(and others?) lines from /e/n/i here */ + curr = ifparser_getfirst(); +- while(curr!=NULL) ++ while (curr != NULL) + { + NMDialUpConfig *config; +- if (strcmp(curr->type,"iface")==0) ++ if (strcmp(curr->type, "iface") == 0) + { +- buf = ifparser_getkey(curr,"inet"); +- if (buf && strcmp (buf, "ppp")==0) ++ buf = ifparser_getkey(curr, "inet"); ++ if (buf && strcmp (buf, "ppp") == 0) + { ++ provider = ifparser_getkey(curr, "provider"); ++ if (!provider) ++ provider = "default provider"; + config = g_malloc (sizeof (NMDialUpConfig)); +- config->name = g_strdup_printf ("Modem (#%d)", i++); ++ config->name = g_strdup_printf ("%s via Modem", provider); + config->data = g_strdup (curr->name); /* interface name */ + + list = g_slist_append (list, config); +@@ -631,14 +694,6 @@ GSList * nm_system_get_dialup_config (vo + } + ifparser_destroy(); + +- /* Hack: Go back and remove the "(#0)" if there is only one device */ +- if (i == 1) +- { +- NMDialUpConfig *config = (NMDialUpConfig *) list->data; +- g_free (config->name); +- config->name = g_strdup ("Modem"); +- } +- + return list; + } + +@@ -679,7 +734,10 @@ void nm_system_set_hostname (NMIP4Config */ gboolean nm_system_should_modify_resolv_conf (void) { -- cgit 1.3.0-6-gf8a5 From ef8b63010b80cb4024f46bd8d702318d665435a4 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Sun, 13 Aug 2006 20:44:48 +0000 Subject: updated some patches git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@932 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/01-supplicant_timeout.patch | 6 +-- debian/patches/04-if_fix.patch | 11 ++--- debian/patches/06-dispatch_more_events.patch | 66 +++------------------------- 3 files changed, 12 insertions(+), 71 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/01-supplicant_timeout.patch b/debian/patches/01-supplicant_timeout.patch index 0723c83a..45060db4 100644 --- a/debian/patches/01-supplicant_timeout.patch +++ b/debian/patches/01-supplicant_timeout.patch @@ -1,6 +1,6 @@ ---- src/nm-device-802-11-wireless.c.orig 2006-02-13 11:46:50.000000000 +0100 -+++ src/nm-device-802-11-wireless.c 2006-02-13 11:47:08.000000000 +0100 -@@ -2205,7 +2205,7 @@ +--- src/nm-device-802-11-wireless.c 2006-06-20 20:15:45.000000000 +0200 ++++ src/nm-device-802-11-wireless.c.new 2006-08-13 22:32:13.000000000 +0200 +@@ -2329,7 +2329,7 @@ } diff --git a/debian/patches/04-if_fix.patch b/debian/patches/04-if_fix.patch index b5667c53..ca0b1574 100644 --- a/debian/patches/04-if_fix.patch +++ b/debian/patches/04-if_fix.patch @@ -1,11 +1,6 @@ -Index: src/nm-device-802-3-ethernet.c -=================================================================== -RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v -retrieving revision 1.3 -diff -u -r1.3 nm-device-802-3-ethernet.c ---- src/nm-device-802-3-ethernet.c 3 Jan 2006 17:47:38 -0000 1.3 -+++ src/nm-device-802-3-ethernet.c 4 Jan 2006 17:13:33 -0000 -@@ -328,7 +328,9 @@ +--- src/nm-device-802-3-ethernet.c 2006-05-13 21:06:05.000000000 +0200 ++++ src/nm-device-802-3-ethernet.c.new 2006-08-13 22:34:56.000000000 +0200 +@@ -376,7 +376,9 @@ /**************************************/ /* MII capability detection */ /**************************************/ diff --git a/debian/patches/06-dispatch_more_events.patch b/debian/patches/06-dispatch_more_events.patch index e8b30810..8b85f49a 100644 --- a/debian/patches/06-dispatch_more_events.patch +++ b/debian/patches/06-dispatch_more_events.patch @@ -1,7 +1,6 @@ -diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c network-manager-0.6.2/dispatcher-daemon/NetworkManagerDispatcher.c ---- network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c 2006-03-13 16:51:57.000000000 +0000 -+++ network-manager-0.6.2/dispatcher-daemon/NetworkManagerDispatcher.c 2006-04-03 18:14:06.000000000 +0100 -@@ -44,6 +44,8 @@ enum NMDAction +--- dispatcher-daemon/NetworkManagerDispatcher.c.old 2006-08-13 22:40:18.000000000 +0200 ++++ dispatcher-daemon/NetworkManagerDispatcher.c 2006-08-13 22:40:27.000000000 +0200 +@@ -44,6 +44,8 @@ NMD_DEVICE_DONT_KNOW, NMD_DEVICE_NOW_INACTIVE, NMD_DEVICE_NOW_ACTIVE, @@ -10,7 +9,7 @@ diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c n }; typedef enum NMDAction NMDAction; -@@ -95,6 +97,10 @@ static void nmd_execute_scripts (NMDActi +@@ -95,6 +97,10 @@ if (action == NMD_DEVICE_NOW_ACTIVE) char_act = "up"; else if (action == NMD_DEVICE_NOW_INACTIVE) @@ -21,7 +20,7 @@ diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c n char_act = "down"; else return; -@@ -217,9 +223,13 @@ static DBusHandlerResult nmd_dbus_filter +@@ -217,9 +223,13 @@ } if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")) @@ -36,7 +35,7 @@ diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c n if (action != NMD_DEVICE_DONT_KNOW) { -@@ -234,8 +244,10 @@ static DBusHandlerResult nmd_dbus_filter +@@ -234,8 +244,10 @@ if (dev_object_path && dev_iface_name) { nm_info ("Device %s (%s) is now %s.", dev_object_path, dev_iface_name, @@ -49,56 +48,3 @@ diff -ruNp network-manager-0.6.2~/dispatcher-daemon/NetworkManagerDispatcher.c n nmd_execute_scripts (action, dev_iface_name); } -diff -ruNp network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in network-manager-0.6.2/man/NetworkManagerDispatcher.1.in ---- network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in 2006-04-03 18:10:32.000000000 +0100 -+++ network-manager-0.6.2/man/NetworkManagerDispatcher.1.in 2006-04-03 18:14:06.000000000 +0100 -@@ -13,10 +13,14 @@ The \fINetworkManagerDispatcher\fP daemo - directory in response to interfaces coming up and down. The scripts are run - alphabetically. The first parameter is the network interface name. The second - parameter is -+.I pre\-up -+before bringing the interface up, - .I up --if the interface is now up and -+after bringing the interface up, - .I down --if the interface is now down. -+before taking the interface down and -+.I post\-down -+after taking the interface down. - .SH OPTIONS - The following options are supported: - .TP -diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.c network-manager-0.6.2/src/NetworkManagerDbus.c ---- network-manager-0.6.2~/src/NetworkManagerDbus.c 2006-02-24 18:59:03.000000000 +0000 -+++ network-manager-0.6.2/src/NetworkManagerDbus.c 2006-04-03 18:14:06.000000000 +0100 -@@ -193,6 +193,7 @@ static DeviceStatusSignals dev_status_si - { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, - { DEVICE_ACTIVATING, "DeviceActivating" }, - { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, -+ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, - { DEVICE_ADDED, "DeviceAdded" }, - { DEVICE_REMOVED, "DeviceRemoved" }, - { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, -diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.h network-manager-0.6.2/src/NetworkManagerDbus.h ---- network-manager-0.6.2~/src/NetworkManagerDbus.h 2005-12-31 08:21:22.000000000 +0000 -+++ network-manager-0.6.2/src/NetworkManagerDbus.h 2006-04-03 18:14:06.000000000 +0100 -@@ -40,6 +40,7 @@ typedef enum - DEVICE_ACTIVATING, - DEVICE_ACTIVATION_FAILED, - DEVICE_ACTIVATION_CANCELED, -+ DEVICE_DEACTIVATED, - DEVICE_ADDED, - DEVICE_REMOVED, - DEVICE_CARRIER_ON, -diff -ruNp network-manager-0.6.2~/src/nm-device.c network-manager-0.6.2/src/nm-device.c ---- network-manager-0.6.2~/src/nm-device.c 2006-03-21 17:56:34.000000000 +0000 -+++ network-manager-0.6.2/src/nm-device.c 2006-04-03 18:14:06.000000000 +0100 -@@ -1445,6 +1445,7 @@ nm_device_deactivate (NMDevice *self) - NM_DEVICE_GET_CLASS (self)->deactivate (self); - - nm_schedule_state_change_signal_broadcast (self->priv->app_data); -+ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); - } - - -- cgit 1.3.0-6-gf8a5 From 65dce1fd406fc96801d744b763608bd44cb536d5 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Tue, 15 Aug 2006 10:51:43 +0000 Subject: fixed debian/patches/06 git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@941 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/06-dispatch_more_events.patch | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'debian/patches') diff --git a/debian/patches/06-dispatch_more_events.patch b/debian/patches/06-dispatch_more_events.patch index 8b85f49a..adbae7ae 100644 --- a/debian/patches/06-dispatch_more_events.patch +++ b/debian/patches/06-dispatch_more_events.patch @@ -48,3 +48,55 @@ nmd_execute_scripts (action, dev_iface_name); } +diff -ruNp network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in network-manager-0.6.2/man/NetworkManagerDispatcher.1.in +--- man/NetworkManagerDispatcher.1.in 2006-04-03 18:10:32.000000000 +0100 ++++ man/NetworkManagerDispatcher.1.in 2006-04-03 18:14:06.000000000 +0100 +@@ -13,10 +13,14 @@ The \fINetworkManagerDispatcher\fP daemo + directory in response to interfaces coming up and down. The scripts are run + alphabetically. The first parameter is the network interface name. The second + parameter is ++.I pre\-up ++before bringing the interface up, + .I up +-if the interface is now up and ++after bringing the interface up, + .I down +-if the interface is now down. ++before taking the interface down and ++.I post\-down ++after taking the interface down. + .SH OPTIONS + The following options are supported: + .TP +diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.c network-manager-0.6.2/src/NetworkManagerDbus.c +--- src/NetworkManagerDbus.c 2006-02-24 18:59:03.000000000 +0000 ++++ src/NetworkManagerDbus.c 2006-04-03 18:14:06.000000000 +0100 +@@ -193,6 +193,7 @@ static DeviceStatusSignals dev_status_si + { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, + { DEVICE_ACTIVATING, "DeviceActivating" }, + { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, ++ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, + { DEVICE_ADDED, "DeviceAdded" }, + { DEVICE_REMOVED, "DeviceRemoved" }, + { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, +diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.h network-manager-0.6.2/src/NetworkManagerDbus.h +--- src/NetworkManagerDbus.h 2005-12-31 08:21:22.000000000 +0000 ++++ src/NetworkManagerDbus.h 2006-04-03 18:14:06.000000000 +0100 +@@ -40,6 +40,7 @@ typedef enum + DEVICE_ACTIVATING, + DEVICE_ACTIVATION_FAILED, + DEVICE_ACTIVATION_CANCELED, ++ DEVICE_DEACTIVATED, + DEVICE_ADDED, + DEVICE_REMOVED, + DEVICE_CARRIER_ON, +diff -ruNp network-manager-0.6.2~/src/nm-device.c network-manager-0.6.2/src/nm-device.c +--- src/nm-device.c 2006-03-21 17:56:34.000000000 +0000 ++++ src/nm-device.c 2006-04-03 18:14:06.000000000 +0100 +@@ -1445,6 +1445,7 @@ nm_device_deactivate (NMDevice *self) + NM_DEVICE_GET_CLASS (self)->deactivate (self); + + nm_schedule_state_change_signal_broadcast (self->priv->app_data); ++ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); + } + -- cgit 1.3.0-6-gf8a5 From b05311797c4d27d5b905b12a36a87953b0ce56c6 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Tue, 15 Aug 2006 14:00:11 +0000 Subject: - Bumped hal deps to version 0.5.7.1. NM needs user haldaemon for dbus operations. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@946 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/02-dbus_access_network_manager.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/patches') diff --git a/debian/patches/02-dbus_access_network_manager.patch b/debian/patches/02-dbus_access_network_manager.patch index afa3bc3b..139a3d87 100644 --- a/debian/patches/02-dbus_access_network_manager.patch +++ b/debian/patches/02-dbus_access_network_manager.patch @@ -5,7 +5,7 @@ - -+ ++ + + + -- cgit 1.3.0-6-gf8a5 From 81542ea9555bbb0e31188705362622d2a99c5aa2 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Tue, 15 Aug 2006 18:17:46 +0000 Subject: (really) fixed debian/patches/06 git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@949 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/06-dispatch_more_events.patch | 67 +++++++++++++--------------- 1 file changed, 32 insertions(+), 35 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/06-dispatch_more_events.patch b/debian/patches/06-dispatch_more_events.patch index adbae7ae..60d50432 100644 --- a/debian/patches/06-dispatch_more_events.patch +++ b/debian/patches/06-dispatch_more_events.patch @@ -48,10 +48,9 @@ nmd_execute_scripts (action, dev_iface_name); } -diff -ruNp network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in network-manager-0.6.2/man/NetworkManagerDispatcher.1.in ---- man/NetworkManagerDispatcher.1.in 2006-04-03 18:10:32.000000000 +0100 -+++ man/NetworkManagerDispatcher.1.in 2006-04-03 18:14:06.000000000 +0100 -@@ -13,10 +13,14 @@ The \fINetworkManagerDispatcher\fP daemo +--- man/NetworkManagerDispatcher.1.in 2006-02-01 19:14:15.000000000 +0100 ++++ man/NetworkManagerDispatcher.1.in.new 2006-08-15 20:13:00.000000000 +0200 +@@ -12,10 +12,14 @@ directory in response to interfaces coming up and down. The scripts are run alphabetically. The first parameter is the network interface name. The second parameter is @@ -68,35 +67,33 @@ diff -ruNp network-manager-0.6.2~/man/NetworkManagerDispatcher.1.in network-mana .SH OPTIONS The following options are supported: .TP -diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.c network-manager-0.6.2/src/NetworkManagerDbus.c ---- src/NetworkManagerDbus.c 2006-02-24 18:59:03.000000000 +0000 -+++ src/NetworkManagerDbus.c 2006-04-03 18:14:06.000000000 +0100 -@@ -193,6 +193,7 @@ static DeviceStatusSignals dev_status_si - { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, - { DEVICE_ACTIVATING, "DeviceActivating" }, - { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, -+ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, - { DEVICE_ADDED, "DeviceAdded" }, - { DEVICE_REMOVED, "DeviceRemoved" }, - { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, -diff -ruNp network-manager-0.6.2~/src/NetworkManagerDbus.h network-manager-0.6.2/src/NetworkManagerDbus.h ---- src/NetworkManagerDbus.h 2005-12-31 08:21:22.000000000 +0000 -+++ src/NetworkManagerDbus.h 2006-04-03 18:14:06.000000000 +0100 -@@ -40,6 +40,7 @@ typedef enum - DEVICE_ACTIVATING, - DEVICE_ACTIVATION_FAILED, - DEVICE_ACTIVATION_CANCELED, -+ DEVICE_DEACTIVATED, - DEVICE_ADDED, - DEVICE_REMOVED, - DEVICE_CARRIER_ON, -diff -ruNp network-manager-0.6.2~/src/nm-device.c network-manager-0.6.2/src/nm-device.c ---- src/nm-device.c 2006-03-21 17:56:34.000000000 +0000 -+++ src/nm-device.c 2006-04-03 18:14:06.000000000 +0100 -@@ -1445,6 +1445,7 @@ nm_device_deactivate (NMDevice *self) - NM_DEVICE_GET_CLASS (self)->deactivate (self); - - nm_schedule_state_change_signal_broadcast (self->priv->app_data); -+ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); +--- src/NetworkManagerDbus.c 2006-05-21 19:28:02.000000000 +0200 ++++ src/NetworkManagerDbus.c.new 2006-08-15 20:15:18.000000000 +0200 +@@ -191,6 +191,7 @@ + { DEVICE_NOW_ACTIVE, "DeviceNowActive" }, + { DEVICE_ACTIVATING, "DeviceActivating" }, + { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" }, ++ { DEVICE_DEACTIVATED, "DeviceDeactivated" }, + { DEVICE_ADDED, "DeviceAdded" }, + { DEVICE_REMOVED, "DeviceRemoved" }, + { DEVICE_CARRIER_ON, "DeviceCarrierOn" }, +--- src/NetworkManagerDbus.h 2006-05-21 19:28:02.000000000 +0200 ++++ src/NetworkManagerDbus.h.new 2006-08-15 20:15:39.000000000 +0200 +@@ -40,6 +40,7 @@ + DEVICE_ACTIVATING, + DEVICE_ACTIVATION_FAILED, + DEVICE_ACTIVATION_CANCELED, ++ DEVICE_DEACTIVATED, + DEVICE_ADDED, + DEVICE_REMOVED, + DEVICE_CARRIER_ON, +--- src/nm-device.c 2006-07-10 22:30:49.000000000 +0200 ++++ src/nm-device.c.new 2006-08-15 20:16:11.000000000 +0200 +@@ -1436,6 +1436,7 @@ + NM_DEVICE_GET_CLASS (self)->deactivate (self); + + nm_schedule_state_change_signal_broadcast (self->priv->app_data); ++ nm_dbus_schedule_device_status_change_signal (self->priv->app_data, self, NULL, DEVICE_DEACTIVATED); } - + + -- cgit 1.3.0-6-gf8a5 From 23a97e78c68fb99151de2bc640dfebf358794d43 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Tue, 5 Sep 2006 17:50:22 +0000 Subject: * Changed adeprecated dbus function (closes: 385380) - added 12_dbus0.9.patch. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@994 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/12_dbus0.9.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 debian/patches/12_dbus0.9.patch (limited to 'debian/patches') diff --git a/debian/patches/12_dbus0.9.patch b/debian/patches/12_dbus0.9.patch new file mode 100644 index 00000000..a3aa9e03 --- /dev/null +++ b/debian/patches/12_dbus0.9.patch @@ -0,0 +1,20 @@ +--- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 ++++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 +@@ -230,7 +230,7 @@ + { + /* Try to reactivate our connection to dbus on the next pass through the event loop */ + ctx->nm_state = LIBNM_NO_DBUS; +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + libnm_glib_schedule_dbus_watcher (ctx); + } + else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) +@@ -444,7 +444,7 @@ + g_main_loop_unref (ctx->g_main_loop); + + if (ctx->dbus_con) +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + + if (ctx->callbacks_lock) + g_mutex_free (ctx->callbacks_lock); -- cgit 1.3.0-6-gf8a5 From 8c51ad8783cedd385dcaea3d308e6e08389c9875 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 24 Oct 2006 18:24:47 +0000 Subject: * Fix the parser for /etc/network/interfaces. The code is still shit, but at least now it accepts tabs or spaces (or combinations of both) as token separator. * On dns changes, do not restart nscd, only invalidate the hosts cache. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1100 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 93 ++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 3 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index c8006623..8a54e68e 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -1,5 +1,5 @@ diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c -index 740572a..3a2fdd6 100644 +index 740572a..93c2914 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -37,6 +37,7 @@ #include "interface_parser.h" @@ -10,6 +10,25 @@ index 740572a..3a2fdd6 100644 /* * nm_system_init +@@ -238,14 +239,14 @@ void nm_system_kill_all_dhcp_daemons (vo + /* + * nm_system_update_dns + * +- * Make glibc/nscd aware of any changes to the resolv.conf file by +- * restarting nscd. ++ * Invalidate the nscd host cache, if it exists, since ++ * we changed resolv.conf. + * + */ + void nm_system_update_dns (void) + { +- nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart"); +- ++ nm_info ("Clearing nscd hosts cache."); ++ nm_spawn_process ("/usr/sbin/nscd -i hosts"); + } + + @@ -514,13 +515,60 @@ gboolean nm_system_device_get_use_dhcp ( /* * nm_system_device_get_disabled @@ -175,10 +194,78 @@ index 740572a..3a2fdd6 100644 diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c -index 53d6487..aa81134 100644 +index 53d6487..2fa559f 100644 --- a/src/backends/interface_parser.c +++ b/src/backends/interface_parser.c -@@ -198,6 +198,18 @@ if_block *ifparser_getif(const char* ifa +@@ -71,7 +71,8 @@ void add_data(const char *key,const char + //printf("added data '%s' with key '%s'\n",data,key); + } + +-#define SPACE_OR_TAB(string,ret) {ret = strchr(string,' ');ret=(ret == NULL?strchr(string,'\t'):ret);} ++// define what we consider a whitespace ++#define WS " \t" + + void ifparser_init(void) + { +@@ -105,36 +106,52 @@ void ifparser_init(void) + if (line[0]=='#' || line[0]=='\0') + continue; + +- SPACE_OR_TAB(line,space) ++ space = line; ++ while (!strchr(WS, space[0])) space++; ++ + if (space == NULL) + { +- nm_warning ("Error: Can't parse interface line '%s'\n",line); ++ nm_warning ("Error: Can't parse line '%s'\n",line); + continue; + } ++ ++ // terminate line string and skip further whitespaces + space[0] = '\0'; +- ++ while (isspace(space[1])) space++; ++ + // There are four different stanzas: + // iface, mapping, auto and allow-*. Create a block for each of them. + if (strcmp(line,"iface")==0) + { +- char *space2 = strchr(space+1,' '); ++ char *space2 = space+1; ++ while (!strchr(WS, space2[0])) space2++; ++ + if (space2 == NULL) + { + nm_warning ("Error: Can't parse iface line '%s'\n",space+1); + continue; + } ++ ++ // terminate space string and skip further whitespaces + space2[0]='\0'; ++ while (isspace(space2[1])) space2++; ++ + add_block(line,space+1); + + if (space2[1]!='\0') + { +- space = strchr(space2+1,' '); ++ space = space2+1; ++ while (!strchr(WS, space[0])) space++; ++ + if (space == NULL) + { + nm_warning ("Error: Can't parse data '%s'\n",space2+1); + continue; + } ++ // terminate space2 string and skip further whitespaces + space[0] = '\0'; ++ while (isspace(space[1])) space++; ++ + add_data(space2+1,space+1); + } + } +@@ -198,6 +215,18 @@ if_block *ifparser_getif(const char* ifa return NULL; } -- cgit 1.3.0-6-gf8a5 From 28a4b40856f34de9dc8f4d1ef8825cc943379d81 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 24 Oct 2006 21:23:24 +0000 Subject: Make the /e/n/i a bit more robust and easier to read. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1104 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 140 +++++++++++++++++++++++++-------- 1 file changed, 107 insertions(+), 33 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index 8a54e68e..8882e749 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -194,10 +194,25 @@ index 740572a..93c2914 100644 diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c -index 53d6487..2fa559f 100644 +index 53d6487..b3ad300 100644 --- a/src/backends/interface_parser.c +++ b/src/backends/interface_parser.c -@@ -71,7 +71,8 @@ void add_data(const char *key,const char +@@ -50,11 +50,13 @@ void add_block(const char *type, const c + + void add_data(const char *key,const char *data) + { ++ if_data *ret; ++ + // Check if there is a block where we can attach our data + if (first == NULL) + return; + +- if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data)); ++ ret = (if_data*) calloc(1,sizeof(struct _if_data)); + ret->key = g_strdup(key); + ret->data = g_strdup(data); + +@@ -71,14 +73,18 @@ void add_data(const char *key,const char //printf("added data '%s' with key '%s'\n",data,key); } @@ -207,65 +222,124 @@ index 53d6487..2fa559f 100644 void ifparser_init(void) { -@@ -105,36 +106,52 @@ void ifparser_init(void) - if (line[0]=='#' || line[0]=='\0') + FILE *inp = fopen(INTERFACES,"r"); + int ret = 0; ++ int pos; ++ int len; + char *line; +- char *space; ++ char *key; ++ char *data; + char rline[255]; + + if (inp == NULL) +@@ -89,7 +95,7 @@ void ifparser_init(void) + first = last = NULL; + while(1) + { +- line = space = NULL; ++ line = NULL; + ret = fscanf(inp,"%255[^\n]\n",rline); + if (ret == EOF) + break; +@@ -102,50 +108,71 @@ void ifparser_init(void) + line = rline; + while(line[0] == ' ') + line++; +- if (line[0]=='#' || line[0]=='\0') ++ if (line[0] == '#' || line[0] == '\0') continue; - SPACE_OR_TAB(line,space) -+ space = line; -+ while (!strchr(WS, space[0])) space++; +- if (space == NULL) ++ len = strlen(line); ++ pos = 0; ++ while (!strchr(WS, line[pos]) && pos < len) pos++; ++ ++ // terminate key string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; + - if (space == NULL) ++ if (pos >= len) { - nm_warning ("Error: Can't parse interface line '%s'\n",line); -+ nm_warning ("Error: Can't parse line '%s'\n",line); ++ nm_warning ("Error: Can't parse line '%s'\n", line); continue; } -+ -+ // terminate line string and skip further whitespaces - space[0] = '\0'; +- space[0] = '\0'; - -+ while (isspace(space[1])) space++; ++ key = &line[0]; ++ data = &line[pos]; + // There are four different stanzas: // iface, mapping, auto and allow-*. Create a block for each of them. - if (strcmp(line,"iface")==0) +- if (strcmp(line,"iface")==0) ++ if (strcmp(key, "iface") == 0) { - char *space2 = strchr(space+1,' '); -+ char *space2 = space+1; -+ while (!strchr(WS, space2[0])) space2++; +- if (space2 == NULL) ++ char *key2; ++ ++ while (!strchr(WS, line[pos]) && pos < len ) pos++; + - if (space2 == NULL) ++ // terminate first data string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; ++ if (pos >= len) { - nm_warning ("Error: Can't parse iface line '%s'\n",space+1); +- nm_warning ("Error: Can't parse iface line '%s'\n",space+1); ++ nm_warning ("Error: Can't parse iface line '%s'\n", data); continue; } -+ -+ // terminate space string and skip further whitespaces - space2[0]='\0'; -+ while (isspace(space2[1])) space2++; -+ - add_block(line,space+1); +- space2[0]='\0'; +- add_block(line,space+1); ++ key2 = &line[pos]; ++ ++ add_block(key, data); - if (space2[1]!='\0') +- if (space2[1]!='\0') ++ if (pos < len) { - space = strchr(space2+1,' '); -+ space = space2+1; -+ while (!strchr(WS, space[0])) space++; +- if (space == NULL) ++ ++ while (!strchr(WS, line[pos]) && pos < len ) pos++; + - if (space == NULL) ++ // terminate key2 string and skip further whitespaces ++ line[pos++] = '\0'; ++ while (strchr(WS, line[pos]) && pos < len) pos++; ++ if (pos >= len) { - nm_warning ("Error: Can't parse data '%s'\n",space2+1); +- nm_warning ("Error: Can't parse data '%s'\n",space2+1); ++ nm_warning ("Error: Can't parse inet line '%s'\n", key2); continue; } -+ // terminate space2 string and skip further whitespaces - space[0] = '\0'; -+ while (isspace(space[1])) space++; +- space[0] = '\0'; +- add_data(space2+1,space+1); ++ data = &line[pos]; + - add_data(space2+1,space+1); ++ add_data(key2, data); } } -@@ -198,6 +215,18 @@ if_block *ifparser_getif(const char* ifa +- else if (strcmp(line,"auto")==0) +- add_block(line,space+1); +- else if (strcmp(line,"mapping")==0) +- add_block(line,space+1); +- else if (strncmp(line,"allow-",6)==0) +- add_block(line,space+1); ++ else if (strcmp(key, "auto") == 0) ++ add_block(key, data); ++ else if (strcmp(key, "mapping") == 0) ++ add_block(key, data); ++ else if (strncmp(key, "allow-", 6) == 0) ++ add_block(key, data); + else +- add_data(line,space+1); ++ add_data(key, data); + + //printf("line: '%s' ret=%d\n",rline,ret); + } +@@ -198,6 +225,18 @@ if_block *ifparser_getif(const char* ifa return NULL; } -- cgit 1.3.0-6-gf8a5 From 87fb83553f69096efd8cae43f93025a6911563a5 Mon Sep 17 00:00:00 2001 From: Riccardo Setti Date: Tue, 14 Nov 2006 20:50:36 +0000 Subject: added 12_dbus1.0.patch git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1148 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/12_dbus0.9.patch | 20 -------------------- debian/patches/12_dbus1.0.patch | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 20 deletions(-) delete mode 100644 debian/patches/12_dbus0.9.patch create mode 100644 debian/patches/12_dbus1.0.patch (limited to 'debian/patches') diff --git a/debian/patches/12_dbus0.9.patch b/debian/patches/12_dbus0.9.patch deleted file mode 100644 index a3aa9e03..00000000 --- a/debian/patches/12_dbus0.9.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 -+++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 -@@ -230,7 +230,7 @@ - { - /* Try to reactivate our connection to dbus on the next pass through the event loop */ - ctx->nm_state = LIBNM_NO_DBUS; -- dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); - libnm_glib_schedule_dbus_watcher (ctx); - } - else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) -@@ -444,7 +444,7 @@ - g_main_loop_unref (ctx->g_main_loop); - - if (ctx->dbus_con) -- dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); - - if (ctx->callbacks_lock) - g_mutex_free (ctx->callbacks_lock); diff --git a/debian/patches/12_dbus1.0.patch b/debian/patches/12_dbus1.0.patch new file mode 100644 index 00000000..85e0b5bc --- /dev/null +++ b/debian/patches/12_dbus1.0.patch @@ -0,0 +1,31 @@ +--- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 ++++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 +@@ -230,7 +230,7 @@ + { + /* Try to reactivate our connection to dbus on the next pass through the event loop */ + ctx->nm_state = LIBNM_NO_DBUS; +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + libnm_glib_schedule_dbus_watcher (ctx); + } + else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) +@@ -444,7 +444,7 @@ + g_main_loop_unref (ctx->g_main_loop); + + if (ctx->dbus_con) +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + + if (ctx->callbacks_lock) + g_mutex_free (ctx->callbacks_lock); +--- src/NetworkManagerDbus.c.orig 2006-11-14 21:10:57.000000000 +0100 ++++ src//NetworkManagerDbus.c 2006-11-14 21:13:19.000000000 +0100 +@@ -832,7 +832,7 @@ + } + + dbus_error_init (&error); +-#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 60) ++#if (DBUS_VERSION_MAJOR == 1) || (DBUS_VERSION_MINOR >= 60) + flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; /* Prohibit replacement is now the default */ + #else + flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; -- cgit 1.3.0-6-gf8a5 From f6000fd2f8d83e5df7edcedf16e21cb376dbb125 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 30 Nov 2006 17:32:36 +0000 Subject: Apply the patch from Cyril Brulebois, which fixes some typos in the french translation. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1177 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/10-po_fr.patch | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 debian/patches/10-po_fr.patch (limited to 'debian/patches') diff --git a/debian/patches/10-po_fr.patch b/debian/patches/10-po_fr.patch new file mode 100644 index 00000000..e2c2b4f6 --- /dev/null +++ b/debian/patches/10-po_fr.patch @@ -0,0 +1,37 @@ +Index: po/fr.po +=================================================================== +RCS file: /cvs/gnome/NetworkManager/po/fr.po,v +retrieving revision 1.2.6.2 +diff -u -3 -p -r1.2.6.2 fr.po +--- po/fr.po 12 Jun 2006 15:47:57 -0000 1.2.6.2 ++++ po/fr.po 30 Nov 2006 17:29:17 -0000 +@@ -250,7 +250,7 @@ msgstr "_Se connecter à un autre résea + + #: ../gnome/applet/applet.c:1562 + msgid "Create _New Wireless Network..." +-msgstr "Créer_un nouveau réseau sans fil..." ++msgstr "Créer _un nouveau réseau sans fil..." + + #: ../gnome/applet/applet.c:1685 + msgid "_VPN Connections" +@@ -290,17 +290,17 @@ msgstr "NetworkManager n'est pas lancé. + #. 'Enable Networking' item + #: ../gnome/applet/applet.c:2170 + msgid "Enable _Networking" +-msgstr "Activer_le réseau" ++msgstr "Activer _le réseau" + + #. 'Enable Wireless' item + #: ../gnome/applet/applet.c:2176 + msgid "Enable _Wireless" +-msgstr "Activer la_connexion sans fil" ++msgstr "Activer la _connexion sans fil" + + #. 'Connection Information' item + #: ../gnome/applet/applet.c:2182 + msgid "Connection _Information" +-msgstr "Informations sur la_connexion" ++msgstr "Informations sur la _connexion" + + #. Help item + #: ../gnome/applet/applet.c:2193 -- cgit 1.3.0-6-gf8a5 From 9e6221b09d05a15bd1568896ec959ce65210a7e8 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 30 Nov 2006 19:05:17 +0000 Subject: Run dos2unix over 12_dbus1.0.patch to remove the unnecessary line-feeds. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1178 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/12_dbus1.0.patch | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/12_dbus1.0.patch b/debian/patches/12_dbus1.0.patch index 85e0b5bc..d9380526 100644 --- a/debian/patches/12_dbus1.0.patch +++ b/debian/patches/12_dbus1.0.patch @@ -1,23 +1,23 @@ ---- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 -+++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 -@@ -230,7 +230,7 @@ - { - /* Try to reactivate our connection to dbus on the next pass through the event loop */ - ctx->nm_state = LIBNM_NO_DBUS; -- dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); - libnm_glib_schedule_dbus_watcher (ctx); - } - else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) -@@ -444,7 +444,7 @@ - g_main_loop_unref (ctx->g_main_loop); - - if (ctx->dbus_con) -- dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); - - if (ctx->callbacks_lock) - g_mutex_free (ctx->callbacks_lock); +--- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 ++++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 +@@ -230,7 +230,7 @@ + { + /* Try to reactivate our connection to dbus on the next pass through the event loop */ + ctx->nm_state = LIBNM_NO_DBUS; +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + libnm_glib_schedule_dbus_watcher (ctx); + } + else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) +@@ -444,7 +444,7 @@ + g_main_loop_unref (ctx->g_main_loop); + + if (ctx->dbus_con) +- dbus_connection_disconnect (ctx->dbus_con); ++ dbus_connection_close (ctx->dbus_con); + + if (ctx->callbacks_lock) + g_mutex_free (ctx->callbacks_lock); --- src/NetworkManagerDbus.c.orig 2006-11-14 21:10:57.000000000 +0100 +++ src//NetworkManagerDbus.c 2006-11-14 21:13:19.000000000 +0100 @@ -832,7 +832,7 @@ -- cgit 1.3.0-6-gf8a5 From afce5bd8bb8fef0a36c50fba66fc1acce8cafef0 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 30 Nov 2006 19:53:16 +0000 Subject: Add missing ".SH NAME" stanzas to man pages. Fixes linda/lintia warnings. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1180 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/11-man_page_sh_name.patch | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 debian/patches/11-man_page_sh_name.patch (limited to 'debian/patches') diff --git a/debian/patches/11-man_page_sh_name.patch b/debian/patches/11-man_page_sh_name.patch new file mode 100644 index 00000000..344a3cb1 --- /dev/null +++ b/debian/patches/11-man_page_sh_name.patch @@ -0,0 +1,45 @@ +Index: man/NetworkManager.1.in +=================================================================== +RCS file: /cvs/gnome/NetworkManager/man/NetworkManager.1.in,v +retrieving revision 1.2 +diff -u -3 -p -r1.2 NetworkManager.1.in +--- man/NetworkManager.1.in 1 Feb 2006 18:14:15 -0000 1.2 ++++ man/NetworkManager.1.in 30 Nov 2006 19:33:39 -0000 +@@ -3,6 +3,7 @@ + .\" Copyright (C) 2005 Robert Love + .\" + .TH NETWORKMANAGER "1" ++.SH NAME + NetworkManager \- network management daemon + .SH SYNOPSIS + .B NetworkManager [\-\-no-daemon] [\-\-enable-test-devices] +Index: man/NetworkManagerDispatcher.1.in +=================================================================== +RCS file: /cvs/gnome/NetworkManager/man/NetworkManagerDispatcher.1.in,v +retrieving revision 1.2 +diff -u -3 -p -r1.2 NetworkManagerDispatcher.1.in +--- man/NetworkManagerDispatcher.1.in 1 Feb 2006 18:14:15 -0000 1.2 ++++ man/NetworkManagerDispatcher.1.in 30 Nov 2006 19:33:39 -0000 +@@ -3,6 +3,7 @@ + .\" Copyright (C) 2005 Robert Love + .\" + .TH NETWORKMANAGERDISPATCHER "1" ++.SH NAME + NetworkManagerDispatcher \- daemon that runs commands in response to off/online + .SH SYNOPSIS + .B NetworkManagerDispatcher [\-\-no-daemon] +Index: man/nm-tool.1.in +=================================================================== +RCS file: /cvs/gnome/NetworkManager/man/nm-tool.1.in,v +retrieving revision 1.1 +diff -u -3 -p -r1.1 nm-tool.1.in +--- man/nm-tool.1.in 1 Feb 2006 18:14:15 -0000 1.1 ++++ man/nm-tool.1.in 30 Nov 2006 19:33:39 -0000 +@@ -3,6 +3,7 @@ + .\" Copyright (C) 2005 Robert Love + .\" + .TH NM-TOOL "1" ++.SH NAME + nm-tool \- utility to report NetworkManager state + .SH SYNOPSIS + .B nm-tool -- cgit 1.3.0-6-gf8a5 From 97e0f5b21486b4759830beb09f45c53db6c96b5f Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 10 Jan 2007 21:05:48 +0000 Subject: Pull the dbus 1.0 changes from SVN, which uses unref rather than close. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1215 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/12_dbus1.0.patch | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/12_dbus1.0.patch b/debian/patches/12_dbus1.0.patch index d9380526..a8ce1422 100644 --- a/debian/patches/12_dbus1.0.patch +++ b/debian/patches/12_dbus1.0.patch @@ -1,31 +1,42 @@ ---- ./gnome/libnm_glib/libnm_glib.c.old 2006-08-24 18:08:22.200388750 +0200 -+++ ./gnome/libnm_glib/libnm_glib.c 2006-08-24 18:08:33.353085750 +0200 -@@ -230,7 +230,7 @@ +diff -urN NetworkManager-0.6.4.orig/gnome/libnm_glib/libnm_glib.c NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c +--- NetworkManager-0.6.4.orig/gnome/libnm_glib/libnm_glib.c 2007-01-10 21:58:05.000000000 +0100 ++++ NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c 2007-01-10 22:00:00.000000000 +0100 +@@ -230,7 +230,8 @@ { /* Try to reactivate our connection to dbus on the next pass through the event loop */ ctx->nm_state = LIBNM_NO_DBUS; - dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); ++ dbus_connection_unref (ctx->dbus_con); ++ ctx->dbus_con = NULL; libnm_glib_schedule_dbus_watcher (ctx); } else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) -@@ -444,7 +444,7 @@ +@@ -444,7 +445,10 @@ g_main_loop_unref (ctx->g_main_loop); if (ctx->dbus_con) - dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_close (ctx->dbus_con); ++ { ++ dbus_connection_unref (ctx->dbus_con); ++ ctx->dbus_con = NULL; ++ } if (ctx->callbacks_lock) g_mutex_free (ctx->callbacks_lock); ---- src/NetworkManagerDbus.c.orig 2006-11-14 21:10:57.000000000 +0100 -+++ src//NetworkManagerDbus.c 2006-11-14 21:13:19.000000000 +0100 -@@ -832,7 +832,7 @@ +diff -urN NetworkManager-0.6.4.orig/src/NetworkManagerDbus.c NetworkManager-0.6.4/src/NetworkManagerDbus.c +--- NetworkManager-0.6.4.orig/src/NetworkManagerDbus.c 2007-01-10 21:58:05.000000000 +0100 ++++ NetworkManager-0.6.4/src/NetworkManagerDbus.c 2007-01-10 22:01:49.000000000 +0100 +@@ -831,10 +831,10 @@ } dbus_error_init (&error); -#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 60) -+#if (DBUS_VERSION_MAJOR == 1) || (DBUS_VERSION_MINOR >= 60) - flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; /* Prohibit replacement is now the default */ +- flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; /* Prohibit replacement is now the default */ ++#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR < 60) ++ flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; #else - flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; +- flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; ++ flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; + #endif + ret = dbus_bus_request_name (connection, NM_DBUS_SERVICE, flags, &error); + if (dbus_error_is_set (&error)) -- cgit 1.3.0-6-gf8a5 From b2f669e84c3cf0ab1ec1b9c29c877dcb80aa20b9 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 3 Mar 2007 02:55:22 +0000 Subject: Add patch by Andy Whitcroft. "|" the wep capabilities instead of "&". git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1245 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/13-wep_capabilities.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 debian/patches/13-wep_capabilities.patch (limited to 'debian/patches') diff --git a/debian/patches/13-wep_capabilities.patch b/debian/patches/13-wep_capabilities.patch new file mode 100644 index 00000000..e69dcad6 --- /dev/null +++ b/debian/patches/13-wep_capabilities.patch @@ -0,0 +1,21 @@ +Index: src/NetworkManagerAP.c +=================================================================== +--- src/NetworkManagerAP.c (Revision 2356) ++++ src/NetworkManagerAP.c (Revision 2357) +@@ -572,12 +572,14 @@ + { + if (cipher & IW_AUTH_CIPHER_WEP40) + { +- caps |= (NM_802_11_CAP_PROTO_WEP & NM_802_11_CAP_CIPHER_WEP40); ++ caps |= NM_802_11_CAP_PROTO_WEP; ++ caps |= NM_802_11_CAP_CIPHER_WEP40; + caps &= ~NM_802_11_CAP_PROTO_NONE; + } + if (cipher & IW_AUTH_CIPHER_WEP104) + { +- caps |= (NM_802_11_CAP_PROTO_WEP & NM_802_11_CAP_CIPHER_WEP104); ++ caps |= NM_802_11_CAP_PROTO_WEP; ++ caps |= NM_802_11_CAP_CIPHER_WEP104; + caps &= ~NM_802_11_CAP_PROTO_NONE; + } + if (cipher & IW_AUTH_CIPHER_TKIP) -- cgit 1.3.0-6-gf8a5 From 071455bd735a38e9df53ed9efe717f75003d2579 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 3 Apr 2007 00:19:08 +0000 Subject: Small fix for the German translation git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1320 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/14-po_de.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 debian/patches/14-po_de.patch (limited to 'debian/patches') diff --git a/debian/patches/14-po_de.patch b/debian/patches/14-po_de.patch new file mode 100644 index 00000000..25ceff26 --- /dev/null +++ b/debian/patches/14-po_de.patch @@ -0,0 +1,13 @@ +Index: po/de.po +=================================================================== +--- po/de.po (Revision 2227) ++++ po/de.po (Arbeitskopie) +@@ -276,7 +276,7 @@ + #. 'Enable Networking' item + #: ../gnome/applet/applet.c:2170 + msgid "Enable _Networking" +-msgstr "Netzwerk_aktivieren" ++msgstr "Netzwerk _aktivieren" + + #. 'Enable Wireless' item + #: ../gnome/applet/applet.c:2176 -- cgit 1.3.0-6-gf8a5 From e91c21edc2b06e8b550d5565b6655a892dbbb8ea Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 3 Apr 2007 00:42:26 +0000 Subject: Update the Debian backend: - Only call nscd -i hosts when nscd is installed http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402436 - Set status variable to return code of ifup/ifdown http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415642 - Remove mDNSResponder restart. Obosoleted by Avahi which doesn't need that. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1321 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 46 ++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index 8882e749..b8967be7 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -1,8 +1,8 @@ diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c -index 740572a..93c2914 100644 +index 740572a..4e3e44a 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c -@@ -37,6 +37,7 @@ #include "interface_parser.h" +@@ -37,6 +37,7 @@ #include "nm-utils.h" #define ARPING "/usr/sbin/arping" @@ -10,7 +10,7 @@ index 740572a..93c2914 100644 /* * nm_system_init -@@ -238,14 +239,14 @@ void nm_system_kill_all_dhcp_daemons (vo +@@ -238,14 +239,16 @@ void nm_system_kill_all_dhcp_daemons (void) /* * nm_system_update_dns * @@ -24,12 +24,24 @@ index 740572a..93c2914 100644 { - nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart"); - -+ nm_info ("Clearing nscd hosts cache."); -+ nm_spawn_process ("/usr/sbin/nscd -i hosts"); ++ if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { ++ nm_info ("Clearing nscd hosts cache."); ++ nm_spawn_process ("/usr/sbin/nscd -i hosts"); ++ } + } + + +@@ -257,8 +260,7 @@ void nm_system_update_dns (void) + * + */ + void nm_system_restart_mdns_responder (void) +-{ +- nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder"); ++{ } -@@ -514,13 +515,60 @@ gboolean nm_system_device_get_use_dhcp ( +@@ -514,13 +516,60 @@ gboolean nm_system_device_get_use_dhcp (NMDevice *dev) /* * nm_system_device_get_disabled * @@ -93,7 +105,7 @@ index 740572a..93c2914 100644 } -@@ -563,12 +611,18 @@ gboolean nm_system_deactivate_dialup (GS +@@ -563,12 +612,18 @@ gboolean nm_system_deactivate_dialup (GSList *list, const char *dialup) if (strcmp (dialup, config->name) == 0) { char *cmd; @@ -101,7 +113,8 @@ index 740572a..93c2914 100644 nm_info ("Deactivating dialup device %s (%s) ...", dialup, (char *) config->data); cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data); - nm_spawn_process (cmd); +- nm_spawn_process (cmd); ++ status = nm_spawn_process (cmd); g_free (cmd); - ret = TRUE; + if (status == 0) { @@ -113,7 +126,7 @@ index 740572a..93c2914 100644 break; } } -@@ -587,12 +641,18 @@ gboolean nm_system_activate_dialup (GSLi +@@ -587,12 +642,18 @@ gboolean nm_system_activate_dialup (GSList *list, const char *dialup) if (strcmp (dialup, config->name) == 0) { char *cmd; @@ -121,7 +134,8 @@ index 740572a..93c2914 100644 nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data); cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data); - nm_spawn_process (cmd); +- nm_spawn_process (cmd); ++ status = nm_spawn_process (cmd); g_free (cmd); - ret = TRUE; + if (status == 0) { @@ -133,7 +147,7 @@ index 740572a..93c2914 100644 break; } } -@@ -603,23 +663,26 @@ gboolean nm_system_activate_dialup (GSLi +@@ -603,23 +664,26 @@ gboolean nm_system_activate_dialup (GSList *list, const char *dialup) GSList * nm_system_get_dialup_config (void) { const char *buf; @@ -166,7 +180,7 @@ index 740572a..93c2914 100644 config->data = g_strdup (curr->name); /* interface name */ list = g_slist_append (list, config); -@@ -631,14 +694,6 @@ GSList * nm_system_get_dialup_config (vo +@@ -631,14 +695,6 @@ GSList * nm_system_get_dialup_config (void) } ifparser_destroy(); @@ -181,7 +195,7 @@ index 740572a..93c2914 100644 return list; } -@@ -679,7 +734,10 @@ void nm_system_set_hostname (NMIP4Config +@@ -679,7 +735,10 @@ void nm_system_set_hostname (NMIP4Config *config) */ gboolean nm_system_should_modify_resolv_conf (void) { @@ -197,7 +211,7 @@ diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c index 53d6487..b3ad300 100644 --- a/src/backends/interface_parser.c +++ b/src/backends/interface_parser.c -@@ -50,11 +50,13 @@ void add_block(const char *type, const c +@@ -50,11 +50,13 @@ void add_block(const char *type, const char* name) void add_data(const char *key,const char *data) { @@ -212,7 +226,7 @@ index 53d6487..b3ad300 100644 ret->key = g_strdup(key); ret->data = g_strdup(data); -@@ -71,14 +73,18 @@ void add_data(const char *key,const char +@@ -71,14 +73,18 @@ void add_data(const char *key,const char *data) //printf("added data '%s' with key '%s'\n",data,key); } @@ -339,7 +353,7 @@ index 53d6487..b3ad300 100644 //printf("line: '%s' ret=%d\n",rline,ret); } -@@ -198,6 +225,18 @@ if_block *ifparser_getif(const char* ifa +@@ -198,6 +225,18 @@ if_block *ifparser_getif(const char* iface) return NULL; } -- cgit 1.3.0-6-gf8a5 From d6f0e556f983e13a380a1f0634cebd296d75b34d Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 26 Aug 2007 18:42:08 +0000 Subject: * New upstream release. (Closes: #420959, #431658) - Runs wpa_supplicant in less verbose mode. (Closes: #375302, #431562) - Adds support for LEAP and phase two authentication. (Closes: #420959, #402747) * Removed patches that were merged upstream - debian/patches/09_fix_bigendian_words.patch - debian/patches/12_dbus1.0.patch - debian/patches/13-wep_capabilities git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1672 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/09_fix_bigendian_words.patch | 310 ---------------------------- debian/patches/12_dbus1.0.patch | 42 ---- debian/patches/13-wep_capabilities.patch | 21 -- 3 files changed, 373 deletions(-) delete mode 100644 debian/patches/09_fix_bigendian_words.patch delete mode 100644 debian/patches/12_dbus1.0.patch delete mode 100644 debian/patches/13-wep_capabilities.patch (limited to 'debian/patches') diff --git a/debian/patches/09_fix_bigendian_words.patch b/debian/patches/09_fix_bigendian_words.patch deleted file mode 100644 index 736103b9..00000000 --- a/debian/patches/09_fix_bigendian_words.patch +++ /dev/null @@ -1,310 +0,0 @@ ---- configure.orig 2006-08-07 17:02:37.000000000 +0200 -+++ configure 2006-08-07 17:03:56.000000000 +0200 -@@ -23030,6 +23030,293 @@ - < $srcdir/po/POTFILES.in > po/POTFILES - - -+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } -+if test "${ac_cv_c_bigendian+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ # See if sys/param.h defines the BYTE_ORDER macro. -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN -+ bogus endian macros -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ # It does; now see whether it defined to BIG_ENDIAN or not. -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+#if BYTE_ORDER != BIG_ENDIAN -+ not big endian -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_c_bigendian=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_c_bigendian=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # It does not; compile a test program. -+if test "$cross_compiling" = yes; then -+ # try to guess the endianness by grepping values into an object file -+ ac_cv_c_bigendian=unknown -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -+int -+main () -+{ -+ _ascii (); _ebcdic (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then -+ ac_cv_c_bigendian=yes -+fi -+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then -+ if test "$ac_cv_c_bigendian" = unknown; then -+ ac_cv_c_bigendian=no -+ else -+ # finding both strings is unlikely to happen, but who knows? -+ ac_cv_c_bigendian=unknown -+ fi -+fi -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+ -+ /* Are we little or big endian? From Harbison&Steele. */ -+ union -+ { -+ long int l; -+ char c[sizeof (long int)]; -+ } u; -+ u.l = 1; -+ return u.c[sizeof (long int) - 1] == 1; -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_c_bigendian=no -+else -+ echo "$as_me: program exited with status $ac_status" >&5 -+echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_c_bigendian=yes -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } -+case $ac_cv_c_bigendian in -+ yes) -+ -+cat >>confdefs.h <<\_ACEOF -+#define WORDS_BIGENDIAN 1 -+_ACEOF -+ ;; -+ no) -+ ;; -+ *) -+ { { echo "$as_me:$LINENO: error: unknown endianness -+presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -+echo "$as_me: error: unknown endianness -+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} -+ { (exit 1); exit 1; }; } ;; -+esac -+ -+ - - # Check whether --with-distro was given. - if test "${with_distro+set}" = set; then ---- configure.in.org 2006-08-07 17:02:45.000000000 +0200 -+++ configure.in 2006-08-07 17:03:37.000000000 +0200 -@@ -50,6 +50,11 @@ - AC_PROG_INTLTOOL([0.27.2]) - AM_GLIB_GNU_GETTEXT - -+dnl -+dnl Make sha1.c happy on big endian systems -+dnl -+AC_C_BIGENDIAN -+ - AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, arch or slackware])) - if test "z$with_distro" = "z"; then - AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") diff --git a/debian/patches/12_dbus1.0.patch b/debian/patches/12_dbus1.0.patch deleted file mode 100644 index a8ce1422..00000000 --- a/debian/patches/12_dbus1.0.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -urN NetworkManager-0.6.4.orig/gnome/libnm_glib/libnm_glib.c NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c ---- NetworkManager-0.6.4.orig/gnome/libnm_glib/libnm_glib.c 2007-01-10 21:58:05.000000000 +0100 -+++ NetworkManager-0.6.4/gnome/libnm_glib/libnm_glib.c 2007-01-10 22:00:00.000000000 +0100 -@@ -230,7 +230,8 @@ - { - /* Try to reactivate our connection to dbus on the next pass through the event loop */ - ctx->nm_state = LIBNM_NO_DBUS; -- dbus_connection_disconnect (ctx->dbus_con); -+ dbus_connection_unref (ctx->dbus_con); -+ ctx->dbus_con = NULL; - libnm_glib_schedule_dbus_watcher (ctx); - } - else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) -@@ -444,7 +445,10 @@ - g_main_loop_unref (ctx->g_main_loop); - - if (ctx->dbus_con) -- dbus_connection_disconnect (ctx->dbus_con); -+ { -+ dbus_connection_unref (ctx->dbus_con); -+ ctx->dbus_con = NULL; -+ } - - if (ctx->callbacks_lock) - g_mutex_free (ctx->callbacks_lock); -diff -urN NetworkManager-0.6.4.orig/src/NetworkManagerDbus.c NetworkManager-0.6.4/src/NetworkManagerDbus.c ---- NetworkManager-0.6.4.orig/src/NetworkManagerDbus.c 2007-01-10 21:58:05.000000000 +0100 -+++ NetworkManager-0.6.4/src/NetworkManagerDbus.c 2007-01-10 22:01:49.000000000 +0100 -@@ -831,10 +831,10 @@ - } - - dbus_error_init (&error); --#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR >= 60) -- flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; /* Prohibit replacement is now the default */ -+#if (DBUS_VERSION_MAJOR == 0) && (DBUS_VERSION_MINOR < 60) -+ flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; - #else -- flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT; -+ flags = DBUS_NAME_FLAG_DO_NOT_QUEUE; - #endif - ret = dbus_bus_request_name (connection, NM_DBUS_SERVICE, flags, &error); - if (dbus_error_is_set (&error)) diff --git a/debian/patches/13-wep_capabilities.patch b/debian/patches/13-wep_capabilities.patch deleted file mode 100644 index e69dcad6..00000000 --- a/debian/patches/13-wep_capabilities.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: src/NetworkManagerAP.c -=================================================================== ---- src/NetworkManagerAP.c (Revision 2356) -+++ src/NetworkManagerAP.c (Revision 2357) -@@ -572,12 +572,14 @@ - { - if (cipher & IW_AUTH_CIPHER_WEP40) - { -- caps |= (NM_802_11_CAP_PROTO_WEP & NM_802_11_CAP_CIPHER_WEP40); -+ caps |= NM_802_11_CAP_PROTO_WEP; -+ caps |= NM_802_11_CAP_CIPHER_WEP40; - caps &= ~NM_802_11_CAP_PROTO_NONE; - } - if (cipher & IW_AUTH_CIPHER_WEP104) - { -- caps |= (NM_802_11_CAP_PROTO_WEP & NM_802_11_CAP_CIPHER_WEP104); -+ caps |= NM_802_11_CAP_PROTO_WEP; -+ caps |= NM_802_11_CAP_CIPHER_WEP104; - caps &= ~NM_802_11_CAP_PROTO_NONE; - } - if (cipher & IW_AUTH_CIPHER_TKIP) -- cgit 1.3.0-6-gf8a5 From 5b85762af7b4dd320c5b526a69dba9b9f380e285 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 26 Aug 2007 18:55:09 +0000 Subject: * Rebased and updated patches for new release - debian/patches/11-man_page_sh_name.patch - debian/patches/05-debian_backend.patch git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1674 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/05-debian_backend.patch | 15 --------------- debian/patches/11-man_page_sh_name.patch | 30 ------------------------------ 2 files changed, 45 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/05-debian_backend.patch b/debian/patches/05-debian_backend.patch index b8967be7..931a2063 100644 --- a/debian/patches/05-debian_backend.patch +++ b/debian/patches/05-debian_backend.patch @@ -211,21 +211,6 @@ diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c index 53d6487..b3ad300 100644 --- a/src/backends/interface_parser.c +++ b/src/backends/interface_parser.c -@@ -50,11 +50,13 @@ void add_block(const char *type, const char* name) - - void add_data(const char *key,const char *data) - { -+ if_data *ret; -+ - // Check if there is a block where we can attach our data - if (first == NULL) - return; - -- if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data)); -+ ret = (if_data*) calloc(1,sizeof(struct _if_data)); - ret->key = g_strdup(key); - ret->data = g_strdup(data); - @@ -71,14 +73,18 @@ void add_data(const char *key,const char *data) //printf("added data '%s' with key '%s'\n",data,key); } diff --git a/debian/patches/11-man_page_sh_name.patch b/debian/patches/11-man_page_sh_name.patch index 344a3cb1..b363268c 100644 --- a/debian/patches/11-man_page_sh_name.patch +++ b/debian/patches/11-man_page_sh_name.patch @@ -1,33 +1,3 @@ -Index: man/NetworkManager.1.in -=================================================================== -RCS file: /cvs/gnome/NetworkManager/man/NetworkManager.1.in,v -retrieving revision 1.2 -diff -u -3 -p -r1.2 NetworkManager.1.in ---- man/NetworkManager.1.in 1 Feb 2006 18:14:15 -0000 1.2 -+++ man/NetworkManager.1.in 30 Nov 2006 19:33:39 -0000 -@@ -3,6 +3,7 @@ - .\" Copyright (C) 2005 Robert Love - .\" - .TH NETWORKMANAGER "1" -+.SH NAME - NetworkManager \- network management daemon - .SH SYNOPSIS - .B NetworkManager [\-\-no-daemon] [\-\-enable-test-devices] -Index: man/NetworkManagerDispatcher.1.in -=================================================================== -RCS file: /cvs/gnome/NetworkManager/man/NetworkManagerDispatcher.1.in,v -retrieving revision 1.2 -diff -u -3 -p -r1.2 NetworkManagerDispatcher.1.in ---- man/NetworkManagerDispatcher.1.in 1 Feb 2006 18:14:15 -0000 1.2 -+++ man/NetworkManagerDispatcher.1.in 30 Nov 2006 19:33:39 -0000 -@@ -3,6 +3,7 @@ - .\" Copyright (C) 2005 Robert Love - .\" - .TH NETWORKMANAGERDISPATCHER "1" -+.SH NAME - NetworkManagerDispatcher \- daemon that runs commands in response to off/online - .SH SYNOPSIS - .B NetworkManagerDispatcher [\-\-no-daemon] Index: man/nm-tool.1.in =================================================================== RCS file: /cvs/gnome/NetworkManager/man/nm-tool.1.in,v -- cgit 1.3.0-6-gf8a5 From 614e759115bb291136e155f2b37af80780ef0ab3 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 26 Aug 2007 22:17:40 +0000 Subject: * Upstream has split nm-applet into a separate package. This means we no longer build the network-manager-gnome binary package from this source package. - Removed files that are now part of the new nm-applet source package + debian/network-manager-gnome.README.Debian + debian/patches/10-po_fr.patch + debian/patches/14-po_de.patch + debian/patches/03-dbus_access_nm_applet.patch + debian/network-manager-gnome.manpages + debian/nm-applet.sgml + debian/network-manager.install + debian/network-manager-gnome.install - debian/control + Remove the binary package network-manager-gnome. + Add Conflicts/Replaces: network-manager-gnome (<< 0.6.5-1) as nm-vpn-properties is now part of the network-manager binary package. + Update Build-Depends. Add autotools-dev and libglib2.0-dev, remove libpanel-applet2-dev. - debian/rules + Do not build the nm-applet.1 manpage anymore. + Exclude nm-vpn-properties from dh_shlibdeps. This is a temporary workaround until this binary has also been moved into the nm-applet source package. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1675 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/03-dbus_access_nm_applet.patch | 11 -------- debian/patches/10-po_fr.patch | 37 --------------------------- debian/patches/14-po_de.patch | 13 ---------- 3 files changed, 61 deletions(-) delete mode 100644 debian/patches/03-dbus_access_nm_applet.patch delete mode 100644 debian/patches/10-po_fr.patch delete mode 100644 debian/patches/14-po_de.patch (limited to 'debian/patches') diff --git a/debian/patches/03-dbus_access_nm_applet.patch b/debian/patches/03-dbus_access_nm_applet.patch deleted file mode 100644 index 94053ea2..00000000 --- a/debian/patches/03-dbus_access_nm_applet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gnome/applet/nm-applet.conf.orig 2006-02-07 04:22:39.000000000 +0100 -+++ gnome/applet/nm-applet.conf 2006-02-07 04:23:00.000000000 +0100 -@@ -8,7 +8,7 @@ - - - -- -+ - - - diff --git a/debian/patches/10-po_fr.patch b/debian/patches/10-po_fr.patch deleted file mode 100644 index e2c2b4f6..00000000 --- a/debian/patches/10-po_fr.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: po/fr.po -=================================================================== -RCS file: /cvs/gnome/NetworkManager/po/fr.po,v -retrieving revision 1.2.6.2 -diff -u -3 -p -r1.2.6.2 fr.po ---- po/fr.po 12 Jun 2006 15:47:57 -0000 1.2.6.2 -+++ po/fr.po 30 Nov 2006 17:29:17 -0000 -@@ -250,7 +250,7 @@ msgstr "_Se connecter à un autre résea - - #: ../gnome/applet/applet.c:1562 - msgid "Create _New Wireless Network..." --msgstr "Créer_un nouveau réseau sans fil..." -+msgstr "Créer _un nouveau réseau sans fil..." - - #: ../gnome/applet/applet.c:1685 - msgid "_VPN Connections" -@@ -290,17 +290,17 @@ msgstr "NetworkManager n'est pas lancé. - #. 'Enable Networking' item - #: ../gnome/applet/applet.c:2170 - msgid "Enable _Networking" --msgstr "Activer_le réseau" -+msgstr "Activer _le réseau" - - #. 'Enable Wireless' item - #: ../gnome/applet/applet.c:2176 - msgid "Enable _Wireless" --msgstr "Activer la_connexion sans fil" -+msgstr "Activer la _connexion sans fil" - - #. 'Connection Information' item - #: ../gnome/applet/applet.c:2182 - msgid "Connection _Information" --msgstr "Informations sur la_connexion" -+msgstr "Informations sur la _connexion" - - #. Help item - #: ../gnome/applet/applet.c:2193 diff --git a/debian/patches/14-po_de.patch b/debian/patches/14-po_de.patch deleted file mode 100644 index 25ceff26..00000000 --- a/debian/patches/14-po_de.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: po/de.po -=================================================================== ---- po/de.po (Revision 2227) -+++ po/de.po (Arbeitskopie) -@@ -276,7 +276,7 @@ - #. 'Enable Networking' item - #: ../gnome/applet/applet.c:2170 - msgid "Enable _Networking" --msgstr "Netzwerk_aktivieren" -+msgstr "Netzwerk _aktivieren" - - #. 'Enable Wireless' item - #: ../gnome/applet/applet.c:2176 -- cgit 1.3.0-6-gf8a5 From f04dbc618f4a8ef079e0acc1a185b0c7bf5eb2f6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 26 Aug 2007 22:59:14 +0000 Subject: * debian/patches/20-stable_branch_updates_r2652.patch - Pull updates from the stable branch up until revision 2652. - Fixes broken link detection and a couple of smaller issues. - Adds support for the rfkill switch. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1676 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- .../patches/20-stable_branch_updates_r2652.patch | 914 +++++++++++++++++++++ 1 file changed, 914 insertions(+) create mode 100644 debian/patches/20-stable_branch_updates_r2652.patch (limited to 'debian/patches') diff --git a/debian/patches/20-stable_branch_updates_r2652.patch b/debian/patches/20-stable_branch_updates_r2652.patch new file mode 100644 index 00000000..aea8e86f --- /dev/null +++ b/debian/patches/20-stable_branch_updates_r2652.patch @@ -0,0 +1,914 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (Revision 2558) ++++ ChangeLog (Revision 2652) +@@ -1,3 +1,99 @@ ++2007-07-26 Dan Williams ++ ++ Patch from Bernhard Miklautz ++ ++ * src/NetworkManagerSystem.c ++ - (nm_system_device_set_ip4_route): don't add the route if it's on the ++ same subnet (#437396) ++ ++2007-07-26 Dan Williams ++ ++ * src/nm-device-802-11-wireless.c ++ - (real_start): I hate orinoco; apparently has trouble scanning too soon ++ after being brought up, so do the initial scan a bit later. ++ ++2007-06-27 Dan Williams ++ ++ * src/NetworkManager.c ++ - (nm_hal_init): set hardware RF to enabled if no killswitches are found ++ after the initial discovery ++ ++2007-06-21 Dan Williams ++ ++ More fixes for Fedora #194124, gnome.org #354565 ++ ++ * src/nm-device-802-3-ethernet.c ++ - (real_act_stage1_prepare): new function; fail activation if device ++ doesn't have a link ++ ++ * src/NetworkManagerPolicy.c ++ - (nm_policy_activation_finish): ensure device is actually activated ++ before sending out signals. Fixes a race where device cancellation ++ would be processed right after finish was scheduled, but not run. ++ - (nm_policy_device_change_check, nm_policy_schedule_device_change_check): ++ ensure device change check GSource ID is locked across threads; ++ allow interruption of activation of 802.3 ethernet devices that no ++ longer have an active link, and ensure that 802.3 ethernet devices ++ have an active link before starting activation ++ ++2007-06-21 Dan Williams ++ ++ Add HAL-based rfkill support, based on a patch from Benjamin Kahn. ++ ++ * src/NetworkManagerDbus.[ch] ++ - (nm_dbus_signal_wireless_enabled): new function, emit signals when ++ wireless enabled status changes ++ ++ * src/nm-dbus-nm.c ++ - (nm_dbus_nm_set_wireless_enabled): handle hardware rfkill correctly; ++ send errors when hardware switch overrides user request, and send ++ signals when wireless enabled state changes ++ - (nm_dbus_nm_get_wireless_enabled): send additional 'hardware rf enabled' ++ argument in method reply ++ ++ * src/NetworkManager.c ++ - (handle_killswitch_pcall_done, nm_killswitch_getpower_reply_cb, ++ nm_poll_killswitches, nm_add_killswitch_device, ++ nm_add_initial_killswitch_devices): new functions; detect and handle ++ hardware killswitches exported by HAL. Unfortunately we have to ++ poll the switches because HAL doesn't support signals for killswitches ++ yet. ++ - (nm_hal_device_new_capability): detect killswitches added asynchronously ++ - (nm_hal_init): look for killswitches when connecting to HAL ++ - (nm_hal_deinit): dispose of killswitches when deiniting HAL data ++ ++ * src/NetworkManagerMain.h ++ - Add bits to track killswitches ++ ++2007-06-12 Dan Williams ++ ++ * src/nm-device.c ++ - (real_act_stage3_ip_config_start): sometimes the device gets downed ++ during the wpa_supplicant association. Ensure the device is up ++ before it's used for IP configuration. ++ ++2007-06-07 Dan Williams ++ ++ Patch from Jon Nettleton ++ ++ * src/nm-device-802-11-wireless.c: ++ - (real_act_stage2_config): sleep 1 second to allow link status ++ to stabilize ++ ++2007-06-07 Dan Williams ++ ++ * (nm_device_802_3_ethernet_link_activated, ++ nm_device_802_3_ethernet_link_deactivated): fix ethernet link detection ++ behavior due to races between the netlink code and when the ++ device thread recognizes the change. Checking the link state ++ before scheduling the change even on the device thread is wrong. ++ (gnome.org #354565, rh #194124) ++ ++2007-04-25 Dan Williams ++ ++ * initscript/RedHat/NetworkManager.in: remove trailing backslash ++ (gnome.org #432401) ++ + 2007-04-18 Tambet Ingo + + * src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network_cb): Update the security +Index: src/NetworkManagerDbus.c +=================================================================== +--- src/NetworkManagerDbus.c (Revision 2558) ++++ src/NetworkManagerDbus.c (Revision 2652) +@@ -434,6 +434,29 @@ + } + + ++void nm_dbus_signal_wireless_enabled (NMData * data) ++{ ++ DBusMessage * message; ++ ++ g_return_if_fail (data != NULL); ++ g_return_if_fail (data->dbus_connection != NULL); ++ ++ if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, "WirelessEnabled"))) ++ { ++ nm_warning ("%s(): Not enough memory for new dbus message!", __func__); ++ return; ++ } ++ ++ dbus_message_append_args (message, ++ DBUS_TYPE_BOOLEAN, &data->wireless_enabled, ++ DBUS_TYPE_BOOLEAN, &data->hw_rf_enabled, ++ DBUS_TYPE_INVALID); ++ if (!dbus_connection_send (data->dbus_connection, message, NULL)) ++ nm_warning ("%s(): Could not emit the WirelessEnabled signal!", __func__); ++ ++ dbus_message_unref (message); ++} ++ + /* + * nm_dbus_signal_filter + * +Index: src/NetworkManagerDbus.h +=================================================================== +--- src/NetworkManagerDbus.h (Revision 2558) ++++ src/NetworkManagerDbus.h (Revision 2652) +@@ -68,6 +68,7 @@ + + void nm_dbus_signal_wireless_network_change (DBusConnection *connection, NMDevice80211Wireless *dev, NMAccessPoint *ap, NMNetworkStatus status, gint strength); + void nm_dbus_signal_device_strength_change (DBusConnection *connection, NMDevice80211Wireless *dev, gint strength); ++void nm_dbus_signal_wireless_enabled (NMData * data); + + NMDevice * nm_dbus_get_device_from_escaped_object_path (NMData *data, const char *path); + +Index: src/nm-dbus-nm.c +=================================================================== +--- src/nm-dbus-nm.c (Revision 2558) ++++ src/nm-dbus-nm.c (Revision 2652) +@@ -483,53 +483,84 @@ + return (reply); + } + +-static DBusMessage *nm_dbus_nm_set_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) ++static DBusMessage *nm_dbus_nm_set_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *cb_data) + { + gboolean enabled = FALSE; + DBusError err; +- NMData *app_data; ++ NMData * data; ++ DBusMessage * ret = NULL; + +- g_return_val_if_fail (data && data->data && connection && message, NULL); ++ g_return_val_if_fail (cb_data && cb_data->data && connection && message, NULL); + + dbus_error_init (&err); + if (!dbus_message_get_args (message, &err, DBUS_TYPE_BOOLEAN, &enabled, DBUS_TYPE_INVALID)) +- return NULL; ++ goto out; + +- app_data = data->data; +- app_data->wireless_enabled = enabled; ++ data = cb_data->data; ++ if (enabled == data->wireless_enabled) ++ goto out; + +- if (!enabled) +- { +- GSList *elt; ++ /* Hardware rfkill overrides whatever user wants */ ++ if (!data->hw_rf_enabled) { ++ nm_info ("User request to %s wireless overridden by radio killswitch.", ++ enabled ? "enable" : "disable"); + +- /* Physically down all wireless devices */ +- nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__); +- for (elt = app_data->dev_list; elt; elt = g_slist_next (elt)) +- { +- NMDevice *dev = (NMDevice *)(elt->data); +- if (nm_device_is_802_11_wireless (dev)) +- { ++ /* Return error if user tries to re-enable wireless, or just ignore ++ * a disable wireless request when wireless is already disabled. ++ */ ++ if (enabled) { ++ ret = nm_dbus_create_error_message (message, ++ NM_DBUS_INTERFACE, ++ "DisabledBySystem", ++ "Wireless disabled by hardware switch."); ++ } ++ goto out; ++ } ++ ++ nm_info ("User request to %s wireless.", enabled ? "enable" : "disable"); ++ ++ data->wireless_enabled = enabled; ++ if (!data->wireless_enabled) { ++ GSList * elt; ++ ++ /* Deactivate all wireless devices and force them down so they ++ * turn off their radios. ++ */ ++ nm_lock_mutex (data->dev_list_mutex, __FUNCTION__); ++ for (elt = data->dev_list; elt; elt = g_slist_next (elt)) { ++ NMDevice * dev = (NMDevice *) elt->data; ++ if (nm_device_is_802_11_wireless (dev)) { + nm_device_deactivate (dev); + nm_device_bring_down (dev); + } + } +- nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__); ++ nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__); + } + +- nm_policy_schedule_device_change_check (data->data); ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); + +- return NULL; ++out: ++ return ret; + } + +-static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) ++static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *cb_data) + { ++ NMData * data; + DBusMessage *reply = NULL; + +- g_return_val_if_fail (data && data->data && connection && message, NULL); ++ g_return_val_if_fail (cb_data && connection && message, NULL); + +- if ((reply = dbus_message_new_method_return (message))) +- dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &data->data->wireless_enabled, DBUS_TYPE_INVALID); ++ data = cb_data->data; ++ g_return_val_if_fail (data != NULL, NULL); + ++ if ((reply = dbus_message_new_method_return (message))) { ++ dbus_message_append_args (reply, ++ DBUS_TYPE_BOOLEAN, &data->wireless_enabled, ++ DBUS_TYPE_BOOLEAN, &data->hw_rf_enabled, ++ DBUS_TYPE_INVALID); ++ } ++ + return reply; + } + +Index: src/nm-device-802-3-ethernet.c +=================================================================== +--- src/nm-device-802-3-ethernet.c (Revision 2558) ++++ src/nm-device-802-3-ethernet.c (Revision 2652) +@@ -108,18 +108,16 @@ + GObject *obj, + NMDevice8023Ethernet *self) + { ++ GSource * source; ++ + /* Make sure signal is for us */ + if (NM_DEVICE (self) != NM_DEVICE (obj)) + return; + +- if (!nm_device_has_active_link (NM_DEVICE (self))) +- { +- GSource * source = g_idle_source_new (); +- +- g_source_set_callback (source, (GSourceFunc) link_activated_helper, self, NULL); +- g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); +- g_source_unref (source); +- } ++ source = g_idle_source_new (); ++ g_source_set_callback (source, (GSourceFunc) link_activated_helper, self, NULL); ++ g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); ++ g_source_unref (source); + } + + +@@ -135,18 +133,16 @@ + GObject *obj, + NMDevice8023Ethernet *self) + { ++ GSource * source; ++ + /* Make sure signal is for us */ + if (NM_DEVICE (self) != NM_DEVICE (obj)) + return; + +- if (nm_device_has_active_link (NM_DEVICE (self))) +- { +- GSource * source = g_idle_source_new (); +- +- g_source_set_callback (source, (GSourceFunc) link_deactivated_helper, self, NULL); +- g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); +- g_source_unref (source); +- } ++ source = g_idle_source_new (); ++ g_source_set_callback (source, (GSourceFunc) link_deactivated_helper, self, NULL); ++ g_source_attach (source, nm_device_get_main_context (NM_DEVICE (self))); ++ g_source_unref (source); + } + + static void +@@ -211,6 +207,26 @@ + return caps; + } + ++ ++static NMActStageReturn ++real_act_stage1_prepare (NMDevice *dev, NMActRequest *req) ++{ ++ NMDevice8023Ethernet * self = NM_DEVICE_802_3_ETHERNET (dev); ++ NMDevice8023EthernetClass * klass; ++ NMDeviceClass * parent_class; ++ ++ /* Ensure ethernet devices have a link before going further with activation, ++ * partially works around Fedora #194124. ++ */ ++ if (!nm_device_has_active_link (dev)) ++ return NM_ACT_STAGE_RETURN_FAILURE; ++ ++ /* Chain up to parent */ ++ klass = NM_DEVICE_802_3_ETHERNET_GET_CLASS (self); ++ parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass)); ++ return parent_class->act_stage1_prepare (dev, req); ++} ++ + static void + nm_device_802_3_ethernet_dispose (GObject *object) + { +@@ -275,6 +291,7 @@ + parent_class->get_generic_capabilities = real_get_generic_capabilities; + parent_class->init = real_init; + parent_class->update_link = real_update_link; ++ parent_class->act_stage1_prepare = real_act_stage1_prepare; + + g_type_class_add_private (object_class, sizeof (NMDevice8023EthernetPrivate)); + } +Index: src/NetworkManagerPolicy.c +=================================================================== +--- src/NetworkManagerPolicy.c (Revision 2558) ++++ src/NetworkManagerPolicy.c (Revision 2652) +@@ -52,6 +52,7 @@ + NMDevice *dev = NULL; + NMData *data = NULL; + NMAccessPoint * ap = NULL; ++ NMActRequest * dev_req; + + g_return_val_if_fail (req != NULL, FALSE); + +@@ -61,6 +62,13 @@ + dev = nm_act_request_get_dev (req); + g_assert (dev); + ++ /* Ensure that inactive devices don't get the activated signal ++ * sent due to race conditions. ++ */ ++ dev_req = nm_device_get_act_request (dev); ++ if (!dev_req || (dev_req != req)) ++ return FALSE; ++ + if (nm_device_is_802_11_wireless (dev)) + ap = nm_act_request_get_ap (req); + +@@ -265,14 +273,16 @@ + } + + #if 0 +- nm_info ("AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (best_wired_dev) : "(null)", +- best_wireless_dev ? nm_device_get_iface (best_wireless_dev) : "(null)", (best_wireless_dev && *ap) ? nm_ap_get_essid (*ap) : "null" ); ++ nm_info ("AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (NM_DEVICE (best_wired_dev)) : "(null)", ++ best_wireless_dev ? nm_device_get_iface (NM_DEVICE (best_wireless_dev)) : "(null)", (best_wireless_dev && *ap) ? nm_ap_get_essid (*ap) : "null" ); + #endif + + return highest_priority_dev; + } + + ++static GStaticMutex dcc_mutex = G_STATIC_MUTEX_INIT; ++ + /* + * nm_policy_device_change_check + * +@@ -294,7 +304,9 @@ + + g_return_val_if_fail (data != NULL, FALSE); + ++ g_static_mutex_lock (&dcc_mutex); + data->dev_change_check_idle_id = 0; ++ g_static_mutex_unlock (&dcc_mutex); + + old_dev = nm_get_active_device (data); + +@@ -303,11 +315,19 @@ + + if (old_dev) + { ++ gboolean has_link = TRUE; + guint32 caps = nm_device_get_capabilities (old_dev); + ++ /* Ensure ethernet devices have a link before starting activation, ++ * partially works around Fedora #194124. ++ */ ++ if (nm_device_is_802_3_ethernet (old_dev)) ++ has_link = nm_device_has_active_link (old_dev); ++ + /* Don't interrupt a currently activating device. */ + if ( nm_device_is_activating (old_dev) +- && !nm_device_can_interrupt_activation (old_dev)) ++ && !nm_device_can_interrupt_activation (old_dev) ++ && has_link) + { + nm_info ("Old device '%s' activating, won't change.", nm_device_get_iface (old_dev)); + goto out; +@@ -425,13 +445,36 @@ + if (do_switch && (nm_device_is_802_3_ethernet (new_dev) || (nm_device_is_802_11_wireless (new_dev) && ap))) + { + NMActRequest * act_req = NULL; ++ gboolean has_link = TRUE; + +- if ((act_req = nm_act_request_new (data, new_dev, ap, FALSE))) ++ /* Ensure ethernet devices have a link before starting activation, ++ * partially works around Fedora #194124. ++ */ ++ if (nm_device_is_802_3_ethernet (new_dev)) ++ has_link = nm_device_has_active_link (new_dev); ++ ++ if (has_link) + { +- nm_info ("Will activate connection '%s%s%s'.", nm_device_get_iface (new_dev), ap ? "/" : "", ap ? nm_ap_get_essid (ap) : ""); +- nm_policy_schedule_device_activation (act_req); +- nm_act_request_unref (act_req); ++ if ((act_req = nm_act_request_new (data, new_dev, ap, FALSE))) ++ { ++ nm_info ("Will activate connection '%s%s%s'.", ++ nm_device_get_iface (new_dev), ++ ap ? "/" : "", ++ ap ? nm_ap_get_essid (ap) : ""); ++ nm_policy_schedule_device_activation (act_req); ++ nm_act_request_unref (act_req); ++ } ++ else ++ { ++ nm_info ("Error creating activation request for %s", ++ nm_device_get_iface (new_dev)); ++ } + } ++ else ++ { ++ nm_info ("Won't activate %s because it no longer has a link.", ++ nm_device_get_iface (new_dev)); ++ } + } + + if (ap) +@@ -452,11 +495,9 @@ + */ + void nm_policy_schedule_device_change_check (NMData *data) + { +- static GStaticMutex mutex = G_STATIC_MUTEX_INIT; +- + g_return_if_fail (data != NULL); + +- g_static_mutex_lock (&mutex); ++ g_static_mutex_lock (&dcc_mutex); + + if (data->dev_change_check_idle_id == 0) + { +@@ -466,8 +507,7 @@ + data->dev_change_check_idle_id = g_source_attach (source, data->main_context); + g_source_unref (source); + } +- +- g_static_mutex_unlock (&mutex); ++ g_static_mutex_unlock (&dcc_mutex); + } + + +Index: src/nm-ap-security-wpa-eap.c +=================================================================== +--- src/nm-ap-security-wpa-eap.c (Revision 2558) ++++ src/nm-ap-security-wpa-eap.c (Revision 2652) +@@ -57,7 +57,6 @@ + NMAPSecurityWPA_EAP * security = NULL; + int eap_method; + int key_type; +- int phase2_type; + int wpa_version; + char * identity = NULL; + char * passwd = NULL; +Index: src/nm-device.c +=================================================================== +--- src/nm-device.c (Revision 2558) ++++ src/nm-device.c (Revision 2652) +@@ -856,6 +856,12 @@ + data = nm_act_request_get_data (req); + g_assert (data); + ++ /* Sometimes the device gets downed by wpa_supplicant; in any case, make ++ * sure it's up before anything tries to use it. ++ */ ++ if (!nm_device_is_up (self)) ++ nm_device_bring_up (self); ++ + /* DHCP devices try DHCP, non-DHCP default to SUCCESS */ + if (nm_device_get_use_dhcp (self)) + { +Index: src/NetworkManager.c +=================================================================== +--- src/NetworkManager.c (Revision 2558) ++++ src/NetworkManager.c (Revision 2652) +@@ -67,6 +67,7 @@ + + static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer data); + static void nm_data_free (NMData *data); ++static gboolean nm_poll_killswitches(gpointer user_data); + + /* + * nm_get_device_interface_from_hal +@@ -274,7 +275,184 @@ + } + + ++static void handle_killswitch_pcall_done (NMData *data, DBusPendingCall * pcall) ++{ ++ GSource * source; ++ gboolean now_enabled = FALSE; ++ gboolean now_disabled = FALSE; ++ ++ data->ks_pcall_list = g_slist_remove (data->ks_pcall_list, pcall); ++ if (g_slist_length (data->ks_pcall_list) > 0) ++ return; /* not done with all killswitches yet */ ++ ++ if (data->hw_rf_enabled != data->tmp_hw_rf_enabled) { ++ nm_info ("Wireless now %s by radio killswitch", ++ data->tmp_hw_rf_enabled ? "enabled" : "disabled"); ++ if (data->tmp_hw_rf_enabled) ++ now_enabled = TRUE; ++ else ++ now_disabled = TRUE; ++ ++ data->hw_rf_enabled = data->tmp_hw_rf_enabled; ++ } ++ ++ if (data->hw_rf_enabled == data->wireless_enabled) ++ goto out; ++ ++ /* Only re-enabled wireless if killswitch just changed, otherwise ++ * ignore hardware rf enabled state. ++ */ ++ if (now_enabled && !data->wireless_enabled) { ++ data->wireless_enabled = TRUE; ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); ++ } else if (!data->hw_rf_enabled && data->wireless_enabled) { ++ GSList * elt; ++ ++ /* Deactivate all wireless devices and force them down so they ++ * turn off their radios. ++ */ ++ nm_lock_mutex (data->dev_list_mutex, __FUNCTION__); ++ for (elt = data->dev_list; elt; elt = g_slist_next (elt)) { ++ NMDevice * dev = (NMDevice *) elt->data; ++ if (nm_device_is_802_11_wireless (dev)) { ++ nm_device_deactivate (dev); ++ nm_device_bring_down (dev); ++ } ++ } ++ nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__); ++ ++ data->wireless_enabled = FALSE; ++ nm_policy_schedule_device_change_check (data); ++ nm_dbus_signal_wireless_enabled (data); ++ } ++ ++out: ++ /* Schedule another killswitch poll */ ++ source = g_timeout_source_new (6000); ++ g_source_set_callback (source, nm_poll_killswitches, data, NULL); ++ g_source_attach (source, data->main_context); ++ g_source_unref (source); ++} ++ ++static void nm_killswitch_getpower_reply_cb (DBusPendingCall *pcall, NMData * data) ++{ ++ DBusError err; ++ DBusMessage * reply = NULL; ++ guint32 status; ++ ++ g_return_if_fail (pcall != NULL); ++ g_return_if_fail (data != NULL); ++ ++ if (!dbus_pending_call_get_completed (pcall)) ++ goto out; ++ ++ if (!(reply = dbus_pending_call_steal_reply (pcall))) ++ goto out; ++ ++ if (message_is_error (reply)) { ++ dbus_error_init (&err); ++ dbus_set_error_from_message (&err, reply); ++ nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ dbus_error_free (&err); ++ goto out; ++ } ++ ++ if (!dbus_message_get_args (reply, &err, DBUS_TYPE_UINT32, &status, DBUS_TYPE_INVALID)) { ++ nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ dbus_error_free (&err); ++ goto out; ++ } ++ ++ if (status == 0) ++ data->tmp_hw_rf_enabled = FALSE; ++ ++out: ++ if (reply) ++ dbus_message_unref (reply); ++ ++ handle_killswitch_pcall_done (data, pcall); ++ dbus_pending_call_unref (pcall); ++} ++ ++ ++static gboolean nm_poll_killswitches (gpointer user_data) ++{ ++ NMData * data = (NMData *) user_data; ++ DBusConnection * connection = data->dbus_connection; ++ GSList * elt; ++ ++ g_return_val_if_fail (data != NULL, FALSE); ++ ++ data->tmp_hw_rf_enabled = TRUE; ++ ++ for (elt = data->killswitch_list; elt; elt = g_slist_next (elt)) ++ { ++ DBusPendingCall * pcall; ++ DBusMessage * message; ++ ++ message = dbus_message_new_method_call ("org.freedesktop.Hal", ++ elt->data, ++ "org.freedesktop.Hal.Device.KillSwitch", ++ "GetPower"); ++ if (!dbus_connection_send_with_reply (connection, message, &pcall, 5000)) { ++ nm_warning ("%s(): could not send dbus message", __func__); ++ } else if (!pcall) { ++ nm_warning ("%s(): could not send dbus message; pcall was NULL", __func__); ++ } else { ++ dbus_pending_call_set_notify (pcall, ++ (DBusPendingCallNotifyFunction) nm_killswitch_getpower_reply_cb, ++ data, ++ NULL); ++ data->ks_pcall_list = g_slist_append (data->ks_pcall_list, pcall); ++ } ++ dbus_message_unref (message); ++ } ++ return FALSE; ++} ++ ++ + /* ++ * nm_add_killswitch_device ++ * ++ * Adds a killswitch device to the list ++ * ++ */ ++static void nm_add_killswitch_device (NMData * data, const char * udi) ++{ ++ char * type; ++ GSList * elt; ++ ++ type = libhal_device_get_property_string (data->hal_ctx, udi, "killswitch.type", NULL); ++ if (!type) ++ return; ++ ++ if (strcmp (type, "wlan") != 0) ++ goto out; ++ ++ /* see if it's already in the list */ ++ for (elt = data->killswitch_list; elt; elt = g_slist_next (elt)) { ++ const char * list_udi = (const char *) elt->data; ++ if (strcmp (list_udi, udi) == 0) ++ goto out; ++ } ++ ++ /* Start polling switches if this is the first switch we've found */ ++ if (g_slist_length (data->killswitch_list) == 0) { ++ GSource * source = g_idle_source_new (); ++ g_source_set_callback (source, nm_poll_killswitches, data, NULL); ++ g_source_attach (source, data->main_context); ++ g_source_unref (source); ++ } ++ ++ data->killswitch_list = g_slist_append (data->killswitch_list, g_strdup (udi)); ++ nm_info ("Found radio killswitch %s", udi); ++ ++out: ++ libhal_free_string (type); ++} ++ ++/* + * nm_hal_device_new_capability + * + */ +@@ -283,10 +461,9 @@ + NMData *data = (NMData *)libhal_ctx_get_user_data (ctx); + + g_return_if_fail (data != NULL); ++ g_return_if_fail (capability != NULL); + +- /*nm_debug ("nm_hal_device_new_capability() called with udi = %s, capability = %s", udi, capability );*/ +- +- if (capability && ((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0))) ++ if (((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0))) + { + char *iface; + +@@ -296,6 +473,10 @@ + g_free (iface); + } + } ++ else if (strcmp (capability, "killswitch") == 0) ++ { ++ nm_add_killswitch_device (data, udi); ++ } + } + + +@@ -340,7 +521,31 @@ + libhal_free_string_array (net_devices); + } + ++void nm_add_initial_killswitch_devices (NMData * data) ++{ ++ char ** udis; ++ int num_udis, i; ++ DBusError error; + ++ g_return_if_fail (data != NULL); ++ ++ dbus_error_init (&error); ++ udis = libhal_find_device_by_capability (data->hal_ctx, "killswitch", &num_udis, &error); ++ if (!udis) ++ return; ++ ++ if (dbus_error_is_set (&error)) { ++ nm_warning("Could not find killswitch devices: %s", error.message); ++ dbus_error_free (&error); ++ return; ++ } ++ ++ for (i = 0; i < num_udis; i++) ++ nm_add_killswitch_device (data, udis[i]); ++ libhal_free_string_array (udis); ++} ++ ++ + /* + * nm_state_change_signal_broadcast + * +@@ -616,28 +821,39 @@ + g_return_if_fail (data != NULL); + + if ((data->hal_ctx = nm_get_hal_ctx (data))) ++ { ++ nm_add_initial_killswitch_devices (data); + nm_add_initial_devices (data); ++ } ++ ++ /* If there weren't any killswitches, mark hardware RF to on */ ++ if (g_slist_length (data->killswitch_list) == 0) ++ data->hw_rf_enabled = TRUE; + } + + + void nm_hal_deinit (NMData *data) + { ++ DBusError error; ++ + g_return_if_fail (data != NULL); + +- if (data->hal_ctx) ++ if (!data->hal_ctx) ++ return; ++ ++ g_slist_foreach (data->killswitch_list, (GFunc) g_free, NULL); ++ g_slist_free (data->killswitch_list); ++ data->killswitch_list = NULL; ++ ++ dbus_error_init (&error); ++ libhal_ctx_shutdown (data->hal_ctx, &error); ++ if (dbus_error_is_set (&error)) + { +- DBusError error; +- +- dbus_error_init (&error); +- libhal_ctx_shutdown (data->hal_ctx, &error); +- if (dbus_error_is_set (&error)) +- { +- nm_warning ("libhal shutdown failed - %s", error.message); +- dbus_error_free (&error); +- } +- libhal_ctx_free (data->hal_ctx); +- data->hal_ctx = NULL; ++ nm_warning ("libhal shutdown failed - %s", error.message); ++ dbus_error_free (&error); + } ++ libhal_ctx_free (data->hal_ctx); ++ data->hal_ctx = NULL; + } + + +Index: src/nm-device-802-11-wireless.c +=================================================================== +--- src/nm-device-802-11-wireless.c (Revision 2558) ++++ src/nm-device-802-11-wireless.c (Revision 2652) +@@ -617,7 +617,10 @@ + /* Start the scanning timeout for devices that can do scanning */ + if (nm_device_get_capabilities (dev) & NM_DEVICE_CAP_WIRELESS_SCAN) + { +- self->priv->pending_scan = g_idle_source_new (); ++ /* Stupid orinoco has problems scanning immediately after being up, ++ * so wait a bit before triggering a scan. ++ */ ++ self->priv->pending_scan = g_timeout_source_new (600); + g_source_set_callback (self->priv->pending_scan, + nm_device_802_11_wireless_scan, + self, +@@ -2981,6 +2984,9 @@ + return NM_ACT_STAGE_RETURN_POSTPONE; + } + ++ /* Some cards are dumb. Wait a second */ ++ sleep (1); ++ + iface = nm_device_get_iface (dev); + if (!supplicant_exec (self)) + { +@@ -3446,10 +3452,9 @@ + char *genie, *gpos, *gend, *custom; + NMAccessPoint *ap = NULL; + size_t clen; +- int maxrate; ++ int maxrate = 0; + struct iw_event iwe_buf, *iwe = &iwe_buf; + struct stream_descr stream; +- struct wireless_scan * wscan = NULL; + int ret; + + g_return_val_if_fail (dev != NULL, FALSE); +Index: src/NetworkManagerMain.h +=================================================================== +--- src/NetworkManagerMain.h (Revision 2558) ++++ src/NetworkManagerMain.h (Revision 2652) +@@ -82,6 +82,7 @@ + GSList * dev_list; + GMutex * dev_list_mutex; + ++ gboolean hw_rf_enabled; + gboolean wireless_enabled; + gboolean modem_active; + gboolean asleep; +@@ -90,6 +91,10 @@ + GSList * dialup_list; + GMutex * dialup_list_mutex; + ++ GSList * killswitch_list; ++ GSList * ks_pcall_list; /* track killswitch D-Bus pending calls */ ++ gboolean tmp_hw_rf_enabled; ++ + struct NMAccessPointList *allowed_ap_list; + struct NMAccessPointList *invalid_ap_list; + } NMData; +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 2558) ++++ src/NetworkManagerSystem.c (Revision 2652) +@@ -64,6 +64,7 @@ + struct sockaddr_in *p; + const char * iface; + int err; ++ NMIP4Config * config = NULL; + + iface = nm_device_get_iface (dev); + +@@ -75,6 +76,15 @@ + if (ip4_gateway == 0) + return TRUE; + ++ /* ++ * Do not add the route if the destination is on the same subnet. ++ */ ++ config = nm_device_get_ip4_config(dev); ++ if (config && ++ ((guint32)ip4_dest & nm_ip4_config_get_netmask(config)) == ++ (nm_ip4_config_get_address(config) & nm_ip4_config_get_netmask(config))) ++ return TRUE; ++ + if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL) + return FALSE; + -- cgit 1.3.0-6-gf8a5 From 8519ea27928d06161a68e8775dfddbc669157e8a Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 26 Aug 2007 23:24:37 +0000 Subject: * debian/patches/02-dbus_access_network_manager.patch - Add support for at_console dbus access check. (Closes: #426462) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1679 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/02-dbus_access_network_manager.patch | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/02-dbus_access_network_manager.patch b/debian/patches/02-dbus_access_network_manager.patch index 139a3d87..ced5effe 100644 --- a/debian/patches/02-dbus_access_network_manager.patch +++ b/debian/patches/02-dbus_access_network_manager.patch @@ -1,15 +1,19 @@ ---- src/NetworkManager.conf.orig 2006-06-14 02:47:10.000000000 +0200 -+++ src/NetworkManager.conf 2006-06-14 02:48:31.000000000 +0200 -@@ -8,7 +8,11 @@ +Index: src/NetworkManager.conf +=================================================================== +--- src/NetworkManager.conf (Revision 2735) ++++ src/NetworkManager.conf (Arbeitskopie) +@@ -8,6 +8,14 @@ -- + + + + + ++ ++ ++ + - -- cgit 1.3.0-6-gf8a5 From 8e106e46371ab5ce776447c0b8c7b2413d752f40 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 28 Sep 2007 18:27:56 +0000 Subject: * debian/patches/21-endianess_fix_r2754.patch - Fixes a problem with ASCII passphrases on big-endian systems due to a missing config.h include. (Closes: 391364) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1744 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/21-endianess_fix_r2754.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 debian/patches/21-endianess_fix_r2754.patch (limited to 'debian/patches') diff --git a/debian/patches/21-endianess_fix_r2754.patch b/debian/patches/21-endianess_fix_r2754.patch new file mode 100644 index 00000000..4932e22a --- /dev/null +++ b/debian/patches/21-endianess_fix_r2754.patch @@ -0,0 +1,28 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (Revision 2753) ++++ ChangeLog (Revision 2754) +@@ -1,3 +1,8 @@ ++2007-08-30 Dan Williams ++ ++ * libnm-util/sha1.c ++ - Include config.h to get defines for endiannes (gnome.org #420216) ++ + 2007-07-26 Dan Williams + + Patch from Bernhard Miklautz +Index: libnm-util/sha1.c +=================================================================== +--- libnm-util/sha1.c (Revision 2753) ++++ libnm-util/sha1.c (Revision 2754) +@@ -12,6 +12,10 @@ + * See README and COPYING for more details. + */ + ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ + #include + #include + -- cgit 1.3.0-6-gf8a5 From e1a65e5b1eda31353ebd56b882568cd53507d34a Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 28 Sep 2007 19:17:01 +0000 Subject: * 22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch - Patch from Ubuntu. Don't set the GNOME_DISABLE_DEPRECATED flag as nm-vpn-properties requires gnome druid which has been deprecated in GTK+ 2.12. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1747 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- ...x_vpn_ftbfs_dont_disable_gnome_deprecated.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch (limited to 'debian/patches') diff --git a/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch b/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch new file mode 100644 index 00000000..ac0459b6 --- /dev/null +++ b/debian/patches/22-fix_vpn_ftbfs_dont_disable_gnome_deprecated.patch @@ -0,0 +1,44 @@ +=== modified file 'gnome/vpn-properties/Makefile.am' +--- network-manager-0.6.5.old/gnome/vpn-properties/Makefile.am 2007-06-25 13:51:34 +0000 ++++ network-manager-0.6.5/gnome/vpn-properties/Makefile.am 2007-08-03 11:50:32 +0000 +@@ -21,17 +21,16 @@ nm_vpn_properties_CFLAGS = + $(GCONF_CFLAGS) \ + $(GMODULE_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DICONDIR=\""$(datadir)/icons"\" \ + -DGLADEDIR=\""$(gladedir)"\" \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ +- -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DVERSION=\"$(VERSION)\" \ + $(NULL) + + nm_vpn_properties_LDADD = \ + $(GLADE_LIBS) \ + $(GTK_LIBS) \ + $(GCONF_LIBS) \ + +=== modified file 'gnome/vpn-properties/Makefile.in' +--- network-manager-0.6.5.old/gnome/vpn-properties/Makefile.in 2007-06-25 13:51:34 +0000 ++++ network-manager-0.6.5/gnome/vpn-properties/Makefile.in 2007-08-03 11:50:32 +0000 +@@ -258,17 +258,16 @@ nm_vpn_properties_CFLAGS = \ + $(GCONF_CFLAGS) \ + $(GMODULE_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DICONDIR=\""$(datadir)/icons"\" \ + -DGLADEDIR=\""$(gladedir)"\" \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ +- -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + -DVERSION=\"$(VERSION)\" \ + $(NULL) + + + nm_vpn_properties_LDADD = \ + $(GLADE_LIBS) \ + $(GTK_LIBS) \ + -- cgit 1.3.0-6-gf8a5 From 72482de1cc44c8b01220e45f7391282abfc52d76 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 22 Oct 2007 15:09:38 +0000 Subject: * debian/patches/23-rfkill_return_type.patch - The return type of the GetPower() method from Device.Killswitch has changed from UINT32 to INT32 in hal-0.5.10. Fix the code accordingly. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1824 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/23-rfkill_return_type.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 debian/patches/23-rfkill_return_type.patch (limited to 'debian/patches') diff --git a/debian/patches/23-rfkill_return_type.patch b/debian/patches/23-rfkill_return_type.patch new file mode 100644 index 00000000..1e327d46 --- /dev/null +++ b/debian/patches/23-rfkill_return_type.patch @@ -0,0 +1,22 @@ +Index: src/NetworkManager.c +=================================================================== +--- src/NetworkManager.c (Revision 2974) ++++ src/NetworkManager.c (Arbeitskopie) +@@ -339,7 +339,7 @@ + { + DBusError err; + DBusMessage * reply = NULL; +- guint32 status; ++ gint32 status; + + g_return_if_fail (pcall != NULL); + g_return_if_fail (data != NULL); +@@ -358,7 +358,7 @@ + goto out; + } + +- if (!dbus_message_get_args (reply, &err, DBUS_TYPE_UINT32, &status, DBUS_TYPE_INVALID)) { ++ if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &status, DBUS_TYPE_INVALID)) { + nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); + dbus_error_free (&err); + goto out; -- cgit 1.3.0-6-gf8a5 From 8d8ad4577ac189e0173fe659fbecc3d2f267777c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 20 Dec 2007 07:04:11 +0000 Subject: - Bump Build-Depends on libnl-dev to (>= 1.0~pre8). * debian/patches/24-libnl1-pre8_fix.patch - Backport support for libnl 1.0-pre8 from upstream SVN. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@1963 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/24-libnl1-pre8_fix.patch | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 debian/patches/24-libnl1-pre8_fix.patch (limited to 'debian/patches') diff --git a/debian/patches/24-libnl1-pre8_fix.patch b/debian/patches/24-libnl1-pre8_fix.patch new file mode 100644 index 00000000..26a54e7b --- /dev/null +++ b/debian/patches/24-libnl1-pre8_fix.patch @@ -0,0 +1,46 @@ +=== modified file 'src/NetworkManagerSystem.c' +--- src/NetworkManagerSystem.c 2007-12-20 06:06:27 +0000 ++++ src/NetworkManagerSystem.c 2007-12-20 06:57:47 +0000 +@@ -224,16 +224,33 @@ + + static struct nl_handle * new_nl_handle (void) + { +- struct nl_handle * nlh = NULL; +- +- nlh = nl_handle_alloc_nondefault(NL_CB_VERBOSE); +- nl_handle_set_pid (nlh, (pthread_self() << 16 | getpid())); +- if (nl_connect(nlh, NETLINK_ROUTE) < 0) +- { +- nm_warning ("%s: couldn't connecto to netlink: %s", __func__, nl_geterror()); ++ struct nl_handle * nlh = NULL; ++ struct nl_cb *cb; ++ ++ cb = nl_cb_alloc (NL_CB_VERBOSE); ++ nlh = nl_handle_alloc_cb (cb); ++ ++ if (!nlh) { ++ nm_warning ("couldn't allocate netlink handle."); ++ return NULL; ++ } ++ ++ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ /* HACK: try one more time. Because the netlink monitor for link state ++ * inits before we get here, it grabs the port that matches the PID ++ * of the NM process, which also happens to be the PID that libnl uses ++ * the first time too. The real fix is to convert nm-netlink-monitor.c ++ * over to use libnl. ++ */ + nl_handle_destroy (nlh); + nlh = NULL; +- } ++ ++ nlh = new_nl_handle (); ++ if (!nlh) { ++ nm_error ("couldn't connect to netlink: %s", nl_geterror ()); ++ return NULL; ++ } ++ } + + return nlh; + } + -- cgit 1.3.0-6-gf8a5 From 001add6140068afaa0edc1bc4579ef2e0f73b236 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 25 Dec 2007 15:52:48 +0000 Subject: * debian/patches/12_readme_format.patch - Fix line break in README file. (Closes: #444038) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2001 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/12_readme_format.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 debian/patches/12_readme_format.patch (limited to 'debian/patches') diff --git a/debian/patches/12_readme_format.patch b/debian/patches/12_readme_format.patch new file mode 100644 index 00000000..5fa39d24 --- /dev/null +++ b/debian/patches/12_readme_format.patch @@ -0,0 +1,14 @@ +Index: README +=================================================================== +--- README (Revision 3190) ++++ README (Arbeitskopie) +@@ -20,7 +20,8 @@ + For wireless networking support, NetworkManager keeps a list of wireless + networks, the preferred list. Preferred Networks are wireless networks that + the user has explicitly made NetworkManager associate with at some previous +-time. So if the user walks into a Starbucks and explicitly asks NetworkManager to associate with that Starbucks network, NetworkManager will remember the ++time. So if the user walks into a Starbucks and explicitly asks NetworkManager ++to associate with that Starbucks network, NetworkManager will remember the + Starbucks network information from that point on. Upon returning to that + Starbucks, NetworkManager will attempt to associate _automatically_ with the + Starbucks network since it is now in the Preferred Networks list. The point of -- cgit 1.3.0-6-gf8a5 From 2d192e860a94462247e73bda6eeece5768fbb0fd Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 24 Jan 2008 21:59:21 +0000 Subject: * Rebuild against libnl1. (Closes: #461922) * debian/patches/24-get_mode_fix_r3122.patch - Pull r3122 from upstream stable branch. - Fix getting mode of device. * debian/patches/25-libnl_unique_pid_r3155.patch - Pull r3155 from stable branch. - Ensures that the pid acquired by libnl is unique. * debian/patches/26-libnl_1.0-pre8_r3206.patch - Pull r3206 from upstream stable branch. - Replaces 24-libnl1-pre8_fix.patch, which has been removed. - Fixes a FTBFS on architectures using SIGTRAP in G_BREAKPOINT(). (Closes: #459740) * debian/patches/13-validate_mac_addr.patch - Drop APs with an invalid MAC address. (Closes: #461500) Thanks to Sjoerd Simons for the patch. git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2056 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/13-validate_mac_addr.patch | 33 ++ debian/patches/24-get_mode_fix_r3122.patch | 13 + debian/patches/24-libnl1-pre8_fix.patch | 46 --- debian/patches/25-libnl_unique_pid_r3155.patch | 417 +++++++++++++++++++++++++ debian/patches/26-libnl_1.0-pre8_r3206.patch | 202 ++++++++++++ 5 files changed, 665 insertions(+), 46 deletions(-) create mode 100644 debian/patches/13-validate_mac_addr.patch create mode 100644 debian/patches/24-get_mode_fix_r3122.patch delete mode 100644 debian/patches/24-libnl1-pre8_fix.patch create mode 100644 debian/patches/25-libnl_unique_pid_r3155.patch create mode 100644 debian/patches/26-libnl_1.0-pre8_r3206.patch (limited to 'debian/patches') diff --git a/debian/patches/13-validate_mac_addr.patch b/debian/patches/13-validate_mac_addr.patch new file mode 100644 index 00000000..47a81e19 --- /dev/null +++ b/debian/patches/13-validate_mac_addr.patch @@ -0,0 +1,33 @@ +--- network-manager-0.6.5.orig/src/nm-device-802-11-wireless.c ++++ network-manager-0.6.5/src/nm-device-802-11-wireless.c +@@ -3439,6 +3439,20 @@ + } + + static gboolean ++has_valid_ether_addr (NMAccessPoint *ap) ++{ ++ struct ether_addr *addr; ++ int i; ++ ++ addr = nm_ap_get_address (ap); ++ for (i = 0 ; i < ETH_ALEN; i++) ++ if (addr->ether_addr_octet[i] != 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++static gboolean + process_scan_results (NMDevice80211Wireless *dev, + const guint8 *res_buf, + guint32 res_buf_len) +@@ -3474,7 +3488,8 @@ + + /* Merge previous AP */ + if (ap) { +- add_new_ap_to_device_list (dev, ap); ++ if (has_valid_ether_addr (ap)) ++ add_new_ap_to_device_list (dev, ap); + nm_ap_unref (ap); + ap = NULL; + } diff --git a/debian/patches/24-get_mode_fix_r3122.patch b/debian/patches/24-get_mode_fix_r3122.patch new file mode 100644 index 00000000..f89db8d5 --- /dev/null +++ b/debian/patches/24-get_mode_fix_r3122.patch @@ -0,0 +1,13 @@ +Index: src/nm-device-802-11-wireless.c +=================================================================== +--- src/nm-device-802-11-wireless.c (Revision 3121) ++++ src/nm-device-802-11-wireless.c (Revision 3122) +@@ -1144,7 +1144,7 @@ + #endif + if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (NM_DEVICE (self)), SIOCGIWMODE, &wrq) == 0) + { +- if ((mode == IW_MODE_ADHOC) || (mode == IW_MODE_INFRA)) ++ if ((wrq.u.mode == IW_MODE_ADHOC) || (wrq.u.mode == IW_MODE_INFRA)) + mode = wrq.u.mode; + } + else diff --git a/debian/patches/24-libnl1-pre8_fix.patch b/debian/patches/24-libnl1-pre8_fix.patch deleted file mode 100644 index 26a54e7b..00000000 --- a/debian/patches/24-libnl1-pre8_fix.patch +++ /dev/null @@ -1,46 +0,0 @@ -=== modified file 'src/NetworkManagerSystem.c' ---- src/NetworkManagerSystem.c 2007-12-20 06:06:27 +0000 -+++ src/NetworkManagerSystem.c 2007-12-20 06:57:47 +0000 -@@ -224,16 +224,33 @@ - - static struct nl_handle * new_nl_handle (void) - { -- struct nl_handle * nlh = NULL; -- -- nlh = nl_handle_alloc_nondefault(NL_CB_VERBOSE); -- nl_handle_set_pid (nlh, (pthread_self() << 16 | getpid())); -- if (nl_connect(nlh, NETLINK_ROUTE) < 0) -- { -- nm_warning ("%s: couldn't connecto to netlink: %s", __func__, nl_geterror()); -+ struct nl_handle * nlh = NULL; -+ struct nl_cb *cb; -+ -+ cb = nl_cb_alloc (NL_CB_VERBOSE); -+ nlh = nl_handle_alloc_cb (cb); -+ -+ if (!nlh) { -+ nm_warning ("couldn't allocate netlink handle."); -+ return NULL; -+ } -+ -+ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { -+ /* HACK: try one more time. Because the netlink monitor for link state -+ * inits before we get here, it grabs the port that matches the PID -+ * of the NM process, which also happens to be the PID that libnl uses -+ * the first time too. The real fix is to convert nm-netlink-monitor.c -+ * over to use libnl. -+ */ - nl_handle_destroy (nlh); - nlh = NULL; -- } -+ -+ nlh = new_nl_handle (); -+ if (!nlh) { -+ nm_error ("couldn't connect to netlink: %s", nl_geterror ()); -+ return NULL; -+ } -+ } - - return nlh; - } - diff --git a/debian/patches/25-libnl_unique_pid_r3155.patch b/debian/patches/25-libnl_unique_pid_r3155.patch new file mode 100644 index 00000000..a14aad83 --- /dev/null +++ b/debian/patches/25-libnl_unique_pid_r3155.patch @@ -0,0 +1,417 @@ +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 3154) ++++ src/NetworkManagerSystem.c (Revision 3155) +@@ -177,24 +177,6 @@ + } + + +-static struct nl_cache * get_link_cache (struct nl_handle *nlh) +-{ +- static GStaticMutex mutex = G_STATIC_MUTEX_INIT; +- static struct nl_cache * link_cache = NULL; +- +- g_static_mutex_lock (&mutex); +- if (!link_cache) +- link_cache = rtnl_link_alloc_cache (nlh); +- if (!link_cache) +- nm_warning ("ERROR: couldn't allocate rtnl link cache!"); +- else +- nl_cache_update (nlh, link_cache); +- g_static_mutex_unlock (&mutex); +- +- return link_cache; +-} +- +- + static void iface_to_rtnl_index (const char *iface, struct nl_handle *nlh, struct rtnl_addr *addr) + { + struct nl_cache * cache = NULL; +@@ -204,14 +186,17 @@ + g_return_if_fail (nlh != NULL); + g_return_if_fail (addr != NULL); + +- if ((cache = get_link_cache (nlh))) +- { +- i = rtnl_link_name2i (cache, iface); +- if (RTNL_LINK_NOT_FOUND != i) +- rtnl_addr_set_ifindex (addr, i); ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache.", __func__); ++ return; + } +- else +- nm_warning ("iface_to_rtnl_link() couldn't allocate link cache."); ++ ++ nl_cache_update (nlh, cache); ++ i = rtnl_link_name2i (cache, iface); ++ if (RTNL_LINK_NOT_FOUND != i) ++ rtnl_addr_set_ifindex (addr, i); ++ nl_cache_destroy_and_free (cache); + } + + +@@ -223,45 +208,104 @@ + g_return_val_if_fail (iface != NULL, NULL); + g_return_val_if_fail (nlh != NULL, NULL); + +- if ((cache = get_link_cache (nlh))) +- have_link = rtnl_link_get_by_name (cache, iface); +- else +- nm_warning ("iface_to_rtnl_link() couldn't allocate link cache."); ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache.", __func__); ++ return NULL; ++ } + ++ nl_cache_update (nlh, cache); ++ have_link = rtnl_link_get_by_name (cache, iface); ++ nl_cache_destroy_and_free (cache); ++ + return have_link; + } + ++static GStaticMutex nlh_mutex = G_STATIC_MUTEX_INIT; + +-static struct nl_handle * new_nl_handle (void) ++GHashTable *nl_pids = NULL; ++ ++static struct ++nl_handle * new_nl_handle (void) + { +- struct nl_handle * nlh = NULL; ++ struct nl_handle * nlh = NULL; ++ guint32 nl_pid; ++ int i = 0; + +- nlh = nl_handle_alloc_nondefault(NL_CB_VERBOSE); +- nl_handle_set_pid (nlh, (pthread_self() << 16 | getpid())); +- if (nl_connect(nlh, NETLINK_ROUTE) < 0) +- { +- nm_warning ("%s: couldn't connecto to netlink: %s", __func__, nl_geterror()); +- nl_handle_destroy (nlh); +- nlh = NULL; ++ g_static_mutex_lock (&nlh_mutex); ++ ++ if (nl_pids == NULL) { ++ nl_pids = g_hash_table_new (g_direct_hash, g_direct_equal); ++ g_assert (nl_pids); ++ ++ /* Insert the PID used by nm-netlink-monitor.c */ ++ g_hash_table_insert (nl_pids, GUINT_TO_POINTER (getpid ()), GUINT_TO_POINTER (1)); + } + ++ while (i++ < 10) { ++ nl_pid = g_random_int (); ++ if (!g_hash_table_lookup (nl_pids, GUINT_TO_POINTER (nl_pid))) ++ break; ++ } ++ ++ if (i < 10) { ++ nlh = nl_handle_alloc_nondefault (NL_CB_VERBOSE); ++ nl_handle_set_pid (nlh, nl_pid); ++ ++ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ nm_warning ("%s: couldn't connect to netlink: %s", __func__, nl_geterror ()); ++ nl_handle_destroy (nlh); ++ nlh = NULL; ++ } else { ++ g_hash_table_insert (nl_pids, GUINT_TO_POINTER (nl_pid), GUINT_TO_POINTER (1)); ++ } ++ } else { ++ g_warning ("%s: couldn't find free netlink pid.", __func__); ++ } ++ ++ g_static_mutex_unlock (&nlh_mutex); ++ + return nlh; + } + ++static void ++destroy_nl_handle (struct nl_handle *nlh) ++{ ++ g_return_if_fail (nlh != NULL); + ++ g_static_mutex_lock (&nlh_mutex); ++ g_hash_table_remove (nl_pids, GUINT_TO_POINTER (nl_handle_get_pid (nlh))); ++ g_static_mutex_unlock (&nlh_mutex); ++ ++ nl_close (nlh); ++ nl_handle_destroy (nlh); ++ ++} ++ ++ + int + nm_system_get_rtnl_index_from_iface (const char *iface) + { + struct nl_handle * nlh = NULL; +- struct nl_cache * cache = NULL; ++ struct nl_cache * cache; + int i = RTNL_LINK_NOT_FOUND; + + nlh = new_nl_handle (); +- if (nlh && (cache = get_link_cache (nlh))) +- i = rtnl_link_name2i (cache, iface); +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ if (!nlh) ++ return RTNL_LINK_NOT_FOUND; + ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache."); ++ goto out; ++ } ++ ++ nl_cache_update (nlh, cache); ++ i = rtnl_link_name2i (cache, iface); ++ nl_cache_destroy_and_free (cache); ++ ++out: ++ destroy_nl_handle (nlh); + return i; + } + +@@ -275,18 +319,31 @@ + char * buf = NULL; + + nlh = new_nl_handle (); +- if (nlh && (cache = get_link_cache (nlh))) +- { +- buf = g_malloc0 (MAX_IFACE_LEN); +- if (!rtnl_link_i2name (cache, rtnl_index, buf, MAX_IFACE_LEN - 1)) +- { +- g_free (buf); +- buf = NULL; +- } ++ if (!nlh) ++ return NULL; ++ ++ cache = rtnl_link_alloc_cache (nlh); ++ if (!cache) { ++ nm_warning ("%s: couldn't allocate link cache."); ++ goto out; + } +- nl_close (nlh); +- nl_handle_destroy (nlh); + ++ nl_cache_update (nlh, cache); ++ ++ buf = g_malloc0 (MAX_IFACE_LEN); ++ if (!buf) ++ goto destroy_cache; ++ ++ if (!rtnl_link_i2name (cache, rtnl_index, buf, MAX_IFACE_LEN - 1)) { ++ g_free (buf); ++ buf = NULL; ++ } ++ ++destroy_cache: ++ nl_cache_destroy_and_free (cache); ++ ++out: ++ destroy_nl_handle (nlh); + return buf; + } + +@@ -313,13 +370,15 @@ + config = nm_device_get_ip4_config (dev); + g_return_val_if_fail (config != NULL, FALSE); + ++ nlh = new_nl_handle (); ++ if (!nlh) ++ return FALSE; ++ + nm_system_delete_default_route (); + nm_system_device_flush_addresses (dev); + nm_system_device_flush_routes (dev); + nm_system_flush_arp_cache (); + +- nlh = new_nl_handle (); +- + if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_DEFAULT))) + { + iface_to_rtnl_index (nm_device_get_iface (dev), nlh, addr); +@@ -330,8 +389,7 @@ + else + nm_warning ("nm_system_device_set_from_ip4_config(): couldn't create rtnl address!\n"); + +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ destroy_nl_handle (nlh); + + sleep (1); + nm_system_device_set_ip4_route (dev, nm_ip4_config_get_gateway (config), 0, 0, nm_ip4_config_get_mss (config)); +@@ -424,7 +482,13 @@ + * Set IPv4 configuration of a VPN device from an NMIP4Config object. + * + */ +-gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config, char **routes, int num_routes) ++gboolean ++nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, ++ NMDevice *active_device, ++ const char *iface, ++ NMIP4Config *config, ++ char **routes, ++ int num_routes) + { + NMIP4Config * ad_config = NULL; + struct nl_handle * nlh = NULL; +@@ -437,71 +501,73 @@ + if (active_device && (ad_config = nm_device_get_ip4_config (active_device))) + nm_system_device_set_ip4_route (active_device, nm_ip4_config_get_gateway (ad_config), nm_ip4_config_get_gateway (config), 0xFFFFFFFF, nm_ip4_config_get_mss (config)); + +- if (iface != NULL && strlen (iface)) +- { +- nm_system_device_set_up_down_with_iface (iface, TRUE); ++ if (!iface || !strlen (iface)) ++ goto done; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (); ++ if (!nlh) ++ goto done; + +- if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_PTP_DEFAULT))) +- { +- int err = 0; +- iface_to_rtnl_index (iface, nlh, addr); +- if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) +- nm_warning ("nm_system_device_set_from_ip4_config(): error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); +- rtnl_addr_put (addr); +- } +- else +- nm_warning ("nm_system_vpn_device_set_from_ip4_config(): couldn't create rtnl address!\n"); ++ nm_system_device_set_up_down_with_iface (iface, TRUE); + +- /* Set the MTU */ +- if ((request = rtnl_link_alloc ())) +- { +- struct rtnl_link * old; ++ if ((addr = nm_ip4_config_to_rtnl_addr (config, NM_RTNL_ADDR_PTP_DEFAULT))) ++ { ++ int err = 0; ++ iface_to_rtnl_index (iface, nlh, addr); ++ if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) ++ nm_warning ("nm_system_device_set_from_ip4_config(): error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); ++ rtnl_addr_put (addr); ++ } ++ else ++ nm_warning ("nm_system_vpn_device_set_from_ip4_config(): couldn't create rtnl address!\n"); + +- old = iface_to_rtnl_link (iface, nlh); +- rtnl_link_set_mtu (request, 1412); +- rtnl_link_change (nlh, old, request, 0); ++ /* Set the MTU */ ++ if ((request = rtnl_link_alloc ())) ++ { ++ struct rtnl_link * old; + +- rtnl_link_put (old); +- rtnl_link_put (request); +- } ++ old = iface_to_rtnl_link (iface, nlh); ++ rtnl_link_set_mtu (request, 1412); ++ rtnl_link_change (nlh, old, request, 0); + +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ rtnl_link_put (old); ++ rtnl_link_put (request); ++ } + +- sleep (1); ++ destroy_nl_handle (nlh); + +- nm_system_device_flush_routes_with_iface (iface); +- if (num_routes <= 0) ++ sleep (1); ++ ++ nm_system_device_flush_routes_with_iface (iface); ++ if (num_routes <= 0) ++ { ++ nm_system_delete_default_route (); ++ nm_system_device_add_default_route_via_device_with_iface (iface); ++ } ++ else ++ { ++ int i; ++ for (i = 0; i < num_routes; i++) + { +- nm_system_delete_default_route (); +- nm_system_device_add_default_route_via_device_with_iface (iface); +- } +- else +- { +- int i; +- for (i = 0; i < num_routes; i++) ++ char *valid_ip4_route; ++ ++ /* Make sure the route is valid, otherwise it's a security risk as the route ++ * text is simply taken from the user, and passed directly to system(). If ++ * we did not check the route, think of: ++ * ++ * system("/sbin/ip route add `rm -rf /` dev eth0") ++ * ++ * where `rm -rf /` was the route text. As UID 0 (root), we have to be careful. ++ */ ++ if ((valid_ip4_route = validate_ip4_route (routes[i]))) + { +- char *valid_ip4_route; +- +- /* Make sure the route is valid, otherwise it's a security risk as the route +- * text is simply taken from the user, and passed directly to system(). If +- * we did not check the route, think of: +- * +- * system("/sbin/ip route add `rm -rf /` dev eth0") +- * +- * where `rm -rf /` was the route text. As UID 0 (root), we have to be careful. +- */ +- if ((valid_ip4_route = validate_ip4_route (routes[i]))) +- { +- nm_system_device_add_route_via_device_with_iface (iface, valid_ip4_route); +- g_free (valid_ip4_route); +- } ++ nm_system_device_add_route_via_device_with_iface (iface, valid_ip4_route); ++ g_free (valid_ip4_route); + } + } + } + ++done: + nm_named_manager_add_ip4_config (named, config); + + return TRUE; +@@ -548,7 +614,8 @@ + + g_return_val_if_fail (iface != NULL, FALSE); + +- if (!(nlh = new_nl_handle ())) ++ nlh = new_nl_handle (); ++ if (!nlh) + return FALSE; + + if (!(request = rtnl_link_alloc ())) +@@ -569,9 +636,7 @@ + success = TRUE; + + out: +- nl_close (nlh); +- nl_handle_destroy (nlh); +- ++ destroy_nl_handle (nlh); + return success; + } + +@@ -614,6 +679,6 @@ + out_request: + rtnl_link_put (request); + out_nl_close: +- nl_close (nlh); +- nl_handle_destroy (nlh); ++ destroy_nl_handle (nlh); + } ++ diff --git a/debian/patches/26-libnl_1.0-pre8_r3206.patch b/debian/patches/26-libnl_1.0-pre8_r3206.patch new file mode 100644 index 00000000..6f96215d --- /dev/null +++ b/debian/patches/26-libnl_1.0-pre8_r3206.patch @@ -0,0 +1,202 @@ +Index: src/nm-netlink-monitor.c +=================================================================== +--- src/nm-netlink-monitor.c (Revision 3205) ++++ src/nm-netlink-monitor.c (Revision 3206) +@@ -174,7 +174,7 @@ + } + + monitor_address.nl_family = AF_NETLINK; +- monitor_address.nl_pid = getpid (); ++ monitor_address.nl_pid = UINT_MAX; + monitor_address.nl_groups = RTMGRP_LINK; + + if (bind (fd, +@@ -365,7 +365,7 @@ + packet.header.nlmsg_len = NLMSG_LENGTH (sizeof (struct rtgenmsg)); + packet.header.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; + packet.header.nlmsg_type = RTM_GETLINK; +- packet.header.nlmsg_pid = getpid (); ++ packet.header.nlmsg_pid = UINT_MAX; + /* Might be good to generate a unique sequence number and track + the response */ + packet.header.nlmsg_seq = sequence_number << 16; +Index: src/NetworkManagerSystem.c +=================================================================== +--- src/NetworkManagerSystem.c (Revision 3205) ++++ src/NetworkManagerSystem.c (Revision 3206) +@@ -196,7 +196,7 @@ + i = rtnl_link_name2i (cache, iface); + if (RTNL_LINK_NOT_FOUND != i) + rtnl_addr_set_ifindex (addr, i); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + } + + +@@ -216,55 +216,42 @@ + + nl_cache_update (nlh, cache); + have_link = rtnl_link_get_by_name (cache, iface); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + return have_link; + } + +-static GStaticMutex nlh_mutex = G_STATIC_MUTEX_INIT; +- +-GHashTable *nl_pids = NULL; +- + static struct +-nl_handle * new_nl_handle (void) ++nl_handle *new_nl_handle (gboolean recursive) + { +- struct nl_handle * nlh = NULL; +- guint32 nl_pid; +- int i = 0; ++ struct nl_handle *nlh = NULL; ++ struct nl_cb *cb; + +- g_static_mutex_lock (&nlh_mutex); +- +- if (nl_pids == NULL) { +- nl_pids = g_hash_table_new (g_direct_hash, g_direct_equal); +- g_assert (nl_pids); +- +- /* Insert the PID used by nm-netlink-monitor.c */ +- g_hash_table_insert (nl_pids, GUINT_TO_POINTER (getpid ()), GUINT_TO_POINTER (1)); ++ cb = nl_cb_alloc (NL_CB_VERBOSE); ++ nlh = nl_handle_alloc_cb (cb); ++ if (!nlh) { ++ nm_warning ("%s: couldn't allocate netlink handle: %s", __func__, nl_geterror ()); ++ return NULL; + } + +- while (i++ < 10) { +- nl_pid = g_random_int (); +- if (!g_hash_table_lookup (nl_pids, GUINT_TO_POINTER (nl_pid))) +- break; +- } ++ if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ /* HACK: try one more time. Because the netlink monitor for link state ++ * inits before we get here, it grabs the port that matches the PID ++ * of the NM process, which also happens to be the PID that libnl uses ++ * the first time too. The real fix is to convert nm-netlink-monitor.c ++ * over to use libnl. ++ */ ++ nl_handle_destroy (nlh); ++ if (recursive) ++ return NULL; + +- if (i < 10) { +- nlh = nl_handle_alloc_nondefault (NL_CB_VERBOSE); +- nl_handle_set_pid (nlh, nl_pid); +- +- if (nl_connect (nlh, NETLINK_ROUTE) < 0) { ++ nlh = new_nl_handle (TRUE); ++ if (!nlh) { + nm_warning ("%s: couldn't connect to netlink: %s", __func__, nl_geterror ()); +- nl_handle_destroy (nlh); +- nlh = NULL; +- } else { +- g_hash_table_insert (nl_pids, GUINT_TO_POINTER (nl_pid), GUINT_TO_POINTER (1)); ++ return NULL; + } +- } else { +- g_warning ("%s: couldn't find free netlink pid.", __func__); + } + +- g_static_mutex_unlock (&nlh_mutex); +- + return nlh; + } + +@@ -273,16 +260,10 @@ + { + g_return_if_fail (nlh != NULL); + +- g_static_mutex_lock (&nlh_mutex); +- g_hash_table_remove (nl_pids, GUINT_TO_POINTER (nl_handle_get_pid (nlh))); +- g_static_mutex_unlock (&nlh_mutex); +- + nl_close (nlh); + nl_handle_destroy (nlh); +- + } + +- + int + nm_system_get_rtnl_index_from_iface (const char *iface) + { +@@ -290,7 +271,7 @@ + struct nl_cache * cache; + int i = RTNL_LINK_NOT_FOUND; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return RTNL_LINK_NOT_FOUND; + +@@ -302,7 +283,7 @@ + + nl_cache_update (nlh, cache); + i = rtnl_link_name2i (cache, iface); +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + out: + destroy_nl_handle (nlh); +@@ -318,7 +299,7 @@ + struct nl_cache * cache = NULL; + char * buf = NULL; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return NULL; + +@@ -340,7 +321,7 @@ + } + + destroy_cache: +- nl_cache_destroy_and_free (cache); ++ nl_cache_free (cache); + + out: + destroy_nl_handle (nlh); +@@ -370,7 +351,7 @@ + config = nm_device_get_ip4_config (dev); + g_return_val_if_fail (config != NULL, FALSE); + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return FALSE; + +@@ -504,7 +485,7 @@ + if (!iface || !strlen (iface)) + goto done; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + goto done; + +@@ -614,7 +595,7 @@ + + g_return_val_if_fail (iface != NULL, FALSE); + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return FALSE; + +@@ -658,7 +639,7 @@ + if (!mtu) + return; + +- nlh = new_nl_handle (); ++ nlh = new_nl_handle (FALSE); + if (!nlh) + return; + -- cgit 1.3.0-6-gf8a5 From a450971ec0fd237ad7984a936d4d04a4da0f1e67 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 24 Jan 2008 23:09:01 +0000 Subject: * debian/patches/27-dont_repeat_errors.patch - Backported r3160 from upstream stable branch. - Don't repeat killswitch errors too often. (Closes: #456363) git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2058 ceb527fc-18e6-0310-9fe2-813c157c29e7 --- debian/patches/27-dont_repeat_errors.patch | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 debian/patches/27-dont_repeat_errors.patch (limited to 'debian/patches') diff --git a/debian/patches/27-dont_repeat_errors.patch b/debian/patches/27-dont_repeat_errors.patch new file mode 100644 index 00000000..64e23223 --- /dev/null +++ b/debian/patches/27-dont_repeat_errors.patch @@ -0,0 +1,37 @@ +diff --git a/src/NetworkManager.c b/src/NetworkManager.c +index 4f89f63..ddb5a4a 100644 +--- a/src/NetworkManager.c ++++ b/src/NetworkManager.c +@@ -65,6 +65,8 @@ + */ + static NMData *nm_data = NULL; + ++char *ks_err_message = NULL; ++ + static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer data); + static void nm_data_free (NMData *data); + static gboolean nm_poll_killswitches(gpointer user_data); +@@ -353,13 +355,21 @@ static void nm_killswitch_getpower_reply_cb (DBusPendingCall *pcall, NMData * da + if (message_is_error (reply)) { + dbus_error_init (&err); + dbus_set_error_from_message (&err, reply); +- nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ if (!ks_err_message || strcmp (ks_err_message, err.message)) { ++ nm_info ("Error getting killswitch power: %s - %s", err.name, err.message); ++ g_free (ks_err_message); ++ ks_err_message = g_strdup (err.message); ++ } + dbus_error_free (&err); + goto out; + } + + if (!dbus_message_get_args (reply, &err, DBUS_TYPE_INT32, &status, DBUS_TYPE_INVALID)) { +- nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ if (!ks_err_message || strcmp (ks_err_message, err.message)) { ++ nm_info ("Error getting killswitch power arguments: %s - %s", err.name, err.message); ++ g_free (ks_err_message); ++ ks_err_message = g_strdup (err.message); ++ } + dbus_error_free (&err); + goto out; + } -- cgit 1.3.0-6-gf8a5