mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <r.hieber@pengutronix.de>
Subject: [ptxdist] [PATCH v2 5/5] bluez: version bump 5.30 -> 5.50
Date: Mon, 12 Nov 2018 15:56:40 +0100	[thread overview]
Message-ID: <20181112145640.22901-6-r.hieber@pengutronix.de> (raw)
In-Reply-To: <20181112145640.22901-1-r.hieber@pengutronix.de>

Update the list of configure options and their dependencies. Use default
values from the configure script for the various profiles; this enabled
OBEX by default.. Pin down the
GPL/LGPL license MD5 sums, and improve help texts.

Development packages can be built unconditionally. The conditional was
added because a previous version of the package installed the test
scripts directly from $(BLUEZ_DIR) during the targetinstall stage, but
this behaviour is no longer the case since PTXdist commit 17e02198ebf607
("bluez: version bump 4.96 -> 5.30").

Some tools are now deprecated, hide them behind an extra kconfig option.
Update the list of installed tools and testscripts in the targetinstall
stage to reflect the tools and scripts installed by the respective
configure options, and order them alphabetically. gatttool is no longer
installed by upstream, remove it.

Also use install_alternative instead of install_copy for all config
files and systemd units. Prevent a file name clash with the udev package
by only installing our rules.d/97-hid2hci.rules and hid2hci (used by the
udev rules), and not the whole /usr/lib/udev/ tree.

There are no patches in PTXdist which would need porting.

Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
---
v1 -> v2:
 - improve kconfig help texts, and add note about kernel support
 - build default profiles as ./configure does (incl. obex), and remove
   broken mesh profile option
 - tools: also install btattach
 - devpkg conditional is no longer needed
 - update list of tools and testscripts, ordered alphabetically
 - solve udev file naming conflict in targetinstall stage
---
 rules/bluez.in   | 33 ++++++++++++++++------
 rules/bluez.make | 73 +++++++++++++++++++++++++++++++-----------------
 2 files changed, 71 insertions(+), 35 deletions(-)

diff --git a/rules/bluez.in b/rules/bluez.in
index 454798e53..57e0356af 100644
--- a/rules/bluez.in
+++ b/rules/bluez.in
@@ -8,12 +8,16 @@ menuconfig BLUEZ
 	select DBUS
 	select GLIB
 	select UDEV
+	select LIBICAL			# needed for --enable-obex
 	select READLINE			if BLUEZ_CLIENT
 	select PYGOBJECT		if BLUEZ_INSTALL_TESTSCRIPTS
 	select DBUS_PYTHON		if BLUEZ_INSTALL_TESTSCRIPTS
 	help
-	  Official Linux Bluetooth protocol stack
-	  For more information refer http://www.bluez.org
+	  Official Linux Bluetooth protocol stack.
+	  For more information refer to <http://www.bluez.org>.
+
+	  Note that you must also enable bluetooth and RFKILL support as well
+	  as the respective drivers in your kernel.
 
 if BLUEZ
 
@@ -24,20 +28,31 @@ config BLUEZ_SYSTEMD_UNIT
 	prompt "install systemd unit files"
 
 config BLUEZ_TOOLS
-	bool "install bluez tools"
+	bool "install tools"
+	help
+	  Install the following tools:
+	  
+	  bccmd bluemoon btmon btattach hex2hcd l2ping l2test mpris-proxy
+	  rctest l2ping rctest
+
+config BLUEZ_TOOLS_DEPRECATED
+	depends on BLUEZ_TOOLS
+	bool "install deprecated tools"
 	help
-	  install the tools "bccmd bluemoon btmon ciptool hciattach
-	  hciconfig hcidump hcitool hex2hcd l2ping l2test mpris-proxy rctest
-	  rfcomm sdptoolciptool l2ping hcitool rctest rfcomm" and "sdptool"
+	  Install the following tools, which have been deprecated by upstream:
+	  
+	  bccmd bluemoon btattach btmon hex2hcd l2ping l2test mpris-proxy
+	  rctest
 
 config BLUEZ_CLIENT
-	bool "install client tools: bluetoothctl, gatttool"
+	bool "install client tools"
 	help
-	  install the client tools bluetoothctl and gatttool
+	  Install the bluetoothctl command line tool
 
 config BLUEZ_INSTALL_TESTSCRIPTS
 	bool "install testscripts"
 	help
-	  install test scripts that allow to set up bluetooth connections
+	  Install test scripts that allow to set up bluetooth connections.
+	  These scripts are installed to /usr/lib/bluez/test/.
 
 endif
