rpms/bluez/devel 0001-Make-discovery-mode-of-bluetooth-CUPS-backend-work-w.patch, NONE, 1.1 0001-Add-sixaxis-cable-pairing-plugin.patch, 1.3, 1.4 bluez.spec, 1.91, 1.92 0001-Allow-lp-CUPS-to-talk-to-bluetoothd.patch, 1.1, NONE 0001-Don-t-abort-cups-backend-on-property-change.patch, 1.1, NONE 0002-Actually-read-the-CreateDevice-reply.patch, 1.1, NONE 0002-Mark-Bluetooth-printers-as-being-local.patch, 1.1, NONE

Bastien Nocera hadess at fedoraproject.org
Tue Sep 1 16:42:33 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/bluez/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2132

Modified Files:
	0001-Add-sixaxis-cable-pairing-plugin.patch bluez.spec 
Added Files:
	0001-Make-discovery-mode-of-bluetooth-CUPS-backend-work-w.patch 
Removed Files:
	0001-Allow-lp-CUPS-to-talk-to-bluetoothd.patch 
	0001-Don-t-abort-cups-backend-on-property-change.patch 
	0002-Actually-read-the-CreateDevice-reply.patch 
	0002-Mark-Bluetooth-printers-as-being-local.patch 
Log Message:
* Tue Sep 01 2009 Bastien Nocera <bnocera at redhat.com> 4.50-2
- Remove obsoleted patches
- Add another CUPS backend patch
- Update cable pairing patch for new build system


0001-Make-discovery-mode-of-bluetooth-CUPS-backend-work-w.patch:
 ChangeLog   |    2 +
 cups/main.c |   64 +++++++++++++++++++++++-------------------------------------
 2 files changed, 27 insertions(+), 39 deletions(-)

--- NEW FILE 0001-Make-discovery-mode-of-bluetooth-CUPS-backend-work-w.patch ---
>From fdf7b75f5fc8a9726db6756bcddff6aa74b42ba0 Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter at gmail.com>
Date: Thu, 27 Aug 2009 09:07:49 +0200
Subject: [PATCH] Make discovery mode of bluetooth CUPS backend work with CUPS 1.4.0

The new CUPS 1.4.x does device discovery only for a given time frame
requested by the client (printer setup tool, "lpinfo" command). CUPS's
default for CUPS-1.3.x-ish requests without timeout specification
seems to be 10 seconds. CUPS starts all backends at once in the
beginning (in parallel) and kills every backend which remains running
at the end of the timeout. It accepts output from the backends
whenever it occurs not only when the backend finishes, so a backend
can search for printers infinitely long if it outputs every found
device immediately. Then all printers found during CUPS' timeout are
taken into account.

The bluetooth backend of 4.48 asks the Bluetooth daemon for printers
and collects results for 10 seconds and after that it outputs
them. This takes a total of 10.5 sec and so CUPS kills the backend
right before it answers (at least with the 10-second default timeout),
resulting in Bluetooth printers never being discovered by CUPS.

This change fixes it by making each new printer added to the list
being output immediately. Note that the list structure cannot be
removed from cups/main.c as otherwise we would get duplicate
listings. Also important is the addition of unbuffered output on
stdout.
---
 ChangeLog   |    2 +
 cups/main.c |   63 +++++++++++++++++++++++-----------------------------------
 2 files changed, 27 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d06f494..6c170f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+ver 4.51:
+	Make discovery mode of bluetooth CUPS backend work with CUPS 1.4.0.
 ver 4.50:
 	Fix issue with missing manual pages in distribution.
 	Fix issue with the configuration and state directories.
diff --git a/cups/main.c b/cups/main.c
index da757b0..1bbc78c 100644
--- a/cups/main.c
+++ b/cups/main.c
@@ -185,6 +185,27 @@ static char *device_get_ieee1284_id(const char *adapter, const char *device)
 	return id;
 }
 
