diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/weston.py | 6 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init/init | 2 | ||||
-rwxr-xr-x | meta/recipes-graphics/wayland/weston-init/weston-start | 30 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch | 50 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch | 32 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 47 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch | 199 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch | 13 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston_10.0.0.bb (renamed from meta/recipes-graphics/wayland/weston_9.0.0.bb) | 27 |
9 files changed, 29 insertions, 377 deletions
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py index b3a7c2776d..b81cc299ef 100644 --- a/meta/lib/oeqa/runtime/cases/weston.py +++ b/meta/lib/oeqa/runtime/cases/weston.py | |||
@@ -10,7 +10,7 @@ import threading | |||
10 | import time | 10 | import time |
11 | 11 | ||
12 | class WestonTest(OERuntimeTestCase): | 12 | class WestonTest(OERuntimeTestCase): |
13 | weston_log_file = '/tmp/weston.log' | 13 | weston_log_file = '/tmp/weston-2.log' |
14 | 14 | ||
15 | @classmethod | 15 | @classmethod |
16 | def tearDownClass(cls): | 16 | def tearDownClass(cls): |
@@ -31,13 +31,13 @@ class WestonTest(OERuntimeTestCase): | |||
31 | return output.split(" ") | 31 | return output.split(" ") |
32 | 32 | ||
33 | def get_weston_command(self, cmd): | 33 | def get_weston_command(self, cmd): |
34 | return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd | 34 | return 'export XDG_RUNTIME_DIR=/run/user/`id -u weston`; export WAYLAND_DISPLAY=wayland-1; %s' % cmd |
35 | 35 | ||
36 | def run_weston_init(self): | 36 | def run_weston_init(self): |
37 | if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: | 37 | if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: |
38 | self.target.run('systemd-run --collect --unit=weston-ptest.service --uid=0 -p PAMName=login -p TTYPath=/dev/tty6 -E XDG_RUNTIME_DIR=/tmp -E WAYLAND_DISPLAY=wayland-0 /usr/bin/weston --socket=wayland-1 --log=%s' % self.weston_log_file) | 38 | self.target.run('systemd-run --collect --unit=weston-ptest.service --uid=0 -p PAMName=login -p TTYPath=/dev/tty6 -E XDG_RUNTIME_DIR=/tmp -E WAYLAND_DISPLAY=wayland-0 /usr/bin/weston --socket=wayland-1 --log=%s' % self.weston_log_file) |
39 | else: | 39 | else: |
40 | self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-1 --log=%s' % self.weston_log_file)) | 40 | self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-2 --log=%s' % self.weston_log_file)) |
41 | 41 | ||
42 | def get_new_wayland_processes(self, existing_wl_processes): | 42 | def get_new_wayland_processes(self, existing_wl_processes): |
43 | try_cnt = 0 | 43 | try_cnt = 0 |
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init index a849f29bcb..d3b0d1873e 100644 --- a/meta/recipes-graphics/wayland/weston-init/init +++ b/meta/recipes-graphics/wayland/weston-init/init | |||
@@ -32,7 +32,7 @@ case "$1" in | |||
32 | . /etc/profile | 32 | . /etc/profile |
33 | export HOME=ROOTHOME | 33 | export HOME=ROOTHOME |
34 | 34 | ||
35 | weston-start -- $OPTARGS | 35 | WESTON_USER=weston weston-start $OPTARGS & |
36 | ;; | 36 | ;; |
37 | 37 | ||
38 | stop) | 38 | stop) |
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index 0f1bc4c29d..01670cd4f5 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start | |||
@@ -6,7 +6,7 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin" | |||
6 | 6 | ||
7 | usage() { | 7 | usage() { |
8 | cat <<EOF | 8 | cat <<EOF |
9 | $0 [<openvt arguments>] [-- <weston options>] | 9 | $0 [<weston options>] |
10 | EOF | 10 | EOF |
11 | } | 11 | } |
12 | 12 | ||
@@ -18,11 +18,6 @@ add_weston_argument() { | |||
18 | weston_args="$weston_args $1" | 18 | weston_args="$weston_args $1" |
19 | } | 19 | } |
20 | 20 | ||
21 | # Add openvt extra argument | ||
22 | add_openvt_argument() { | ||
23 | openvt_args="$openvt_args $1" | ||
24 | |||
25 | } | ||
26 | ## Add module to --modules argument | 21 | ## Add module to --modules argument |
27 | add_weston_module() { | 22 | add_weston_module() { |
28 | if [[ "x${weston_modules}" == "x" ]]; then | 23 | if [[ "x${weston_modules}" == "x" ]]; then |
@@ -37,33 +32,12 @@ if [ -n "$WAYLAND_DISPLAY" ]; then | |||
37 | fi | 32 | fi |
38 | 33 | ||
39 | if [ -n "$WESTON_USER" ]; then | 34 | if [ -n "$WESTON_USER" ]; then |
40 | if [ -z "$WESTON_TTY" ]; then | ||
41 | echo "ERROR: If you have WESTON_USER variable set, you also need WESTON_TTY." | ||
42 | exit 1 | ||
43 | fi | ||
44 | if [ -z "$WESTON_GROUP" ]; then | 35 | if [ -z "$WESTON_GROUP" ]; then |
45 | # no explicit WESTON_GROUP given, therefore use WESTON_USER | 36 | # no explicit WESTON_GROUP given, therefore use WESTON_USER |
46 | export WESTON_GROUP="${WESTON_USER}" | 37 | export WESTON_GROUP="${WESTON_USER}" |
47 | fi | 38 | fi |
48 | weston_args_user="-u $WESTON_USER -t $WESTON_TTY" | ||
49 | fi | 39 | fi |
50 | 40 | ||
51 | if [ -n "$DISPLAY" ]; then | ||
52 | launcher="weston" | ||
53 | else | ||
54 | launcher="weston-launch $weston_args_user --" | ||
55 | fi | ||
56 | |||
57 | openvt_args="-s" | ||
58 | while [ -n "$1" ]; do | ||
59 | if [ "$1" = "--" ]; then | ||
60 | shift | ||
61 | break | ||
62 | fi | ||
63 | openvt_args="$openvt_args $1" | ||
64 | shift | ||
65 | done | ||
66 | |||
67 | weston_args=$* | 41 | weston_args=$* |
68 | 42 | ||
69 | # Load and run modules | 43 | # Load and run modules |
@@ -94,4 +68,4 @@ if test -z "$XDG_RUNTIME_DIR"; then | |||
94 | fi | 68 | fi |
95 | fi | 69 | fi |
96 | 70 | ||
97 | exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log | 71 | su -c "XDG_RUNTIME_DIR=/run/user/`id -u ${WESTON_USER}` weston $weston_args --log=/tmp/weston.log" $WESTON_USER |
diff --git a/meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch deleted file mode 100644 index f8f7589499..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Thu, 1 Apr 2021 00:12:00 +0300 | ||
4 | Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down | ||
5 | |||
6 | Tearing down the drm-backend when there are no input devices, would call | ||
7 | for the gbm device destruction before compositor shutdown. The latter | ||
8 | would call into the renderer detroy function and assume that the | ||
9 | EGLDisplay, which was created using the before-mentioned gbm device, is | ||
10 | still available. This patch re-orders the gbm destruction after the | ||
11 | compositor shutdown when no one would make use of it. | ||
12 | |||
13 | Fixes: #314 | ||
14 | |||
15 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
16 | Suggested-by: Daniel Stone <daniel.stone@collabora.com> | ||
17 | |||
18 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] | ||
19 | --- | ||
20 | libweston/backend-drm/drm.c | 8 ++++---- | ||
21 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c | ||
24 | index 2780f3b..fbcfeca 100644 | ||
25 | --- a/libweston/backend-drm/drm.c | ||
26 | +++ b/libweston/backend-drm/drm.c | ||
27 | @@ -3025,10 +3025,6 @@ err_drm_source: | ||
28 | err_udev_input: | ||
29 | udev_input_destroy(&b->input); | ||
30 | err_sprite: | ||
31 | -#ifdef BUILD_DRM_GBM | ||
32 | - if (b->gbm) | ||
33 | - gbm_device_destroy(b->gbm); | ||
34 | -#endif | ||
35 | destroy_sprites(b); | ||
36 | err_udev_dev: | ||
37 | udev_device_unref(drm_device); | ||
38 | @@ -3038,6 +3034,10 @@ err_launcher: | ||
39 | weston_launcher_destroy(compositor->launcher); | ||
40 | err_compositor: | ||
41 | weston_compositor_shutdown(compositor); | ||
42 | +#ifdef BUILD_DRM_GBM | ||
43 | + if (b->gbm) | ||
44 | + gbm_device_destroy(b->gbm); | ||
45 | +#endif | ||
46 | free(b); | ||
47 | return NULL; | ||
48 | } | ||
49 | -- | ||
50 | 2.33.0 | ||
diff --git a/meta/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/meta/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch deleted file mode 100644 index 06e0f7baec..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 20 Apr 2021 20:42:18 -0700 | ||
4 | Subject: [PATCH] meson.build: fix incorrect header | ||
5 | |||
6 | The wayland.c actually include 'xdg-shell-client-protocol.h' instead of | ||
7 | the server one, so fix it. Otherwise, it's possible to get build failure | ||
8 | due to race condition. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | libweston/backend-wayland/meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build | ||
18 | index 7e82513..29270b5 100644 | ||
19 | --- a/libweston/backend-wayland/meson.build | ||
20 | +++ b/libweston/backend-wayland/meson.build | ||
21 | @@ -10,7 +10,7 @@ srcs_wlwl = [ | ||
22 | fullscreen_shell_unstable_v1_protocol_c, | ||
23 | presentation_time_protocol_c, | ||
24 | presentation_time_server_protocol_h, | ||
25 | - xdg_shell_server_protocol_h, | ||
26 | + xdg_shell_client_protocol_h, | ||
27 | xdg_shell_protocol_c, | ||
28 | ] | ||
29 | |||
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
diff --git a/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch deleted file mode 100644 index 6fe86ff3f0..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Tue, 8 Sep 2020 19:37:42 -0400 | ||
4 | Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and | ||
5 | O_CREAT | ||
6 | |||
7 | musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), | ||
8 | O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: | ||
9 | |||
10 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': | ||
11 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] | ||
12 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
13 | | | ^~~~ | ||
14 | | | popen | ||
15 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) | ||
16 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
17 | | | ^~~~~~ | ||
18 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in | ||
19 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) | ||
20 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
21 | | | ^~~~~~~~~ | ||
22 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) | ||
23 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
24 | | | ^~~~~~~ | ||
25 | |||
26 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] | ||
27 | |||
28 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
29 | --- | ||
30 | tests/weston-test-fixture-compositor.c | 1 + | ||
31 | 1 file changed, 1 insertion(+) | ||
32 | |||
33 | diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c | ||
34 | index 0c9855f..e0e32c9 100644 | ||
35 | --- a/tests/weston-test-fixture-compositor.c | ||
36 | +++ b/tests/weston-test-fixture-compositor.c | ||
37 | @@ -31,6 +31,7 @@ | ||
38 | #include <unistd.h> | ||
39 | #include <sys/file.h> | ||
40 | #include <errno.h> | ||
41 | +#include <fcntl.h> | ||
42 | |||
43 | #include "shared/helpers.h" | ||
44 | #include "weston-test-fixture-compositor.h" | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index f6ebfd8f61..0000000000 --- a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | |||
6 | PAM | ||
7 | |||
8 | weston-launch requires PAM for starting weston as a non-root user. | ||
9 | |||
10 | Since starting weston as root is a valid use case by itself, if | ||
11 | PAM is not available, provide a default version of weston-launch | ||
12 | without non-root-user support. | ||
13 | |||
14 | Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] | ||
15 | |||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
19 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | ||
20 | |||
21 | --- | ||
22 | libweston/meson.build | 16 ++++++++++++---- | ||
23 | libweston/weston-launch.c | 21 +++++++++++++++++++++ | ||
24 | meson_options.txt | 7 +++++++ | ||
25 | 3 files changed, 40 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/libweston/meson.build b/libweston/meson.build | ||
28 | index 08d23ec..cb9fd3f 100644 | ||
29 | --- a/libweston/meson.build | ||
30 | +++ b/libweston/meson.build | ||
31 | @@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( | ||
32 | ) | ||
33 | |||
34 | if get_option('weston-launch') | ||
35 | - dep_pam = cc.find_library('pam') | ||
36 | + deps_weston_launch = [systemd_dep, dep_libdrm] | ||
37 | |||
38 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
39 | - error('pam_open_session not found for weston-launch') | ||
40 | + if get_option('pam') | ||
41 | + dep_pam = cc.find_library('pam') | ||
42 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
43 | + error('pam_open_session not found for weston-launch') | ||
44 | + endif | ||
45 | + | ||
46 | + if dep_pam.found() | ||
47 | + deps_weston_launch += dep_pam | ||
48 | + config_h.set('HAVE_PAM', '1') | ||
49 | + endif | ||
50 | endif | ||
51 | |||
52 | executable( | ||
53 | 'weston-launch', | ||
54 | 'weston-launch.c', | ||
55 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], | ||
56 | + dependencies: deps_weston_launch, | ||
57 | include_directories: common_inc, | ||
58 | install: true | ||
59 | ) | ||
60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
61 | index 521cb2c..2d42d33 100644 | ||
62 | --- a/libweston/weston-launch.c | ||
63 | +++ b/libweston/weston-launch.c | ||
64 | @@ -51,7 +51,9 @@ | ||
65 | |||
66 | #include <pwd.h> | ||
67 | #include <grp.h> | ||
68 | +#ifdef HAVE_PAM | ||
69 | #include <security/pam_appl.h> | ||
70 | +#endif | ||
71 | |||
72 | #ifdef HAVE_SYSTEMD_LOGIN | ||
73 | #include <systemd/sd-login.h> | ||
74 | @@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) | ||
75 | #endif | ||
76 | |||
77 | struct weston_launch { | ||
78 | +#ifdef HAVE_PAM | ||
79 | struct pam_conv pc; | ||
80 | pam_handle_t *ph; | ||
81 | +#endif | ||
82 | int tty; | ||
83 | int ttynr; | ||
84 | int sock[2]; | ||
85 | @@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | +#ifdef HAVE_PAM | ||
90 | static int | ||
91 | pam_conversation_fn(int msg_count, | ||
92 | const struct pam_message **messages, | ||
93 | @@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | +#endif | ||
98 | |||
99 | static int | ||
100 | setup_launcher_socket(struct weston_launch *wl) | ||
101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) | ||
102 | close(wl->signalfd); | ||
103 | close(wl->sock[0]); | ||
104 | |||
105 | +#ifdef HAVE_PAM | ||
106 | if (wl->new_user) { | ||
107 | err = pam_close_session(wl->ph, 0); | ||
108 | if (err) | ||
109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) | ||
110 | err, pam_strerror(wl->ph, err)); | ||
111 | pam_end(wl->ph, err); | ||
112 | } | ||
113 | +#endif | ||
114 | |||
115 | /* | ||
116 | * Get a fresh handle to the tty as the previous one is in | ||
117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
118 | setenv("HOME", wl->pw->pw_dir, 1); | ||
119 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
120 | |||
121 | +#ifdef HAVE_PAM | ||
122 | env = pam_getenvlist(wl->ph); | ||
123 | if (env) { | ||
124 | for (i = 0; env[i]; ++i) { | ||
125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
126 | } | ||
127 | free(env); | ||
128 | } | ||
129 | +#endif | ||
130 | |||
131 | /* | ||
132 | * We open a new session, so it makes sense | ||
133 | @@ -789,8 +799,10 @@ static void | ||
134 | help(const char *name) | ||
135 | { | ||
136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
137 | +#ifdef HAVE_PAM | ||
138 | fprintf(stderr, " -u, --user Start session as specified username,\n" | ||
139 | " e.g. -u joe, requires root.\n"); | ||
140 | +#endif | ||
141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | ||
142 | " e.g. -t /dev/tty4, requires -u option.\n"); | ||
143 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) | ||
145 | int i, c; | ||
146 | char *tty = NULL; | ||
147 | struct option opts[] = { | ||
148 | +#ifdef HAVE_PAM | ||
149 | { "user", required_argument, NULL, 'u' }, | ||
150 | +#endif | ||
151 | { "tty", required_argument, NULL, 't' }, | ||
152 | { "verbose", no_argument, NULL, 'v' }, | ||
153 | { "help", no_argument, NULL, 'h' }, | ||
154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) | ||
155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | ||
156 | switch (c) { | ||
157 | case 'u': | ||
158 | +#ifdef HAVE_PAM | ||
159 | wl.new_user = optarg; | ||
160 | if (getuid() != 0) { | ||
161 | fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); | ||
162 | exit(EXIT_FAILURE); | ||
163 | } | ||
164 | +#else | ||
165 | + fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); | ||
166 | + exit(EXIT_FAILURE); | ||
167 | +#endif | ||
168 | break; | ||
169 | case 't': | ||
170 | tty = optarg; | ||
171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) | ||
172 | if (setup_tty(&wl, tty) < 0) | ||
173 | exit(EXIT_FAILURE); | ||
174 | |||
175 | +#ifdef HAVE_PAM | ||
176 | if (wl.new_user && setup_pam(&wl) < 0) | ||
177 | exit(EXIT_FAILURE); | ||
178 | +#endif | ||
179 | |||
180 | if (setup_launcher_socket(&wl) < 0) | ||
181 | exit(EXIT_FAILURE); | ||
182 | diff --git a/meson_options.txt b/meson_options.txt | ||
183 | index 239bd2d..99e4ec3 100644 | ||
184 | --- a/meson_options.txt | ||
185 | +++ b/meson_options.txt | ||
186 | @@ -73,6 +73,13 @@ option( | ||
187 | ) | ||
188 | |||
189 | option( | ||
190 | + 'pam', | ||
191 | + type: 'boolean', | ||
192 | + value: true, | ||
193 | + description: 'Define if PAM is available' | ||
194 | +) | ||
195 | + | ||
196 | +option( | ||
197 | 'xwayland', | ||
198 | type: 'boolean', | ||
199 | value: true, | ||
diff --git a/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch index a4444e5d18..1ac0695222 100644 --- a/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch +++ b/meta/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch | |||
@@ -1,4 +1,7 @@ | |||
1 | Fix atomic modesetting with musl | 1 | From ece4c3d261aeec230869c0304ed1011ff6837c16 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Sep 2020 14:04:04 -0700 | ||
4 | Subject: [PATCH] Fix atomic modesetting with musl | ||
2 | 5 | ||
3 | atomic modesetting seems to fail with drm weston backend and this patch fixes | 6 | atomic modesetting seems to fail with drm weston backend and this patch fixes |
4 | it, below errors are seen before weston exits | 7 | it, below errors are seen before weston exits |
@@ -8,9 +11,15 @@ atomic: couldn't commit new state: Invalid argument | |||
8 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] | 11 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] |
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
10 | 13 | ||
14 | --- | ||
15 | libweston/backend-drm/kms.c | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c | ||
19 | index 780d007..9994da1 100644 | ||
11 | --- a/libweston/backend-drm/kms.c | 20 | --- a/libweston/backend-drm/kms.c |
12 | +++ b/libweston/backend-drm/kms.c | 21 | +++ b/libweston/backend-drm/kms.c |
13 | @@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr | 22 | @@ -1142,8 +1142,8 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, |
14 | wl_list_for_each(plane, &b->plane_list, link) { | 23 | wl_list_for_each(plane, &b->plane_list, link) { |
15 | drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", | 24 | drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", |
16 | (unsigned long) plane->plane_id); | 25 | (unsigned long) plane->plane_id); |
diff --git a/meta/recipes-graphics/wayland/weston_9.0.0.bb b/meta/recipes-graphics/wayland/weston_10.0.0.bb index 59ab217a3b..fbb7927820 100644 --- a/meta/recipes-graphics/wayland/weston_9.0.0.bb +++ b/meta/recipes-graphics/wayland/weston_10.0.0.bb | |||
@@ -3,22 +3,19 @@ DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | |||
3 | HOMEPAGE = "http://wayland.freedesktop.org" | 3 | HOMEPAGE = "http://wayland.freedesktop.org" |
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
6 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | 6 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
7 | " | ||
7 | 8 | ||
8 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 9 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
9 | file://weston.png \ | 10 | file://weston.png \ |
10 | file://weston.desktop \ | 11 | file://weston.desktop \ |
11 | file://xwayland.weston-start \ | 12 | file://xwayland.weston-start \ |
12 | file://systemd-notify.weston-start \ | 13 | file://systemd-notify.weston-start \ |
13 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 14 | " |
14 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
15 | file://0001-meson.build-fix-incorrect-header.patch \ | ||
16 | file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ | ||
17 | " | ||
18 | 15 | ||
19 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | 16 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |
20 | 17 | ||
21 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | 18 | SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" |
22 | 19 | ||
23 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 20 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
24 | 21 | ||
@@ -34,13 +31,13 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', | |||
34 | 31 | ||
35 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 32 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
36 | 33 | ||
37 | EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" | 34 | EXTRA_OEMESON += "-Dpipewire=false" |
38 | 35 | ||
39 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | 36 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
40 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 37 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
41 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 38 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
42 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | 39 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
43 | launch \ | 40 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ |
44 | image-jpeg \ | 41 | image-jpeg \ |
45 | screenshare \ | 42 | screenshare \ |
46 | shell-desktop \ | 43 | shell-desktop \ |
@@ -59,11 +56,11 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx | |||
59 | # Headless Weston | 56 | # Headless Weston |
60 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | 57 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
61 | # Weston on framebuffer | 58 | # Weston on framebuffer |
62 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | 59 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" |
63 | # Weston on RDP | 60 | # Weston on RDP |
64 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | 61 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
65 | # weston-launch | 62 | # weston-launch |
66 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | 63 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" |
67 | # VA-API desktop recorder | 64 | # VA-API desktop recorder |
68 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | 65 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
69 | # Weston with EGL support | 66 | # Weston with EGL support |
@@ -82,8 +79,6 @@ PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-color | |||
82 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 79 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
83 | # Virtual remote output with GStreamer on DRM backend | 80 | # Virtual remote output with GStreamer on DRM backend |
84 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | 81 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
85 | # Weston with PAM support | ||
86 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
87 | # Weston with screen-share support | 82 | # Weston with screen-share support |
88 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | 83 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
89 | # Traditional desktop shell | 84 | # Traditional desktop shell |
@@ -94,6 +89,8 @@ PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=fa | |||
94 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | 89 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
95 | # JPEG image loading support | 90 | # JPEG image loading support |
96 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | 91 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
92 | # support libseat based launch | ||
93 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
97 | 94 | ||
98 | do_install:append() { | 95 | do_install:append() { |
99 | # Weston doesn't need the .la files to load modules, so wipe them | 96 | # Weston doesn't need the .la files to load modules, so wipe them |