summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-graphical/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-10-13 14:47:13 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-12-18 10:54:16 +0100
commitb422f52e6afcce6bd0bdaa3c04dc2dee72d51b2e (patch)
treeadc62a40f9e8fa0a9b5f449ddb2f64e997ac97a9 /meta-agl-profile-graphical/recipes-graphics/wayland/weston
parentd9d7eb20d17acde2f4e3826736ad45fa6d441837 (diff)
weston: Create really shared files
Last time it was discussed, this patch was not upstreamable. But it is needed for a reason that still have to be investigated. Nevertheless the patch is enough simple to be maintained while waiting for the full investigation/resolution. Change-Id: I47b17c7aa9ca5c495267259a15caacef50b4b324 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/weston')
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch
new file mode 100644
index 000000000..91c2239cb
--- /dev/null
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch
@@ -0,0 +1,52 @@
+From 0ed62e1a0beb47e033f7632dbf6d2087366b7830 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh>
+Date: Fri, 13 Oct 2017 14:05:56 +0200
+Subject: [PATCH] use XDG_RUNTIMESHARE_DIR
+
+When running with LSM Smack, the file returned by the
+function 'os_create_anonymous_file' is tagged with the
+security label of weston. That security label genrally doesn't
+allow sharing of files? Then passing the vreated file descriptor
+to the client application fails with EPERM.
+
+To allow file descriptors to be tagged with a security
+label that allows clients to receive and use it, that
+patch introduce the use of the environment variable
+XDG_RUNTIMESHARE_DIR that takes precedence over
+XDG_RUNTIME_DIR whe, creating anonymous file is needed.
+
+A correct setting of the shared directory using Smack's
+transmute mechanism allows set up file tag for sharing.
+
+This patch was submitted upstream for discussion but
+was rejected with the following reason (IIRC): "the
+function 'os_create_anonymous_file' and the sharing
+are obsolete and should not be used anymore. IVI was
+requiring it but newer version don't use it". Halas,
+even aligned with latest versions of IVI-shell and weston,
+the patch is needed. Because of its simplicity, it can
+remain maintained locally out of mainstream in the wait
+of further investigations.
+
+Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+---
+ shared/os-compatibility.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
+index e19fb61b..7e93e818 100644
+--- a/shared/os-compatibility.c
++++ b/shared/os-compatibility.c
+@@ -157,6 +157,8 @@ os_create_anonymous_file(off_t size)
+ int fd;
+ int ret;
+
+- path = getenv("XDG_RUNTIME_DIR");
++ path = getenv("XDG_RUNTIMESHARE_DIR");
++ if (!path)
++ path = getenv("XDG_RUNTIME_DIR");
+ if (!path) {
+ errno = ENOENT;
+--
+2.13.6
+
ackground-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
require conf/include/agl_rcar-nogfx.inc
SOC_FAMILY = "r8a7795"
BOARD_NAME = "h3ulcb"

DTB_SUFFIX = "r8a77951-ulcb"

# Mask graphic Pkgs
BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm"
# Mask MMP recipes
BBMASK += "kernel-module-uvcs-drv|omx-user-module"

# Work around use of obsolete Weston backend-fbdev in meta-rcar-gen3
# when building without the proprietary driver stack.  Masking out the
# weston_%.bbappend seems the simplest approach for now, as forcing
# USE_GLES = "1" to disable the adding of -Dbackend-default="fbdev" to
# EXTRA_OEMESON triggers adding "libgbm" to DEPENDS, which breaks due
# to that being a component specific to the proprietary stack we are
# explicitly disabling.  If the "libgbm" usage in the bbappend was
# instead "virtual/libgbm" as is now used in poky, it might be possible
# to just tweak PREFERRED_PROVIDER_virtual/libgbm = "mesa".
BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend"

# do use software rendering to display the compositor
# used for images w/o binary-only driver
WESTON_USE_PIXMAN = "1"