[Pkg-bluetooth-maintainers] Bug#729808: NMU for #729808

Michael Biebl biebl at debian.org
Sat Mar 1 07:36:53 UTC 2014


tags 729808 + patch pending
thanks

Hi Nobuhiro,

with systemd becoming increasingly popular and the recent TC decision to
make it the default for jessie, we are seeing quite a few users who run
into bug #729808.
The problem is, that bluez ships a native systemd service (which
overrides the SysV init script), but doesn't enable it. As a result, the
bluetoohd daemon is not started under systemd.

I've prepared an NMU and uploaded to DELAYED/5. I also cleaned up some
obsolete udev helpers (which aren't used anymore) while at it and
dropped the update-rc.d parameters, which are no longer used and only
generate a warning nowadays.

The complete debdiff is attached. I've also split up the changes above
into separate commits for you convenience.

The bluez package is using CDBS and the dh-systemd support in CDBS is
currently buggy [1] unfortunately. CDBS doesn't run dh_install and
dh_systemd_{enable,start} in the correct order, so the dh_systemd tools
don't find the service file. As a workaround I point dh_systemd_enable
and dh_systemd_start to the uninstalled service file.
You should consider removing that workaround again once [1] is fixed.

If you object to the NMU, please let me know and I'll cancel it.

Regards,
Michael


[1] http://bugs.debian.org/715504
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Stop-passing-static-start-and-stop-priorities-to-upd.patch
Type: text/x-patch
Size: 1451 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20140301/eb0f1973/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Remove-obsolete-and-unused-udev-helpers-for-bluetoot.patch
Type: text/x-patch
Size: 2564 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20140301/eb0f1973/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Enable-systemd-service-file-on-installation.patch
Type: text/x-patch
Size: 3118 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20140301/eb0f1973/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Release-version-4.101-4.1-to-unstable.patch
Type: text/x-patch
Size: 1029 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20140301/eb0f1973/attachment-0003.bin>
-------------- next part --------------
diff -Nru bluez-4.101/debian/bluez_agent.udev bluez-4.101/debian/bluez_agent.udev
--- bluez-4.101/debian/bluez_agent.udev	2013-11-26 17:16:53.000000000 +0100
+++ bluez-4.101/debian/bluez_agent.udev	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh -e
-# /usr is not guaranteed to be mounted when udev starts
-
-(
-	. /lib/udev/hotplug.functions
-	wait_for_file /lib/udev/hid2hci
-	exec /lib/udev/hid2hci "$@"
-) &
diff -Nru bluez-4.101/debian/bluez-udev bluez-4.101/debian/bluez-udev
--- bluez-4.101/debian/bluez-udev	2013-11-26 17:16:53.000000000 +0100
+++ bluez-4.101/debian/bluez-udev	1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh -e
-# /usr is not guaranteed to be mounted when udev starts
-
-(
-	. /lib/udev/hotplug.functions
-	wait_for_file /usr/sbin/bluetoothd
-	exec /usr/sbin/bluetoothd "$@"
-) &
diff -Nru bluez-4.101/debian/changelog bluez-4.101/debian/changelog
--- bluez-4.101/debian/changelog	2013-12-14 04:37:17.000000000 +0100
+++ bluez-4.101/debian/changelog	2014-03-01 08:14:13.000000000 +0100
@@ -1,3 +1,21 @@
+bluez (4.101-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Stop passing static start and stop priorities to update-rc.d. Those are
+    determined dynamically nowadays via the dependencies specified in the
+    LSB header.
+  * Remove obsolete and unused udev helpers for bluetoothd and hid2hci.
+  * Enable systemd service file on installation. This hooks up the service in
+    bluetooth.target which is activated by systemd when bluetooth hardware is
+    attached. (Closes: #729808)
+    - Add Build-Depends on dh-systemd.
+    - Bump Build-Depends on cdbs to (>= 0.4.122) to get dh-systemd support.
+    - Workaround a bug in cdbs, which doesn't run dh_install and dh_systemd
+      the correct order, by pointing dh_systemd_enable and dh_systemd_start at
+      the uninstalled service file. See #715504 for details.
+
+ -- Michael Biebl <biebl at debian.org>  Sat, 01 Mar 2014 08:14:10 +0100
+
 bluez (4.101-4) unstable; urgency=low
 
   * Remove 0008-Enable-the-Gateway-and-Source-audio-profiles-by-defa.patch.
diff -Nru bluez-4.101/debian/control bluez-4.101/debian/control
--- bluez-4.101/debian/control	2013-11-26 17:16:53.000000000 +0100
+++ bluez-4.101/debian/control	2014-03-01 08:13:16.000000000 +0100
@@ -3,7 +3,8 @@
 Priority: optional
 Maintainer: Debian Bluetooth Maintainers <pkg-bluetooth-maintainers at lists.alioth.debian.org>
 Uploaders: Nobuhiro Iwamatsu <iwamatsu at debian.org>
-Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.97), quilt,
+Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.122), quilt,
+               dh-systemd,
                autotools-dev,
                flex,
                bison,
diff -Nru bluez-4.101/debian/rules bluez-4.101/debian/rules
--- bluez-4.101/debian/rules	2013-11-26 17:16:53.000000000 +0100
+++ bluez-4.101/debian/rules	2014-03-01 08:10:14.000000000 +0100
@@ -7,8 +7,16 @@
 
 LDFLAGS += -Wl,--as-needed
 
-DEB_UPDATE_RCD_PARAMS = "start 25 2 3 4 5 . stop 74 0 1 6 ."
 DEB_DH_INSTALLINIT_ARGS = "--name=bluetooth"
+
+# Workaround a bug in cdbs, which doesn't run dh_install and dh_systemd
+# in the correct order, by pointing dh_systemd_enable and dh_systemd_start
+# at the uninstalled service file.
+# Once the bug #715504 in cdbs has been fixed, this workaround should be
+# removed again.
+DEB_DH_SYSTEMD_ENABLE_ARGS_bluez = src/bluetooth.service
+DEB_DH_SYSTEMD_START_ARGS_bluez = src/bluetooth.service
+
 DEB_CONFIGURE_EXTRA_FLAGS := \
                              --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
                              --enable-static \
@@ -45,9 +53,6 @@
 	test-service test-telephony
 
 install/bluez::
-	install -D -m 0755 $(CURDIR)/debian/bluez_agent.udev \
-		$(CURDIR)/debian/bluez/lib/udev/bluez
-
 	install -D -m 0755 $(CURDIR)/test/agent \
 		$(CURDIR)/debian/bluez/usr/bin/bluetooth-agent
 	for d in $(TEST_PROGRAM_LIST) ; do \
@@ -65,8 +70,3 @@
 binary-install/bluez::
 	install -D -m 0644 $(CURDIR)/debian/bluetooth-dbus.conf \
 		$(CURDIR)/debian/bluez/etc/dbus-1/system.d/bluetooth.conf
-	install -D -m 0755 $(CURDIR)/debian/bluez-udev \
-		$(CURDIR)/debian/bluez/lib/udev/bluez-udev
-
-clean::
-	-rm -f $(CURDIR)/debian/bluez-pcmcia-support.udev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20140301/eb0f1973/attachment.sig>


More information about the Pkg-bluetooth-maintainers mailing list