weston: Set XDG_RUNTIME_DIR for fsl-arm 29/7129/4
authorDennis Field <dennisf@radiosound.com>
Wed, 9 Nov 2016 20:55:05 +0000 (15:55 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 11 Nov 2016 13:44:17 +0000 (13:44 +0000)
Without this environment variable, Weston fails to start on Wandboard

Bug-AGL: SPEC-318

Change-Id: I42696f45d9a9b78dfeea905d3c5066845056894e
Signed-off-by: Dennis Field <dennisf@radiosound.com>
meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston/weston.sh [new file with mode: 0644]
meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston_%.bbappend [new file with mode: 0644]

diff --git a/meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston/weston.sh b/meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston/weston.sh
new file mode 100644 (file)
index 0000000..225a034
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if test -z "$XDG_RUNTIME_DIR"; then
+    export XDG_RUNTIME_DIR=/run/user/$UID
+    mkdir --parents $XDG_RUNTIME_DIR
+    chmod 0700 $XDG_RUNTIME_DIR
+fi
diff --git a/meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston_%.bbappend b/meta-agl-bsp/meta-fsl-arm/recipes-graphics/weston/weston_%.bbappend
new file mode 100644 (file)
index 0000000..bdb6e44
--- /dev/null
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+SRC_URI_append = "\
+    file://weston.sh \
+    "
+
+do_install_append() {
+    install -d ${D}/${sysconfdir}/profile.d
+    install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh
+}
+FILES_${PN} += " \
+    ${sysconfdir}/profile.d/weston.sh \
+    "