[Pkg-bluetooth-maintainers] Bug#599023: Please disable hal support

Michael Biebl biebl at debian.org
Sun Oct 3 20:36:28 UTC 2010


Package: bluez
Version: 4.70-1
Severity: wishlist
Tags: patch
User: pkg-utopia-maintainers at lists.alioth.debian.org
Usertags: halectomy

bluez uses hal in its telephony plugins and has a hal plugin.
According to Martin Pitt, that hal integration does not do any useful
things nowadays and can safely disabled.

As I plan to start hal on-demand in wheezy, this also means that
starting bluetooth would trigger a hal startup, which is expensive.

This patch touches the build system, so you need to regenerate it. You
can either build-depend on dh-autoreconf for it and add the following
line to debian/rules:
include /usr/share/cdbs/1/rules/autoreconf.mk

or update the buildsystem manually and ship a patch.

The attached patch does not include the changes for the updated
build-system.

This patch would also fix #549615.

Thanks,
Michael

P.S: As we are already late in the freeze process, it is probably safest
to wait for wheezy before you apply this patch. I would appreciate
though, if you could apply it as soon as development for wheezy opens or
if you make an experimental upload.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bluez depends on:
ii  dbus                  1.4.0-1            simple interprocess messaging syst
ii  libbluetooth3         4.70-1             Library to use the BlueZ Linux Blu
ii  libc6                 2.11.2-6           Embedded GNU C Library: Shared lib
ii  libcap-ng0            0.6.4-1            An alternate posix capabilities li
ii  libdbus-1-3           1.4.0-1            simple interprocess messaging syst
ii  libglib2.0-0          2.26.0-1           The GLib library of C routines
ii  libnl1                1.1-5              library for dealing with netlink s
ii  libusb-0.1-4          2:0.1.12-16        userspace USB programming library
ii  lsb-base              3.2-25             Linux Standard Base 3.2 init scrip
ii  module-init-tools     3.12-1             tools for managing Linux kernel mo
ii  python-dbus           0.83.1-1           simple interprocess messaging syst
ii  python-gobject        2.21.4+is.2.21.3-1 Python bindings for the GObject li
ii  udev                  161-1              /dev/ and hotplug management daemo

bluez recommends no packages.

bluez suggests no packages.

-- no debconf information
-------------- next part --------------
Description: Disable usage of Hal in the telephony plugins, and disable the hal plugin. They do not do very useful things anyway, and just cause hal to start up, which is expensive.
Author: Martin Pitt <martin.pitt at ubuntu.com>
Origin: Ubuntu
Updated by Michael Biebl <biebl at debian.org>
Index: bluez-4.70/audio/telephony-maemo5.c
===================================================================
--- bluez-4.70.orig/audio/telephony-maemo5.c	2010-10-03 21:44:21.564381381 +0200
+++ bluez-4.70/audio/telephony-maemo5.c	2010-10-03 21:44:55.324383753 +0200
@@ -1394,7 +1394,7 @@
 
 	return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
 }
-
+#if 0
 static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
 {
 	DBusError err;
@@ -1511,6 +1511,7 @@
 		dbus_message_iter_next(&array);
 	}
 }
+#endif
 
 static void csd_call_free(struct csd_call *call)
 {
@@ -1725,6 +1726,7 @@
 	dbus_message_unref(reply);
 }
 
+#if 0
 static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
 {
 	DBusError err;
@@ -1778,6 +1780,7 @@
 done:
 	dbus_message_unref(reply);
 }
+#endif
 
 static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
 {
@@ -2034,9 +2037,11 @@
 	else if (dbus_message_is_signal(msg, NETWORK_INTERFACE,
 					"signal_strength_change"))
 		handle_signal_strength_change(msg);
+	/*
 	else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
 					"PropertyModified"))
 		handle_hal_property_modified(msg);
+	*/
 	else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
 						"modem_state_changed_ind"))
 		handle_modem_state(msg);
@@ -2093,6 +2098,7 @@
 
 	telephony_ready_ind(features, maemo_indicators, response_and_hold,
 								chld_str);
