Skip to contentSkip to conversation

Add meson build system and HTML docs

PATCH Superseded Bastien Nocera 2 participants 18 messages Jan 28 – Jan 29

Subsystems (3)

v7 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v7 cover Add meson build system and HTML docs

Changes since v6:
Drop:
doc: Port sap-api.txt to RST
doc: Port health-api.txt to RST
doc: Add "C" code-block markers for coding-style doc
tools: Install btmgmt along with other tools

SAP and health profiles were removed, the C code-block marker needs a dependency check (both autotools and meson), and btmgmt was superseded by bluetoothctl's mgmt submenu.

"build: Only build gdbus library if there is a user" was fixed to also build gdbus if the daemon was built.

"github: Add docs deployment" was modified to be ready to deploy in bluez' github.

Bastien Nocera (14):
build: Add meson wrap for libell
build: Add meson build system
build: Make more use of 'feature' options
build: Separate systemd and libsystemd dependencies
tools: Install gatttool if deprecated tools are enabled
tools: Install avinfo tool by default
emulator: Install the emulator if built
build: Add option to allow disabling bluetoothd
unit: Run test-bap tests concurrently
unit: Make gobex-transfer tests run concurrently
build: Only build profiles if the daemon is built
build: Only build gdbus library if there is a user
doc: Add HTML documentation
github: Add docs deployment

Paul Otto (2):
client: Expand GATT submenu documentation
doc: Add introduction to GATT

 .github/workflows/docs.yml                    |  54 +
 attrib/meson.build                            |  17 +
 btio/meson.build                              |   1 +
 client/meson.build                            |  29 +
 completion/meson.build                        |   3 +
 doc/_static/bluez.css                         | 452 +++++++++
 doc/_static/bluez.png                         | Bin 0 -> 17550 bytes
 doc/_static/bullet.svg                        |   1 +
 doc/_static/card.png                          | Bin 0 -> 38230 bytes
 doc/_static/inter.woff2                       | Bin 0 -> 345588 bytes
 doc/_static/toc_bullet.svg                    |  39 +
 doc/bluetoothctl-cmd.rst                      |  34 +
 doc/bluetoothctl-gatt.rst                     |  79 +-
 doc/conf.py                                   |  39 +
 doc/copy-subdir.py                            |  14 +
 doc/daemons.rst                               |  12 +
 doc/dbus-gatt.rst                             |  18 +
 doc/dbus-obex.rst                             |  33 +
 doc/dbus.rst                                  |  76 ++
 doc/deprecated-tools.rst                      |  22 +
 doc/dev-maint.rst                             |  17 +
 doc/favicon.ico                               | Bin 0 -> 937 bytes
 doc/gatt-intro.rst                            | 141 +++
 doc/index.rst                                 |  47 +
 doc/meson.build                               | 290 ++++++
 doc/protocols.rst                             |  20 +
 doc/qualifications.rst                        |  76 ++
 doc/tools.rst                                 |  24 +
 emulator/meson.build                          |  36 +
 gdbus/meson.build                             |  19 +
 gobex/meson.build                             |   8 +
 lib/meson.build                               |  53 +
 mesh/meson.build                              |  60 ++
 meson.build                                   | 300 ++++++
 meson_options.txt                             |  55 ++
 monitor/meson.build                           |  37 +
 obexd/meson.build                             | 121 +++
 peripheral/meson.build                        |  13 +
 plugins/meson.build                           |  29 +
 profiles/meson.build                          | 167 ++++
 src/meson.build                               |  90 ++
 src/shared/meson.build                        |  85 ++
 subprojects/ell.wrap                          |  11 +
 .../0001-build-Add-meson-build-system.patch   | 922 ++++++++++++++++++
 test/meson.build                              |  37 +
 tools/mesh/meson.build                        |  16 +
 tools/meson.build                             | 302 ++++++
 tools/mpris-proxy.service.in                  |   2 +-
 unit/meson.build                              | 163 ++++
 unit/unittest_list.sh                         |  15 +
 50 files changed, 4055 insertions(+), 24 deletions(-)
 create mode 100644 .github/workflows/docs.yml
 create mode 100644 attrib/meson.build
 create mode 100644 btio/meson.build
 create mode 100644 client/meson.build
 create mode 100644 completion/meson.build
 create mode 100644 doc/_static/bluez.css
 create mode 100644 doc/_static/bluez.png
 create mode 100644 doc/_static/bullet.svg
 create mode 100644 doc/_static/card.png
 create mode 100644 doc/_static/inter.woff2
 create mode 100644 doc/_static/toc_bullet.svg
 create mode 100644 doc/bluetoothctl-cmd.rst
 create mode 100644 doc/conf.py
 create mode 100644 doc/copy-subdir.py
 create mode 100644 doc/daemons.rst
 create mode 100644 doc/dbus-gatt.rst
 create mode 100644 doc/dbus-obex.rst
 create mode 100644 doc/dbus.rst
 create mode 100644 doc/deprecated-tools.rst
 create mode 100644 doc/dev-maint.rst
 create mode 100644 doc/favicon.ico
 create mode 100644 doc/gatt-intro.rst
 create mode 100644 doc/index.rst
 create mode 100644 doc/meson.build
 create mode 100644 doc/protocols.rst
 create mode 100644 doc/qualifications.rst
 create mode 100644 doc/tools.rst
 create mode 100644 emulator/meson.build
 create mode 100644 gdbus/meson.build
 create mode 100644 gobex/meson.build
 create mode 100644 lib/meson.build
 create mode 100644 mesh/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 monitor/meson.build
 create mode 100644 obexd/meson.build
 create mode 100644 peripheral/meson.build
 create mode 100644 plugins/meson.build
 create mode 100644 profiles/meson.build
 create mode 100644 src/meson.build
 create mode 100644 src/shared/meson.build
 create mode 100644 subprojects/ell.wrap
 create mode 100644 subprojects/packagefiles/0001-build-Add-meson-build-system.patch
 create mode 100644 test/meson.build
 create mode 100644 tools/mesh/meson.build
 create mode 100644 tools/meson.build
 create mode 100644 unit/meson.build
 create mode 100644 unit/unittest_list.sh
Signature · 1 line
2.52.0
#1 lore raw

PATCH v7 1/16 build: Add meson wrap for libell

Rather than relying on libell being able to build with meson from upstream, apply the meson build patches on top of the latest upstream release.

The build should still fallback to the system libell if available, and will fail to build if a system libell is not available, and no network access is available, as in many build systems.

---
 subprojects/ell.wrap                          |  11 +
 .../0001-build-Add-meson-build-system.patch   | 922 ++++++++++++++++++
 2 files changed, 933 insertions(+)
 create mode 100644 subprojects/ell.wrap
 create mode 100644 subprojects/packagefiles/0001-build-Add-meson-build-system.patch
subprojects/ell.wrap new file +11 -0
new file mode 100644
index 000000000000..322edd4cdc1e
@@ -0,0 +1,11 @@
+[wrap-file]
+directory = ell-0.81
+source_url = https://www.kernel.org/pub/linux/libs/ell/ell-0.81.tar.xz
+source_filename = ell-0.81.tar.xz
+source_hash = 672ca1e44dc0ddce1665941754b4e2b3b9203481d7d7a60e0b5f39829d73fa14
+
+# Maintained in https://github.com/hadess/ell/tree/wip/hadess/add-meson
+diff_files = 0001-build-Add-meson-build-system.patch
+
+[provide]
+dependency_names = ell
subprojects/packagefiles/0001-build-Add-meson-build-system.patch new file +922 -0

922 lines not on this page · raw message

Signature · 1 line
2.52.0
#2 lore raw

PATCH v7 2/16 build: Add meson build system

In reply to Bastien Nocera

The options default were selected to try and match the existing autotools default as best as possible. Further commits will likely change those defaults, but at least it should be clear what defaults were changed from.

However, a number of options were removed:

--enable-pie is replaced by the meson base option "b_pie":
https://mesonbuild.com/Builtin-options.html#base-options

--enable-maintainer-mode is replaced by the "debug" build-types:
https://mesonbuild.com/Builtin-options.html#core-options

--enable-debug and --disable-optimization are replaced by the debug build type:
https://mesonbuild.com/Builtin-options.html#details-for-buildtype

Each of the sanitisers have their own b_sanitize option:
- asan: b_sanitize=address
- lsan: b_sanitize=leak
- ubsan: b_sanitize=address,undefined
https://mesonbuild.com/Builtin-options.html#base-options

--enable-coverage is replaced by the b_coverage option:
https://mesonbuild.com/Builtin-options.html#base-options

--enable-valgrind can be replicated by running the test suite with:
meson test --setup valgrind

---
 attrib/meson.build           |  17 ++
 btio/meson.build             |   1 +
 client/meson.build           |  29 ++++
 completion/meson.build       |   3 +
 doc/meson.build              | 169 +++++++++++++++++++
 emulator/meson.build         |  34 ++++
 gdbus/meson.build            |  19 +++
 gobex/meson.build            |   8 +
 lib/meson.build              |  53 ++++++
 mesh/meson.build             |  60 +++++++
 meson.build                  | 289 +++++++++++++++++++++++++++++++
 meson_options.txt            |  52 ++++++
 monitor/meson.build          |  37 ++++
 obexd/meson.build            | 121 +++++++++++++
 peripheral/meson.build       |  13 ++
 plugins/meson.build          |  29 ++++
 profiles/meson.build         | 167 ++++++++++++++++++
 src/meson.build              |  88 ++++++++++
 src/shared/meson.build       |  85 ++++++++++
 test/meson.build             |  37 ++++
 tools/mesh/meson.build       |  16 ++
 tools/meson.build            | 319 +++++++++++++++++++++++++++++++++++
 tools/mpris-proxy.service.in |   2 +-
 unit/meson.build             | 125 ++++++++++++++
 24 files changed, 1772 insertions(+), 1 deletion(-)
 create mode 100644 attrib/meson.build
 create mode 100644 btio/meson.build
 create mode 100644 client/meson.build
 create mode 100644 completion/meson.build
 create mode 100644 doc/meson.build
 create mode 100644 emulator/meson.build
 create mode 100644 gdbus/meson.build
 create mode 100644 gobex/meson.build
 create mode 100644 lib/meson.build
 create mode 100644 mesh/meson.build
 create mode 100644 meson.build
 create mode 100644 meson_options.txt
 create mode 100644 monitor/meson.build
 create mode 100644 obexd/meson.build
 create mode 100644 peripheral/meson.build
 create mode 100644 plugins/meson.build
 create mode 100644 profiles/meson.build
 create mode 100644 src/meson.build
 create mode 100644 src/shared/meson.build
 create mode 100644 test/meson.build
 create mode 100644 tools/mesh/meson.build
 create mode 100644 tools/meson.build
 create mode 100644 unit/meson.build
attrib/meson.build new file +17 -0
new file mode 100644
index 000000000000..0b7bc97933db
@@ -0,0 +1,17 @@
+attrib_sources = files(
+  'att.c',
+  'gatt.c',
+  'gattrib.c'
+)
+
+gatttool_sources = files(
+  'gatttool.c',
+  'att.c',
+  'gatt.c',
+  'gattrib.c',
+  'interactive.c',
+  'utils.c',
+  '../client/display.c',
+  '../btio/btio.c',
+  '../src/log.c'
+)
btio/meson.build new file +1 -0
new file mode 100644
index 000000000000..46ae5691f1d8
@@ -0,0 +1 @@
+btio_sources = files('btio.c')
client/meson.build new file +29 -0
new file mode 100644
index 000000000000..08cd23b332c5
@@ -0,0 +1,29 @@
+if get_option('client').enabled()
+  executable('bluetoothctl',
+    sources: [
+      'main.c',
+      'print.c',
+      'display.c',
+      'agent.c',
+      'advertising.c',
+      'adv_monitor.c',
+      'gatt.c',
+      'admin.c',
+      'player.c',
+      'mgmt.c',
+      'assistant.c',
+      'hci.c',
+      'telephony.c'
+      ],
+    dependencies: [
+      libbluetooth_internal_dep,
+      libgdbus_internal_dep,
+      libshared_glib_dep,
+      glib_dep,
+      udevlib_dep,
+      dbus_dep,
+      readline_dep
+      ],
+    install: true,
+  )
+endif
completion/meson.build new file +3 -0
new file mode 100644
index 000000000000..24b71518c67d
@@ -0,0 +1,3 @@
+install_data('zsh/_bluetoothctl',
+  install_dir: zshcompletiondir
+)
doc/meson.build new file +169 -0

