Bug#628491: [Pkg-bluetooth-maintainers] Bug#628491: bluez: hid2hci missing

2011-06-05 Thread Nobuhiro Iwamatsu
Hi,

Thanks, I will applied your cleanup patch.

Nobuhiro


2011/6/1 Cristian Ionescu-Idbohrn :
> On Tue, 31 May 2011, Detlev Brodowski wrote:
>>
>> I had the same problem.
>> The cause of
>> - missing hid2hci and
>> - the not working udev rules
>> are the changed location of hid2hci and the complete rewrite of the udev
>> rule by the upstream bluez developer.
>> I have solved the problem for me with the attached patch.
>>
>> The new location of hid2hci should be /lib/udev/hid2hci, I think ;).
>>
>> Therefor I have modified these 3 files in the debian source package of
>> bluez:
>> debian/bluez_agent.udev
>> debian/bluez.bluetooth.init
>> debian/bluez.install
>
> Right.  Thanks.
> I was curious to find out why this change:
>
>> diff -ur bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init 
>> bluez-4.93/debian/bluez.bluetooth.init
>> --- bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init
>> 2011-05-30 20:11:37.735321846 +0200
>> +++ bluez-4.93/debian/bluez.bluetooth.init      2011-05-30
>> 20:12:36.682466070 +0200
>> @@ -26,7 +26,7 @@
>>  DAEMON=/usr/sbin/bluetoothd
>>  HCIATTACH=/usr/sbin/hciattach
>>
>> -HID2HCI=/usr/sbin/hid2hci
>> +HID2HCI=/lib/udev/hid2hci
>>  HID2HCI_ENABLED=1
>>  HID2HCI_UNDO=1
>>
>
> and found out it's not used.
>
> The attached patch suggests some improvements and adjusts some
> inconsistencies.
>
>
> Cheers,
>
> --
> Cristian
> ___
> Pkg-bluetooth-maintainers mailing list
> pkg-bluetooth-maintain...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-bluetooth-maintainers
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#628491: bluez: hid2hci missing

2011-06-01 Thread Cristian Ionescu-Idbohrn
On Tue, 31 May 2011, Detlev Brodowski wrote:
>
> I had the same problem.
> The cause of
> - missing hid2hci and
> - the not working udev rules
> are the changed location of hid2hci and the complete rewrite of the udev
> rule by the upstream bluez developer.
> I have solved the problem for me with the attached patch.
>
> The new location of hid2hci should be /lib/udev/hid2hci, I think ;).
>
> Therefor I have modified these 3 files in the debian source package of
> bluez:
> debian/bluez_agent.udev
> debian/bluez.bluetooth.init
> debian/bluez.install

Right.  Thanks.
I was curious to find out why this change:

> diff -ur bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init 
> bluez-4.93/debian/bluez.bluetooth.init
> --- bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init
> 2011-05-30 20:11:37.735321846 +0200
> +++ bluez-4.93/debian/bluez.bluetooth.init  2011-05-30
> 20:12:36.682466070 +0200
> @@ -26,7 +26,7 @@
>  DAEMON=/usr/sbin/bluetoothd
>  HCIATTACH=/usr/sbin/hciattach
>
> -HID2HCI=/usr/sbin/hid2hci
> +HID2HCI=/lib/udev/hid2hci
>  HID2HCI_ENABLED=1
>  HID2HCI_UNDO=1
>

and found out it's not used.

The attached patch suggests some improvements and adjusts some
inconsistencies.


Cheers,

-- 
Cristian--- debian/bluez.bluetooth.init.orig	2011-06-01 10:25:07.0 +0200
+++ debian/bluez.bluetooth.init	2011-06-01 15:25:43.0 +0200
@@ -26,21 +26,21 @@ DESC=bluetooth
 DAEMON=/usr/sbin/bluetoothd
 HCIATTACH=/usr/sbin/hciattach
 
-HID2HCI=/lib/udev/hid2hci
 HID2HCI_ENABLED=1
 HID2HCI_UNDO=1
 
 UART_CONF=/etc/bluetooth/uart
 
-RFCOMM=/usr/bin/rfcomm
 RFCOMM_NAME=rfcomm
-RFCOMM_CONF=/etc/bluetooth/rfcomm.conf
+RFCOMM=/usr/bin/$RFCOMM_NAME
+RFCOMM_CONF=/etc/bluetooth/$RFCOMM_NAME.conf
 SDPTOOL=/usr/bin/sdptool
 
 SSD_OPTIONS="--oknodo --quiet --exec $DAEMON"
 
