summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2009-11-23 23:49:03 +0000
committerMichael Biebl <biebl@debian.org>2009-11-23 23:49:03 +0000
commitcfae2d2412095b104b158b90a6e5cdb3058b4b92 (patch)
tree2d85db48f46603e8f8480444ed6eb60f00d81da5
parent2197e852526abc628a32322fad940897499664dd (diff)
* Drop patches that have been merged upstream
  - debian/patches/04-struct_termios.patch
  - debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch

git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@3274 ceb527fc-18e6-0310-9fe2-813c157c29e7
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/04-struct_termios.patch66
-rw-r--r--debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch253
-rw-r--r--debian/patches/series2
4 files changed, 3 insertions, 321 deletions
diff --git a/debian/changelog b/debian/changelog
index 146f71b4..b4b2565b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ network-manager (0.7.2-1) UNRELEASED; urgency=low
     - Update group="netdev" policy based on the upstream changes for
       at_console. The updated D-Bus policy also fixes communication failures
       between pppd and NetworkManager. (Closes: #555624)
+  * Drop patches that have been merged upstream
+    - debian/patches/04-struct_termios.patch
+    - debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch
 
  -- Michael Biebl <biebl@debian.org>  Tue, 24 Nov 2009 00:34:08 +0100
 
diff --git a/debian/patches/04-struct_termios.patch b/debian/patches/04-struct_termios.patch
deleted file mode 100644
index bddb0394..00000000
--- a/debian/patches/04-struct_termios.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-# Fix FTBFS on alpha by using the POSIX.1 struct termios interface instead
-# of the obsolete struct termio ioctl interface. (Closes: #524161)  
-diff --git a/src/nm-serial-device.c b/src/nm-serial-device.c
-index 1cba1ca..afdc6a6 100644
---- a/src/nm-serial-device.c
-+++ b/src/nm-serial-device.c
-@@ -21,13 +21,12 @@
- 
- #define _GNU_SOURCE  /* for strcasestr() */
- 
--#include <termio.h>
-+#include <termios.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <errno.h>
--#include <sys/ioctl.h>
- #include <string.h>
- #include <stdlib.h>
- #include <glib.h>
-@@ -346,7 +345,7 @@ static gboolean
- config_fd (NMSerialDevice *device, NMSettingSerial *setting)
- {
- 	NMSerialDevicePrivate *priv = NM_SERIAL_DEVICE_GET_PRIVATE (device);
--	struct termio stbuf;
-+	struct termios stbuf;
- 	int speed;
- 	int bits;
- 	int parity;
-@@ -357,7 +356,7 @@ config_fd (NMSerialDevice *device, NMSettingSerial *setting)
- 	parity = parse_parity (nm_setting_serial_get_parity (setting));
- 	stopbits = parse_stopbits (nm_setting_serial_get_stopbits (setting));
- 
--	ioctl (priv->fd, TCGETA, &stbuf);
-+	tcgetattr (priv->fd, &stbuf);
- 
- 	stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
- 	stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
-@@ -370,7 +369,7 @@ config_fd (NMSerialDevice *device, NMSettingSerial *setting)
- 	stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
- 	stbuf.c_cflag |= (speed | bits | CREAD | 0 | parity | stopbits);
- 
--	if (ioctl (priv->fd, TCSETA, &stbuf) < 0) {
-+	if (tcsetattr (priv->fd, TCSANOW, &stbuf) < 0) {
- 		nm_warning ("(%s) cannot control device (errno %d)",
- 		            nm_device_get_iface (NM_DEVICE (device)), errno);
- 		return FALSE;
-@@ -404,7 +403,7 @@ nm_serial_device_open (NMSerialDevice *device,
- 		return FALSE;
- 	}
- 
--	if (ioctl (priv->fd, TCGETA, &priv->old_t) < 0) {
-+	if (tcgetattr (priv->fd, &priv->old_t) < 0) {
- 		nm_warning ("(%s) cannot control device (errno %d)", iface, errno);
- 		close (priv->fd);
- 		return FALSE;
-@@ -447,7 +446,7 @@ nm_serial_device_close (NMSerialDevice *device)
- 			priv->channel = NULL;
- 		}
- 
--		ioctl (priv->fd, TCSETA, &priv->old_t);
-+		tcsetattr (priv->fd, TCSANOW, &priv->old_t);
- 		close (priv->fd);
- 		priv->fd = 0;
- 	}
diff --git a/debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch b/debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch
deleted file mode 100644
index 25949e82..00000000
--- a/debian/patches/05-handle-new-ssb-bus-from-HAL-0.5.13.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-Squash the following commits into one patch
-
-d0cdbf3525b105de6dc0ca4ce02801bfe8fe2222
-4c36f7c0b607813753072acf1bec14414494948c
-d185695d80b248354dd7a95fd896daa5c45085e5
-
-modem: handle newer HAL versions where info.bus is no longer present
-
-hal: find driver for ibmebus-type 'ehea' devices
-
-core: handle new 'ssb' bus from HAL 0.5.13 (deb #540613)
-
-HAL added 'ssb' (Silicon Sonics Backplane, used internally on most
-Broadcom ethernet and wifi chipsets) in 0.5.13, which changed the
-device list layout and made NM unable to get the driver for the
-wifi device.  Fix that.
----
- src/nm-hal-manager.c |  133 +++++++++++++++++++++++++++++--------------------
- 1 files changed, 79 insertions(+), 54 deletions(-)
-
-diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c
-index 647fe21..a01b4e2 100644
---- a/src/nm-hal-manager.c
-+++ b/src/nm-hal-manager.c
-@@ -124,19 +124,45 @@ get_creator (NMHalManager *self, const char *udi)
- /* Common helpers for built-in device creators */
- 
- static char *
-+hal_get_subsystem (LibHalContext *ctx, const char *udi)
-+{
-+	char *subsys;
-+
-+	subsys = libhal_device_get_property_string (ctx, udi, "info.subsystem", NULL);
-+	if (!subsys) {
-+		/* info.bus is deprecated */
-+		subsys = libhal_device_get_property_string (ctx, udi, "info.bus", NULL);
-+	}
-+	return subsys;
-+}
-+
-+static char *
- nm_get_device_driver_name (LibHalContext *ctx, const char *origdev_udi)
- {
--	char *driver_name = NULL;
-+	char *driver_name = NULL, *subsystem, *drv, *od_parent = NULL;
- 
--	if (origdev_udi && libhal_device_property_exists (ctx, origdev_udi, "info.linux.driver", NULL)) {
--		char *drv;
-+	if (!origdev_udi)
-+		return NULL;
- 
--		drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
--		if (drv) {
--			driver_name = g_strdup (drv);
--			libhal_free_string (drv);
-+	/* s390 driver name is on the grandparent of the net device */
-+	subsystem = hal_get_subsystem (ctx, origdev_udi);
-+	if (subsystem) {
-+		if (!strcmp (subsystem, "ibmebus")) {
-+			od_parent = libhal_device_get_property_string (ctx, origdev_udi, "info.parent", NULL);
-+			origdev_udi = (const char *) od_parent;
-+		} else if (!strcmp (subsystem, "ssb")) {
-+			od_parent = libhal_device_get_property_string (ctx, origdev_udi, "info.parent", NULL);
-+			origdev_udi = (const char *) od_parent;
- 		}
- 	}
-+
-+	drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
-+	if (drv)
-+		driver_name = g_strdup (drv);
-+
-+	libhal_free_string (drv);
-+	libhal_free_string (od_parent);
-+	libhal_free_string (subsystem);
- 	return driver_name;
- }
- 
-@@ -292,18 +318,34 @@ is_modem_device (NMHalManager *self, const char *udi)
- }
- 
- static char *
-+hal_get_originating_device (LibHalContext *ctx, const char *udi, const char *prefix)
-+{
-+	char *od_key = g_strdup_printf ("%s.originating_device", prefix);
-+	char *pd_key = g_strdup_printf ("%s.physical_device", prefix);
-+	char *od;
-+
-+	od = libhal_device_get_property_string (ctx, udi, od_key, NULL);
-+	if (!od) {
-+		/* physical_device is deprecated */
-+		od = libhal_device_get_property_string (ctx, udi, pd_key, NULL);
-+	}
-+
-+	g_free (od_key);
-+	g_free (pd_key);
-+	return od;
-+}
-+
-+static char *
- get_hso_netdev (LibHalContext *ctx, const char *udi)
- {
--	char *serial_od = NULL, *serial_od_parent = NULL, *netdev = NULL, *bus;
-+	char *serial_od = NULL, *serial_od_parent = NULL, *netdev = NULL, *subsys;
- 	char **netdevs = NULL;
- 	int num, i;
- 
- 	/* Get the serial interface's originating device UDI, used to find the
- 	 * originating device's netdev.
- 	 */
--	serial_od = libhal_device_get_property_string (ctx, udi, "serial.originating_device", NULL);
--	if (!serial_od)
--		serial_od = libhal_device_get_property_string (ctx, udi, "serial.physical_device", NULL);
-+	serial_od = hal_get_originating_device (ctx, udi, "serial");
- 	if (!serial_od)
- 		goto out;
- 
-@@ -312,21 +354,19 @@ get_hso_netdev (LibHalContext *ctx, const char *udi)
- 		goto out;
- 
- 	/* Check to ensure we've got the actual "USB Device" */
--	bus = libhal_device_get_property_string (ctx, serial_od_parent, "info.bus", NULL);
--	if (!bus || strcmp (bus, "usb_device")) {
--		libhal_free_string (bus);
-+	subsys = hal_get_subsystem (ctx, serial_od_parent);
-+	if (!subsys || strcmp (subsys, "usb_device")) {
-+		libhal_free_string (subsys);
- 		goto out;
- 	}
--	libhal_free_string (bus);
-+	libhal_free_string (subsys);
- 
- 	/* Look for the originating device's netdev */
- 	netdevs = libhal_find_device_by_capability (ctx, "net", &num, NULL);
- 	for (i = 0; netdevs && !netdev && (i < num); i++) {
- 		char *net_od = NULL, *net_od_parent = NULL, *tmp;
- 
--		net_od = libhal_device_get_property_string (ctx, netdevs[i], "net.originating_device", NULL);
--		if (!net_od)
--			net_od = libhal_device_get_property_string (ctx, netdevs[i], "net.physical_device", NULL);
-+		net_od = hal_get_originating_device (ctx, netdevs[i], "net");
- 		if (!net_od)
- 			goto next;
- 
-@@ -335,12 +375,12 @@ get_hso_netdev (LibHalContext *ctx, const char *udi)
- 			goto next;
- 
- 		/* Check to ensure we've got the actual "USB Device" */
--		bus = libhal_device_get_property_string (ctx, net_od_parent, "info.bus", NULL);
--		if (!bus || strcmp (bus, "usb_device")) {
--			libhal_free_string (bus);
-+		subsys = hal_get_subsystem (ctx, net_od_parent);
-+		if (!subsys || strcmp (subsys, "usb_device")) {
-+			libhal_free_string (subsys);
- 			goto next;
- 		}
--		libhal_free_string (bus);
-+		libhal_free_string (subsys);
- 
- 		if (!strcmp (net_od_parent, serial_od_parent)) {
- 			/* We found it */
-@@ -851,22 +891,16 @@ new_modem_device (const char *udi,
- static char *
- nm_get_modem_device_driver_name (LibHalContext *ctx, const char *udi)
- {
--	char *driver_name = NULL;
--	char *origdev_udi;
-+	char *driver_name = NULL, *origdev_udi, *driver;
- 
--	origdev_udi = libhal_device_get_property_string (ctx, udi, "serial.originating_device", NULL);
--	/* Older HAL uses "physical_device" */
-+	origdev_udi = hal_get_originating_device (ctx, udi, "serial");
- 	if (!origdev_udi)
--		origdev_udi = libhal_device_get_property_string (ctx, udi, "serial.physical_device", NULL);
--
--	if (origdev_udi && libhal_device_property_exists (ctx, origdev_udi, "info.linux.driver", NULL)) {
--		char *drv;
-+		return NULL;
- 
--		drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
--		if (drv) {
--			driver_name = g_strdup (drv);
--			libhal_free_string (drv);
--		}
-+	driver = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
-+	if (driver) {
-+		driver_name = g_strdup (driver);
-+		libhal_free_string (driver);
- 	}
- 	libhal_free_string (origdev_udi);
- 	return driver_name;
-@@ -1039,7 +1073,7 @@ static void
- emit_udi_added (NMHalManager *self, const char *udi, DeviceCreator *creator)
- {
- 	NMHalManagerPrivate *priv = NM_HAL_MANAGER_GET_PRIVATE (self);
--	char *od = NULL, *tmp, *parent, *bus = NULL;
-+	char *od = NULL, *tmp, *parent, *subsys = NULL;
- 
- 	g_return_if_fail (self != NULL);
- 	g_return_if_fail (udi != NULL);
-@@ -1056,8 +1090,8 @@ emit_udi_added (NMHalManager *self, const char *udi, DeviceCreator *creator)
- 	 */
- 	parent = libhal_device_get_property_string (priv->hal_ctx, udi, "info.parent", NULL);
- 	if (parent)
--		bus = libhal_device_get_property_string (priv->hal_ctx, parent, "info.bus", NULL);
--	if (bus && !strcmp (bus, "usb")) {
-+		subsys = hal_get_subsystem (priv->hal_ctx, parent);
-+	if (subsys && !strcmp (subsys, "usb")) {
- 		char *usb_intf_udi;
- 
- 		usb_intf_udi = libhal_device_get_property_string (priv->hal_ctx, udi, "info.parent", NULL);
-@@ -1066,7 +1100,7 @@ emit_udi_added (NMHalManager *self, const char *udi, DeviceCreator *creator)
- 
- 			/* Ensure the grandparent really is the "USB Device" */
- 			if (od) {
--				tmp = libhal_device_get_property_string (priv->hal_ctx, od, "info.bus", NULL);
-+				tmp = hal_get_subsystem (priv->hal_ctx, od);
- 				if (!tmp || strcmp (tmp, "usb_device")) {
- 					libhal_free_string (od);
- 					od = NULL;
-@@ -1077,24 +1111,15 @@ emit_udi_added (NMHalManager *self, const char *udi, DeviceCreator *creator)
- 			libhal_free_string (usb_intf_udi);
- 		}
- 	}
--	libhal_free_string (bus);
-+	libhal_free_string (subsys);
- 	libhal_free_string (parent);
- 
--	/* For non-USB devices, and ss a fallback, just use the originating device
--	 * of the tty; though this might result in more than one modem being detected by NM.
-+	/* For non-USB devices, and as a fallback, just use the originating device
-+	 * of the tty; though this might result in more than one modem being
-+	 * detected by NM.
- 	 */
--	if (!od) {
--		tmp = g_strdup_printf ("%s.originating_device", creator->category);
--		od = libhal_device_get_property_string (priv->hal_ctx, udi, tmp, NULL);
--		g_free (tmp);
--	}
--
--	if (!od) {
--		/* Older HAL uses 'physical_device' */
--		tmp = g_strdup_printf ("%s.physical_device", creator->category);
--		od = libhal_device_get_property_string (priv->hal_ctx, udi, tmp, NULL);
--		g_free (tmp);
--	}
-+	if (!od)
-+		od = hal_get_originating_device (priv->hal_ctx, udi, creator->category);
- 
- 	g_signal_emit (self, signals[UDI_ADDED], 0,
- 	               udi,
--- 
-1.6.3.3
-
diff --git a/debian/patches/series b/debian/patches/series
index 6a732b2f..3ad97cdd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,3 @@
 02-dbus_access_network_manager.patch
 #03-F3507g.patch
 #20-manual_means_always_online.patch
-04-struct_termios.patch
-05-handle-new-ssb-bus-from-HAL-0.5.13.patch