diff --git a/rules/bluez.make b/rules/bluez.make
index c3a442381..f5c1191ad 100644
--- a/rules/bluez.make
+++ b/rules/bluez.make
@@ -1,6 +1,8 @@
 # -*-makefile-*-
 #
 # Copyright (C) 2010 by Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+# Copyright (C) 2018 Pengutronix, Roland Hieber <r.hieber@pengutronix.de>
+#
 #
 # See CREDITS for details about who has contributed to this project.
 #
@@ -16,17 +18,17 @@ PACKAGES-$(PTXCONF_BLUEZ) += bluez
 #
 # Paths and names
 #
-BLUEZ_VERSION	:= 5.30
-BLUEZ_MD5	:= a7b99d40cd78c7497abdfd7f024fd07b
+BLUEZ_VERSION	:= 5.50
+BLUEZ_MD5	:= 860349d2afebf130f772c0f2943b5a27
 BLUEZ		:= bluez-$(BLUEZ_VERSION)
 BLUEZ_SUFFIX	:= tar.gz
 BLUEZ_URL	:= $(call ptx/mirror, KERNEL, bluetooth/$(BLUEZ).$(BLUEZ_SUFFIX))
 BLUEZ_SOURCE	:= $(SRCDIR)/$(BLUEZ).$(BLUEZ_SUFFIX)
 BLUEZ_DIR	:= $(BUILDDIR)/$(BLUEZ)
 BLUEZ_LICENSE	:= GPL-2.0-or-later AND LGPL-2.1-or-later
-ifdef PTXCONF_BLUEZ_INSTALL_TESTSCRIPTS
-BLUEZ_DEVPKG	:= NO
-endif
+BLUEZ_LICENSE_FILES := \
+	  file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+	  file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09
 
 # ----------------------------------------------------------------------------
 # Prepare
@@ -41,20 +43,34 @@ BLUEZ_CONF_OPT	:= $(CROSS_AUTOCONF_USR) \
 	--disable-debug \
 	--disable-pie \
 	--enable-threads \
+	--disable-backtrace \
 	--enable-library \
 	--$(call ptx/endis, PTXCONF_BLUEZ_INSTALL_TESTSCRIPTS)-test \
+	--disable-nfc \
+	--disable-sap \
+	--enable-a2dp \
+	--enable-avrcp \
+	--enable-network \
+	--enable-hid \
+	--enable-hog \
+	--disable-health \
 	--$(call ptx/endis, PTXCONF_BLUEZ_TOOLS)-tools \
 	--$(call ptx/endis, PTXCONF_BLUEZ_TOOLS)-monitor \
 	--enable-udev \
 	--disable-cups \
-	--disable-obex \
+	--disable-mesh \
+	--disable-midi \
+	--enable-obex \
+	--disable-btpclient \
 	--$(call ptx/endis, PTXCONF_BLUEZ_CLIENT)-client \
 	--enable-systemd \
 	--enable-datafiles \
 	--disable-manpages \
 	--disable-experimental \
+	--$(call ptx/endis, PTXCONF_BLUEZ_TOOLS_DEPRECATED)-deprecated \
 	--disable-sixaxis \
 	--disable-android \
+	--disable-logger \
 	--with-dbusconfdir=/usr/share \
 	--with-dbussystembusdir=/usr/share/dbus-1/system-services \
 	--with-dbussessionbusdir=/usr/share/dbus-1/services \
@@ -82,34 +98,37 @@ $(STATEDIR)/bluez.targetinstall:
 	@$(call install_lib, bluez, 0, 0, 0644, libbluetooth)
 
 ifdef PTXCONF_BLUEZ_TOOLS