-test -f /usr/sbin/bluetoothd || exit 0
+test -f $DAEMON || exit 0
 
+# FIXME: any of the sourced files may fail if/with syntax errors
 test -f /etc/default/bluetooth && . /etc/default/bluetooth
 test -f /etc/default/rcS && . /etc/default/rcS
 
@@ -48,36 +48,36 @@ test -f /etc/default/rcS && . /etc/defau
 
 set -e
 
+# FIXME: this function is possibly a no-op
 run_sdptool()
 {
+	# declaring IFS local in this function, removes the need to
+	# save/restore it
+	local IFS o
+
 	test -x $SDPTOOL || return 1
 
+# FIXME: where does SDPTOOL_OPTIONS come from?
 	if ! test -z "$SDPTOOL_OPTIONS" ; then
-		oldifs="$IFS"
 		IFS=";"
 		for o in $SDPTOOL_OPTIONS ; do
 			#echo "execing $SDPTOOL $o"
 			IFS=" "
-			if [ "$VERBOSE" != "no" ]; then
+			if [ "$VERBOSE" != no ]; then
 $SDPTOOL $o
 			else
 $SDPTOOL $o >/dev/null 2>&1
 			fi
 		done
-		IFS="$oldifs"
 	fi
-
-}
-
-enable_hci_input()
-{
-log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz"
 }
 
-disable_hci_input()
+hci_input()
 {
-log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz"
+log_progress_msg "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz" || :
 }