169 lines not on this page · raw message

emulator/meson.build new file +34 -0
new file mode 100644
index 000000000000..59c72c4dbd4d
@@ -0,0 +1,34 @@
+emulator_sources = files(
+  'hciemu.c',
+  'vhci.c',
+  'btdev.c',
+  'bthost.c',
+  'smp.c',
+)
+
+if get_option('tests')
+  executable('btvirt',
+    sources: [ 'main.c',
+      'serial.c',
+      'server.c',
+      'vhci.c',
+      'btdev.c',
+      'bthost.c',
+      'smp.c',
+      'phy.c',
+      'le.c' ],
+    dependencies: [ libbluetooth_internal_dep, libshared_mainloop_dep, glib_dep ]
+  )
+
+  executable('b1ee',
+    sources: 'b1ee.c',
+    include_directories: '../lib',
+    dependencies: libshared_mainloop_dep
+  )
+
+  executable('hfp',
+    sources: 'hfp.c',
+    dependencies: libshared_mainloop_dep
+  )
+endif
+
gdbus/meson.build new file +19 -0
new file mode 100644
index 000000000000..dc7f2887a60f
@@ -0,0 +1,19 @@
+gdbus_sources = [
+  'gdbus.h',
+  'mainloop.c',
+  'watch.c',
+  'object.c',
+  'client.c',
+  'polkit.c'
+]
+
+libgdbus_internal = static_library('gdbus_internal',
+  sources: gdbus_sources,
+  dependencies: [ glib_dep, dbus_dep ],
+  install: false
+)
+
+libgdbus_internal_dep = declare_dependency(
+  dependencies: dbus_dep,
+  link_with: libgdbus_internal
+)
gobex/meson.build new file +8 -0
new file mode 100644
index 000000000000..0ff6238a7b8c
@@ -0,0 +1,8 @@
+gobex_sources = files(
+  'gobex.c',
+  'gobex-defs.c',
+  'gobex-packet.c',
+  'gobex-header.c',
+  'gobex-transfer.c',
+  'gobex-apparam.c'
+)
lib/meson.build new file +53 -0

53 lines not on this page · raw message

mesh/meson.build new file +60 -0

60 lines not on this page · raw message

meson.build new file +289 -0

289 lines not on this page · raw message

meson_options.txt new file +52 -0

52 lines not on this page · raw message

monitor/meson.build new file +37 -0
new file mode 100644
index 000000000000..44197f2d3ba2
@@ -0,0 +1,37 @@
+executable('btmon',
+  sources: [
+    'main.c',
+    'display.c',
+    'hcidump.c',
+    'ellisys.c',
+    'control.c',
+    'packet.c',
+    'vendor.c',
+    'lmp.c',
+    'crc.c',
+    'll.c',
+    'l2cap.c',
+    'sdp.c',
+    'avctp.c',
+    'avdtp.c',
+    'a2dp.c',
+    'rfcomm.c',
+    'bnep.c',
+    'hwdb.c',
+    'keys.c',
+    'analyze.c',
+    'intel.c',
+    'broadcom.c',
+    'msft.c',
+    'jlink.c',
+    'att.c',
+    '../src/log.c',
+    '../src/textfile.c',
+    '../src/settings.c'
+  ],
+  c_args: [
+    '-DSTORAGEDIR="@0"'.format(storagedir)
+  ],
+  dependencies: [ libbluetooth_internal_dep, libshared_mainloop_dep, udevlib_dep, glib_dep ],
+  install: true
+)
obexd/meson.build new file +121 -0

121 lines not on this page · raw message

peripheral/meson.build new file +13 -0
new file mode 100644
index 000000000000..21d6296829ea
@@ -0,0 +1,13 @@
+if get_option('tests')
+  executable('btsensor',
+    sources: [
+      'main.c',
+      'efivars.c',
+      'attach.c',
+      'log.c',
+      'gap.c',
+      'gatt.c',
+    ],
+    dependencies: [ libshared_mainloop_dep, libbluetooth_internal_dep ]
+  )
+endif
plugins/meson.build new file +29 -0
new file mode 100644
index 000000000000..019e7083df16
@@ -0,0 +1,29 @@
+builtin_modules = [
+  'hostname',
+  'autopair',
+  'policy',
+]
+
+builtin_sources = files(
+  'hostname.c',
+  'autopair.c',
+  'policy.c'
+)
+
+builtin_deps = []
+
+if get_option('admin')
+  builtin_modules += 'admin'
+  builtin_sources += files('admin.c')
+endif
+
+if get_option('nfc')
+  builtin_modules += 'neard'
+  builtin_sources += files('neard.c')
+endif
+
+if get_option('sixaxis')
+  builtin_modules += 'sixaxis'
+  builtin_sources += files('sixaxis.c')
+  builtin_deps += udev_dep
+endif
profiles/meson.build new file +167 -0

167 lines not on this page · raw message

src/meson.build new file +88 -0

88 lines not on this page · raw message

src/shared/meson.build new file +85 -0

85 lines not on this page · raw message

test/meson.build new file +37 -0
new file mode 100644
index 000000000000..6f93cf8a36e0
@@ -0,0 +1,37 @@
+test_scripts = [
+  'bluezutils.py',
+  'dbusdef.py',
+  'monitor-bluetooth',
+  'list-devices',
+  'test-discovery',
+  'test-manager',
+  'test-adapter',
+  'test-device',
+  'simple-agent',
+  'simple-endpoint',
+  'test-network',
+  'test-profile',
+  'service-record.dtd',
+  'service-did.xml',
+  'service-spp.xml',
+  'service-opp.xml',
+  'service-ftp.xml',
+  'simple-player',
+  'test-nap',
+  'test-hfp',
+  'opp-client',
+  'ftp-client',
+  'pbap-client',
+  'map-client',
+  'example-advertisement',
+  'example-gatt-server',
+  'example-gatt-client',
+  'test-gatt-profile',
+  'test-mesh',
+  'agent.py'
+]
+
+install_data(
+  sources: test_scripts,
+  install_dir: pkglibdir / 'tests'
+)
tools/mesh/meson.build new file +16 -0
new file mode 100644
index 000000000000..85bfb00977f3
@@ -0,0 +1,16 @@
+if get_option('tools') and readline_dep.found()
+  executable('mesh-cfgclient',
+    sources: [ '../mesh-cfgclient.c',
+      'cfgcli.c',
+      'keys.c',
+      'util.c',
+      'remote.c',
+      'agent.c',
+      'mesh-db.c',
+      '../../mesh/util.c',
+      '../../mesh/crypto.c',
+    ],
+    dependencies: [ libbluetooth_internal_dep, libshared_mainloop_dep, ell_dep, dbus_dep, jsonc_dep, readline_dep ],
+    install: true
+  )
+endif
tools/meson.build new file +319 -0

319 lines not on this page · raw message

tools/mpris-proxy.service.in +1 -1
index 6ae56c6720b9..a55f0254014a 100644
@@ -8,7 +8,7 @@ ConditionUser=!@system
 
 [Service]
 Type=simple
-ExecStart=@PKGBINDIR@/mpris-proxy
+ExecStart=@PKGLIBEXECDIR@/mpris-proxy
 
 [Install]
 WantedBy=default.target
unit/meson.build new file +125 -0

125 lines not on this page · raw message

Signature · 1 line
2.52.0
#3 lore raw

PATCH v7 3/16 build: Make more use of 'feature' options

In reply to Bastien Nocera

This allows finer control around what is built and what is not, trying to build as much as possible by default.

This also makes it easier to enable all the "auto" features which would then fail if dependencies are missing (maximalist builds, for testing), or disable everything by default, and only enable select options, which minimises side-effects for distributions.

---
 doc/meson.build        |  8 +++---
 emulator/meson.build   |  2 +-
 lib/meson.build        |  2 +-
 mesh/meson.build       |  4 +--
 meson.build            | 28 +++++++++----------
 meson_options.txt      | 62 +++++++++++++++++++++---------------------
 obexd/meson.build      |  8 +++---
 peripheral/meson.build |  2 +-
 plugins/meson.build    |  6 ++--
 profiles/meson.build   | 30 ++++++++++----------
 src/meson.build        |  4 +--
 tools/mesh/meson.build |  2 +-
 tools/meson.build      | 36 ++++++------------------
 unit/meson.build       |  4 +--
 14 files changed, 89 insertions(+), 109 deletions(-)
doc/meson.build +4 -4
index b62918db64b8..d587c03aa0c6 100644
@@ -64,7 +64,7 @@ endif
 
 monitor_man_pages = [ 'btmon.1' ]
 
-if get_option('monitor')
+if get_option('monitor').enabled()
   man_pages += monitor_man_pages
 endif
 
@@ -77,7 +77,7 @@ tools_man_pages = [
   'bdaddr.1',
 ]
 
-if get_option('tools')
+if get_option('tools').enabled()
   man_pages += tools_man_pages
 endif
 
@@ -91,13 +91,13 @@ deprecated_tools_man_pages = [
   'ciptool.1',
 ]
 
-if get_option('deprecated')
+if get_option('deprecated').enabled()
   man_pages += deprecated_tools_man_pages
 endif
 
 hid2hci_man_pages = [ 'hid2hci.1' ]
 
-if get_option('hid2hci')
+if get_option('hid2hci').enabled()
   man_pages += 'hid2hci.1'
 endif
 
emulator/meson.build +1 -1
index 59c72c4dbd4d..bc038becc567 100644
@@ -6,7 +6,7 @@ emulator_sources = files(
   'smp.c',
 )
 