+static void print_printer_details(const char *name, const char *bdaddr, const char *id)
+{
+	char *uri, *escaped;
+
+	escaped = g_strdelimit(g_strdup(name), "\"", '\'');
+	uri = g_strdup_printf("bluetooth://%c%c%c%c%c%c%c%c%c%c%c%c",
+		 bdaddr[0], bdaddr[1],
+		 bdaddr[3], bdaddr[4],
+		 bdaddr[6], bdaddr[7],
+		 bdaddr[9], bdaddr[10],
+		 bdaddr[12], bdaddr[13],
+		 bdaddr[15], bdaddr[16]);
+	printf("direct %s \"%s\" \"%s (Bluetooth)\"", uri, escaped, escaped);
+	if (id != NULL)
+		printf(" \"%s\"\n", id);
+	else
+		printf("\n");
+	g_free(escaped);
+	g_free(uri);
+}
+
 static void add_device_to_list(const char *name, const char *bdaddr, const char *id)
 {
 	struct cups_device *device;
@@ -212,27 +233,7 @@ static void add_device_to_list(const char *name, const char *bdaddr, const char
 	device->id = g_strdup(id);
 
 	device_list = g_slist_prepend(device_list, device);
-}
-
-static void print_printer_details(const char *name, const char *bdaddr, const char *id)
-{
-	char *uri, *escaped;
-
-	escaped = g_strdelimit(g_strdup(name), "\"", '\'');
-	uri = g_strdup_printf("bluetooth://%c%c%c%c%c%c%c%c%c%c%c%c",
-		 bdaddr[0], bdaddr[1],
-		 bdaddr[3], bdaddr[4],
-		 bdaddr[6], bdaddr[7],
-		 bdaddr[9], bdaddr[10],
-		 bdaddr[12], bdaddr[13],
-		 bdaddr[15], bdaddr[16]);
-	printf("direct %s \"%s\" \"%s (Bluetooth)\"", uri, escaped, escaped);
-	if (id != NULL)
-		printf(" \"%s\"\n", id);
-	else
-		printf("\n");
-	g_free(escaped);
-	g_free(uri);
+	print_printer_details(device->name, device->bdaddr, device->id);
 }
 
 static gboolean parse_device_properties(DBusMessageIter *reply_iter, char **name, char **bdaddr)
@@ -384,23 +385,6 @@ static void remote_device_found(const char *adapter, const char *bdaddr, const c
 
 static void discovery_completed(void)
 {
-	GSList *l;
-
-	for (l = device_list; l != NULL; l = l->next) {
-		struct cups_device *device = (struct cups_device *) l->data;
-
-		if (device->name == NULL)
-			device->name = g_strdelimit(g_strdup(device->bdaddr), ":", '-');
-		/* Give another try to getting an ID for the device */
-		if (device->id == NULL)
-			remote_device_found(NULL, device->bdaddr, device->name);
-		print_printer_details(device->name, device->bdaddr, device->id);
-		g_free(device->name);
-		g_free(device->bdaddr);
-		g_free(device->id);
-		g_free(device);
-	}
-
 	g_slist_free(device_list);
 	device_list = NULL;
 
@@ -638,6 +622,9 @@ int main(int argc, char *argv[])
 	/* Make sure status messages are not buffered */
 	setbuf(stderr, NULL);
 
+	/* Make sure output is not buffered */
+	setbuf(stdout, NULL);
+
 	/* Ignore SIGPIPE signals */
 #ifdef HAVE_SIGSET
 	sigset(SIGPIPE, SIG_IGN);
-- 
1.6.3.3


0001-Add-sixaxis-cable-pairing-plugin.patch:
 Makefile.am     |    9 +
 acinclude.m4    |   16 ++
 configure.ac    |    1 
 plugins/cable.c |  362 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 387 insertions(+), 1 deletion(-)

Index: 0001-Add-sixaxis-cable-pairing-plugin.patch
===================================================================
RCS file: /cvs/pkgs/rpms/bluez/devel/0001-Add-sixaxis-cable-pairing-plugin.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- 0001-Add-sixaxis-cable-pairing-plugin.patch	3 Jul 2009 11:24:10 -0000	1.3
+++ 0001-Add-sixaxis-cable-pairing-plugin.patch	1 Sep 2009 16:42:32 -0000	1.4
@@ -1,6 +1,6 @@
-From f23a9556acf6308e217b11e0a882e89d799f2517 Mon Sep 17 00:00:00 2001
+From 0f3b73be98d0f933970b87eda3fc6128de3788ab Mon Sep 17 00:00:00 2001
 From: Bastien Nocera <hadess at hadess.net>
-Date: Thu, 4 Jun 2009 10:23:58 +0100
+Date: Tue, 1 Sep 2009 17:32:48 +0100
 Subject: [PATCH] Add sixaxis cable-pairing plugin
 
 Implement the old "sixpair" using gudev (a GObject layer on top
@@ -10,18 +10,91 @@ When a Sixaxis device is plugged in, eve
 the device is selected, poked around to set the default Bluetooth
 address, and added to the database of the current default adapter.
 ---
- acinclude.m4        |   16 +++
- configure.ac        |    1 +
- plugins/Makefile.am |   11 ++-
- plugins/cable.c     |  361 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ Makefile.am     |   11 ++-
+ acinclude.m4    |   16 +++
+ configure.ac    |    1 +
+ plugins/cable.c |  361 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  4 files changed, 388 insertions(+), 1 deletions(-)
  create mode 100644 plugins/cable.c
 
+diff --git a/Makefile.am b/Makefile.am
+index 09eb7ec..cc8381e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -162,6 +162,15 @@ builtin_modules += service
+ builtin_sources += plugins/service.c
+ endif
+ 
++if CABLE
++plugin_LTLIBRARIES += plugins/cable.la
++
++plugins_cable_la_LIBADD = @CABLE_LIBS@
++plugins_cable_la_LDFLAGS = -module -avoid-version -no-undefined
++plugins_cable_la_CFLAGS = -fvisibility=hidden @DBUS_CFLAGS@ \
++					@GLIB_CFLAGS@ @CABLE_CFLAGS@
++endif
++
+ builtin_modules += hciops
+ builtin_sources += plugins/hciops.c
+ 
+diff --git a/acinclude.m4 b/acinclude.m4
+index 44f7c72..465fb67 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -142,6 +142,12 @@ AC_DEFUN([AC_PATH_USB], [
+ 			[Define to 1 if you need the usb_interrupt_read() function.]))
+ ])
+ 
++AC_DEFUN([AC_PATH_CABLE], [
++	PKG_CHECK_MODULES(CABLE, gudev-1.0 libusb-1.0, cable_found=yes, cable_found=no)
++	AC_SUBST(CABLE_CFLAGS)
++	AC_SUBST(CABLE_LIBS)
++])
++
+ AC_DEFUN([AC_PATH_NETLINK], [
+ 	PKG_CHECK_MODULES(NETLINK, libnl-1, netlink_found=yes, netlink_found=no)
+ 	AC_SUBST(NETLINK_CFLAGS)
+@@ -163,6 +169,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
+ 	netlink_enable=no
+ 	hal_enable=${hal_found}
+ 	usb_enable=${usb_found}
++	cable_enable=${cable_found}
+ 	alsa_enable=${alsa_found}
+ 	gstreamer_enable=${gstreamer_found}
+ 	audio_enable=yes
+@@ -228,6 +235,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
+ 		usb_enable=${enableval}
+ 	])
+ 
++	AC_ARG_ENABLE(cable, AC_HELP_STRING([--enable-cable], [enable DeviceKit support]), [
++		cable_enable=${enableval}
++	])
++
+ 	AC_ARG_ENABLE(netlink, AC_HELP_STRING([--enable-netlink], [enable NETLINK support]), [
+ 		netlink_enable=${enableval}
+ 	])
+@@ -311,6 +322,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
+ 		AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
+ 	fi
+ 
++	if (test "${cable_enable}" = "yes" && test "${cable_found}" = "yes"); then
++		AC_DEFINE(HAVE_CABLE, 1, [Define to 1 if you have libcable.])
++	fi
++
+ 	AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes")
+ 	AM_CONDITIONAL(NETLINK, test "${netlink_enable}" = "yes" && test "${netlink_found}" = "yes")
+ 	AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes")
+@@ -335,4 +350,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
+ 	AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes")
+ 	AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes")
+ 	AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes")
++	AM_CONDITIONAL(CABLE, test "${cable_enable}" = "yes" && test "${cable_found}" = "yes")
+ ])
 diff --git a/configure.ac b/configure.ac
-index 1686d18..339d45c 100644
+index 9e5279d..8b17659 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -36,6 +36,7 @@ AC_PATH_GLIB
+@@ -40,6 +40,7 @@ AC_PATH_GLIB
  AC_PATH_ALSA
  AC_PATH_GSTREAMER
  AC_PATH_USB
@@ -29,59 +102,9 @@ index 1686d18..339d45c 100644
  AC_PATH_NETLINK
  AC_PATH_SNDFILE
  
-diff --git a/plugins/Makefile.am b/plugins/Makefile.am
-index 9d9f970..e43584a 100644
---- a/plugins/Makefile.am
-+++ b/plugins/Makefile.am
-@@ -26,10 +26,16 @@ builtin_sources += hal.c
- builtin_modules += storage
- builtin_sources += storage.c
- 
-+if CABLE
-+plugin_LTLIBRARIES += cable.la
-+cable_la_LIBADD = @CABLE_CFLAGS@
-+endif
-+
- noinst_LTLIBRARIES = libbuiltin.la echo.la
- 
- libbuiltin_la_SOURCES = $(builtin_sources)
- libbuiltin_la_LDFLAGS =
-+libbuiltin_la_LIBADD = @CABLE_LIBS@
- libbuiltin_la_CFLAGS = $(AM_CFLAGS) \
- 			$(builtin_cflags) -DBLUETOOTH_PLUGIN_BUILTIN
- 
-@@ -40,7 +46,7 @@ nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
- AM_LDFLAGS = -module -avoid-version -no-undefined
- 
- AM_CFLAGS = -fvisibility=hidden @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ \
--			@GLIB_CFLAGS@ @GDBUS_CFLAGS@ @NETLINK_CFLAGS@
-+			@GLIB_CFLAGS@ @GDBUS_CFLAGS@ @NETLINK_CFLAGS@ @CABLE_CFLAGS@
- 
- INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/src
- 
-@@ -49,6 +55,7 @@ CLEANFILES = $(BUILT_SOURCES)
- MAINTAINERCLEANFILES = Makefile.in
- 
- builtin.h:
-+	echo $(builtin_modules)
- 	echo "" > $@
- 	list='$(builtin_modules)'; for i in $$list; \
- 	  do echo "extern struct bluetooth_plugin_desc __bluetooth_builtin_$$i;" >> $@; done
-@@ -63,9 +70,11 @@ all-local:
- 	@$(LN_S) -f $(top_srcdir)/audio/.libs/audio.so
- 	@$(LN_S) -f $(top_srcdir)/serial/.libs/serial.so
- 	@$(LN_S) -f $(top_srcdir)/network/.libs/network.so
-+	@$(LN_S) -f $(top_srcdir)/plugins/.libs/cable.so
- 
- clean-local:
- 	@rm -f network.so
- 	@rm -f serial.so
- 	@rm -f audio.so
- 	@rm -f input.so
-+	@rm -f cable.so
 diff --git a/plugins/cable.c b/plugins/cable.c
 new file mode 100644
-index 0000000..9f24b55
+index 0000000..9179c62
 --- /dev/null
 +++ b/plugins/cable.c
 @@ -0,0 +1,361 @@
@@ -447,56 +470,5 @@ index 0000000..9f24b55
 +BLUETOOTH_PLUGIN_DEFINE(cable, VERSION,
 +			BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, cable_init, cable_exit)
 -- 
-1.6.0.6
+1.6.2.5
 
---- bluez-4.43.old/acinclude.m4	2009-07-02 23:43:14.000000000 +0100
-+++ bluez-4.43/acinclude.m4	2009-07-03 12:18:46.000000000 +0100
-@@ -162,6 +162,12 @@ AC_DEFUN([AC_PATH_USB], [
- 			[Define to 1 if you need the usb_interrupt_read() function.]))
- ])
- 
-+AC_DEFUN([AC_PATH_CABLE], [
-+	PKG_CHECK_MODULES(CABLE, gudev-1.0 libusb-1.0, cable_found=yes, cable_found=no)
-+	AC_SUBST(CABLE_CFLAGS)
-+	AC_SUBST(CABLE_LIBS)
-+])
-+
- AC_DEFUN([AC_PATH_NETLINK], [
- 	PKG_CHECK_MODULES(NETLINK, libnl-1, netlink_found=yes, netlink_found=no)
- 	AC_SUBST(NETLINK_CFLAGS)
-@@ -182,6 +188,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 	netlink_enable=no
- 	hal_enable=${hal_found}
- 	usb_enable=${usb_found}
-+	cable_enable=${cable_found}
- 	alsa_enable=${alsa_found}
- 	gstreamer_enable=${gstreamer_found}
- 	audio_enable=yes
-@@ -244,6 +251,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 		usb_enable=${enableval}
- 	])
- 
-+	AC_ARG_ENABLE(cable, AC_HELP_STRING([--enable-cable], [enable DeviceKit support]), [
-+		cable_enable=${enableval}
-+	])
-+
- 	AC_ARG_ENABLE(netlink, AC_HELP_STRING([--enable-netlink], [enable NETLINK support]), [
- 		netlink_enable=${enableval}
- 	])
-@@ -327,6 +338,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 		AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
- 	fi
- 
-+	if (test "${cable_enable}" = "yes" && test "${cable_found}" = "yes"); then
-+		AC_DEFINE(HAVE_CABLE, 1, [Define to 1 if you have libcable.])
-+	fi
-+
- 	AC_SUBST([BLUEZ_CFLAGS], ['-I$(top_builddir)/include'])
- 	AC_SUBST([BLUEZ_LIBS], ['$(top_builddir)/lib/libbluetooth.la'])
- 
-@@ -360,4 +375,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 	AM_CONDITIONAL(MANPAGES, test "${manpages_enable}" = "yes")
- 	AM_CONDITIONAL(UDEVRULES, test "${udevrules_enable}" = "yes")
- 	AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes")
-+	AM_CONDITIONAL(CABLE, test "${cable_enable}" = "yes" && test "${cable_found}" = "yes")
- ])


Index: bluez.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bluez/devel/bluez.spec,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -p -r1.91 -r1.92
--- bluez.spec	1 Sep 2009 14:58:17 -0000	1.91
+++ bluez.spec	1 Sep 2009 16:42:32 -0000	1.92
@@ -1,7 +1,7 @@
 Summary: Bluetooth utilities
 Name: bluez
 Version: 4.50
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
@@ -23,12 +23,8 @@ Patch3: bluez-activate-wacom-mode2.patch
 Patch4: bluez-socket-mobile-cf-connection-kit.patch
 # http://thread.gmane.org/gmane.linux.bluez.kernel/2396
 Patch5: 0001-Add-sixaxis-cable-pairing-plugin.patch
-# http://thread.gmane.org/gmane.linux.bluez.kernel/3108
-Patch6: 0001-Don-t-abort-cups-backend-on-property-change.patch
-Patch7: 0002-Actually-read-the-CreateDevice-reply.patch
-# http://thread.gmane.org/gmane.linux.bluez.kernel/3106/focus=3114
-Patch8: 0001-Allow-lp-CUPS-to-talk-to-bluetoothd.patch
-Patch9: 0002-Mark-Bluetooth-printers-as-being-local.patch
+# http://thread.gmane.org/gmane.linux.bluez.kernel/3264/focus=3286
+Patch6: 0001-Make-discovery-mode-of-bluetooth-CUPS-backend-work-w.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://www.bluez.org/
@@ -138,10 +134,7 @@ This includes hidd, dund and pand.
 %patch3 -p1 -b .wacom
 %patch4 -p1 -b .socket-mobile
 %patch5 -p1 -b .cable-pairing
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
+%patch6 -p1 -b .newer-cups
 
 %build
 libtoolize -f -c
@@ -281,6 +274,11 @@ fi
 %config(noreplace) %{_sysconfdir}/sysconfig/pand
 
 %changelog
+* Tue Sep 01 2009 Bastien Nocera <bnocera at redhat.com> 4.50-2
+- Remove obsoleted patches
+- Add another CUPS backend patch
+- Update cable pairing patch for new build system
+
 * Tue Sep 01 2009 Bastien Nocera <bnocera at redhat.com> 4.50-1
 - Update to 4.50
 


--- 0001-Allow-lp-CUPS-to-talk-to-bluetoothd.patch DELETED ---


--- 0001-Don-t-abort-cups-backend-on-property-change.patch DELETED ---


--- 0002-Actually-read-the-CreateDevice-reply.patch DELETED ---


--- 0002-Mark-Bluetooth-printers-as-being-local.patch DELETED ---




More information about the fedora-extras-commits mailing list