diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-14 17:10:00 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-14 21:58:10 +0100 |
| commit | 155295c1092c5dd170ea2a6be28b6f2f9d7d49ac (patch) | |
| tree | 18125ab19443a07c20f36b98a74178d7a5ca8bd6 | |
| parent | 3a694070f776a9fca0974b50fd6210313b30b9ee (diff) | |
| download | poky-155295c1092c5dd170ea2a6be28b6f2f9d7d49ac.tar.gz | |
bluez5: Add fix for startup issues under systemd
The systemd bluetooth service failed to start. Add a workaround for this whilst the
final fix is discussed upstream, https://github.com/bluez/bluez/issues/329.
(From OE-Core rev: 3e85ce436699a2b5b7751f671e4a6eabb4ca5404)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5/fix_service.patch | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index 79d4645ca8..22dd07b348 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc | |||
| @@ -53,6 +53,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ | |||
| 53 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ | 53 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ |
| 54 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ | 54 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ |
| 55 | file://0001-test-gatt-Fix-hung-issue.patch \ | 55 | file://0001-test-gatt-Fix-hung-issue.patch \ |
| 56 | file://fix_service.patch \ | ||
| 56 | " | 57 | " |
| 57 | S = "${WORKDIR}/bluez-${PV}" | 58 | S = "${WORKDIR}/bluez-${PV}" |
| 58 | 59 | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/fix_service.patch b/meta/recipes-connectivity/bluez5/bluez5/fix_service.patch new file mode 100644 index 0000000000..96fdf6b299 --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/fix_service.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | The systemd bluetooth service failed to start because the /var/lib/bluetooth | ||
| 2 | path of ReadWritePaths= is created by the bluetooth daemon itself. | ||
| 3 | |||
| 4 | The commit systemd: Add more filesystem lockdown (442d211) add ReadWritePaths=/etc/bluetooth | ||
| 5 | and ReadOnlyPaths=/var/lib/bluetooth options to the bluetooth systemd service. | ||
| 6 | The existing ProtectSystem=full option mounts the /usr, the boot loader | ||
| 7 | directories and /etc read-only. This means the two option are useless and could be removed. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/bluez/bluez/issues/329] | ||
| 10 | |||
| 11 | Index: bluez-5.64/src/bluetooth.service.in | ||
| 12 | =================================================================== | ||
| 13 | --- bluez-5.64.orig/src/bluetooth.service.in | ||
| 14 | +++ bluez-5.64/src/bluetooth.service.in | ||
| 15 | @@ -15,12 +15,12 @@ LimitNPROC=1 | ||
| 16 | |||
| 17 | # Filesystem lockdown | ||
| 18 | ProtectHome=true | ||
| 19 | -ProtectSystem=full | ||
| 20 | +ProtectSystem=strict | ||
| 21 | PrivateTmp=true | ||
| 22 | ProtectKernelTunables=true | ||
| 23 | ProtectControlGroups=true | ||
| 24 | -ReadWritePaths=@statedir@ | ||
| 25 | -ReadOnlyPaths=@confdir@ | ||
| 26 | +ConfigurationDirectory=bluetooth | ||
| 27 | +StateDirectory=bluetooth | ||
| 28 | |||
| 29 | # Execute Mappings | ||
| 30 | MemoryDenyWriteExecute=true | ||