-if get_option('tests')
+if get_option('tests').enabled()
   executable('btvirt',
     sources: [ 'main.c',
       'serial.c',
lib/meson.build +1 -1
index f31c8c3a58c5..aac809ab1c70 100644
@@ -22,7 +22,7 @@ lib_headers = [
   'bluetooth/hidp.h'
   ]
 
-if get_option('library')
+if get_option('library').enabled()
   lib_bluetooth = shared_library('bluetooth',
     sources: lib_headers + lib_sources,
     version: '3.19.15',
mesh/meson.build +2 -2
index ac01b7025457..b954dccfe1ef 100644
@@ -1,11 +1,11 @@
-if get_option('datafiles')
+if get_option('datafiles').enabled()
   install_data('bluetooth-mesh.conf',
     install_dir: dbusdir)
   install_data('mesh-main.conf',
     install_dir: configdir)
 endif
 
-if get_option('systemd')
+if systemd_dep.found()
   configure_file(
     input: 'bluetooth-mesh.service.in',
     output: 'bluetooth-mesh.service',
meson.build +13 -15
index 3473ed64ee90..c4b48194b62a 100644
@@ -95,10 +95,8 @@ if get_option('buildtype').contains('debug')
 
   add_project_arguments(common_flags, language: 'c')
 
-  if get_option('valgrind')
-    config_h.set('HAVE_VALGRIND_MEMCHECK_H',
-      cc.has_header('valgrind/memcheck.h', required: false))
-  endif
+  config_h.set('HAVE_VALGRIND_MEMCHECK_H',
+    cc.has_header('valgrind/memcheck.h', required: get_option('valgrind').enabled()))
 endif
 
 test_cflags = [
@@ -124,7 +122,7 @@ config_h.set10('HAVE_DECL_SOF_TIMESTAMPING_TX_COMPLETION',
 config_h.set10('HAVE_DECL_SCM_TSTAMP_COMPLETION',
   cc.has_header_symbol('linux/errqueue.h', 'SCM_TSTAMP_COMPLETION', prefix: '#include <time.h>'))
 
-udev_required = get_option('udev').enabled() or get_option('sixaxis') or get_option('hid2hci')
+udev_required = get_option('udev').enabled() or get_option('sixaxis').enabled() or get_option('hid2hci').enabled()
 udev_dep = dependency('udev', version:'>= 196', required: udev_required)
 udevlib_dep = dependency('libudev', required: udev_required)
 
@@ -139,7 +137,7 @@ systemd_dep = dependency('systemd', required: get_option('systemd'))
 libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
 ell_dep = dependency('ell',
   version: '>= 0.39',
-  required: get_option('btpclient') or get_option('mesh').enabled(),
+  required: get_option('btpclient').enabled() or get_option('mesh').enabled(),
   fallback : ['ell', 'libell_dep'],
   default_options: [
     'default_library=static',
@@ -228,18 +226,18 @@ if cups_dep.found()
 endif
 
 external_plugins_link_args = ''
-if get_option('external-plugins')
+if get_option('external-plugins').enabled()
   external_plugins_link_args = [
     '-Wl,--export-dynamic',
     '-Wl,--version-script=' + meson.project_source_root() / 'src/bluetooth.ver'
   ]
 endif
 
-config_h.set('HAVE_A2DP', get_option('a2dp'))
-config_h.set('HAVE_AVRCP', get_option('avrcp'))
-config_h.set('HAVE_ASHA', get_option('asha'))
-config_h.set('HAVE_VCP', get_option('vcp'))
-config_h.set10('EXTERNAL_PLUGINS', get_option('external-plugins'))
+config_h.set('HAVE_A2DP', get_option('a2dp').enabled())
+config_h.set('HAVE_AVRCP', get_option('avrcp').enabled())
+config_h.set('HAVE_ASHA', get_option('asha').enabled())
+config_h.set('HAVE_VCP', get_option('vcp').enabled())
+config_h.set10('EXTERNAL_PLUGINS', get_option('external-plugins').enabled())
 config_h.set_quoted('VERSION', meson.project_version())
 
 configure_file(
@@ -255,7 +253,7 @@ subdir('plugins')
 subdir('profiles')
 subdir('src')
 subdir('client')
-if get_option('monitor')
+if get_option('monitor').enabled()
   subdir('monitor')
 endif
 subdir('emulator')
@@ -271,10 +269,10 @@ endif
 if get_option('mesh').enabled()
   subdir('mesh')
 endif
-if get_option('manpages').enabled()
+if rst2man.found()
   subdir('doc')
 endif
-if get_option('tests')
+if not get_option('tests').disabled()
   subdir('test')
   subdir('unit')
 endif
meson_options.txt +31 -31

78 lines not on this page · raw message

obexd/meson.build +4 -4
index cb658b24ed08..30952590f54d 100644
@@ -1,10 +1,10 @@
-if get_option('datafiles')
+if get_option('datafiles').enabled()
   install_data('src/obex.conf',
     install_dir: dbusconfdir / 'dbus-1/system.d'
   )
 endif
 
-if get_option('systemd')
+if systemd_dep.found()
   configure_file(
     input: 'src/obex.service.in',
     output: 'obex.service',
@@ -50,7 +50,7 @@ obexd_builtin_sources = [
   'client/mns.c',
 ]
 
-if get_option('experimental')
+if get_option('experimental').enabled()
   obexd_builtin_modules += 'pcsuite'
   obexd_builtin_sources += 'plugins/pcsuite.c'
 endif
@@ -111,7 +111,7 @@ executable('obexd',
     '-DPLUGINDIR="@0@"'.format(obex_plugindir),
     '-D_FILE_OFFSET_BITS=64',
     '-DCONFIGDIR="@0@"'.format(configdir),
-    get_option('systemd') ? '-DSYSTEMD' : ''
+    libsystemd_dep.found() ? '-DSYSTEMD' : ''
   ],
   link_args: external_plugins_link_args,
   install: true,
peripheral/meson.build +1 -1
index 21d6296829ea..31e5435763ef 100644
@@ -1,4 +1,4 @@
-if get_option('tests')
+if get_option('tests').enabled()
   executable('btsensor',
     sources: [
       'main.c',
plugins/meson.build +3 -3
index 019e7083df16..5485ef8eca44 100644
@@ -12,17 +12,17 @@ builtin_sources = files(
 
 builtin_deps = []
 
-if get_option('admin')
+if get_option('admin').enabled()
   builtin_modules += 'admin'
   builtin_sources += files('admin.c')
 endif
 
-if get_option('nfc')
+if get_option('nfc').enabled()
   builtin_modules += 'neard'
   builtin_sources += files('neard.c')
 endif
 
-if get_option('sixaxis')
+if get_option('sixaxis').enabled()
   builtin_modules += 'sixaxis'
   builtin_sources += files('sixaxis.c')
   builtin_deps += udev_dep
profiles/meson.build +15 -15
index 9d4c39c78a52..c77687a04e8e 100644
@@ -18,7 +18,7 @@ builtin_sources += files(
   'ranging/rap.c',
 )
 
-if get_option('a2dp')
+if get_option('a2dp').enabled()
   builtin_modules += 'a2dp'
   builtin_sources += files(
     'audio/source.c',
@@ -28,7 +28,7 @@ if get_option('a2dp')
   )
 endif
 
-if get_option('avrcp')
+if get_option('avrcp').enabled()
   builtin_modules += 'avrcp'
   builtin_sources += files(
     'audio/control.c',
@@ -38,7 +38,7 @@ if get_option('avrcp')
   )
 endif
 
-if get_option('network')
+if get_option('network').enabled()
   builtin_modules += 'network'
   builtin_sources += files(
     'network/manager.c',
@@ -51,7 +51,7 @@ if get_option('network')
   )
 endif
 
-if get_option('hid')
+if get_option('hid').enabled()
   builtin_modules += 'input'
   builtin_sources += files(
     'input/manager.c',
@@ -64,7 +64,7 @@ if get_option('hid')
   )
 endif
 
-if get_option('hog')
+if get_option('hog').enabled()
   builtin_modules += 'hog'
   builtin_sources += files(
     'input/hog.c',
@@ -85,42 +85,42 @@ if get_option('midi').enabled()
   builtin_deps += alsa_dep
 endif
 
-if get_option('bap')
+if get_option('bap').enabled()
   builtin_modules += 'bap'
   builtin_sources += files('audio/bap.c')
 endif
 
-if get_option('bass')
+if get_option('bass').enabled()
   builtin_modules += 'bass'
   builtin_sources += files('audio/bass.c')
 endif
 
-if get_option('mcp')
+if get_option('mcp').enabled()
   builtin_modules += 'mcp'
   builtin_sources += files('audio/mcp.c')
 endif
 
-if get_option('vcp')
+if get_option('vcp').enabled()
   builtin_modules += 'vcp'
   builtin_sources += files('audio/vcp.c')
 endif
 
-if get_option('micp')
+if get_option('micp').enabled()
   builtin_modules += 'micp'
   builtin_sources += files('audio/micp.c')
 endif
 
-if get_option('ccp')
+if get_option('ccp').enabled()
   builtin_modules += 'ccp'
   builtin_sources += files('audio/ccp.c')
 endif
 
-if get_option('csip')
+if get_option('csip').enabled()
   builtin_modules += 'csip'
   builtin_sources += files('audio/csip.c')
 endif
 
-if get_option('asha')
+if get_option('asha').enabled()
   builtin_modules += 'asha'
   builtin_sources += files('audio/asha.c')
 endif
@@ -140,14 +140,14 @@ if get_option('hfp').enabled()
   builtin_sources += files('audio/telephony.c', 'audio/hfp-hf.c')
 endif
 
-if get_option('tools')
+if get_option('tools').enabled()
   executable('iapd',
     sources: 'iap/main.c',
     dependencies: [ libgdbus_internal_dep, glib_dep, dbus_dep ]
   )
 endif
 
-if get_option('cups').enabled()
+if cups_dep.found()
   executable('bluetooth',
     sources: [
       'cups/main.c',
src/meson.build +2 -2
index c82085b8a519..bf2155e13d89 100644
@@ -1,6 +1,6 @@
 subdir('shared')
 
-if get_option('datafiles')
+if get_option('datafiles').enabled()
   install_data('bluetooth.conf',
     install_dir: dbusconfdir / 'dbus-1/system.d'
   )
@@ -9,7 +9,7 @@ if get_option('datafiles')
   )
 endif
 
-if get_option('systemd')
+if systemd_dep.found()
   configure_file(
     input: 'bluetooth.service.in',
     output: 'bluetooth.service',
tools/mesh/meson.build +1 -1
index 85bfb00977f3..eb4039909b5c 100644
@@ -1,4 +1,4 @@
-if get_option('tools') and readline_dep.found()
+if get_option('tools').enabled() and readline_dep.found()
   executable('mesh-cfgclient',
     sources: [ '../mesh-cfgclient.c',
       'cfgcli.c',
tools/meson.build +9 -27
index 194016a49d2e..e945fcaed953 100644
@@ -1,22 +1,4 @@
-tools_man_pages = [
-  'hid2hci.1',
-  'rctest.1',
-  'l2ping.1',
-  'btattach.1',
-  'isotest.1',
-  'btmgmt.1',
-  'hciattach.1',
-  'hciconfig.1',
-  'hcitool.1',
-  'hcidump.1',
-  'rfcomm.1',
-  'sdptool.1',
-  'ciptool.1',
-]
-
-inst_tools_man_pages = []
-
-if get_option('logger')
+if get_option('logger').enabled()
   executable('btmon-logger',
     [ 'btmon-logger.c' ],
     dependencies: libshared_mainloop_dep,
@@ -24,7 +6,7 @@ if get_option('logger')
     install_dir: pkglibexecdir
   )
 
-  if get_option('systemd')
+  if systemd_dep.found()
     configure_file(
       input: 'bluetooth-logger.service.in',
       output: 'bluetooth-logger.service',
@@ -56,7 +38,7 @@ tester_tools = [
   '6lowpan',
 ]
 
-if get_option('tests')
+if get_option('tests').enabled()
   foreach tool: tester_tools
     executable(tool + '-tester',
       sources: [ tool + '-tester.c', emulator_sources ],
@@ -65,7 +47,7 @@ if get_option('tests')
   endforeach
 endif
 
-if get_option('btpclient')
+if get_option('btpclient').enabled()
   executable('btpclient',
     sources: [ 'btpclient.c', '../src/shared/btp.c' ],
     include_directories: '..',
@@ -82,7 +64,7 @@ if get_option('btpclient')
   )
 endif
 
-if get_option('hid2hci')
+if get_option('hid2hci').enabled()
   executable('hid2hci',
     sources: 'hid2hci.c',
     dependencies: udevlib_dep,
@@ -127,7 +109,7 @@ inst_tools_names = [
   'isotest'
 ]
 
-if get_option('tools')
+if get_option('tools').enabled()
   foreach tool: tools_names
     executable(tool,
       sources: tool + '.c',
@@ -199,7 +181,7 @@ if get_option('tools')
         include_directories: '..',
         install: true
       )
-      if get_option('deprecated')
+      if get_option('deprecated').enabled()
         executable('meshctl',
           sources: [
             'meshctl.c',
@@ -230,7 +212,7 @@ if get_option('tools')
     endif
   endif
 
-  if get_option('deprecated')
+  if get_option('deprecated').enabled()
     executable('gatttool',
       sources: gatttool_sources,
       dependencies: [ libbluetooth_internal_dep, libshared_glib_dep, readline_dep ],
@@ -303,7 +285,7 @@ if get_option('tools')
     endforeach
   endif
 
-  if get_option('systemd')
+  if systemd_dep.found()
     configure_file(
       input: 'mpris-proxy.service.in',
       output: 'mpris-proxy.service',
unit/meson.build +2 -2
index b53568ccb76d..1e9b7020c089 100644
@@ -52,7 +52,7 @@ tests2 = [
   [ 'test-avctp.c', '../src/log.c', 'avctp.c' ],
 ]
 
-if get_option('obex').enabled()
+if ical_dep.found()
   tests2 += [
     [ 'test-gobex.c', 'util.c', gobex_sources ],
     [ 'test-gobex-packet.c', 'util.c', gobex_sources ],
@@ -96,7 +96,7 @@ exe = executable('test-profile',
 )
 test('test-profile', exe)
 
-if get_option('midi').enabled()
+if alsa_dep.found()
   exe = executable('test-midi',
     sources: [ 'test-midi.c', '../profiles/midi/libmidi.c' ],
     c_args: [ '-DMIDI_TEST' ],
Signature · 1 line
2.52.0
#4 lore raw

PATCH v7 4/16 build: Separate systemd and libsystemd dependencies

In reply to Bastien Nocera

One is to install systemd service files, the other to enable deeper logind integration into obexd.

---
 meson.build       | 3 ++-
 meson_options.txt | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
meson.build +2 -1
index c4b48194b62a..099ad5e0dd49 100644
@@ -134,7 +134,8 @@ readline_dep = dependency('readline',
   required: get_option('client').enabled() or
     get_option('mesh').enabled())
 systemd_dep = dependency('systemd', required: get_option('systemd'))
-libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+libsystemd_dep = dependency('libsystemd',
+  required: get_option('obex').enabled() and get_option('logind').enabled())
 ell_dep = dependency('ell',
   version: '>= 0.39',
   required: get_option('btpclient').enabled() or get_option('mesh').enabled(),
meson_options.txt +2 -1
index 66abdcb1c145..b72080f87813 100644
@@ -6,7 +6,8 @@ option('tests', type: 'feature', value: 'auto', description: 'Enable testing too
 option('tools', type: 'feature', value: 'enabled', description: 'Enable Bluetooth tools')
 option('monitor', type: 'feature', value: 'enabled', description: 'Enable Bluetooth monitor')
 option('client', type: 'feature', value: 'enabled', description: 'Enable command line client')
-option('systemd', type: 'feature', value: 'enabled', description: 'Enable systemd integration')
+option('systemd', type: 'feature', value: 'enabled', description: 'Install systemd service files')
+option('logind', type: 'feature', value: 'enabled', description: 'Enable logind integration in obexd')
 option('udev', type: 'feature', value: 'enabled', description: 'Enable udev device support')
 option('datafiles', type: 'feature', value: 'enabled', description: 'Install configuration and data files')
 option('manpages', type: 'feature', value: 'auto', description: 'Enable building of manual pages')
Signature · 1 line
2.52.0
#5 lore raw

PATCH v7 5/16 tools: Install gatttool if deprecated tools are enabled

In reply to Bastien Nocera

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1141909
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720486

---
 tools/meson.build | 1 +
 1 file changed, 1 insertion(+)
tools/meson.build +1 -0
index e945fcaed953..431082cba94a 100644
@@ -216,6 +216,7 @@ if get_option('tools').enabled()
     executable('gatttool',
       sources: gatttool_sources,
       dependencies: [ libbluetooth_internal_dep, libshared_glib_dep, readline_dep ],
+      install: true
     )
     executable('hciattach',
       sources: [
Signature · 1 line
2.52.0
#6 lore raw

PATCH v7 6/16 tools: Install avinfo tool by default

In reply to Bastien Nocera

It's used for checking which audio codecs are supported by a Bluetooth audio device, which is more useful now that PulseAudio/PipeWire support alternative codecs like LDAC or aptX).

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1699680

---
 tools/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/meson.build +1 -1
index 431082cba94a..273b42134775 100644
@@ -78,7 +78,6 @@ if get_option('hid2hci').enabled()
 endif
 
 tools_names = [
-  'avinfo',
   'avtest',
   'scotest',
   'hwdb',
@@ -99,6 +98,7 @@ tools_names = [
 ]
 
 inst_tools_names = [
+  'avinfo',
   'rctest',
   'l2test',
   'l2ping',
Signature · 1 line
2.52.0
#7 lore raw

PATCH v7 7/16 emulator: Install the emulator if built

In reply to Bastien Nocera

It's useful for testing.

---
 emulator/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
emulator/meson.build +3 -1
index bc038becc567..55d77e40319d 100644
@@ -17,7 +17,9 @@ if get_option('tests').enabled()
       'smp.c',
       'phy.c',
       'le.c' ],
-    dependencies: [ libbluetooth_internal_dep, libshared_mainloop_dep, glib_dep ]
+    dependencies: [ libbluetooth_internal_dep, libshared_mainloop_dep, glib_dep ],
+    install: true,
+    install_dir: pkglibexecdir
   )
 
   executable('b1ee',
Signature · 1 line
2.52.0
#8 lore raw

PATCH v7 8/16 build: Add option to allow disabling bluetoothd

In reply to Bastien Nocera

This makes it possible to build, for example, just the library, or the command-line client, without also building and installing bluetoothd.

---
 doc/meson.build   |   3 +-
 meson.build       |   8 ++-
 meson_options.txt |   1 +
 src/meson.build   | 164 +++++++++++++++++++++++-----------------------
 4 files changed, 92 insertions(+), 84 deletions(-)
doc/meson.build +2 -1
index d587c03aa0c6..db13911c2e73 100644
@@ -143,7 +143,8 @@ bluetoothd_rst = configure_file(
   output: 'bluetoothd.rst',
   configuration: man_conf
 )
-if get_option('manpages').enabled()
+
+if get_option('daemon').enabled() and get_option('manpages').enabled()
   custom_target(
     input: bluetoothd_rst,
     output: 'bluetoothd.8',
meson.build +6 -2
index 099ad5e0dd49..2d4203a02a0b 100644
@@ -281,8 +281,12 @@ endif
 # Fix permissions on install
 install = find_program('install')
 sh = find_program('sh')
-meson.add_install_script(sh, '-c', 'install -dm755 ${DESTDIR}/' + configdir)
-meson.add_install_script(sh, '-c', 'install -dm700 ${DESTDIR}/' + storagedir)
+if get_option('daemon').enabled()
+  meson.add_install_script(sh, '-c', 'install -dm755 ${DESTDIR}/' + configdir)
+endif
+if get_option('daemon').enabled() or get_option('mesh').enabled()
+  meson.add_install_script(sh, '-c', 'install -dm700 ${DESTDIR}/' + storagedir)
+endif
 if get_option('mesh').enabled()
   meson.add_install_script(sh, '-c', 'install -dm700 ${DESTDIR}/' + meshstoragedir)
 endif
meson_options.txt +1 -0
index b72080f87813..aad131212886 100644
@@ -6,6 +6,7 @@ option('tests', type: 'feature', value: 'auto', description: 'Enable testing too
 option('tools', type: 'feature', value: 'enabled', description: 'Enable Bluetooth tools')
 option('monitor', type: 'feature', value: 'enabled', description: 'Enable Bluetooth monitor')
 option('client', type: 'feature', value: 'enabled', description: 'Enable command line client')
+option('daemon', type: 'feature', value: 'enabled', description: 'Enable bluetoothd daemon')
 option('systemd', type: 'feature', value: 'enabled', description: 'Install systemd service files')
 option('logind', type: 'feature', value: 'enabled', description: 'Enable logind integration in obexd')
 option('udev', type: 'feature', value: 'enabled', description: 'Enable udev device support')
src/meson.build +83 -81

171 lines not on this page · raw message

Signature · 1 line
2.52.0
#9 lore raw

PATCH v7 9/16 unit: Run test-bap tests concurrently

In reply to Bastien Nocera
---
 meson.build           |  2 +-
 unit/meson.build      | 25 ++++++++++++++++++++++---
 unit/unittest_list.sh | 15 +++++++++++++++
 3 files changed, 38 insertions(+), 4 deletions(-)
 create mode 100644 unit/unittest_list.sh
meson.build +1 -1
index 2d4203a02a0b..f2220b2c4613 100644
@@ -273,6 +273,7 @@ endif
 if rst2man.found()
   subdir('doc')
 endif
+sh = find_program('sh')
 if not get_option('tests').disabled()
   subdir('test')
   subdir('unit')
@@ -280,7 +281,6 @@ endif
 
 # Fix permissions on install
 install = find_program('install')
-sh = find_program('sh')
 if get_option('daemon').enabled()
   meson.add_install_script(sh, '-c', 'install -dm755 ${DESTDIR}/' + configdir)
 endif
unit/meson.build +22 -3
index 1e9b7020c089..b74a67541e99 100644
@@ -7,7 +7,6 @@ tests1 = [
   [ 'test-avrcp.c', '../src/log.c', 'avctp.c', 'avrcp-lib.c' ],
   [ 'test-lib.c' ],
   [ 'test-gatt.c' ],
-  [ 'test-bap.c' ],
   [ 'test-micp.c' ],
   [ 'test-bass.c' ],
   [ 'test-vcp.c' ],
@@ -39,6 +38,26 @@ foreach t: tests1
 endforeach
 
 tests2 = [
+  [ 'test-bap.c' ],
+]
+
+unittest_list = find_program('unittest_list.sh')
+
+foreach t: tests2
+  test_name = t[0].substring(0, -2)
+  exe = executable(test_name,
+    sources: t,
+    dependencies: [ libshared_glib_dep, libbluetooth_internal_dep ],
+  )
+
+  r = run_command(sh, unittest_list, t, check: true)
+  unit_tests = r.stdout().strip().split(' ')
+  foreach ut: unit_tests
+    test(ut, exe, args: [ '-p', ut ])
+  endforeach
+endforeach
+
+tests3 = [
   [ 'test-textfile.c', '../src/textfile.c' ],
   [ 'test-crc.c', '../monitor/crc.c' ],
   [ 'test-crypto.c' ],
@@ -53,7 +72,7 @@ tests2 = [
 ]
 
 if ical_dep.found()
-  tests2 += [
+  tests3 += [
     [ 'test-gobex.c', 'util.c', gobex_sources ],
     [ 'test-gobex-packet.c', 'util.c', gobex_sources ],
     [ 'test-gobex-header.c', 'util.c', gobex_sources ],
@@ -62,7 +81,7 @@ if ical_dep.found()
   ]
 endif
 
-foreach t: tests2
+foreach t: tests3
   test_name = t[0].substring(0, -2)
   exe = executable(test_name,
     sources: t,
unit/unittest_list.sh new file +15 -0
new file mode 100644
index 000000000000..c478edc9d3e4
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if [ $# -lt 1 ] ; then
+	echo "Usage: $0 FILE..."
+	exit 1
+fi
+
+TESTS=$(grep '^[[:space:]]*define_test[_a-z]*("' $* | cut -d \" -f 2 | cut -d " " -f 1)
+if [ -z "$TESTS" ] ; then
+	TESTS=$(grep '^[[:space:]]*tester_add("' $* | cut -d \" -f 2 | cut -d " " -f 1)
+fi
+if [ -z "$TESTS" ] ; then
+	TESTS=$(grep '^[[:space:]]*g_test_add_*func("' $* | cut -d \" -f 2 | cut -d " " -f 1)
+fi
+echo $TESTS
Signature · 1 line
2.52.0
#10 lore raw

PATCH v7 10/16 unit: Make gobex-transfer tests run concurrently

In reply to Bastien Nocera
---
 unit/meson.build | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
unit/meson.build +20 -1
index b74a67541e99..9acae732d495 100644
@@ -70,15 +70,18 @@ tests3 = [
   [ 'test-avdtp.c', '../src/log.c', 'avdtp.c' ],
   [ 'test-avctp.c', '../src/log.c', 'avctp.c' ],
 ]
+tests4 = []
 
 if ical_dep.found()
   tests3 += [
     [ 'test-gobex.c', 'util.c', gobex_sources ],
     [ 'test-gobex-packet.c', 'util.c', gobex_sources ],
     [ 'test-gobex-header.c', 'util.c', gobex_sources ],
-    [ 'test-gobex-transfer.c', 'util.c', gobex_sources ],
     [ 'test-gobex-apparam.c', 'util.c', gobex_sources ],
   ]
+  tests4 = [
+    [ 'test-gobex-transfer.c', 'util.c', gobex_sources ],
+  ]
 endif
 
 foreach t: tests3
@@ -92,6 +95,22 @@ foreach t: tests3
   test(test_name, exe)
 endforeach
 
+foreach t: tests4
+  test_name = t[0].substring(0, -2)
+  exe = executable(test_name,
+    sources: t,
+    c_args: [ '-DSTORAGEDIR="@0"'.format(storagedir) ],
+    include_directories: '../lib',
+    dependencies: libshared_glib_dep
+  )
+
+  r = run_command(sh, unittest_list, t, check: true)
+  unit_tests = r.stdout().strip().split(' ')
+  foreach ut: unit_tests
+    test(ut, exe, args: [ '-p', ut ])
+  endforeach
+endforeach
+
 exe = executable('test-gdbus-client',
   sources: 'test-gdbus-client.c',
   dependencies: [ libgdbus_internal_dep, libshared_glib_dep ]
Signature · 1 line
2.52.0
#11 lore raw

PATCH v7 11/16 build: Only build profiles if the daemon is built

In reply to Bastien Nocera
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +3 -1
index f2220b2c4613..ab21fd80e76e 100644
@@ -251,7 +251,9 @@ subdir('gdbus')
 subdir('attrib')
 subdir('btio')
 subdir('plugins')
-subdir('profiles')
+if get_option('daemon').enabled()
+  subdir('profiles')
+endif
 subdir('src')
 subdir('client')
 if get_option('monitor').enabled()
Signature · 1 line
2.52.0
#12 lore raw

PATCH v7 12/16 build: Only build gdbus library if there is a user

In reply to Bastien Nocera
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +3 -1
index ab21fd80e76e..6d95cee1cd3c 100644
@@ -247,7 +247,9 @@ configure_file(
 )
 
 subdir('lib')
-subdir('gdbus')
+if not get_option('tools').disabled() or get_option('client').enabled() or get_option('obex').enabled() or not get_option('tests').disabled() or not get_option('daemon').disabled()
+  subdir('gdbus')
+endif
 subdir('attrib')
 subdir('btio')
 subdir('plugins')
Signature · 1 line
2.52.0
#13 lore raw

PATCH v7 13/16 doc: Add HTML documentation

In reply to Bastien Nocera

Based off the XDG desktop portal documentation at:
https://github.com/flatpak/xdg-desktop-portal/commits/main/doc

TODO:
- better logo and favicon
- integrate txt files or port them to RST
- add introduction
- tweak stylesheets so XML interface docs look better

---
 doc/_static/bluez.css      | 452 +++++++++++++++++++++++++++++++++++++
 doc/_static/bluez.png      | Bin 0 -> 17550 bytes
 doc/_static/bullet.svg     |   1 +
 doc/_static/card.png       | Bin 0 -> 38230 bytes
 doc/_static/inter.woff2    | Bin 0 -> 345588 bytes
 doc/_static/toc_bullet.svg |  39 ++++
 doc/bluetoothctl-cmd.rst   |  34 +++
 doc/conf.py                |  39 ++++
 doc/copy-subdir.py         |  14 ++
 doc/daemons.rst            |  12 +
 doc/dbus-gatt.rst          |  18 ++
 doc/dbus-obex.rst          |  33 +++
 doc/dbus.rst               |  76 +++++++
 doc/deprecated-tools.rst   |  22 ++
 doc/dev-maint.rst          |  17 ++
 doc/favicon.ico            | Bin 0 -> 937 bytes
 doc/index.rst              |  47 ++++
 doc/meson.build            | 120 ++++++++++
 doc/protocols.rst          |  20 ++
 doc/qualifications.rst     |  76 +++++++
 doc/tools.rst              |  24 ++
 meson.build                |   6 +-
 meson_options.txt          |   1 +
 23 files changed, 1050 insertions(+), 1 deletion(-)
 create mode 100644 doc/_static/bluez.css
 create mode 100644 doc/_static/bluez.png
 create mode 100644 doc/_static/bullet.svg
 create mode 100644 doc/_static/card.png
 create mode 100644 doc/_static/inter.woff2
 create mode 100644 doc/_static/toc_bullet.svg
 create mode 100644 doc/bluetoothctl-cmd.rst
 create mode 100644 doc/conf.py
 create mode 100644 doc/copy-subdir.py
 create mode 100644 doc/daemons.rst
 create mode 100644 doc/dbus-gatt.rst
 create mode 100644 doc/dbus-obex.rst
 create mode 100644 doc/dbus.rst
 create mode 100644 doc/deprecated-tools.rst
 create mode 100644 doc/dev-maint.rst
 create mode 100644 doc/favicon.ico
 create mode 100644 doc/index.rst
 create mode 100644 doc/protocols.rst
 create mode 100644 doc/qualifications.rst
 create mode 100644 doc/tools.rst
doc/_static/bluez.css new file +452 -0
new file mode 100644
index 000000000000..f82f89c5ceb4
@@ -0,0 +1,452 @@
+/* XDG CSS theme for Sphinx + Furo
+
+https://www.sphinx-doc.org
+https://pypi.org/project/furo/
+*/
+
+/* FONTS */
+
+@font-face {
+  font-family: "Inter var";
+  font-weight: 100 900;
+  font-display: swap;
+  font-style: normal;
+  font-named-instance: "Regular";
+  src: url("inter.woff2") format("woff2");
+}
+
+:root {
+  --rounded-corner: 12px;
+  --blue1: rgb(153,193,241);
+  --blue2: rgb(98,160,234);
+  --blue3: rgb(53,132,228);
+  --blue4: rgb(28,113,216);
+  --blue5: rgb(26,95,180);
+  --green1: rgb(143,240,164);
+  --green2: rgb(87,227,137);
+  --green3: rgb(51,209,122);
+  --green4: rgb(46,194,126);
+  --green5: rgb(38,162,105);
+  --yellow1: rgb(249,240,107);
+  --yellow2: rgb(248,228,92);
+  --yellow3: rgb(246,211,45);
+  --yellow4: rgb(245,194,17);
+  --yellow5: rgb(229,165,10);
+  --orange1: rgb(255,190,111);
+  --orange2: rgb(255,163,72);
+  --orange3: rgb(255,120,0);
+  --orange4: rgb(230,97,0);
+  --orange5: rgb(198,70,0);
+  --red1: rgb(246,97,81);
+  --red2: rgb(237,51,59);
+  --red3: rgb(224,27,36);
+  --red4: rgb(192,28,40);
+  --red5: rgb(165,29,45);
+  --purple1: rgb(220,138,221);
+  --purple2: rgb(192,97,203);
+  --purple3: rgb(145,65,172);
+  --purple4: rgb(129,61,156);
+  --purple5: rgb(97,53,131);
+  --brown1: rgb(205,171,143);
+  --brown2: rgb(181,131,90);
+  --brown3: rgb(152,106,68);
+  --brown4: rgb(134,94,60);
+  --brown5: rgb(99,69,44);
+  --light1: rgb(255,255,255);
+  --light2: rgb(246,245,244);
+  --light3: rgb(222,221,218);
+  --light4: rgb(192,191,188);
+  --light5: rgb(154,153,150);
+  --dark1: rgb(119,118,123);
+  --dark2: rgb(94,92,100);
+  --dark3: rgb(61,56,70);
+  --dark4: rgb(36,31,49);
+  --dark5: rgb(0,0,0);
+  --text: #f6f5f4;
+  --tocbg: var(--light2);
+  --tocfg: var(--dark3);
+  --borders: var(--light3);
+  --link: var(--blue5);
+  --link-underline: var(--blue1);
+}
+
+::selection {
+	background-color:  rgba(153,193,241,0.5);
+}
+
+@media (prefers-color-scheme: dark) {
+  :root {
+    --tocbg: var(--dark5);
+    --tocfg: var(--light5);
+    --borders: var(--dark3);
+    --link: var(--blue1);
+    --link-underline: var(--blue5);
+  }
+	::selection {
+		background-color:  rgba(26,95,180,0.4);
+	}
+}
+
+* {
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+html, body {
+  margin: 0;
+  padding: 0;
+  font-size: 16px;
+  font-family: "Inter var", sans-serif;
+  font-weight: 400;
+  line-height: 1.6;
+}
+  @media (min-width: 700px) {
+    html, body {
+      font-size: 18px;
+    }
+  }
+
+a {
+  color: var(--link);
+  text-decoration-color: var(--link-underline);
+}
+
+p strong {
+  font-weight: 600;
+  opacity: 0.9;
+}
+
+h1 {
+   font-weight: 500;
+   font-size: 2rem;
+   margin-top: '0';
+   margin-bottom: 1.5rem;
+   font-family: "Inter var", sans-serif;
+}
+h2 {
+   font-weight: 800;
+   font-size: 1.7rem;
+   margin-top: 2.5rem;
+   margin-bottom: 1.2rem;
+   font-family: "Inter var", sans-serif;
+}
+h3 {
+   font-weight: 800;
+   font-size: 1.3rem;
+   margin-top: 2.2rem;
+   margin-bottom: 1rem;
+   font-family: "Inter var", sans-serif;
+}
+h4 {
+   font-weight: 700;
+   font-size: 1.1rem;
+   margin-top: 1rem;
+   margin-bottom: 1rem;
+   font-family: "Inter var", sans-serif;
+}
+h5 {
+   font-weight: 700;
+   font-size: 1rem;
+   margin-top: 1rem;
+   margin-bottom: 1rem;
+   font-family: "Inter var", sans-serif;
+}
+  h2,h3,h4,h5 { opacity: 0.7; }
+
+ul.simple {
+  margin: 1rem 1rem 3rem;
+}
+
+  ul.simple li {
+    list-style-image: url(bullet.svg);
+    margin-inline-end: 1ch;
+    margin-bottom: 1rem;
+  }
+	ul.simple li:hover::marker {	}
+
+.related-pages {
+  font-size: 10pt;
+  font-weight: 800;
+  display: flex;
+  flex-direction: row-reverse;
+  align-items: stretch;
+  justify-content: space-between;
+}
+
+  .related-pages a .title {
+    color: var(--dark1);
+  }
+  .related-pages a svg {
+    width: 32px; height: 32px;
+  }
+
+  .prev-page {
+    border-radius: 8px;
+    padding: 8px 24px 8px 8px;
+
+  }
+  .next-page {
+    border-radius: 8px;
+    padding: 8px 8px 8px 24px;
+  }
+  .related-pages a.prev-page,
+  .related-pages a.next-page {
+    float: none;
+    max-width: inherit; /* cancel furo's 50% */
+  }
+  .related-pages a.prev-page:hover, .related-pages a.next-page:hover {
+    background-color: var(--tocbg);
+  }
+
+  @media (min-width: 700px) {
+    .related-pages {
+      font-size: 14pt;
+    }
+    .prev-page {
+      padding: 16px 48px 16px 16px;
+      border-radius: 24px;
+
+    }
+    .next-page {
+      padding: 16px 16px 16px 48px;
+      border-radius: 24px;
+    }
+  }
+  .related-pages a.prev-page:only-child,
+  .related-pages a.next-page:only-child,
+  .page-info {
+      /* align-self: flex-end; i wish */
+      width: 100%; /* big buttons instead */
+  }
+
+.toctree-wrapper ul {
+	margin: 0; padding: 0;
+}
+
+  .toctree-wrapper li {
+		list-style: none;
+    margin: 0 0 1rem 0;
+  }
+  .toctree-wrapper li.toctree-l1 {
+    font-size: 14pt;
+    font-weight: 600;
+
+  }
+    .toctree-wrapper li.toctree-l1 > a { color: var(--tocfg); }
+
+  .toctree-wrapper li.toctree-l2 {
+		list-style-image: url(toc_bullet.svg);
+		margin: 0;
+    font-size: 12pt;
+    font-weight: 400;
+    padding: 0.2rem;
+  }
+    .toctree-wrapper > ul ul {
+      margin-top: 1rem;
+      display: grid;
+      grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
+      gap: .2rem;
+    }
+    .toctree-wrapper > ul ul a {
+      background-color: transparent;
+    }
+/* tiled TOC with images */
+
+ul.tiled-toc {
+  display: grid;
+  gap: 1rem;
+  grid-auto-flow: row;
+  margin: 1rem 0; padding: 0;
+  text-align: center;
+  margin-top: 2rem;
+  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
+}
+  ul.tiled-toc li {
+    display: block;
+    list-style: none;
+  }
+  ul.tiled-toc li img {
+    display: block;
+    width: 100%;
+    image-rendering: crisp-edges;
+    image-rendering: pixelated;
+  }
+  ul.tiled-toc li img::after {
+    content: "";
+  }
+
+  ul.tiled-toc a {
+    color: black;
+    text-decoration: none;
+    font-weight: 600;
+  }
+
+  @media (prefers-color-scheme: dark) {
+    ul.tiled-toc a { color: white; }
+  }
+
+
+table.docutils {
+  font-size: 90%;
+  box-shadow: none;
+  border-collapse: collapse;
+  border-spacing: 0;
+  border-radius: 0;
+  text-align: left;
+  border-width: 0;
+  box-sizing: border-box;
+}
+  /* reset crazy */
+  table.docutils th, table.docutils tr, table.docutils td {
+    background-color: transparent;
+    text-align: left;
+  }
+
+  table.docutils td, table.docutils th {
+    border-width: 0;
+    padding: .25rem;
+  }
+  table.docutils tr {
+    border-width: 0;
+    border-bottom: 1px solid var(--borders);
+  }
+
+  table.docutils thead tr {
+    font-weight: 800;
+    border-width: 0;
+    box-sizing: inherit;
+    border-bottom: 2px solid var(--borders);
+  }
+
+  .hig-palette-table.align-default {
+    display: table;
+    width: 100%;
+  }
+
+  img.hig-palette-swatch {
+    display: block;
+    width: 42px;
+    aspect-ratio: 1 / 1;
+    border-radius: 50%;
+  }
+
+  .hig-palette-table colgroup { display: none; }
+  .hig-palette-table .stub,
+  .hig-palette-table .head.stub {
+    width: 50px;
+  }
+
+video {
+  width: 100%;
+  height: auto;
+}
+
+footer {
+  margin-bottom: 3rem;
+}
+
+.sidebar-drawer {
+
+}
+
+.sidebar-brand-text {
+  font-family: Cantarell, -apple-system, BlinkMacSystemFont, "Helvetica", sans-serif;
+  font-size: 14pt;
+  font-weight: 800;
+}
+
+.sidebar-search-container,
+.sidebar-search {
+	border-radius: 99999px;
+	border: none;
+}
+.sidebar-search-container {
+	margin: 0 var(--sidebar-item-spacing-horizontal);
+	transition: background-color 0.2s linear;
+	background-color: rgba(0,0,0,0.06);
+}
+.sidebar-search-container:hover {
+  background-color: rgba(0,0,0,0.09);
+}
+.sidebar-search-container:focus-within {
+  background-color: rgba(0,0,0,0.12);
+}
+
+@media (prefers-color-scheme: dark) {
+  .sidebar-search-container {
+    background-color: rgba(255,255,255,0.06);
+  }
+  .sidebar-search-container:hover {
+    background-color: rgba(255,255,255,0.09);
+  }
+  .sidebar-search-container:focus-within {
+    background-color: rgba(255,255,255,0.12);
+  }
+}
+
+.sidebar-tree .toctree-l1,
+.sidebar-tree .toctree-l2 {
+	margin: 1px 12px;
+	border-radius: 6px;
+  color: var(--link);
+}
+
+.sidebar-tree .toctree-l1 > .reference {
+  color: var(--link);
+}
+
+.sidebar-tree .toctree-l2 {
+	margin: 1px 0;
+	font-size: 90%;
+	text-wrap: balance;
+	overflow-wrap: break-word;
+	hyphens: manual;
+}
+
+.sidebar-tree li > ul {
+	margin-left: 0;
+}
+.sidebar-tree li > ul .reference {
+	padding-left: calc(1.5*var(--sidebar-item-spacing-horizontal));
+}
+
+.sidebar-tree label[for^="toctree-checkbox"] {
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.sidebar-tree li.toctree-l3 a {
+  margin: 1px 0;
+  padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)
+           var(--sidebar-item-spacing-vertical) calc(2*var(--sidebar-item-spacing-horizontal)) ; /* extra indentation */
+}
+
+.sidebar-tree .reference {
+	background: rgba(0,0,0,0);
+	transition: background 0.2s linear;
+	border-radius: 6px;
+	padding: var(--sidebar-item-spacing-vertical) calc(0.75*var(--sidebar-item-spacing-horizontal));
+}
+.sidebar-tree .reference:hover,
+.sidebar-tree .current > .reference:hover {
+	/* background: var(--color-background-hover); */
+	background: rgba(0,0,0,0.03);
+}
+
+.sidebar-tree .reference.current {
+	background: rgba(0,0,0,0.06);
+}
+.sidebar-tree .reference.current:hover {
+	background: rgba(0,0,0,0.09);
+}
+
+.sidebar-tree .current-page > .reference {
+	font-weight: 600;
+}
+
+.theme-toggle {
+  display: none; /* just go with auto */
+}
doc/_static/bluez.png new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c816fea872249307365343eb61c99975af58967f
GIT binary patch
doc/_static/bullet.svg new file +1 -0
new file mode 100644
index 000000000000..e75341131991
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"><path d="M6.662 4.586a1.143 1.143 0 00-.838.334l-.531.531c-.458.458-.442 1.21.037 1.69l2.873 2.87-2.873 2.874c-.479.479-.495 1.231-.037 1.69l.531.53c.458.458 1.213.442 1.692-.037l4.068-4.07a1.22 1.22 0 00.348-.986 1.22 1.22 0 00-.348-.985l-4.068-4.07a1.249 1.249 0 00-.854-.371z" fill="#9a9996"/></svg>
\ No newline at end of file
doc/_static/card.png new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..13747490f2925dd7ce6e87cf995a72c193bbdfd5
GIT binary patch
doc/_static/inter.woff2 new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..22a12b04e1abd959c00f9d8429ca78ddae3f7dde
GIT binary patch
doc/_static/toc_bullet.svg new file +39 -0
new file mode 100644
index 000000000000..d4a77331c98f
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   height="16"
+   width="16"
+   version="1.1"
+   id="svg4"
+   sodipodi:docname="toc_bullet.svg"
+   inkscape:version="1.1-beta1 (77e7b44db3, 2021-03-28)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs8" />
+  <sodipodi:namedview
+     id="namedview6"
+     pagecolor="#505050"
+     bordercolor="#ffffff"
+     borderopacity="1"
+     objecttolerance="10.0"
+     gridtolerance="10.0"
+     guidetolerance="10.0"
+     inkscape:pageshadow="0"
+     inkscape:pageopacity="0"
+     inkscape:pagecheckerboard="1"
+     showgrid="true"
+     inkscape:current-layer="svg4">
+    <inkscape:grid
+       type="xygrid"
+       id="grid49" />
+  </sodipodi:namedview>
+  <path
+     id="path2"
+     sodipodi:type="inkscape:offset"
+     inkscape:radius="-0.81220347"
+     inkscape:original="M 6.6621094 4.5859375 A 1.143 1.143 0 0 0 5.8242188 4.9199219 L 5.2929688 5.4511719 C 4.8349687 5.9091719 4.8510781 6.660625 5.3300781 7.140625 L 8.203125 10.011719 L 5.3300781 12.884766 C 4.8510781 13.363766 4.8349688 14.115219 5.2929688 14.574219 L 5.8242188 15.105469 C 6.2822188 15.563469 7.036625 15.547359 7.515625 15.068359 L 11.583984 10.998047 A 1.22 1.22 0 0 0 11.931641 10.011719 A 1.22 1.22 0 0 0 11.583984 9.0273438 L 7.515625 4.9570312 A 1.249 1.249 0 0 0 6.6621094 4.5859375 z "
+     d="m 6.6386719,5.3984375 c -0.088798,-0.00181 -0.1773948,0.032925 -0.2402344,0.095703 l -0.53125,0.53125 C 5.7300188,6.1625593 5.7182537,6.3799747 5.9042969,6.5664062 L 8.7773438,9.4375 a 0.81228469,0.81228469 0 0 1 0,1.148438 L 5.9042969,13.458984 C 5.719186,13.644095 5.7289844,13.861495 5.8671875,14 l 0.53125,0.53125 c 0.135934,0.135934 0.3590378,0.146822 0.5429687,-0.03711 l 4.0664058,-4.06836 0.002,-0.002 c 0.08366,-0.0854 0.125702,-0.209206 0.113281,-0.328125 a 0.81228469,0.81228469 0 0 1 0,-0.1679686 c 0.01222,-0.1187076 -0.0298,-0.2409206 -0.113281,-0.3261719 l -0.002,-0.00195 L 6.9414062,5.53125 A 0.81228469,0.81228469 0 0 1 6.9375,5.5273438 C 6.8598316,5.4486568 6.7511214,5.4020564 6.640625,5.3984375 Z"
+     style="fill:#deddda" />
+</svg>
doc/bluetoothctl-cmd.rst new file +34 -0
new file mode 100644
index 000000000000..3fa9b4c984e7
@@ -0,0 +1,34 @@
+bluetoothctl
+============
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   bluetoothctl
+   bluetoothctl-mgmt
+   bluetoothctl-monitor
+   bluetoothctl-admin
+   bluetoothctl-advertise
+   bluetoothctl-endpoint
+   bluetoothctl-gatt
+   bluetoothctl-player
+   bluetoothctl-scan
+   bluetoothctl-transport
+   bluetoothctl-assistant
+   bluetoothctl-hci
+   bluetoothctl-telephony
+
+* :doc:`bluetoothctl <bluetoothctl>`
+* :doc:`bluetoothctl-mgmt <bluetoothctl-mgmt>`
+* :doc:`bluetoothctl-monitor <bluetoothctl-monitor>`
+* :doc:`bluetoothctl-admin <bluetoothctl-admin>`
+* :doc:`bluetoothctl-advertise <bluetoothctl-advertise>`
+* :doc:`bluetoothctl-endpoint <bluetoothctl-endpoint>`
+* :doc:`bluetoothctl-gatt <bluetoothctl-gatt>`
+* :doc:`bluetoothctl-player <bluetoothctl-player>`
+* :doc:`bluetoothctl-scan <bluetoothctl-scan>`
+* :doc:`bluetoothctl-transport <bluetoothctl-transport>`
+* :doc:`bluetoothctl-assistant <bluetoothctl-assistant>`
+* :doc:`bluetoothctl-hci <bluetoothctl-hci>`
+* :doc:`bluetoothctl-telephony <bluetoothctl-telephony>`
doc/conf.py new file +39 -0
new file mode 100644
index 000000000000..07f87510be6f
@@ -0,0 +1,39 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# For the full list of built-in configuration values, see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Project information -----------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
+
+project = "BlueZ"
+copyright = "2026, BlueZ authors"
+author = "BlueZ authors"
+
+# -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
+html_favicon = "favicon.ico"
+
+extensions = [
+    "sphinxext.opengraph",
+    "sphinx_copybutton",
+]
+
+templates_path = ["_templates"]
+exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
+
+
+# -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
+
+html_theme = "furo"
+# add custom files that are stored in _static
+html_css_files = ["bluez.css"]
+html_static_path = ["_static"]
+
+# -- Options for OpenGraph ---------------------------------------------------
+
+ogp_site_url = "https://bluez.github.io/docs/"
+ogp_image = "_static/card.png"
+
+html_permalinks_icon = "🔗"
doc/copy-subdir.py new file +14 -0
new file mode 100644
index 000000000000..8cb64f54bf9b
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+import shutil
+
+subdir = os.environ["MESON_SUBDIR"]
+
+input_path = os.path.join(os.environ["MESON_SOURCE_ROOT"], subdir, sys.argv[1])
+output_path = os.path.join(os.environ["MESON_BUILD_ROOT"], subdir, sys.argv[2])
+
+os.makedirs(os.path.dirname(output_path), exist_ok=True)
+
+shutil.copyfile(input_path, output_path)
doc/daemons.rst new file +12 -0
new file mode 100644
index 000000000000..7c5f61f74c79
@@ -0,0 +1,12 @@
+Daemons
+=======
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   bluetoothd
+   bluetooth-meshd
+
+* :doc:`bluetoothd <bluetoothd>`
+* :doc:`bluetooth-meshd <bluetooth-meshd>`
doc/dbus-gatt.rst new file +18 -0
new file mode 100644
index 000000000000..fb026e9f9ede
@@ -0,0 +1,18 @@
+D-Bus GATT APIs
+===============
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   org.bluez.GattManager
+   org.bluez.GattProfile
+   org.bluez.GattService
+   org.bluez.GattCharacteristic
+   org.bluez.GattDescriptor
+
+* :doc:`org.bluez.GattManager <org.bluez.GattManager>`
+* :doc:`org.bluez.GattProfile <org.bluez.GattProfile>`
+* :doc:`org.bluez.GattService <org.bluez.GattService>`
+* :doc:`org.bluez.GattCharacteristic <org.bluez.GattCharacteristic>`
+* :doc:`org.bluez.GattDescriptor <org.bluez.GattDescriptor>`
doc/dbus-obex.rst new file +33 -0
new file mode 100644
index 000000000000..b3d0e5c90ada
@@ -0,0 +1,33 @@
+OBEX D-Bus APIs
+===============
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   org.bluez.obex.Agent
+   org.bluez.obex.Image
+   org.bluez.obex.Client
+   org.bluez.obex.Session
+   org.bluez.obex.Transfer
+   org.bluez.obex.ObjectPush
+   org.bluez.obex.FileTransfer
+   org.bluez.obex.Synchronization
+   org.bluez.obex.PhonebookAccess
+   org.bluez.obex.MessageAccess
+   org.bluez.obex.Message
+   org.bluez.obex.AgentManager
+
+* :doc:`org.bluez.obex.Client </org.bluez.obex.Client>`
+* :doc:`org.bluez.obex.Session <org.bluez.obex.Session>`
+* :doc:`org.bluez.obex.Transfer <org.bluez.obex.Transfer>`
+* :doc:`org.bluez.obex.ObjectPush <org.bluez.obex.ObjectPush>`
+* :doc:`org.bluez.obex.FileTransfer <org.bluez.obex.FileTransfer>`
+* :doc:`org.bluez.obex.Synchronization <org.bluez.obex.Synchronization>`
+* :doc:`org.bluez.obex.PhonebookAccess <org.bluez.obex.PhonebookAccess>`
+* :doc:`org.bluez.obex.MessageAccess <org.bluez.obex.MessageAccess>`
+* :doc:`org.bluez.obex.Message <org.bluez.obex.Message>`
+* :doc:`org.bluez.obex.AgentManager <org.bluez.obex.AgentManager>`
+* :doc:`org.bluez.obex.Agent <org.bluez.obex.Agent>`
+* :doc:`org.bluez.obex.Image <org.bluez.obex.Image>`
+
doc/dbus.rst new file +76 -0

76 lines not on this page · raw message

doc/deprecated-tools.rst new file +22 -0
new file mode 100644
index 000000000000..0c86f5265751
@@ -0,0 +1,22 @@
+Deprecated Tools
+================
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   hciattach
+   hciconfig
+   hcitool
+   hcidump
+   rfcomm
+   sdptool
+   ciptool
+
+* :doc:`hciattach <hciattach>`
+* :doc:`hciconfig <hciconfig>`
+* :doc:`hcitool <hcitool>`
+* :doc:`hcidump <hcidump>`
+* :doc:`rfcomm <rfcomm>`
+* :doc:`sdptool <sdptool>`
+* :doc:`ciptool <ciptool>`
doc/dev-maint.rst new file +17 -0
new file mode 100644
index 000000000000..d92e892ba352
@@ -0,0 +1,17 @@
+Development and Maintenance
+===========================
+
+
+.. toctree::
+   :hidden:
+
+   test-runner
+   security-bugs
+   coding-style
+   maintainer-guidelines
+
+* :doc:`Test kernel changes to the Bluetooth subsystem <test-runner>`
+* :doc:`Security bugs handling <security-bugs>`
+* :doc:`Coding style <coding-style>`
+* :doc:`Maintainers guidelines <maintainer-guidelines>`
+
doc/favicon.ico new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..8362b8793b1e0e0da6eeaf299a4f5502c31e6a86
GIT binary patch
doc/index.rst new file +47 -0

47 lines not on this page · raw message

doc/meson.build +120 -0

183 lines not on this page · raw message

doc/protocols.rst new file +20 -0
new file mode 100644
index 000000000000..5e8841b850cf
@@ -0,0 +1,20 @@
+Protocol and Management References
+==================================
+
+.. toctree::
+   :hidden:
+
+   hci-protocol
+   mgmt-protocol
+   l2cap-protocol
+   rfcomm-protocol
+   assigned-numbers
+   sco-protocol
+   iso-protocol
+
+* :doc:`HCI protocol <hci-protocol>`
+* :doc:`MGMT protocol <mgmt-protocol>`
+* :doc:`L2CAP protocol <l2cap-protocol>`
+* :doc:`RFCOMM protocol <rfcomm-protocol>` and :doc:`channel numbers <assigned-numbers>`
+* :doc:`SCO transport <sco-protocol>`: SCO transport
+* :doc:`ISO transport <iso-protocol>`: ISO transport
doc/qualifications.rst new file +76 -0

76 lines not on this page · raw message

doc/tools.rst new file +24 -0
new file mode 100644
index 000000000000..6da8ca58f6fc
@@ -0,0 +1,24 @@
+Tools
+=====
+
+.. toctree::
+   :hidden:
+   :maxdepth: 2
+
+   btmon
+   rctest
+   l2ping
+   btattach
+   isotest
+   btmgmt
+   hid2hci
+   bdaddr
+
+* :doc:`btmon <btmon>`
+* :doc:`rctest <rctest>`
+* :doc:`l2ping <l2ping>`
+* :doc:`btattach <btattach>`
+* :doc:`isotest <isotest>`
+* :doc:`btmgmt <btmgmt>`
+* :doc:`hid2hci <hid2hci>`
+* :doc:`bdaddr <bdaddr>`
meson.build +5 -1
index 6d95cee1cd3c..f09ab409352e 100644
@@ -147,6 +147,10 @@ ell_dep = dependency('ell',
   ]
 )
 
+pymod = import('python')
+sphinx_build = find_program('sphinx-build', native: true, required: get_option('documentation'))
+sphinx_modules = pymod.find_installation(modules: ['sphinxext.opengraph', 'sphinx_copybutton', 'furo'], required: get_option('documentation'))
+
 rst2man = find_program('rst2man', 'rst2man.py', required: get_option('manpages'))
 if rst2man.found()
   rst2man_command = [
@@ -274,7 +278,7 @@ endif
 if get_option('mesh').enabled()
   subdir('mesh')
 endif
-if rst2man.found()
+if get_option('manpages').enabled() or get_option('documentation').enabled()
   subdir('doc')
 endif
 sh = find_program('sh')
meson_options.txt +1 -0
index aad131212886..069763e0fa64 100644
@@ -12,6 +12,7 @@ option('logind', type: 'feature', value: 'enabled', description: 'Enable logind
 option('udev', type: 'feature', value: 'enabled', description: 'Enable udev device support')
 option('datafiles', type: 'feature', value: 'enabled', description: 'Install configuration and data files')
 option('manpages', type: 'feature', value: 'auto', description: 'Enable building of manual pages')
+option('documentation', type: 'feature', value: 'auto', description: 'Enable building of online documentation')
 option('experimental', type: 'feature', value: 'disabled', description: 'Enable experimental tools')
 option('deprecated', type: 'feature', value: 'disabled', description: 'Enable deprecated tools')
 option('external-plugins', type: 'feature', value: 'enabled', description: 'Enable support for external plugins')
Signature · 1 line
2.52.0
#14 lore raw

PATCH v7 14/16 github: Add docs deployment

In reply to Bastien Nocera
---
 .github/workflows/docs.yml | 54 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 .github/workflows/docs.yml
.github/workflows/docs.yml new file +54 -0
new file mode 100644
index 000000000000..07169d0bc5c9
@@ -0,0 +1,54 @@
+name: Deploy Docs
+
+on:
+  push:
+    branches:
+      - master
+  workflow_dispatch:
+
+permissions:
+  contents: read
+  pages: write
+  id-token: write
+
+concurrency:
+  group: pages
+  cancel-in-progress: true
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Set up Python
+        uses: actions/setup-python@v5
+        with:
+          python-version: "3.12"
+
+      - name: Install deps
+        run: |
+          sudo apt-get update
+          sudo apt install -y libglib2.0-dev libdbus-1-dev meson python3-docutils furo python3-sphinx python3-sphinx-copybutton python3-sphinxext-opengraph
+
+      - name: Build site
+        run: |
+          meson setup --prefix /tmp/bluez-install --libdir lib -Dudev=disabled -Dauto_features=disabled -Dtools=disabled -Dclient=disabled -Ddaemon=disabled -Dmonitor=disabled -Ddeprecated=disabled -Dexperimental=disabled -Ddocumentation=enabled -Dlocalstatedir=/var _build
+          meson compile -C _build
+
+      - name: Upload Pages artifact
+        uses: actions/upload-pages-artifact@v3
+        with:
+          path: _build/doc/html/
+
+  deploy:
+    runs-on: ubuntu-latest
+    needs: build
+    environment:
+      name: github-pages
+      url: ${{ steps.deployment.outputs.page_url }}
+    steps:
+      - name: Deploy to GitHub Pages
+        id: deployment
+        uses: actions/deploy-pages@v4
Signature · 1 line
2.52.0
#15 lore raw

PATCH v7 15/16 client: Expand GATT submenu documentation

In reply to Bastien Nocera

From: Paul Otto <[email protected]>

From:
https://github.com/potto216/bluez/blob/master/client/bluetoothctl-gatt.rst

---
 doc/bluetoothctl-gatt.rst | 79 +++++++++++++++++++++++++++------------
 1 file changed, 56 insertions(+), 23 deletions(-)
doc/bluetoothctl-gatt.rst +56 -23
index b2f45d56c7cb..6c72302ae935 100644
@@ -25,147 +25,180 @@ Generic Attribute Commands
 list-attributes
 ---------------
 
-List attributes.
+Lists the attributes of either the local device or a remote device,
+encompassing services, characteristics, and handles. This command provides
+a comprehensive overview of the available Bluetooth attributes, which can
+be further interacted with using other commands.
 
-:Usage: **> list-attributes <attribute/UUID>**
+:Usage: **> list-attributes <attribute/UUID> <dev/local>**
 
 select-attribute
 ----------------
 
-Select attribute.
+Selects a specific attribute on either the local or remote device for
+subsequent operations. Before you can read or write to an attribute, you
+must select it with this command. This establishes a context for many
+other commands (read, write, notify, etc.), specifying the attribute
+they should operate on.
 
-:Usage: **> select-attribute <attribute/UUID>**
+:Usage: **> select-attribute <attribute/UUID/local>**
 
 attribute-info
 --------------
 
-Select attribute.
+Displays detailed information about an attribute. If no attribute or
+UUID is specified, it shows information about the currently selected
+attribute. This command is useful for understanding the properties and
+capabilities of an attribute.
 
 :Usage: **> attribute-info [attribute/UUID]**
 
 read
 ----
 
-Read attribute value.
+Reads the value of an attribute. Requires that an attribute be selected
+beforehand with select-attribute. The optional offset parameter can be
+used for attributes that allow partial reads.
 
 :Usage: **> read [offset]**
 
 write
 -----
 
-Write attribute value.
+Writes a value to an attribute. This command necessitates that an attribute
+be selected in advance using select-attribute. Data must be provided in
+hexadecimal format. Optional offset and type parameters can accommodate
+specific write requirements.
 
 :Usage: **> write <data=xx xx ...> [offset] [type]**
 
 acquire-write
 -------------
 
-Acquire Write file descriptor.
+Acquires a Write file descriptor for a previously selected attribute. This
+is useful for applications that need a file descriptor to perform
+write operations.
 
 :Usage: **> acquire-write**
 
 release-write
 -------------
 
-Release Write file descriptor.
+Releases the Write file descriptor acquired with acquire-write. This
+command is necessary to clean up resources after you're done with the
+write operation.
 
 :Usage: **> release-write**
 
 acquire-notify
 --------------
 
-Acquire Notify file descriptor.
+Acquires a Notify file descriptor for a previously selected attribute.
+This enables applications to listen for notifications on attribute
+value changes.
 
 :Usage: **> acquire-notify**
 
 release-notify
 --------------
 
-Release Notify file descriptor.
+Releases the Notify file descriptor obtained with acquire-notify. Ensures
+resources are freed once notification listening is no longer needed.
 
 :Usage: **> release-notify**
 
 notify
 ------
 
-Notify attribute value.
+Enables or disables notifications for attribute value changes. Before
+this command can be used, the relevant attribute must be selected. This
+command allows applications to be notified of attribute changes without
+polling.
 
 :Usage: **> notify <on/off>**
 
 clone
 -----
 
-Clone a device or attribute.
+Creates a clone of a device or attribute. This can be useful for creating
+a backup or working with a copy for testing purposes.
 
 :Usage: **> clone [dev/attribute/UUID]**
 
 register-application
 --------------------
 
-Register application.
+Registers a new application with the Bluetooth system, allowing for the
+management of services, characteristics, and descriptors under this
+application.
 
 :Usage: **> register-application [UUID ...]**
 
 unregister-application
 ----------------------
 
-Unregister application
+Removes a previously registered application from the Bluetooth system.
 
 :Usage: **> unregister-application**
 
 register-service
 ----------------
 
-Register application service.
+Adds a new service under a registered application. This command is
+crucial for defining new services that devices can offer.
 
 :Usage: **> register-service <UUID> [handle]**
 
 unregister-service
 ------------------
 
-Unregister application service
+Removes a service from a registered application, effectively ceasing
+its availability.
 
 :Usage: **> unregister-service <UUID/object>**
 
 register-includes
 -----------------
 
-Register as Included service.
+Marks a service as included within another service, allowing for
+service hierarchies and complex service structures.
 
 :Usage: **>r egister-includes <UUID> [handle]**
 
 unregister-includes
 -------------------
 
-Unregister Included service.
+Removes an included service relationship, simplifying the service structure.
 
 :Usage: **> unregister-includes <Service-UUID><Inc-UUID>**
 
 register-characteristic
 -----------------------
 
-Register service characteristic.
+Introduces a new characteristic under a service, specifying its properties
+and access permissions with flags.
 
 :Usage: **> register-characteristic <UUID> <Flags=read,write,notify...> [handle]**
 
 unregister-characteristic
 -------------------------
 
-Unregister service characteristic.
+Eliminates a characteristic from a service, removing its functionality.
 
 :Usage: **> unregister-characteristic <UUID/object>**
 
 register-descriptor
 -------------------
 
-Register characteristic descriptor.
+Adds a descriptor to a characteristic, further defining its behavior and
+access controls.
 
 :Usage: **> register-descriptor <UUID> <Flags=read,write...> [handle]**
 
 unregister-descriptor
 ---------------------
 
-Unregister characteristic descriptor.
+Removes a descriptor from a characteristic, simplifying its behavior.
 
 :Usage: **> unregister-descriptor <UUID/object>**
 
Signature · 1 line
2.52.0
#16 lore raw

PATCH v7 16/16 doc: Add introduction to GATT

In reply to Bastien Nocera

From: Paul Otto <[email protected]>

As originally written for the bluetoothctl gatt submenu at:
https://github.com/potto216/bluez/blob/master/client/bluetoothctl-gatt.rst

---
 doc/gatt-intro.rst | 141 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 141 insertions(+)
 create mode 100644 doc/gatt-intro.rst
doc/gatt-intro.rst new file +141 -0
new file mode 100644
index 000000000000..271f9bac08ce
@@ -0,0 +1,141 @@
+=========================================
+Intro to GATT (Generic Attribute Profile)
+=========================================
+
+The Generic Attribute Profile (GATT) defines how two connected Bluetooth
+LE devices can share data using concepts called Services and Characteristics.
+Data is orgnaized into a hierarchical structure of profiles, services, and
+characteristics in the GATT database. The device containing the GATT database
+is known as the server device and the device accessing the GATT database is
+the client device. Only the database's services and characteristics are
+documented here.
+
+BlueZ provides D-Bus interfaces for accessing GATT services and profiles which
+are documented in the :doc:`D-Bus GATT APIs <dbus>` document.
+
+One-off usage and prototyping can also be done using the bluetoothctl
+command-line utility.
+
+UUIDs
+-----
+
+Services and characteristics are differentiated by Universally Unique
+Identifiers (UUIDs). For GATT there are several formats of UUIDs: 128-bit,
+32-bit, and 16-bit.
+
+128-bit UUIDs: Displayed in five groups of 32 hexadecimal digits separated
+by hyphens (e.g., 123e4567-e89b-12d3-a456-426614174000). 128-bit UUIDs allow
+for custom services and characteristics that do not conflict with those of
+other vendors or standard profiles defined by the Bluetooth SIG.
+
+32-bit UUIDs: A subset of the 128-bit UUID, where only 32 bits are used to
+represent the UUID. The UUID values fall within a certain range defined by
+the Bluetooth specification. The 32-bit value is inserted into a base UUID
+(UUUUUUUU-0000-1000-8000-00805F9B34FB) to form a full 128-bit UUID. The
+UUUUUUUU in the base UUID is replaced by the 32-bit value. This format is
+used within the Bluetooth protocol for standardized services and profiles.
+
+16-bit UUIDs: Similar to the 32-bit UUID, but more common. This is also
+used for standardized services, characteristics, and descriptors defined by
+the Bluetooth SIG. The 16-bit value is inserted into a base UUID
+(0000UUUU-0000-1000-8000-00805F9B34FB) to form a full 128-bit UUID.
+
+Services and Characteristics
+----------------------------
+
+Services: Collections of related data that together perform a specific
+function or feature of the device. Each service is identified by a
+UUID and contains Characteristics that define the actual data and behaviors
+of the service.
+
+Characteristics: Pieces of data under a service, representing a specific
+piece of information or a function of the device. Each characteristic can
+have its own unique value, associated properties and access permissions that
+define how it can be interacted with. These properties include read, write,
+notify, indicate, and more. A Characteristic may include one or more
+Descriptors that provide additional metadata or control specific aspects
+of the Characteristic's behavior.
+
+Properties
+----------
+
+Read Property: Allows a connected device to read the value of a characteristic.
+Information meant to be consumed but not altered by the client device, such
+as the device's battery level or sensor readings. Characteristics marked with
+the read property are essentially broadcasting their data to be accessed by
+other devices, ensuring that the information can be consumed without
+being modified.
+
+Write Property: Enables a connected device to change the value of a
+characteristic. An example of when a client device needs to alter data on the
+server device is a Bluetooth controlled light bulb, where the characteristic
+controlling the color or brightness of the light would have the write property,
+allowing external devices to modify these settings.
+
+Read/Write Property: Characteristics can also be configured to support both
+read and write properties simultaneously. This dual capability is useful for
+characteristics that hold information which not only needs to be displayed to
+external devices but also can be updated by them. For example, a Bluetooth
+thermostat may have a characteristic with read/write properties for the target
+temperature, enabling devices to both monitor the current setting and adjust
+it as needed.
+
+Notifications and Indications
+-----------------------------
+
+In addition to read and write properties,
+Bluetooth characteristics can also be configured to notify or indicate to
+connected devices when their value has changed. This is particularly useful
+for dynamic data that changes over time, such as sensor measurements or
+device status updates.
+
+Notifications: When a characteristic's notify property is enabled, it can
+send an update to connected devices whenever its value changes. This allows
+for real-time data streaming without the client having to continuously read
+the characteristic's value. Notifications are unacknowledged, meaning the
+sender does not receive confirmation that the message has been
+received successfully.
+
+Indications: Similar to notifications, indications inform connected devices
+about changes in a characteristic's value. The key difference is that
+indications are acknowledged; the receiver sends back a confirmation to the
+sender upon successfully receiving the update. This ensures reliable delivery
+of important data changes but at the cost of higher power consumption and
+potentially lower throughput due to the additional confirmation step.
+
+Organization of a GATT database The Bluetooth GATT database is a structured
+collection of values that are used to share information between two Bluetooth
+Low Energy (LE) devices. The GATT database is organized as a hierarchical
+structure composed of Services, Characteristics, and Descriptors. The two LE
+devices share the database information through read, writes, and subscription
+to notifications or indications of data values. The two LE devices perform
+this sharing by referencing 16-bit indexes known as "handles" which are
+numerical identifiers for each element in the GATT database. This avoids
+the need to use the UUIDs to reference the elements in the database.
+
+Service: A GATT database service is a collection of related functionalities
+that a device offers. It groups together one or more Characteristics that are
+logically related to perform a specific function or feature of the server
+device. Each service is identified by a UUID and contains Characteristics
+that define the actual data and behaviors of the service.
+
+Characteristic: Each characteristic can have its own unique value, associated
+properties, and access permissions that define how it can be interacted with.
+These properties include read, write, notify, indicate, and more. A
+Characteristic may include one or more Descriptors that provide additional
+metadata or control specific aspects of the Characteristic's behavior.
+
+Descriptors: A descriptor is an optional attribute that describes or controls
+certain aspects of a Characteristic's behavior. They provide additional context
+or metadata about a Characteristic. Some common types of Descriptors include the
+Characteristic User Description (provides human-readable description), the
+Characteristic Presentation Format (defines the format of the Characteristic
+value), and the Client Characteristic Configuration (used to enable or
+disable notifications or indications for a Characteristic).
+
+Handles: Every element in the GATT database (Service, Characteristic,
+Descriptor) is assigned a unique handle. Handles are 16-bit numerical
+identifiers that are used to reference these elements in GATT operations.
+The handles are used to avoid the need to use the UUIDs to reference the
+elements in the database.
+
Signature · 1 line
2.52.0
#17 lore raw
In reply to Bastien Nocera
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 8 lines · On Wed, 28 Jan 2026 23:11:50 +0100 you wrote:

Changes since v6:
Drop:
doc: Port sap-api.txt to RST
doc: Port health-api.txt to RST
doc: Add "C" code-block markers for coding-style doc
tools: Install btmgmt along with other tools

[...]

Here is the summary with links:
- [BlueZ,v7,01/16] build: Add meson wrap for libell
(no matching commit)
- [BlueZ,v7,02/16] build: Add meson build system
(no matching commit)
- [BlueZ,v7,03/16] build: Make more use of 'feature' options (no matching commit)
- [BlueZ,v7,04/16] build: Separate systemd and libsystemd dependencies (no matching commit)
- [BlueZ,v7,05/16] tools: Install gatttool if deprecated tools are enabled (no matching commit)
- [BlueZ,v7,06/16] tools: Install avinfo tool by default
(no matching commit)
- [BlueZ,v7,07/16] emulator: Install the emulator if built
(no matching commit)
- [BlueZ,v7,08/16] build: Add option to allow disabling bluetoothd (no matching commit)
- [BlueZ,v7,09/16] unit: Run test-bap tests concurrently
(no matching commit)
- [BlueZ,v7,10/16] unit: Make gobex-transfer tests run concurrently (no matching commit)
- [BlueZ,v7,11/16] build: Only build profiles if the daemon is built (no matching commit)
- [BlueZ,v7,12/16] build: Only build gdbus library if there is a user (no matching commit)
- [BlueZ,v7,14/16] github: Add docs deployment
(no matching commit)
- [BlueZ,v7,15/16] client: Expand GATT submenu documentation

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=358ab8994207

- [BlueZ,v7,16/16] doc: Add introduction to GATT (no matching commit)

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html