+	/*
 	if (send_method_call("org.freedesktop.Hal",
 				"/org/freedesktop/Hal/Manager",
 				"org.freedesktop.Hal.Manager",
@@ -2101,7 +2107,7 @@
 				DBUS_TYPE_STRING, &battery_cap,
 				DBUS_TYPE_INVALID) < 0)
 		error("Unable to send HAL method call");
-
+	*/
 	return 0;
 }
 
Index: bluez-4.70/audio/telephony-ofono.c
===================================================================
--- bluez-4.70.orig/audio/telephony-ofono.c	2010-10-03 21:44:21.548382972 +0200
+++ bluez-4.70/audio/telephony-ofono.c	2010-10-03 21:44:55.324383753 +0200
@@ -889,6 +889,7 @@
 	return TRUE;
 }
 
+#if 0
 static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
 {
 	DBusMessage *reply;
@@ -1061,6 +1062,7 @@
 done:
 	dbus_message_unref(reply);
 }
+#endif
 
 int telephony_init(void)
 {
@@ -1087,6 +1089,7 @@
 	if (ret < 0)
 		return ret;
 
+	/*
 	ret = send_method_call("org.freedesktop.Hal",
 				"/org/freedesktop/Hal/Manager",
 				"org.freedesktop.Hal.Manager",
@@ -1096,7 +1099,7 @@
 				DBUS_TYPE_INVALID);
 	if (ret < 0)
 		return ret;
-
+	*/
 	DBG("telephony_init() successfully");
 
 	return ret;
Index: bluez-4.70/Makefile.am
===================================================================
--- bluez-4.70.orig/Makefile.am	2010-10-03 21:44:21.584389240 +0200
+++ bluez-4.70/Makefile.am	2010-10-03 21:44:55.324383753 +0200
@@ -188,9 +188,6 @@
 builtin_modules += hciops
 builtin_sources += plugins/hciops.c
 
-builtin_modules += hal
-builtin_sources += plugins/hal.c
-
 builtin_modules += storage
 builtin_sources += plugins/storage.c
 
Index: bluez-4.70/audio/telephony-maemo6.c
===================================================================
--- bluez-4.70.orig/audio/telephony-maemo6.c	2010-10-03 21:45:05.392383472 +0200
+++ bluez-4.70/audio/telephony-maemo6.c	2010-10-03 21:45:11.516381108 +0200
@@ -1303,6 +1303,7 @@
 	return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
 }
 
+#if 0
 static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
 {
 	DBusError err;
@@ -1416,6 +1417,7 @@
 		dbus_message_iter_next(&array);
 	}
 }
+#endif
 
 static void csd_call_free(struct csd_call *call)
 {
@@ -1609,6 +1611,7 @@
 	dbus_message_unref(reply);
 }
 
+#if 0
 static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
 {
 	DBusError err;
@@ -1662,6 +1665,7 @@
 done:
 	dbus_message_unref(reply);
 }
+#endif
 
 static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
 {
@@ -1920,9 +1924,11 @@
 	else if (dbus_message_is_signal(msg, CSD_CSNET_SIGNAL,
 				"SignalBarsChanged"))
 		handle_signal_bars_changed(msg);
+	/*
 	else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
 					"PropertyModified"))
 		handle_hal_property_modified(msg);
+	*/
 	else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
 						"modem_state_changed_ind"))
 		handle_modem_state(msg);
@@ -1986,6 +1992,7 @@
 
 	telephony_ready_ind(features, maemo_indicators, response_and_hold,
 								chld_str);
+	/*
 	if (send_method_call("org.freedesktop.Hal",
 				"/org/freedesktop/Hal/Manager",
 				"org.freedesktop.Hal.Manager",
@@ -1994,6 +2001,7 @@
 				DBUS_TYPE_STRING, &battery_cap,
 				DBUS_TYPE_INVALID) < 0)
 		error("Unable to send HAL method call");
+	*/
 
 	return 0;
 }


More information about the Pkg-bluetooth-maintainers mailing list