summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-graphical/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/weston')
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch36
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch33
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-add-memfd-create-option.patch48
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch26
4 files changed, 95 insertions, 48 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch
deleted file mode 100644
index 9dbd7a749..000000000
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-config-parser-Export-get_full_path-and-destroy.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 40ff644ac4da90c5cf5239c6ee6051d9bb2b099a Mon Sep 17 00:00:00 2001
-From: Daniel Stone <daniels@collabora.com>
-Date: Mon, 25 Nov 2019 10:30:11 +0000
-Subject: [PATCH] config-parser: Export get_full_path and destroy
-
-Make sure we export the get_full_path() accessor (declared in the
-header, used by Weston itself) and the parser's destroy function.
-
-Signed-off-by: Daniel Stone <daniels@collabora.com>
----
- shared/config-parser.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/shared/config-parser.c b/shared/config-parser.c
-index 35f09f006..94eb24cc1 100644
---- a/shared/config-parser.c
-+++ b/shared/config-parser.c
-@@ -470,6 +470,7 @@ weston_config_parse(const char *name)
- return config;
- }
-
-+WL_EXPORT
- const char *
- weston_config_get_full_path(struct weston_config *config)
- {
-@@ -500,6 +501,7 @@ weston_config_next_section(struct weston_config *config,
- return 1;
- }
-
-+WL_EXPORT
- void
- weston_config_destroy(struct weston_config *config)
- {
---
-2.21.0
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch
new file mode 100644
index 000000000..278087156
--- /dev/null
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch
@@ -0,0 +1,33 @@
+commit 7b36f171d09354a2d3a48db0ae2d34d66aa4f1ae
+Author: James Hilliard <james.hilliard1@gmail.com>
+Date: Sat Feb 1 20:02:29 2020 -0700
+
+ unconditionally include sys/mman.h in os-compatibility.c
+
+ Fixes:
+ ../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’?
+ map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0);
+ ^~~~~~~~~
+ LOCK_READ
+
+ Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+
+Upstream-Status: Backport
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
+index 5e1ce479..041c929f 100644
+--- a/shared/os-compatibility.c
++++ b/shared/os-compatibility.c
+@@ -34,10 +34,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <libweston/zalloc.h>
+-
+-#ifdef HAVE_MEMFD_CREATE
+ #include <sys/mman.h>
+-#endif
+
+ #include "os-compatibility.h"
+
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-add-memfd-create-option.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-add-memfd-create-option.patch
new file mode 100644
index 000000000..f4ea60130
--- /dev/null
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-add-memfd-create-option.patch
@@ -0,0 +1,48 @@
+Add memfd-create option
+
+Add a meson build option, memfd-create, that controls whether the
+memfd_create system call support will be enabled. The default value
+is true so that it will be enabled, but it allows users like AGL
+that currently has issues with security labels and memfd to disable
+it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/meson.build b/meson.build
+index 82107e1..9d042ca 100644
+--- a/meson.build
++++ b/meson.build
+@@ -78,8 +78,12 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
+ endif
+
+ optional_libc_funcs = [
+- 'mkostemp', 'strchrnul', 'initgroups', 'posix_fallocate', 'memfd_create'
++ 'mkostemp', 'strchrnul', 'initgroups', 'posix_fallocate'
+ ]
++if get_option('memfd-create')
++ optional_libc_funcs += [ 'memfd_create' ]
++endif
++
+ foreach func : optional_libc_funcs
+ if cc.has_function(func)
+ config_h.set('HAVE_' + func.to_upper(), 1)
+diff --git a/meson_options.txt b/meson_options.txt
+index 80a2ad7..4a93472 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -99,6 +99,13 @@ option(
+ description: 'systemd service plugin: state notify, watchdog, socket activation'
+ )
+
++option(
++ 'memfd-create',
++ type: 'boolean',
++ value: true,
++ description: 'Use memfd_create system call'
++)
++
+ option(
+ 'remoting',
+ type: 'boolean',
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
index 2f3b0108a..0e5d7cdf9 100644
--- 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
@@ -29,19 +29,21 @@ remain maintained locally out of mainstream in the wait
of further investigations.
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
+[Updated for Weston 8.0.0]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c
-index e19fb61b..826e48b8 100644
+index 5e1ce47..9962588 100644
--- a/shared/os-compatibility.c
+++ b/shared/os-compatibility.c
-@@ -157,7 +157,9 @@ 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;
- return -1;
+@@ -184,7 +184,9 @@ os_create_anonymous_file(off_t size)
+ } else
+ #endif
+ {
+- path = getenv("XDG_RUNTIME_DIR");
++ path = getenv("XDG_RUNTIMESHARE_DIR");
++ if (!path)
++ path = getenv("XDG_RUNTIME_DIR");
+ if (!path) {
+ errno = ENOENT;
+ return -1;