bluez5: change obexd --root path to avoid SMACK issues 24/24124/2
authorMatt Ranostay <matt.ranostay@konsulko.com>
Tue, 25 Feb 2020 06:45:09 +0000 (08:45 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 27 Feb 2020 22:19:00 +0000 (22:19 +0000)
On startup obexd attempts to read from %HOMEDIR%/.cache/obexd or
create the respective directory. Which is really not needed but causes
failure to start with SMACK failures, and so workaround this by
setting the parameter --root=/var/volatile/tmp

Bug-AGL: SPEC-3206
Change-Id: I8b39a91d8d095d94b903a6607f6960f38ed08b5d
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/obex.service [new file with mode: 0644]
meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend

diff --git a/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/obex.service b/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/obex.service
new file mode 100644 (file)
index 0000000..87ffff6
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Bluetooth OBEX service
+
+[Service]
+Type=dbus
+BusName=org.bluez.obex
+ExecStart=/usr/libexec/bluetooth/obexd --root=/var/volatile/tmp
+
+[Install]
+Alias=dbus-org.bluez.obex.service
index 36fb315..9ee1db2 100644 (file)
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
 SRC_URI_append = " \
     file://bluetooth.conf \
     file://tmpdir.conf \
+    file://obex.service \
     file://0001-obex-report-notification-status-on-incoming-message.patch \
 "
 
@@ -12,6 +13,8 @@ do_install_append() {
 
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
         mkdir -p ${D}${systemd_user_unitdir}/obex.service.d
+
+        install -m 0644 ${WORKDIR}/obex.service ${D}${systemd_user_unitdir}
         install -m 0644 ${WORKDIR}/tmpdir.conf ${D}${systemd_user_unitdir}/obex.service.d/tmpdir.conf
         mkdir -p ${D}/etc/systemd/user
         ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service