From 7852cb2a8e2713e5f42f082a9fbf4a08b145e6006e6ed5517590b63509354946 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 2 Feb 2019 09:10:23 +0000 Subject: [PATCH] Accepting request 666265 from home:seife:testing add btgatt-client to bluez-test, remove bluez-5.50-gcc9.patch again OBS-URL: https://build.opensuse.org/request/show/666265 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=256 --- bluez-5.50-gcc9.patch | 49 ------------------------------------------- bluez.changes | 4 ++-- bluez.spec | 9 +++++--- 3 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 bluez-5.50-gcc9.patch diff --git a/bluez-5.50-gcc9.patch b/bluez-5.50-gcc9.patch deleted file mode 100644 index 4a748fc..0000000 --- a/bluez-5.50-gcc9.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: b/unit/test-sdp.c -=================================================================== ---- a/unit/test-sdp.c -+++ b/unit/test-sdp.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include - -@@ -197,27 +198,23 @@ static gboolean send_pdu(gpointer user_d - { - struct context *context = user_data; - const struct sdp_pdu *req_pdu; -- uint16_t pdu_len; -- unsigned char *buf; -+ struct iovec iov[2]; - ssize_t len; - - req_pdu = &context->data->pdu_list[context->pdu_offset]; - -- pdu_len = req_pdu->raw_size + context->cont_size; -+ iov[0].iov_base = (void *) req_pdu->raw_data; -+ iov[0].iov_len = req_pdu->raw_size; - -- buf = g_malloc0(pdu_len); -+ iov[1].iov_base = context->cont_data; -+ iov[1].iov_len = context->cont_size; - -- memcpy(buf, req_pdu->raw_data, req_pdu->raw_size); -+ if (context->cont_size && context->cont_size != req_pdu->cont_len) -+ put_be16(req_pdu->cont_len, iov[1].iov_base + 4); - -- if (context->cont_size > 0) -- memcpy(buf + req_pdu->raw_size, context->cont_data, -- context->cont_size); -+ len = writev(context->fd, iov, 2); - -- len = write(context->fd, buf, pdu_len); -- -- g_free(buf); -- -- g_assert(len == pdu_len); -+ g_assert(len == (ssize_t) (iov[0].iov_len + iov[1].iov_len)); - - return FALSE; - } diff --git a/bluez.changes b/bluez.changes index 3dca228..54768da 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- -Thu Jan 10 18:55:13 UTC 2019 - Stefan Seyfried +Tue Jan 15 09:05:19 UTC 2019 - seife+obs@b1-systems.com -- add bluez-5.50-gcc9.patch (boo#1121404, bko#202213) +- add btgatt-client to bluez-test ------------------------------------------------------------------- Mon Jun 4 19:15:59 UTC 2018 - seife+obs@b1-systems.com diff --git a/bluez.spec b/bluez.spec index 52c6028..c373b90 100644 --- a/bluez.spec +++ b/bluez.spec @@ -38,8 +38,6 @@ Patch4: bluez-5.45-disable-broken-tests.diff Patch5: 0001-obexd-use-AM_LDFLAGS-for-linking.patch # disable tests for bypass boo#1078285 Patch6: disable_some_obex_tests.patch -# gcc9 -Patch7: bluez-5.50-gcc9.patch # Upstream suggests to use btmon instead of hcidump and does not want those patches # => PATCH-FIX-OPENSUSE for those two :-) # fix some memory leak with malformed packet (reported upstream but not yet fixed) @@ -153,7 +151,6 @@ desktop specific applets like blueman or GNOME or KDE applets). %ifarch ppc ppc64 ppc64le %patch6 -p1 %endif -%patch7 -p1 %patch101 -p1 %patch102 -p1 mkdir dbus-apis @@ -201,8 +198,13 @@ rm %{buildroot}%{_userunitdir}/obex.service ## same as in fedora... # "make install" fails to install gatttool, used with Bluetooth Low Energy +# boo#970628 install -m0755 attrib/gatttool %{buildroot}%{_bindir} +## install btgatt-client for -test package, see +## https://www.spinics.net/lists/linux-bluetooth/msg63258.html +install -m0755 tools/btgatt-client %{buildroot}%{_bindir} + # for auto-enable subpackage find . -name main.conf install --mode 0644 -D src/main.conf %{buildroot}/%{_sysconfdir}/bluetooth/main.conf @@ -314,6 +316,7 @@ make check V=0 #{_bindir}/hciemu %{_bindir}/l2test %{_bindir}/rctest +%{_bindir}/btgatt-client %dir %{_libdir}/bluez %{_libdir}/bluez/test