[bluez/rawhide/user/lkundrak/bluez-5.1: 1/2] mm

Lubomir Rintel lkundrak at fedoraproject.org
Sun Jan 13 11:05:39 UTC 2013


commit d6b9f4e8ac78966aa63a220b1929d2631fe6067e
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Sun Jan 13 00:02:08 2013 +0100

    mm

 0001-Add-sixaxis-cable-pairing-plugin.patch        |  203 +++++++-------------
 0001-Allow-PulseAudio-to-connect-by-default.patch  |   16 +-
 ...Add-helper-function-to-request-disconnect.patch |   37 ----
 ...-Logitech-diNovo-Edge-keyboard-firmware-i.patch |   16 +-
 bluez.spec                                         |  190 +++++-------------
 5 files changed, 140 insertions(+), 322 deletions(-)
---
diff --git a/0001-Add-sixaxis-cable-pairing-plugin.patch b/0001-Add-sixaxis-cable-pairing-plugin.patch
index b20c9c8..ac44849 100644
--- a/0001-Add-sixaxis-cable-pairing-plugin.patch
+++ b/0001-Add-sixaxis-cable-pairing-plugin.patch
@@ -1,4 +1,4 @@
-From 64f9449656dbbb718d53a54ed8e7904e289280ec Mon Sep 17 00:00:00 2001
+From b9799634a70b20522732794044617d5efc43dc7f Mon Sep 17 00:00:00 2001
 From: Bastien Nocera <hadess at hadess.net>
 Date: Fri, 30 Dec 2011 12:34:29 +0100
 Subject: [PATCH] Add sixaxis cable-pairing plugin
@@ -9,120 +9,80 @@ When a Sixaxis device is plugged in, events are filtered, and
 the device is selected, poked around to set the default Bluetooth
 address, and added to the database of the current default adapter.
 ---
- Makefile.am     |    9 +-
- acinclude.m4    |   16 +++
- configure.ac    |    1 +
- plugins/cable.c |  382 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- src/adapter.c   |   19 +++
- src/adapter.h   |    3 +
- 6 files changed, 428 insertions(+), 2 deletions(-)
+ Makefile.am      |    4 +-
+ Makefile.plugins |    5 +
+ configure.ac     |   13 ++
+ plugins/cable.c  |  371 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/adapter.c    |    7 +
+ src/adapter.h    |    3 +
+ 6 files changed, 401 insertions(+), 2 deletions(-)
  create mode 100644 plugins/cable.c
 
 diff --git a/Makefile.am b/Makefile.am
-index 53fcbe9..f831a72 100644
+index 84e51a3..85f8491 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -238,6 +238,11 @@ builtin_sources += thermometer/main.c \
- endif
- 
- 
-+if CABLE
-+builtin_modules += cable
-+builtin_sources += plugins/cable.c
-+endif
-+
- builtin_modules += hciops mgmtops
- builtin_sources += plugins/hciops.c plugins/mgmtops.c
- 
-@@ -306,7 +311,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
- 			src/event.h src/event.c \
- 			src/oob.h src/oob.c src/eir.h src/eir.c
+@@ -145,7 +145,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
+ 			src/dbus-common.c src/dbus-common.h \
+ 			src/eir.h src/eir.c src/mgmt.c src/mgmt.h
  src_bluetoothd_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@ @DBUS_LIBS@ \
 -								-ldl -lrt
 +								@CABLE_LIBS@ -ldl -lrt
  src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \
  				-Wl,--version-script=$(srcdir)/src/bluetooth.ver
  
-@@ -428,7 +433,7 @@ EXTRA_DIST += doc/manager-api.txt \
+@@ -207,7 +207,7 @@ EXTRA_DIST += doc/obex-api.txt doc/obex-agent-api.txt
  
- AM_YFLAGS = -d
+ EXTRA_DIST += tools/magic.btsnoop
  
 -AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@
 +AM_CFLAGS += @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CABLE_CFLAGS@
  
- INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
- 			-I$(srcdir)/audio -I$(srcdir)/sbc -I$(srcdir)/gdbus \
-diff --git a/acinclude.m4 b/acinclude.m4
-index 6505ad3..3f59989 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -139,6 +139,12 @@ AC_DEFUN([AC_PATH_UDEV], [
- 	AC_SUBST(UDEV_LIBS)
- ])
+ AM_CPPFLAGS = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
+ 			-I$(srcdir)/gdbus -I$(srcdir)/btio
+diff --git a/Makefile.plugins b/Makefile.plugins
+index c4670d8..c5e9998 100644
+--- a/Makefile.plugins
++++ b/Makefile.plugins
+@@ -110,3 +110,8 @@ builtin_sources += profiles/heartrate/heartrate.c
+ builtin_modules += cyclingspeed
+ builtin_sources += profiles/cyclingspeed/cyclingspeed.c
+ endif
++
++if CABLE
++builtin_modules += cable
++builtin_sources += plugins/cable.c
++endif
+diff --git a/configure.ac b/configure.ac
+index 1e42b3d..04fd347 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -229,6 +229,19 @@ AC_ARG_ENABLE(experimental, AC_HELP_STRING([--enable-experimental],
+ 					[enable_experimental=${enableval}])
+ AM_CONDITIONAL(EXPERIMENTAL, test "${enable_experimental}" = "yes")
  
-+AC_DEFUN([AC_PATH_CABLE], [
++AC_ARG_ENABLE(cable, AC_HELP_STRING([--enable-cable],
++			[enable DeviceKit support]),
++				[enable_cable=${enableval}])
++if (test "${enable_cable}" == "yes"); then
 +	PKG_CHECK_MODULES(CABLE, libudev libusb-1.0, cable_found=yes, cable_found=no)
 +	AC_SUBST(CABLE_CFLAGS)
 +	AC_SUBST(CABLE_LIBS)
-+])
-+
- AC_DEFUN([AC_PATH_SNDFILE], [
- 	PKG_CHECK_MODULES(SNDFILE, sndfile, sndfile_found=yes, sndfile_found=no)
- 	AC_SUBST(SNDFILE_CFLAGS)
-@@ -176,6 +182,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 	sndfile_enable=${sndfile_found}
- 	hal_enable=no
- 	usb_enable=${usb_found}
-+	cable_enable=${cable_found}
- 	alsa_enable=${alsa_found}
- 	gstreamer_enable=${gstreamer_found}
- 	audio_enable=yes
-@@ -265,6 +272,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(tools, AC_HELP_STRING([--enable-tools], [install Bluetooth utilities]), [
- 		tools_enable=${enableval}
- 	])
-@@ -366,6 +377,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
++	if (test "${cable_found}" = "yes"); then
 +		AC_DEFINE(HAVE_CABLE, 1, [Define to 1 if you have libcable.])
 +	fi
++fi
++AM_CONDITIONAL(CABLE, test "${enable_cable}" = "yes" && test "${cable_found}" = "yes")
 +
- 	AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes")
- 	AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes")
- 	AM_CONDITIONAL(SBC, test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes" ||
-@@ -398,4 +413,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
- 	AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
- 	AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
- 	AM_CONDITIONAL(GATTMODULES, test "${gatt_enable}" = "yes")
-+	AM_CONDITIONAL(CABLE, test "${cable_enable}" = "yes" && test "${cable_found}" = "yes")
- ])
-diff --git a/configure.ac b/configure.ac
-index 48b181e..45a4b15 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -46,6 +46,7 @@ AC_PATH_GSTREAMER
- AC_PATH_USB
- AC_PATH_UDEV
- AC_PATH_SNDFILE
-+AC_PATH_CABLE
- AC_PATH_OUI
- AC_PATH_READLINE
- AC_PATH_CHECK
+ if (test "${prefix}" = "NONE"); then
+ 	dnl no prefix and no localstatedir, so default to /var
+ 	if (test "$localstatedir" = '${prefix}/var'); then
 diff --git a/plugins/cable.c b/plugins/cable.c
 new file mode 100644
-index 0000000..fe758db
+index 0000000..476c000
 --- /dev/null
 +++ b/plugins/cable.c
-@@ -0,0 +1,382 @@
+@@ -0,0 +1,371 @@
 +/*
 + *
 + *  BlueZ - Bluetooth protocol stack for Linux
@@ -151,9 +111,7 @@ index 0000000..fe758db
 +#endif
 +
 +#include <glib.h>
-+#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE 1
 +#include <libudev.h>
-+#include <dbus/dbus.h>
 +#include <bluetooth/bluetooth.h>
 +#include <bluetooth/sdp.h>
 +#include <libusb.h>
@@ -174,8 +132,7 @@ index 0000000..fe758db
 +#define SIXAXIS_PNP_RECORD "3601920900000A000100000900013503191124090004350D35061901000900113503190011090006350909656E09006A0901000900093508350619112409010009000D350F350D350619010009001335031900110901002513576972656C65737320436F6E74726F6C6C65720901012513576972656C65737320436F6E74726F6C6C6572090102251B536F6E7920436F6D707574657220456E7465727461696E6D656E740902000901000902010901000902020800090203082109020428010902052801090206359A35980822259405010904A101A102850175089501150026FF00810375019513150025013500450105091901291381027501950D0600FF8103150026FF0005010901A10075089504350046FF0009300931093209358102C0050175089527090181027508953009019102750895300901B102C0A1028502750895300901B102C0A10285EE750895300901B102C0A10285EF750895300901B102C0C0090207350835060904090901000902082800090209280109020A280109020B09010009020C093E8009020D280009020E2800"
 +#define HID_UUID "00001124-0000-1000-8000-00805f9b34fb"
 +
-+static struct btd_device *create_cable_association(DBusConnection *conn,
-+						    struct btd_adapter *adapter,
++static struct btd_device *create_cable_association(struct btd_adapter *adapter,
 +						    const char *name,
 +						    const char *address,
 +						    guint32 vendor_id,
@@ -189,9 +146,9 @@ index 0000000..fe758db
 +
 +	device = adapter_find_device(adapter, address);
 +	if (device == NULL) {
-+		device = device_create(conn, adapter, address, BDADDR_BREDR);
++		device = device_create(adapter, address, BDADDR_BREDR);
 +		if (device != NULL)
-+			adapter_create_device_for_device(conn, adapter, device);
++			adapter_create_device_for_device(adapter, device);
 +	}
 +	if (device != NULL) {
 +		device_set_temporary(device, FALSE);
@@ -281,7 +238,6 @@ index 0000000..fe758db
 +			      int itfnum,
 +			      const struct libusb_interface_descriptor *alt)
 +{
-+	DBusConnection *conn;
 +	libusb_device_handle *devh;
 +	char *device_bdaddr;
 +	char adapter_bdaddr[18];
@@ -289,11 +245,6 @@ index 0000000..fe758db
 +	bdaddr_t dst;
 +
 +	device_bdaddr = NULL;
-+	conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
-+	if (conn == NULL) {
-+		DBG("Failed to get on the bus");
-+		return;
-+	}
 +
 +	if (libusb_open(dev, &devh) < 0) {
 +		DBG("Can't open device");
@@ -312,8 +263,7 @@ index 0000000..fe758db
 +		goto bail;
 +	}
 +
-+	device = create_cable_association(conn,
-+					  adapter,
++	device = create_cable_association(adapter,
 +					  "PLAYSTATION(R)3 Controller",
 +					  device_bdaddr,
 +					  VENDOR, PRODUCT, SIXAXIS_PNP_RECORD);
@@ -329,7 +279,6 @@ index 0000000..fe758db
 +	}
 +
 +bail:
-+	dbus_connection_unref(conn);
 +	g_free(device_bdaddr);
 +	libusb_release_interface(devh, itfnum);
 +	/* We ignore errors from the reattach, as there's nothing we
@@ -506,49 +455,37 @@ index 0000000..fe758db
 +BLUETOOTH_PLUGIN_DEFINE(cable, VERSION,
 +			BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, cable_init, cable_exit)
 diff --git a/src/adapter.c b/src/adapter.c
-index 6e04faf..0488891 100644
+index e71cea8..cfcf2bb 100644
 --- a/src/adapter.c
 +++ b/src/adapter.c
-@@ -952,6 +952,25 @@ static struct btd_device *adapter_create_device(DBusConnection *conn,
- 	return device;
+@@ -763,6 +763,13 @@ static void service_auth_cancel(struct service_auth *auth)
+ 	g_free(auth);
  }
  
-+void adapter_create_device_for_device(DBusConnection *conn,
-+				      struct btd_adapter *adapter,
++void adapter_create_device_for_device(struct btd_adapter *adapter,
 +				      struct btd_device *device)
 +{
-+	const char *path;
-+
 +	device_set_temporary(device, TRUE);
-+
 +	adapter->devices = g_slist_append(adapter->devices, device);
-+
-+	path = device_get_path(device);
-+	g_dbus_emit_signal(conn, adapter->path,
-+			ADAPTER_INTERFACE, "DeviceCreated",
-+			DBUS_TYPE_OBJECT_PATH, &path,
-+			DBUS_TYPE_INVALID);
-+
-+	adapter_update_devices(adapter);
 +}
 +
- void adapter_remove_device(DBusConnection *conn, struct btd_adapter *adapter,
- 						struct btd_device *device,
+ void adapter_remove_device(struct btd_adapter *adapter,
+ 						struct btd_device *dev,
  						gboolean remove_storage)
 diff --git a/src/adapter.h b/src/adapter.h
-index b7ea62b..ac0aa2e 100644
+index d35b8db..d0f7d37 100644
 --- a/src/adapter.h
 +++ b/src/adapter.h
-@@ -114,6 +114,9 @@ void adapter_update_found_devices(struct btd_adapter *adapter,
- 					uint8_t *data, uint8_t data_len);
- void adapter_emit_device_found(struct btd_adapter *adapter,
- 						struct remote_dev_info *dev);
-+void adapter_create_device_for_device(DBusConnection *conn,
-+				      struct btd_adapter *adapter,
-+				      struct btd_device *device);
- void adapter_mode_changed(struct btd_adapter *adapter, uint8_t scan_mode);
- int adapter_set_name(struct btd_adapter *adapter, const char *name);
- void adapter_name_changed(struct btd_adapter *adapter, const char *name);
+@@ -88,6 +88,9 @@ sdp_list_t *btd_adapter_get_services(struct btd_adapter *adapter);
+ 
+ struct btd_device *adapter_find_device(struct btd_adapter *adapter, const char *dest);
+ 
++void adapter_create_device_for_device(struct btd_adapter *adapter,
++						struct btd_device *device);
++
+ void adapter_remove_device(struct btd_adapter *adapter,
+ 						struct btd_device *device,
+ 						gboolean remove_storage);
 -- 
-1.7.10.2
+1.7.1
 
diff --git a/0001-Allow-PulseAudio-to-connect-by-default.patch b/0001-Allow-PulseAudio-to-connect-by-default.patch
index e957ae1..1298545 100644
--- a/0001-Allow-PulseAudio-to-connect-by-default.patch
+++ b/0001-Allow-PulseAudio-to-connect-by-default.patch
@@ -1,17 +1,17 @@
-From dcbeaaa74020031741ad3727e651cdd2d00c773f Mon Sep 17 00:00:00 2001
+From b4d4723f3b68a9bb9f5db8fa07ad5f471c3ca35f Mon Sep 17 00:00:00 2001
 From: Luke Hutchison <luke.hutch at gmail.com>
 Date: Thu, 10 Jan 2013 09:13:19 +0100
 Subject: [PATCH] Allow PulseAudio to connect by default
 
 https://bugzilla.redhat.com/show_bug.cgi?id=874015#c0
 ---
- audio/audio.conf | 4 ++++
- 1 file changed, 4 insertions(+)
+ profiles/audio/audio.conf |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
 
-diff --git a/audio/audio.conf b/audio/audio.conf
-index fd6092a..9a80e63 100644
---- a/audio/audio.conf
-+++ b/audio/audio.conf
+diff --git a/profiles/audio/audio.conf b/profiles/audio/audio.conf
+index f556610..d5222a0 100644
+--- a/profiles/audio/audio.conf
++++ b/profiles/audio/audio.conf
 @@ -4,6 +4,10 @@
  # particular interface
  [General]
@@ -24,5 +24,5 @@ index fd6092a..9a80e63 100644
  #Master=true
  
 -- 
-1.8.0.1
+1.7.1
 
diff --git a/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch b/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
index 447e951..5ddf885 100644
--- a/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
+++ b/0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
@@ -1,17 +1,17 @@
-From 3aca31788655582f3029b3c88ad6f468c4de07a2 Mon Sep 17 00:00:00 2001
+From aa73bf5039dfd2cf0a52dd6fd22501d955cc1a00 Mon Sep 17 00:00:00 2001
 From: Tommy <mesilliac at gmail.com>
 Date: Thu, 10 Jan 2013 09:18:43 +0100
 Subject: [PATCH] work around Logitech diNovo Edge keyboard firmware issue
 
 https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/269851
 ---
- scripts/bluetooth-hid2hci.rules | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ tools/hid2hci.rules |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
 
-diff --git a/scripts/bluetooth-hid2hci.rules b/scripts/bluetooth-hid2hci.rules
-index 0687c8a..2a571e5 100644
---- a/scripts/bluetooth-hid2hci.rules
-+++ b/scripts/bluetooth-hid2hci.rules
+diff --git a/tools/hid2hci.rules b/tools/hid2hci.rules
+index db6bb03..7db4572 100644
+--- a/tools/hid2hci.rules
++++ b/tools/hid2hci.rules
 @@ -11,7 +11,10 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt
    RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1"
  
@@ -25,5 +25,5 @@ index 0687c8a..2a571e5 100644
  
  ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end"
 -- 
-1.8.0.1
+1.7.1
 
diff --git a/bluez.spec b/bluez.spec
index 2f12b7c..410f979 100644
--- a/bluez.spec
+++ b/bluez.spec
@@ -1,50 +1,31 @@
 Summary: Bluetooth utilities
 Name: bluez
-Version: 4.101
-Release: 5%{?dist}
+Version: 5.0
+Release: 1%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: http://www.bluez.org/
 
-Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
+Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
 Source1: bluez.gitignore
-Source3: dund.init
-Source4: dund.conf
-Source5: pand.init
-Source6: pand.conf
-Source7: rfcomm.init
 Source8: bluez-uinput.modules
 
-# https://bugzilla.redhat.com/show_bug.cgi?id=874015#c0
+## https://bugzilla.redhat.com/show_bug.cgi?id=874015#c0
 Patch0: 0001-Allow-PulseAudio-to-connect-by-default.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=877998
-Patch1: 0001-hid2hci-change-subsystem-in-udev-rule-from-usb-to-us.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=498756
-Patch4: 0001-Activate-the-Socket-Mobile-CF-kit.patch
-# http://thread.gmane.org/gmane.linux.bluez.kernel/2396
-Patch5: 0001-Add-sixaxis-cable-pairing-plugin.patch
-# PS3 BD Remote patches
-Patch6: 0001-input-Add-helper-function-to-request-disconnect.patch
-Patch7: 0002-fakehid-Disconnect-from-PS3-remote-after-10-mins.patch
-Patch8: 0003-fakehid-Use-the-same-constant-as-declared.patch
-# Upstream patches
-Patch9: 0001-audio-Permit-concurrent-use-of-AG-and-HF-roles.patch
-Patch10: 0001-Fix-GDBus-flags-after-conversion-to-macros.patch
-Patch11: 0001-input-Fix-not-adding-watches-when-io-channel-is-conn.patch
-Patch12: 0001-network-fix-network-Connect-method-parameters.patch
-Patch13: 0001-network-NULL-dereference-fix.patch
-# Ubuntu patches
-Patch14: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
-Patch15: 0001-Enable-the-Gateway-and-Source-audio-profiles-by-defa.patch
+Patch1: 0001-Add-sixaxis-cable-pairing-plugin.patch
+Patch2: 0001-Substitute-systemd-unit-directories-if-overriden-too.patch
+
+## Ubuntu patches
+Patch3: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
 
 BuildRequires: git
 BuildRequires: flex
 BuildRequires: dbus-devel >= 0.90
-BuildRequires: libusb-devel, glib2-devel, alsa-lib-devel
-BuildRequires: gstreamer-plugins-base-devel, gstreamer-devel
-BuildRequires: libsndfile-devel
+BuildRequires: libusb-devel, glib2-devel
+#BuildRequires: libsndfile-devel
 BuildRequires: libcap-ng-devel
 BuildRequires: readline-devel
+BuildRequires: libical-devel
 # For cable pairing
 BuildRequires: systemd-devel
 # For cups
@@ -60,12 +41,13 @@ Requires: bluez-libs = %{version}-%{release}
 Requires: systemd
 Requires: dbus >= 0.60
 Requires: hwdata >= 0.215
-%ifnarch s390 s390x
-Requires: dbus-bluez-pin-helper
-%endif
 Requires(preun): /bin/systemctl
 Requires(post): /bin/systemctl
 
+Obsoletes: bluez-gstreamer < %{version}
+Obsoletes: bluez-alsa < %{version}
+Obsoletes: bluez-compat < %{version}
+
 %description
 Utilities for use in Bluetooth applications:
 	- hcitool
@@ -73,6 +55,14 @@ Utilities for use in Bluetooth applications:
 	- hciconfig
 	- bluetoothd
 	- l2ping
+	- rfcomm
+	- sdptool
+	- bccmd
+	- bluetoothctl
+	- btmon
+	- hcidump
+	- l2test
+	- rctest
 	- start scripts (Red Hat)
 	- pcmcia configuration files
 
@@ -94,24 +84,6 @@ Group: System Environment/Daemons
 Requires: bluez-libs = %{version}-%{release}
 Requires: cups
 
-%package gstreamer
-Summary: GStreamer support for SBC audio format
-Group: System Environment/Daemons
-Requires: bluez-libs = %{version}-%{release}
-
-%package alsa
-Summary: ALSA support for Bluetooth audio devices
-Group: System Environment/Daemons
-Requires: bluez-libs = %{version}-%{release}
-
-%package compat
-Summary: Compatibility utilities for Bluetooth devices
-Group: System Environment/Daemons
-Requires: bluez-libs = %{version}-%{release}
-Requires: bluez = %{version}-%{release}
-Requires(preun): /sbin/chkconfig, /sbin/service
-Requires(post): /sbin/chkconfig, /sbin/service
-
 %package hid2hci
 Summary: Put HID proxying bluetooth HCI's into HCI mode
 Group: System Environment/Daemons
@@ -121,12 +93,6 @@ Requires: bluez = %{version}-%{release}
 %description cups
 This package contains the CUPS backend
 
-%description gstreamer
-This package contains gstreamer plugins for the Bluetooth SBC audio format
-
-%description alsa
-This package contains ALSA support for Bluetooth audio devices
-
 %description libs
 Libraries for use in Bluetooth applications.
 
@@ -134,10 +100,6 @@ Libraries for use in Bluetooth applications.
 bluez-libs-devel contains development libraries and headers for
 use in Bluetooth applications.
 
-%description compat
-This package contains compatibility utilities for Bluetooth devices.
-This includes hidd, dund and pand.
-
 %description hid2hci
 Most allinone PC's and bluetooth keyboard / mouse sets which include a
 bluetooth dongle, ship with a so called HID proxying bluetooth HCI.
@@ -174,24 +136,16 @@ git am -p1 %{patches} < /dev/null
 %build
 libtoolize -f -c
 autoreconf
-%configure --enable-cups --enable-dfutool --enable-tools --enable-bccmd --enable-gstreamer --enable-hidd --enable-pand --enable-dund --enable-hid2hci --with-ouifile=/usr/share/hwdata/oui.txt --with-systemdsystemunitdir=/lib/systemd/system --enable-wiimote
+%configure --enable-cups --enable-tools --enable-library \
+	--with-systemdsystemunitdir=/lib/systemd/system \
+	--with-systemduserunitdir=/lib/systemd/user
 make V=1
 
 %install
 make install DESTDIR=$RPM_BUILD_ROOT
 /sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir}
 # Remove autocrap and libtool droppings
-rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la				\
-	$RPM_BUILD_ROOT/%{_libdir}/alsa-lib/*.la		\
-	$RPM_BUILD_ROOT/%{_libdir}/bluetooth/plugins/*.la	\
-	$RPM_BUILD_ROOT/%{_libdir}/gstreamer-0.10/*.la
-
-for a in dund pand rfcomm ; do
-	install -D -m0755 $RPM_SOURCE_DIR/$a.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/$a
-	if [ -e $RPM_SOURCE_DIR/$a.conf ] ; then
-		install -D -m0644 $RPM_SOURCE_DIR/$a.conf $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/$a
-	fi
-done
+rm $RPM_BUILD_ROOT/%{_libdir}/*.la
 
 # Remove the cups backend from libdir, and install it in /usr/lib whatever the install
 if test -d ${RPM_BUILD_ROOT}/usr/lib64/cups ; then
@@ -199,10 +153,8 @@ if test -d ${RPM_BUILD_ROOT}/usr/lib64/cups ; then
 	rm -rf ${RPM_BUILD_ROOT}%{_libdir}/cups
 fi
 
-rm -f ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/*.rules ${RPM_BUILD_ROOT}/lib/udev/rules.d/*.rules
-install -D -p -m0644 scripts/bluetooth-serial.rules ${RPM_BUILD_ROOT}/lib/udev/rules.d/97-bluetooth-serial.rules
-install -D -p -m0644 scripts/bluetooth-hid2hci.rules ${RPM_BUILD_ROOT}/lib/udev/rules.d/97-bluetooth-hid2hci.rules
-install -D -m0755 scripts/bluetooth_serial ${RPM_BUILD_ROOT}/lib/udev/bluetooth_serial
+rm -f ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/*.rules ${RPM_BUILD_ROOT}/usr/lib/udev/rules.d/*.rules
+install -D -p -m0644 tools/hid2hci.rules ${RPM_BUILD_ROOT}/lib/udev/rules.d/97-hid2hci.rules
 
 install -D -m0755 %{SOURCE8} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/modules/bluez-uinput.modules
 
@@ -210,7 +162,8 @@ install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth
 
 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/
 
-install -D -p -m0644 audio/audio.conf ${RPM_BUILD_ROOT}/etc/bluetooth/
+install -d -m0755 ${RPM_BUILD_ROOT}/etc/bluetooth/
+install -D -p -m0644 profiles/audio/audio.conf ${RPM_BUILD_ROOT}/etc/bluetooth/
 
 %post libs -p /sbin/ldconfig
 
@@ -236,58 +189,48 @@ fi
 %triggerun -- bluez < 4.94-4
 /bin/systemctl --no-reload enable bluetooth.service >/dev/null 2>&1 || :
 
-%post compat
-/sbin/chkconfig --add dund
-/sbin/chkconfig --add pand
-/sbin/chkconfig --add rfcomm
-if [ "$1" -ge "1" ]; then
-	/sbin/service dund condrestart >/dev/null 2>&1 || :
-	/sbin/service pand condrestart >/dev/null 2>&1 || :
-	/sbin/service rfcomm condrestart >/dev/null 2>&1 || :
-fi
-exit 0
-
-%preun compat
-if [ "$1" = "0" ]; then
-	/sbin/service dund stop >/dev/null 2>&1 || :
-	/sbin/service pand stop >/dev/null 2>&1 || :
-	/sbin/service rfcomm stop >/dev/null 2>&1 || :
-	/sbin/chkconfig --del dund
-	/sbin/chkconfig --del pand
-	/sbin/chkconfig --del rfcomm
-fi
-
 %post hid2hci
 /sbin/udevadm trigger --subsystem-match=usb
 
 %files
 %defattr(-,root,root,-)
 %{_bindir}/ciptool
-%{_bindir}/dfutool
 %{_bindir}/hcitool
 %{_bindir}/l2ping
 %{_bindir}/rfcomm
 %{_bindir}/sdptool
-%{_bindir}/gatttool
-%{_sbindir}/*
+%{_bindir}/bccmd
+%{_bindir}/bluetoothctl
+%{_bindir}/btmon
+%{_bindir}/hciattach
+%{_bindir}/hciconfig
+%{_bindir}/hcidump
+%{_bindir}/l2test
+%{_bindir}/rctest
 %{_mandir}/man1/ciptool.1.gz
-%{_mandir}/man1/dfutool.1.gz
 %{_mandir}/man1/hcitool.1.gz
 %{_mandir}/man1/rfcomm.1.gz
 %{_mandir}/man1/sdptool.1.gz
+%{_mandir}/man1/bccmd.1.*
+%{_mandir}/man1/hciattach.1.*
+%{_mandir}/man1/hciconfig.1.*
+%{_mandir}/man1/hcidump.1.*
+%{_mandir}/man1/l2ping.1.*
+%{_mandir}/man1/rctest.1.*
 %{_mandir}/man8/*
-%exclude %{_mandir}/man8/hid2hci.8*
 %dir %{_sysconfdir}/bluetooth/
-%config(noreplace) %{_sysconfdir}/bluetooth/main.conf
 %config(noreplace) %{_sysconfdir}/bluetooth/audio.conf
+%{_libexecdir}/bluetooth/bluetoothd
+%{_libexecdir}/bluetooth/obexd
+%exclude %{_mandir}/man1/hid2hci.1*
 %config(noreplace) %{_sysconfdir}/sysconfig/modules/bluez-uinput.modules
 %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
 %{_libdir}/bluetooth/
-/lib/udev/bluetooth_serial
-/lib/udev/rules.d/97-bluetooth-serial.rules
 %{_localstatedir}/lib/bluetooth
 %{_datadir}/dbus-1/system-services/org.bluez.service
-/usr/lib/systemd/system/bluetooth.service
+%{_datadir}/dbus-1/services/org.bluez.obex.service
+/lib/systemd/system/bluetooth.service
+/lib/systemd/user/obex.service
 
 %files libs
 %defattr(-,root,root,-)
@@ -305,36 +248,11 @@ fi
 %defattr(-,root,root,-)
 %_cups_serverbin/backend/bluetooth
 
-%files gstreamer
-%defattr(-,root,root,-)
-%{_libdir}/gstreamer-*/*.so
-
-%files alsa
-%defattr(-,root,root,-)
-%{_libdir}/alsa-lib/*.so
-%{_datadir}/alsa/bluetooth.conf
-
-%files compat
-%defattr(-,root,root,-)
-%{_bindir}/dund
-%{_bindir}/pand
-%{_bindir}/hidd
-%config(noreplace) %{_sysconfdir}/bluetooth/rfcomm.conf
-%{_sysconfdir}/rc.d/init.d/dund
-%{_sysconfdir}/rc.d/init.d/rfcomm
-%{_sysconfdir}/rc.d/init.d/pand
-%config(noreplace) %{_sysconfdir}/sysconfig/dund
-%config(noreplace) %{_sysconfdir}/sysconfig/pand
-%{_mandir}/man1/dund.1.gz
-%{_mandir}/man1/hidd.1.gz
-%{_mandir}/man1/pand.1.gz
-
 %files hid2hci
 %defattr(-,root,root,-)
 /usr/lib/udev/hid2hci
-%{_mandir}/man8/hid2hci.8*
-/lib/udev/rules.d/97-bluetooth-hid2hci.rules
-%exclude /usr/lib/udev/rules.d/97-bluetooth-hid2hci.rules
+%{_mandir}/man1/hid2hci.1*
+/lib/udev/rules.d/97-hid2hci.rules
 
 %changelog
 * Thu Jan 10 2013 Bastien Nocera <bnocera at redhat.com> 4.101-5


More information about the scm-commits mailing list