Automatic import for version 4.98

This commit is contained in:
Rosa 2012-02-26 04:53:44 +04:00
parent b1f6e4e40c
commit e47093bc90
3 changed files with 85 additions and 107 deletions

View file

@ -1,2 +1,2 @@
sources:
"bluez-4.96.tar.gz": c9327784cbcf1efc03cc547ceb18de90c8fb4c7c
"bluez-4.98.tar.xz": 4fe7cbee9db8bd82c30046d4ccca132702b511ad

View file

@ -1,62 +1,6 @@
From 3c2e6dab927acfa3dfbeb7b9bc910d6a9780b095 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 1 Sep 2009 17:32:48 +0100
Subject: [PATCH 1/2] Add sixaxis cable-pairing plugin
Implement the old "sixpair" using libudev and libusb-1.0.
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(-)
create mode 100644 plugins/cable.c
diff --git a/Makefile.am b/Makefile.am
index 7eadf82..aecc8f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -223,6 +223,11 @@ builtin_sources += thermometer/main.c \
thermometer/thermometer.h thermometer/thermometer.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
@@ -282,7 +287,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
src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ \
- @CAPNG_LIBS@ -ldl -lrt
+ @CAPNG_LIBS@ @CABLE_LIBS@ -ldl -lrt
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/bluetooth.ver
@@ -397,7 +402,7 @@ EXTRA_DIST += doc/manager-api.txt \
AM_YFLAGS = -d
-AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ \
+AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @CABLE_CFLAGS@ \
-DBLUETOOTH_PLUGIN_BUILTIN -DPLUGINDIR=\""$(plugindir)"\"
INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
diff --git a/acinclude.m4 b/acinclude.m4
index 3cb9459..c23368b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -155,6 +155,12 @@ AC_DEFUN([AC_PATH_UDEV], [
--- bluez-4.98/acinclude.m4.cable-pairing 2012-01-11 23:44:59.000000000 +0100
+++ bluez-4.98/acinclude.m4 2012-02-24 17:17:56.092866689 +0100
@@ -149,6 +149,12 @@ AC_DEFUN([AC_PATH_UDEV], [
AC_SUBST(UDEV_LIBS)
])
@ -77,7 +21,7 @@ index 3cb9459..c23368b 100644
alsa_enable=${alsa_found}
gstreamer_enable=${gstreamer_found}
audio_enable=yes
@@ -286,6 +293,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
@@ -296,6 +303,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
usb_enable=${enableval}
])
@ -88,7 +32,7 @@ index 3cb9459..c23368b 100644
AC_ARG_ENABLE(tracer, AC_HELP_STRING([--enable-tracer], [install Tracing daemon]), [
tracer_enable=${enableval}
])
@@ -385,6 +396,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
@@ -395,6 +406,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
fi
@ -99,16 +43,14 @@ index 3cb9459..c23368b 100644
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" ||
@@ -421,4 +436,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
@@ -432,4 +447,5 @@ AC_DEFUN([AC_ARG_BLUEZ], [
AM_CONDITIONAL(DBUSOOBPLUGIN, test "${dbusoob_enable}" = "yes")
AM_CONDITIONAL(WIIMOTEPLUGIN, test "${wiimote_enable}" = "yes")
AM_CONDITIONAL(THERMOMETERPLUGIN, test "${thermometer_enable}" = "yes")
+ AM_CONDITIONAL(CABLE, test "${cable_enable}" = "yes" && test "${cable_found}" = "yes")
])
diff --git a/configure.ac b/configure.ac
index 908ad55..bc2658c 100644
--- a/configure.ac
+++ b/configure.ac
--- bluez-4.98/configure.ac.cable-pairing 2012-01-11 23:44:59.000000000 +0100
+++ bluez-4.98/configure.ac 2012-02-24 17:17:56.092866689 +0100
@@ -46,6 +46,7 @@ AC_PATH_GSTREAMER
AC_PATH_USB
AC_PATH_UDEV
@ -116,13 +58,42 @@ index 908ad55..bc2658c 100644
+AC_PATH_CABLE
AC_PATH_OUI
AC_PATH_READLINE
AC_PATH_CHECK
--- bluez-4.98/Makefile.am.cable-pairing 2012-01-11 23:44:59.000000000 +0100
+++ bluez-4.98/Makefile.am 2012-02-24 17:17:56.092866689 +0100
@@ -244,6 +244,11 @@ builtin_sources += thermometer/main.c \
thermometer/thermometer.h thermometer/thermometer.c
endif
diff --git a/plugins/cable.c b/plugins/cable.c
new file mode 100644
index 0000000..e8cff76
--- /dev/null
+++ b/plugins/cable.c
@@ -0,0 +1,382 @@
+if CABLE
+builtin_modules += cable
+builtin_sources += plugins/cable.c
+endif
+
builtin_modules += hciops mgmtops
builtin_sources += plugins/hciops.c plugins/mgmtops.c
@@ -311,7 +316,7 @@ src_bluetoothd_SOURCES = $(gdbus_sources
src/event.h src/event.c \
src/oob.h src/oob.c src/eir.h src/eir.c
src_bluetoothd_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@ @DBUS_LIBS@ \
- @CAPNG_LIBS@ -ldl -lrt
+ @CAPNG_LIBS@ @CABLE_LIBS@ -ldl -lrt
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/bluetooth.ver
@@ -432,7 +437,7 @@ EXTRA_DIST += doc/manager-api.txt \
AM_YFLAGS = -d
-AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@
+AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @CABLE_CFLAGS@
INCLUDES = -I$(builddir)/lib -I$(builddir)/src -I$(srcdir)/src \
-I$(srcdir)/audio -I$(srcdir)/sbc -I$(srcdir)/gdbus \
--- bluez-4.98/plugins/cable.c.cable-pairing 2012-02-24 17:17:56.092866689 +0100
+++ bluez-4.98/plugins/cable.c 2012-02-24 17:17:56.092866689 +0100
@@ -0,0 +1,379 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
@ -188,11 +159,8 @@ index 0000000..e8cff76
+ char srcaddr[18];
+
+ device = adapter_find_device(adapter, address);
+ if (device == NULL) {
+ device = device_create(conn, adapter, address, DEVICE_TYPE_UNKNOWN);
+ if (device != NULL)
+ adapter_create_device_for_device(conn, adapter, device);
+ }
+ if (device == NULL)
+ device = adapter_create_device(conn, adapter, address);
+ if (device != NULL) {
+ device_set_temporary(device, FALSE);
+ device_set_name(device, name);
@ -505,11 +473,18 @@ index 0000000..e8cff76
+
+BLUETOOTH_PLUGIN_DEFINE(cable, VERSION,
+ BLUETOOTH_PLUGIN_PRIORITY_DEFAULT, cable_init, cable_exit)
diff --git a/src/adapter.c b/src/adapter.c
index 4c88a0e..09d8392 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1092,6 +1092,25 @@ static struct btd_device *adapter_create_device(DBusConnection *conn,
--- bluez-4.98/src/adapter.c.cable-pairing 2012-01-11 23:44:59.000000000 +0100
+++ bluez-4.98/src/adapter.c 2012-02-24 17:18:12.820867665 +0100
@@ -985,7 +985,7 @@ void adapter_service_remove(struct btd_a
adapter_emit_uuids_updated(adapter);
}
-static struct btd_device *adapter_create_device(DBusConnection *conn,
+struct btd_device *adapter_create_device(DBusConnection *conn,
struct btd_adapter *adapter,
const char *address,
addr_type_t type)
@@ -1014,6 +1014,25 @@ static struct btd_device *adapter_create
return device;
}
@ -535,20 +510,15 @@ index 4c88a0e..09d8392 100644
void adapter_remove_device(DBusConnection *conn, struct btd_adapter *adapter,
struct btd_device *device,
gboolean remove_storage)
diff --git a/src/adapter.h b/src/adapter.h
index 687275a..7f7cb55 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -116,6 +116,9 @@ void adapter_update_found_devices(struct btd_adapter *adapter, bdaddr_t *bdaddr,
int adapter_remove_found_device(struct btd_adapter *adapter, bdaddr_t *bdaddr);
--- bluez-4.98/src/adapter.h.cable-pairing 2012-01-11 23:44:59.000000000 +0100
+++ bluez-4.98/src/adapter.h 2012-02-24 17:17:56.093866689 +0100
@@ -108,6 +108,9 @@ void adapter_update_found_devices(struct
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);
+ struct btd_adapter *adapter,
+ struct btd_device *device);
void adapter_mode_changed(struct btd_adapter *adapter, uint8_t scan_mode);
int adapter_update_local_name(struct btd_adapter *adapter, const char *name);
void adapter_service_insert(struct btd_adapter *adapter, void *rec);
--
1.7.6
int adapter_set_name(struct btd_adapter *adapter, const char *name);
void adapter_name_changed(struct btd_adapter *adapter, const char *name);

View file

@ -6,12 +6,11 @@
Name: bluez
Summary: Official Linux Bluetooth protocol stack
Version: 4.96
Release: %mkrel 1
Version: 4.98
Release: 1
License: GPLv2+
Group: Communications
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
Source6: pand.conf
Source7: dund.conf
Source8: hidd.conf
@ -32,7 +31,7 @@ BuildRequires: flex
BuildRequires: bison
BuildRequires: libusb-devel
BuildRequires: libalsa-devel
BuildRequires: udev-tools
BuildRequires: udev
BuildRequires: libgstreamer0.10-plugins-base-devel
BuildRequires: gstreamer0.10-devel
BuildRequires: expat-devel
@ -90,7 +89,7 @@ fi
/sbin/hidd
/sbin/bluetoothd
%if %{_with_systemd}
/lib/systemd/system/bluetooth.service
/lib/systemd/system/*.service
#/lib/systemd/system/bluetooth.target.wants/bluetooth.service
%endif
#/sbin/udev_bluetooth_helper
@ -189,7 +188,6 @@ applications which will use libraries from %{name}.
%dir %{_includedir}/bluetooth
%{_includedir}/bluetooth/*.h
/%{_lib}/*.so
/%{_lib}/*.la
%{_libdir}/pkgconfig/bluez.pc
#--------------------------------------------------------------------
@ -242,9 +240,10 @@ EOF
chmod 600 %{buildroot}%{_sysconfdir}/bluetooth/pin
rm -f %{buildroot}/etc/default/bluetooth %{buildroot}/etc/init.d/bluetooth
for a in dund hidd pand ; do
install -D -m0644 $RPM_SOURCE_DIR/$a.conf %{buildroot}%{_sysconfdir}/sysconfig/$a
done
install -D -c -m 0644 %SOURCE6 %buildroot%_sysconfdir/sysconfig/pand
install -D -c -m 0644 %SOURCE7 %buildroot%_sysconfdir/sysconfig/dund
install -D -c -m 0644 %SOURCE8 %buildroot%_sysconfdir/sysconfig/hidd
install -D -c -m 0644 %SOURCE9 %buildroot%_sysconfdir/sysconfig/rfcomm
rm -rf %{buildroot}/%{_lib}/pkgconfig
install -m644 bluez.pc -D %{buildroot}%{_libdir}/pkgconfig/bluez.pc
@ -279,12 +278,21 @@ rm -f %{buildroot}/%{_lib}/*/*.la
install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth
ln -s bluetooth.service %buildroot/lib/systemd/system/dbus-org.bluez.service
%clean
rm -fr %{buildroot}
%changelog
* Tue Oct 04 2011 Александр Казанцев <kazancas@mandriva.org> 4.96-1mdv2012.0
* Fri Feb 24 2012 Bernhard Rosenkraenzer <bero@bero.eu> 4.98-1
+ Revision: 780214
- 4.98
- Remove RPM_SOURCE_DIR usage
- Fix dbus systemd startup
- Adapt sixaxis patch to 4.98
* Tue Oct 04 2011 Александр Казанцев <kazancas@mandriva.org> 4.96-1
+ Revision: 702844
- new version 4.96
- enable bluetoothd by default