summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-graphical/recipes-graphics/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland')
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch2
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch14
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch35
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend1
-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
-rw-r--r--meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.0.bbappend (renamed from meta-agl-profile-graphical/recipes-graphics/wayland/weston_7.0.0.bbappend)5
9 files changed, 106 insertions, 94 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
index d86e1f22e..0fe2abb35 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch
@@ -73,7 +73,7 @@ index 0000000..7354a7e
+pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED)
+pkg_check_modules(WESTON weston>=5.0.0 REQUIRED)
+pkg_check_modules(PIXMAN pixman-1 REQUIRED)
-+pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-7 REQUIRED)
++pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-8 REQUIRED)
+
+find_package(Threads REQUIRED)
+
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch
index b04127b57..d0dcb45af 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch
@@ -4,16 +4,19 @@ Date: Tue, 18 Apr 2017 13:53:26 +0200
Subject: [PATCH] Change socket mode:add rw for group
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
+[Updated for 1.18.0 to remove fuzz]
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
---
src/wayland-server.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wayland-server.c b/src/wayland-server.c
-index 64d1bec..313c5a0 100644
+index 3f48dfe..fbccb45 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
-@@ -1189,7 +1189,10 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s)
- wl_log("bind() failed with error: %m\n");
+@@ -1528,7 +1528,10 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s)
+ wl_log("bind() failed with error: %s\n", strerror(errno));
return -1;
}
-
@@ -22,8 +25,5 @@ index 64d1bec..313c5a0 100644
+ return -1;
+ }
if (listen(s->fd, 128) < 0) {
- wl_log("listen() failed with error: %m\n");
+ wl_log("listen() failed with error: %s\n", strerror(errno));
return -1;
---
-2.6.6
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch
deleted file mode 100644
index ea9dbd65d..000000000
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 152c9ed968124c253f0be25b76c2a083a21af37e Mon Sep 17 00:00:00 2001
-From: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
-Date: Mon, 26 Aug 2019 17:08:22 +0800
-Subject: [PATCH] server: Fix fake "Address already in use" error
-
-In the current workflow, socket file will be deleted if it already exists.
-However, if the socket file is a symbolic link and the file that it refers
-to doesn't exist, we will got "Address already in use" because bind()
-thinks the socket file exists and won't create it.
-
-Now, use lstat() to determine whether the socket file exists.
-
-Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/35]
-
-Signed-off-by: Liu Wenlong <liuwl.fnst@cn.fujitsu.com>
----
- src/wayland-server.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/wayland-server.c b/src/wayland-server.c
-index 83b984f..3bc6ed7 100644
---- a/src/wayland-server.c
-+++ b/src/wayland-server.c
-@@ -1393,7 +1393,7 @@ wl_socket_lock(struct wl_socket *socket)
- goto err_fd;
- }
-
-- if (stat(socket->addr.sun_path, &socket_stat) < 0 ) {
-+ if (lstat(socket->addr.sun_path, &socket_stat) < 0 ) {
- if (errno != ENOENT) {
- wl_log("did not manage to stat file %s\n",
- socket->addr.sun_path);
---
-2.7.4
-
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
index 5677ed52d..9d1822697 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend
@@ -2,5 +2,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = "\
file://0001-Change-socket-mode-add-rw-for-group.patch \
- file://0002-server-Fix-fake-Address-already-in-use-error.patch \
"
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;
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_7.0.0.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.0.bbappend
index 67ce0ba5e..03626abe8 100644
--- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_7.0.0.bbappend
+++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.0.bbappend
@@ -8,8 +8,9 @@ SRC_URI_append = "\
file://0001-Allow-regular-users-to-launch-Weston_7.0.0.patch \
file://use-XDG_RUNTIMESHARE_DIR.patch \
file://0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch \
- file://0001-config-parser-Export-get_full_path-and-destroy.patch \
file://0001-libweston-Expose-weston_output_damage-in-libweston.patch \
+ file://0004-unconditionally-include-mman.h.patch \
+ file://0005-add-memfd-create-option.patch \
"
-EXTRA_OEMESON_append = " -Denable-user-start=true"
+EXTRA_OEMESON_append = " -Denable-user-start=true -Dmemfd-create=false"