+alias enable_hci_input=hci_input
+alias disable_hci_input=hci_input
 
 start_uarts()
 {
@@ -93,7 +93,7 @@ start_uarts()
 
 stop_uarts()
 {
-	killall hciattach > /dev/null 2>&1 || true
+	killall ${HCIATTACH##*/} >/dev/null 2>&1 || :
 }
 
 start_rfcomm()
@@ -102,10 +102,10 @@ start_rfcomm()
 		# rfcomm must always succeed for now: users
 		# may not yet have an rfcomm-enabled kernel
 if [ "$VERBOSE" != no ]; then
-   log_progress_msg "rfcomm"
-   $RFCOMM -f $RFCOMM_CONF bind all || true
+		   log_progress_msg "${RFCOMM##*/}"
+		   $RFCOMM -f $RFCOMM_CONF bind all || :
 else
-   $RFCOMM -f $RFCOMM_CONF bind all >/dev/null 2>&1 || true
+		   $RFCOMM -f $RFCOMM_CONF bind all >/dev/null 2>&1 || :
 fi
 	fi
 }
@@ -114,10 +114,10 @@ stop_rfcomm()
 {
 	if [ -x $RFCOMM ] ; then
if [ "$VERBOSE" != no ]; then
-   log_progress_msg "rfcomm"
-   $RFCOMM unbind all || true
+		   log_progress_msg "${RFCOMM##*/}"
+		   $RFCOMM unbind all || :
else
-   $RFCOMM unbind all >/dev/null 2>&1 || true
+		   $RFCOMM unbind all >/dev/null 2>&1 || :
fi
 	fi
 }
@@ -126,41 +126,40 @@ restart_rfcomm()
 {
 	if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then
if [ "$VERBOSE" != no ]; then
-   log_progress_msg  "rfcomm"
-   $RFCOMM unbind all || true
-   $RFCOMM -f $RFCOMM_CONF bind all || true
+		   log_progress_msg  "${RFCOMM##*/}"
+		   $RFCOMM unbind all || :
+		   $RFCOMM -f $RFCOMM_CONF bind all || :
else
-   $RFCOMM unbind all >/dev/null 2>&1|| true
-   $RFCOMM -f $RFCOMM_CONF bind all >/dev/null 2>&1 || true
+		   $

Bug#628491: [Pkg-bluetooth-maintainers] Bug#628491: bluez: hid2hci missing

2011-05-31 Thread Nobuhiro Iwamatsu
Hi all.

I fixed in repository. I will upload soon.

Best regards,
  Nobuhiro

2011/5/31 Detlev Brodowski :
> Hello Christian,
>
> I had the same problem.
> The cause of
> - missing hid2hci and
> - the not working udev rules
> are the changed location of hid2hci and the complete rewrite of the udev
> rule by the upstream bluez developer.
> I have solved the problem for me with the attached patch.
>
> The new location of hid2hci should be /lib/udev/hid2hci, I think ;).
>
> Therefor I have modified these 3 files in the debian source package of
> bluez:
> debian/bluez_agent.udev
> debian/bluez.bluetooth.init
> debian/bluez.install
>
>
> ==
> diff -ur bluez-4.93_without_hid2hci/debian/bluez_agent.udev
> bluez-4.93/debian/bluez_agent.udev
> --- bluez-4.93_without_hid2hci/debian/bluez_agent.udev  2011-05-30
> 20:11:37.727321967 +0200
> +++ bluez-4.93/debian/bluez_agent.udev  2011-05-30 20:12:36.682466070
> +0200
> @@ -3,6 +3,6 @@
>
>  (
>        . /lib/udev/hotplug.functions
> -       wait_for_file /usr/sbin/hid2hci
> -       exec /usr/sbin/hid2hci "$@"
> +       wait_for_file /lib/udev/hid2hci
> +       exec /lib/udev/hid2hci "$@"
>  ) &
> diff -ur bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init
> bluez-4.93/debian/bluez.bluetooth.init
> --- bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init
> 2011-05-30 20:11:37.735321846 +0200
> +++ bluez-4.93/debian/bluez.bluetooth.init      2011-05-30
> 20:12:36.682466070 +0200
> @@ -26,7 +26,7 @@
>  DAEMON=/usr/sbin/bluetoothd
>  HCIATTACH=/usr/sbin/hciattach
>
> -HID2HCI=/usr/sbin/hid2hci
> +HID2HCI=/lib/udev/hid2hci
>  HID2HCI_ENABLED=1
>  HID2HCI_UNDO=1
>
> diff -ur bluez-4.93_without_hid2hci/debian/bluez.install
> bluez-4.93/debian/bluez.install
> --- bluez-4.93_without_hid2hci/debian/bluez.install     2011-05-30
> 20:11:37.743321725 +0200
> +++ bluez-4.93/debian/bluez.install     2011-05-30 20:12:36.690465949
> +0200
> @@ -4,3 +4,4 @@
>  debian/tmp/usr/sbin/*
>  debian/tmp/usr/bin/*
>  debian/tmp/usr/share/man/man*
> +debian/tmp/usr/lib/bluez/udev/hid2hci /lib/udev
> ==
>
> Kind regards,
>
> Detlev
>
> ___
> Pkg-bluetooth-maintainers mailing list
> pkg-bluetooth-maintain...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-bluetooth-maintainers
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#628491: bluez: hid2hci missing

2011-05-30 Thread Detlev Brodowski
Hello Christian,

I had the same problem.
The cause of 
- missing hid2hci and
- the not working udev rules
are the changed location of hid2hci and the complete rewrite of the udev 
rule by the upstream bluez developer.
I have solved the problem for me with the attached patch.

The new location of hid2hci should be /lib/udev/hid2hci, I think ;).

Therefor I have modified these 3 files in the debian source package of 
bluez:
debian/bluez_agent.udev
debian/bluez.bluetooth.init
debian/bluez.install


==
diff -ur bluez-4.93_without_hid2hci/debian/bluez_agent.udev 
bluez-4.93/debian/bluez_agent.udev
--- bluez-4.93_without_hid2hci/debian/bluez_agent.udev  2011-05-30 
20:11:37.727321967 +0200
+++ bluez-4.93/debian/bluez_agent.udev  2011-05-30 20:12:36.682466070 
+0200
@@ -3,6 +3,6 @@
 
 (
. /lib/udev/hotplug.functions
-   wait_for_file /usr/sbin/hid2hci
-   exec /usr/sbin/hid2hci "$@"
+   wait_for_file /lib/udev/hid2hci
+   exec /lib/udev/hid2hci "$@"
 ) &
diff -ur bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init 
bluez-4.93/debian/bluez.bluetooth.init
--- bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init  
2011-05-30 20:11:37.735321846 +0200
+++ bluez-4.93/debian/bluez.bluetooth.init  2011-05-30 
20:12:36.682466070 +0200
@@ -26,7 +26,7 @@
 DAEMON=/usr/sbin/bluetoothd
 HCIATTACH=/usr/sbin/hciattach
 
-HID2HCI=/usr/sbin/hid2hci
+HID2HCI=/lib/udev/hid2hci
 HID2HCI_ENABLED=1
 HID2HCI_UNDO=1
 
diff -ur bluez-4.93_without_hid2hci/debian/bluez.install 
bluez-4.93/debian/bluez.install
--- bluez-4.93_without_hid2hci/debian/bluez.install 2011-05-30 
20:11:37.743321725 +0200
+++ bluez-4.93/debian/bluez.install 2011-05-30 20:12:36.690465949 
+0200
@@ -4,3 +4,4 @@
 debian/tmp/usr/sbin/*
 debian/tmp/usr/bin/*
 debian/tmp/usr/share/man/man*
+debian/tmp/usr/lib/bluez/udev/hid2hci /lib/udev
==

Kind regards,

Detlev
diff -ur bluez-4.93_without_hid2hci/debian/bluez_agent.udev bluez-4.93/debian/bluez_agent.udev
--- bluez-4.93_without_hid2hci/debian/bluez_agent.udev	2011-05-30 20:11:37.727321967 +0200
+++ bluez-4.93/debian/bluez_agent.udev	2011-05-30 20:12:36.682466070 +0200
@@ -3,6 +3,6 @@
 
 (
 	. /lib/udev/hotplug.functions
-	wait_for_file /usr/sbin/hid2hci
-	exec /usr/sbin/hid2hci "$@"
+	wait_for_file /lib/udev/hid2hci
+	exec /lib/udev/hid2hci "$@"
 ) &
diff -ur bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init bluez-4.93/debian/bluez.bluetooth.init
--- bluez-4.93_without_hid2hci/debian/bluez.bluetooth.init	2011-05-30 20:11:37.735321846 +0200
+++ bluez-4.93/debian/bluez.bluetooth.init	2011-05-30 20:12:36.682466070 +0200
@@ -26,7 +26,7 @@
 DAEMON=/usr/sbin/bluetoothd
 HCIATTACH=/usr/sbin/hciattach
 
-HID2HCI=/usr/sbin/hid2hci
+HID2HCI=/lib/udev/hid2hci
 HID2HCI_ENABLED=1
 HID2HCI_UNDO=1
 
diff -ur bluez-4.93_without_hid2hci/debian/bluez.install bluez-4.93/debian/bluez.install
--- bluez-4.93_without_hid2hci/debian/bluez.install	2011-05-30 20:11:37.743321725 +0200
+++ bluez-4.93/debian/bluez.install	2011-05-30 20:12:36.690465949 +0200
@@ -4,3 +4,4 @@
 debian/tmp/usr/sbin/*
 debian/tmp/usr/bin/*
 debian/tmp/usr/share/man/man*
+debian/tmp/usr/lib/bluez/udev/hid2hci /lib/udev


Bug#628491: bluez: hid2hci missing

2011-05-29 Thread Cristian Ionescu-Idbohrn
Package: bluez
Version: 4.93-1
Severity: important

The man page /usr/share/man/man8/hid2hci.8.gz is there though.

I've built the package from source and manually copied hid2hci to
/usr/sbin.  Also modified the program path in
/lib/udev/rules.d/62-bluez-hid2hci.rules:

-  RUN+="hid2hci --method=logitech-hid --devpath=%p"
+  RUN+="/usr/sbin/hid2hci --method=logitech-hid --devpath=%p"

hoping udev will do use the rule and enable the dongle (a Logitech diNovo
Edge).  But that rule is seemingly not used, hid2hci not RUN.  I wasn't
able to make use of it when running it manually, either.  See also #626975
for more details.

Downgrading to 4.91-1 solved the immediate problem.

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

Kernel: Linux 2.6.38-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages bluez depends on:
ii  dbus 1.4.8-3 simple interprocess messaging syst
ii  libc62.13-4  Embedded GNU C Library: Shared lib
ii  libcap-ng0   0.6.5-1+b1  An alternate POSIX capabilities li
ii  libdbus-1-3  1.4.8-3 simple interprocess messaging syst
ii  libglib2.0-0 2.28.6-1The GLib library of C routines
ii  libusb-0.1-4 2:0.1.12-17 userspace USB programming library
ii  lsb-base 3.2-27  Linux Standard Base 3.2 init scrip
ii  makedev  2.3.1-89creates device files in /dev
ii  module-init-tools3.12-1  tools for managing Linux kernel mo
ii  python-dbus  0.84.0-1simple interprocess messaging syst
ii  python-gobject   2.28.4-1Python bindings for the GObject li
ii  udev 170-1   /dev/ and hotplug management daemo

bluez recommends no packages.

bluez suggests no packages.

-- no debconf information


Cheers,

-- 
Cristian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org