check XDG_RUNTIME_DIR differences
Description
Environment
None
relates to
Activity
Show:
Walt Miner May 24, 2017 at 8:56 PM
Walt Miner
May 24, 2017 at 8:56 PM
Close for Dab RC1
Stephane Desneux April 21, 2017 at 10:53 PM(edited)
Stephane Desneux
April 21, 2017 at 10:53 PM
(edited)
Fixed at least partially (see log below).
Note that we still have one application which hardcodes /run/user/0 (meta-agl-demo/recipes-demo-hmi/navigation/mapviewer/mapviewer.service:Environment=NAVI_DATA_DIR=/var/mapdata/navi_data_UK/japan_TR9 XDG_RUNTIME_DIR=/run/user/0).
This is bad because when we'll switch to real users, nothing will work.
$ cd /xdt/meta
$ grep -sr XDG_RUNTIME_DIR
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start:if test -z "$XDG_RUNTIME_DIR"; then
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start: export XDG_RUNTIME_DIR=/run/user/`id -u`
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start: if ! test -d "$XDG_RUNTIME_DIR"; then
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start: mkdir --parents $XDG_RUNTIME_DIR
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start: chmod 0700 $XDG_RUNTIME_DIR
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/wayland_fp_morty/weston-init/weston-start:if test -z "$XDG_RUNTIME_DIR"; then
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/wayland_fp_morty/weston-init/weston-start: export XDG_RUNTIME_DIR=/run/user/`id -u`
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/wayland_fp_morty/weston-init/weston-start: if ! test -d "$XDG_RUNTIME_DIR"; then
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/wayland_fp_morty/weston-init/weston-start: mkdir --parents $XDG_RUNTIME_DIR
meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/wayland_fp_morty/weston-init/weston-start: chmod 0700 $XDG_RUNTIME_DIR
poky/documentation/ref-manual/technical-details.xml: <filename>XDG_RUNTIME_DIR</filename>:
poky/documentation/ref-manual/technical-details.xml: export XDG_RUNTIME_DIR=/tmp/$USER-weston
poky/meta/recipes-graphics/wayland/weston-init/weston-start:if test -z "$XDG_RUNTIME_DIR"; then
poky/meta/recipes-graphics/wayland/weston-init/weston-start: export XDG_RUNTIME_DIR=/run/user/`id -u`
poky/meta/recipes-graphics/wayland/weston-init/weston-start: if ! test -d "$XDG_RUNTIME_DIR"; then
poky/meta/recipes-graphics/wayland/weston-init/weston-start: mkdir --parents $XDG_RUNTIME_DIR
poky/meta/recipes-graphics/wayland/weston-init/weston-start: chmod 0700 $XDG_RUNTIME_DIR
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh:# Wayland needs XDG_RUNTIME_DIR, so set it to /tmp. This isn't compliant with
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh:if [ -z "$XDG_RUNTIME_DIR" ]; then
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh: XDG_RUNTIME_DIR="/tmp"
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh: export XDG_RUNTIME_DIR
meta-iot-agl/meta-app-framework/recipes-example/afb-radio/files/afb-radio:if [ -z "${XDG_RUNTIME_DIR+1}" ]; then
meta-iot-agl/meta-app-framework/recipes-example/afb-radio/files/afb-radio: export XDG_RUNTIME_DIR=/run/user/$UID
meta-agl-demo/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh:if test -z "$XDG_RUNTIME_DIR"; then
meta-agl-demo/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh: export XDG_RUNTIME_DIR=/run/user/$UID
meta-agl-demo/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh: mkdir --parents $XDG_RUNTIME_DIR
meta-agl-demo/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh: chmod 0700 $XDG_RUNTIME_DIR
meta-agl-demo/recipes-demo-hmi/navigation/mapviewer/mapviewer.service:Environment=NAVI_DATA_DIR=/var/mapdata/navi_data_UK/japan_TR9 XDG_RUNTIME_DIR=/run/user/0
meta-agl/meta-app-framework/recipes-example/afb-client/files/afb-client:if [ -z "${XDG_RUNTIME_DIR+1}" ]; then
meta-agl/meta-app-framework/recipes-example/afb-client/files/afb-client: export XDG_RUNTIME_DIR=/run/user/$UID
meta-agl/meta-app-framework/recipes-example/afm-client/files/afm-client:if [ -z "${XDG_RUNTIME_DIR+1}" ]; then
meta-agl/meta-app-framework/recipes-example/afm-client/files/afm-client: export XDG_RUNTIME_DIR=/run/user/$UID
Walt Miner April 21, 2017 at 8:43 PM
Walt Miner
April 21, 2017 at 8:43 PM
If gerrit 9103 fixes the issue then please resolve this JIRA issue.
Stephane Desneux April 18, 2017 at 2:29 PM
Stephane Desneux
April 18, 2017 at 2:29 PM
Solved by https://gerrit.automotivelinux.org/gerrit/9103 which removes ugly fixes in weston.sh.
Walt Miner January 13, 2017 at 5:24 PM
Walt Miner
January 13, 2017 at 5:24 PM
Still an open issue or can it be closed?
We need to double-check how/where XDG_RUNTIME_DIR is set.
There are at least 2 right now: /run/user/0 vs. /run/user/root
agl-master/build$ repo grep XDG_RUNTIME_DIR | cat
meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh:if test -z "$XDG_RUNTIME_DIR"; then
meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh: export XDG_RUNTIME_DIR=/var/run/user/root
meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh: mkdir --parents $XDG_RUNTIME_DIR
meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh: chmod 0700 $XDG_RUNTIME_DIR
meta-agl-extra/meta-app-framework/recipes-example/afb-client/files/afb-client:if [ -z "${XDG_RUNTIME_DIR+1}" ]; then
meta-agl-extra/meta-app-framework/recipes-example/afb-client/files/afb-client: export XDG_RUNTIME_DIR=/run/user/$UID
meta-agl-extra/meta-app-framework/recipes-example/afm-client/files/afm-client:if [ -z "${XDG_RUNTIME_DIR+1}" ]; then
meta-agl-extra/meta-app-framework/recipes-example/afm-client/files/afm-client: export XDG_RUNTIME_DIR=/run/user/$UID
poky/documentation/ref-manual/technical-details.xml: <filename>XDG_RUNTIME_DIR</filename>:
poky/documentation/ref-manual/technical-details.xml: export XDG_RUNTIME_DIR=/tmp/$USER-weston
poky/meta/recipes-graphics/wayland/weston-init/init: if test -z "$XDG_RUNTIME_DIR"; then
poky/meta/recipes-graphics/wayland/weston-init/init: export XDG_RUNTIME_DIR=/run/user/root
poky/meta/recipes-graphics/wayland/weston-init/init: mkdir --parents $XDG_RUNTIME_DIR
poky/meta/recipes-graphics/wayland/weston-init/init: chmod 0700 $XDG_RUNTIME_DIR
poky/meta/recipes-graphics/wayland/weston-init/weston.service:Environment="XDG_RUNTIME_DIR=/run/user/root"
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh:# Wayland needs XDG_RUNTIME_DIR, so set it to /tmp. This isn't compliant with
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh: XDG_RUNTIME_DIR="/tmp"
poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh: export XDG_RUNTIME_DIR