-	@$(foreach binprogram, bccmd bluemoon btmon ciptool \
-			hciattach hciconfig hcidump hcitool hex2hcd l2ping \
-			l2test mpris-proxy rctest rfcomm sdptool, \
+	@$(foreach binprogram, bccmd bluemoon btattach btmon hex2hcd l2ping \
+			l2test mpris-proxy rctest, \
+		$(call install_copy, bluez, 0, 0, 0755, -, \
+			/usr/bin/$(binprogram));)
+
+ifdef PTXCONF_BLUEZ_TOOLS_DEPRECATED
+	@$(foreach binprogram, ciptool hciattach hciconfig hcidump hcitool \
+			rfcomm sdptool, \
 		$(call install_copy, bluez, 0, 0, 0755, -, \
 			/usr/bin/$(binprogram))$(ptx/nl))
 endif
+endif
 
 ifdef PTXCONF_BLUEZ_CLIENT
 	@$(call install_copy, bluez, 0, 0, 0755, -, /usr/bin/bluetoothctl)
-
-	@$(call install_copy, bluez, 0, 0, 0755, $(BLUEZ_DIR)/attrib/gatttool, \
-		/usr/bin/gatttool)
 endif
 
 ifdef PTXCONF_BLUEZ_INSTALL_TESTSCRIPTS
-	@$(foreach testdata, service-ftp.xml service-did.xml service-spp.xml \
-			service-record.dtd service-opp.xml, \
+	@$(foreach testdata, service-did.xml service-ftp.xml service-opp.xml \
+			service-record.dtd service-spp.xml, \
 		$(call install_copy, bluez, 0, 0, 0644, -, \
 			/usr/lib/bluez/test/$(testdata))$(ptx/nl))
 
-	@$(foreach testprog, list-devices opp-client \
-			simple-endpoint test-alert test-discovery \
-			test-heartrate test-nap test-proximity \
-			map-client pbap-client simple-player test-cyclingspeed \
-			test-health test-hfp test-network test-sap-server \
-			ftp-client monitor-bluetooth simple-agent \
-			test-adapter test-device test-health-sink test-manager \
-			test-profile test-thermometer, \
+	@$(foreach testprog, bluezutils.py dbusdef.py example-advertisement \
+			example-gatt-client example-gatt-server ftp-client \
+			list-devices map-client monitor-bluetooth opp-client \
+			pbap-client sap_client.py simple-agent simple-endpoint \
+			simple-player test-adapter test-device test-discovery \
+			test-gatt-profile test-health test-health-sink test-hfp \
+			test-manager test-nap test-network test-profile \
+			test-sap-server, \
 		$(call install_copy, bluez, 0, 0, 0755, -, \
 			/usr/lib/bluez/test/$(testprog))$(ptx/nl))
 	@$(foreach testprog, bluezutils.py dbusdef.py sap_client.py, \
@@ -117,16 +136,18 @@ ifdef PTXCONF_BLUEZ_INSTALL_TESTSCRIPTS
 			/usr/lib/bluez/test/$(testprog))$(ptx/nl))
 endif
 
-	@$(call install_copy, bluez, 0, 0, 0644, -, \
+	@$(call install_alternative, bluez, 0, 0, 0644, \
 		/usr/share/dbus-1/system.d/bluetooth.conf)
-	@$(call install_tree, bluez, 0, 0, -, /usr/lib/udev/rules.d/)
+	@$(call install_alternative, bluez, 0, 0, 0644, \
+		/usr/lib/udev/rules.d/97-hid2hci.rules)
+	@$(call install_copy, bluez, 0, 0, 0644, -, /usr/lib/udev/hid2hci)
 
 ifdef PTXCONF_BLUEZ_SYSTEMD_UNIT
-	@$(call install_copy, bluez, 0, 0, 0644, -, \
+	@$(call install_alternative, bluez, 0, 0, 0644, \
 		/usr/lib/systemd/system/bluetooth.service)
 	@$(call install_link, bluez, ../bluetooth.service, \
 		/usr/lib/systemd/system/multi-user.target.wants/bluetooth.service)
-	@$(call install_copy, bluez, 0, 0, 0644, -, \
+	@$(call install_alternative, bluez, 0, 0, 0644, \
 		/usr/lib/systemd/user/obex.service)
 endif
 
-- 
2.19.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      parent reply	other threads:[~2018-11-12 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 14:56 [ptxdist] [PATCH v2 0/5] bluez fixes and version bump to 5.50 Roland Hieber
2018-11-12 14:56 ` [ptxdist] [PATCH v2 1/5] bluez: fix license string Roland Hieber
2018-11-12 14:56 ` [ptxdist] [PATCH v2 2/5] bluez: consistently make use of $(ptx/nl) Roland Hieber
2018-11-12 14:56 ` [ptxdist] [PATCH v2 3/5] bluez: make it possible to disable building the tools Roland Hieber
2018-11-12 14:56 ` [ptxdist] [PATCH v2 4/5] bluez: rename PTXCONF_BLUEZ{_UTILS -> _TOOLS}* for consistency Roland Hieber
2018-11-12 14:56 ` Roland Hieber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181112145640.22901-6-r.hieber@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox