Rebuild with new build options

This commit is contained in:
VictorR2007 2019-01-18 16:20:13 +03:00
parent ca5878940d
commit 17a775df56
3 changed files with 30 additions and 87 deletions

View file

@ -1,25 +0,0 @@
From 67e5477687a2753d3f7b300bcfdc74464d8ad41f Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 9 Dec 2013 18:04:56 +0100
Subject: [PATCH 4/5] agent: Assert possible infinite loop
---
src/agent.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/agent.c b/src/agent.c
index bcba969..b292881 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -203,6 +203,8 @@ void agent_unref(struct agent *agent)
if (agent->ref > 0)
return;
+ g_assert (agent->ref == 0);
+
if (agent->request) {
DBusError err;
agent_pincode_cb pincode_cb;
--
1.8.4.2

View file

@ -1,38 +0,0 @@
From 488fd81a0f9cb193a733ac03fba0a80c145868c9 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 20 Oct 2015 12:24:45 +0200
Subject: systemd: Check if bluetooth is supported in the kernel
When running a kernel without bluetooth support, bluetooth.service fails to
start with
bluetoothd[1640]: Failed to access management interface
bluetoothd[1640]: Adapter handling initialization failed
systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Bluetooth service.
This causes an unnecessary "degraded" state and more importantly breaks package
installation when the bluez package auto-starts the daemon.
Add a condition to only start the service if /sys/class/bluetooth exists.
https://launchpad.net/bugs/1506774
---
src/bluetooth.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
index 35e9457..83e4732 100644
--- a/src/bluetooth.service.in
+++ b/src/bluetooth.service.in
@@ -1,6 +1,7 @@
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
+ConditionPathIsDirectory=/sys/class/bluetooth
[Service]
Type=dbus
--
cgit v0.11.2

View file

@ -5,7 +5,7 @@
Summary: Official Linux Bluetooth protocol stack
Name: bluez
Version: 5.50
Release: 4
Release: 5
License: GPLv2+
Group: Communications
Url: http://www.bluez.org/
@ -16,18 +16,19 @@ Source3: hidd.conf
Source4: rfcomm.conf
Source5: 97-bluetooth.rules
Source10: bluez-uinput.modules
# Revert this commit, it leads to huge delay on boot in Plasma 5
Patch0: bluez-5.36-systemd-conditional.patch
## Ubuntu patches
Patch1: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
Patch0: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
# Non-upstream
Patch2: bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch
Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
Patch4: 0004-agent-Assert-possible-infinite-loop.patch
Patch1: bluez-5.50-allow-using-obexd-without-systemd-in-the-user-sessio.patch
Patch2: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: cups-devel
BuildRequires: elfutils-devel
BuildRequires: readline-devel
BuildRequires: sbc-devel
BuildRequires: speexdsp-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(glib-2.0)
@ -63,6 +64,7 @@ These are the official Bluetooth communication libraries for Linux.
%{_bindir}/sdptool
%{_libexecdir}/bluetooth/bluetoothd
%{_libexecdir}/bluetooth/obexd
%{_unitdir}/bluetooth-logger.service
%{_unitdir}/bluetooth.service
%{_unitdir}/dbus-org.bluez.service
%{_userunitdir}/obex.service
@ -85,7 +87,11 @@ These are the official Bluetooth communication libraries for Linux.
%{_datadir}/dbus-1/services/org.bluez.obex.service
%{_localstatedir}/lib/bluetooth
%dir %{_libdir}/bluetooth
%{_libdir}/bluetooth/btmon-logger
%dir %{_libdir}/bluetooth/plugins
%{_libdir}/bluetooth/plugins/audio.a2dp.default.so
%{_libdir}/bluetooth/plugins/audio.sco.default.so
%{_libdir}/bluetooth/plugins/bluetooth.default.so
%{_libdir}/bluetooth/plugins/sixaxis.so
%{_udevrulesdir}/97-bluetooth.rules
@ -106,7 +112,7 @@ Requires: cups
This package contains the CUPS backend for Bluetooth printers.
%files cups
%{_prefix}/lib/cups/backend/bluetooth
%{_libdir}/cups/backend/bluetooth
#----------------------------------------------------------------------------
@ -118,7 +124,7 @@ Group: System/Libraries
These are the official Bluetooth communication libraries for Linux.
%files -n %{libname}
/%{_lib}/libbluetooth.so.%{major}*
%{_libdir}/libbluetooth.so.%{major}*
#----------------------------------------------------------------------------
@ -195,24 +201,29 @@ BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
%prep
%setup -q
%patch0 -p1 -R
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
libtoolize -f -c
autoreconf -fi
%build
%configure2_5x \
--enable-cups \
--prefix=/usr \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-sixaxis \
--enable-udev \
--enable-backtrace \
--enable-battery \
--enable-deprecated \
--enable-deviceinfo \
--enable-testing \
--enable-library \
--enable-usb \
--enable-threads \
--enable-tools \
--enable-monitor \
--enable-obex \
--enable-client \
@ -224,6 +235,11 @@ autoreconf -fi
--enable-experimental \
--enable-nfc \
--enable-sap \
--enable-android \
--enable-midi \
--enable-logger \
--enable-network \
--enable-input \
--enable-health
%make
@ -241,16 +257,6 @@ install -m644 %{SOURCE2} -D %{buildroot}%{_sysconfdir}/sysconfig/dund
install -m644 %{SOURCE3} -D %{buildroot}%{_sysconfdir}/sysconfig/hidd
install -m644 %{SOURCE4} -D %{buildroot}%{_sysconfdir}/sysconfig/rfcomm
mkdir -p %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/libbluetooth.so.%{major}* %{buildroot}/%{_lib}
ln -srf %{buildroot}/%{_lib}/libbluetooth.so.%{major}.*.* %{buildroot}%{_libdir}/libbluetooth.so
# Remove the cups backend from libdir, and install it in /usr/lib whatever the install
%if "%{_lib}" == "lib64"
install -d %{buildroot}%{_prefix}/lib
mv %{buildroot}%{_libdir}/cups %{buildroot}%{_prefix}/lib/cups
%endif
cp test/test-* %{buildroot}%{_bindir}
cp test/simple-agent %{buildroot}%{_bindir}/simple-agent
@ -263,10 +269,10 @@ sed s,"/usr/bin/bluetoothd","%{_libexecdir}/bluetooth/bluetoothd",g -i %{buildro
install -m0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/
install -m0644 src/main.conf %{buildroot}%{_sysconfdir}/bluetooth/
install -m0644 profiles/input/input.conf %{buildroot}%{_sysconfdir}/bluetooth/
#install -m0644 profiles/proximity/proximity.conf %{buildroot}%{_sysconfdir}/bluetooth/
install -d -m0755 %{buildroot}%{_localstatedir}/lib/bluetooth
ln -s bluetooth.service %{buildroot}%{_unitdir}/dbus-org.bluez.service
sed 's|#AutoEnable=false|AutoEnable=true|' -i %{buildroot}%{_sysconfdir}/bluetooth/main.conf