summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch80
-rw-r--r--meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch47
-rw-r--r--meta/recipes-graphics/wayland/weston_7.0.0.bb (renamed from meta/recipes-graphics/wayland/weston_6.0.1.bb)7
3 files changed, 28 insertions, 106 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
deleted file mode 100644
index acea9dbc31..0000000000
--- a/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ /dev/null
@@ -1,80 +0,0 @@
1From c4677e155736062e75687f1a655732c8902e912b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 May 2015 20:56:00 -0700
4Subject: [PATCH] make error() portable
5
6error() is not posix but gnu extension so may not be available on all
7kind of systemsi e.g. musl.
8
9Upstream-Status: Submitted
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Signed-off-by: Ming Liu <ming.liu@toradex.com>
13---
14 libweston/weston-error.h | 20 ++++++++++++++++++++
15 libweston/weston-launch.c | 2 +-
16 meson.build | 1 +
17 3 files changed, 22 insertions(+), 1 deletion(-)
18 create mode 100644 libweston/weston-error.h
19
20diff --git a/libweston/weston-error.h b/libweston/weston-error.h
21new file mode 100644
22index 0000000..2089d02
23--- /dev/null
24+++ b/libweston/weston-error.h
25@@ -0,0 +1,20 @@
26+#ifndef _WESTON_ERROR_H
27+#define _WESTON_ERROR_H
28+
29+#if defined(HAVE_ERROR_H)
30+#include <error.h>
31+#else
32+#include <err.h>
33+#include <string.h>
34+#define _weston_error(S, E, F, ...) do { \
35+ if (E) \
36+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
37+ else \
38+ err(S, F, ##__VA_ARGS__); \
39+} while(0)
40+
41+#define error _weston_error
42+#endif
43+
44+#endif
45+
46diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
47index bf73e0d..9064439 100644
48--- a/libweston/weston-launch.c
49+++ b/libweston/weston-launch.c
50@@ -33,7 +33,6 @@
51 #include <poll.h>
52 #include <errno.h>
53
54-#include <error.h>
55 #include <getopt.h>
56
57 #include <sys/types.h>
58@@ -59,6 +58,7 @@
59 #endif
60
61 #include "weston-launch.h"
62+#include "weston-error.h"
63
64 #define DRM_MAJOR 226
65
66diff --git a/meson.build b/meson.build
67index 2155b7b..baa52d9 100644
68--- a/meson.build
69+++ b/meson.build
70@@ -94,6 +94,7 @@ foreach func : optional_libc_funcs
71 endforeach
72
73 optional_system_headers = [
74+ 'error.h',
75 'linux/sync_file.h'
76 ]
77 foreach hdr : optional_system_headers
78--
792.7.4
80
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
index 81cc025371..e50845b17a 100644
--- 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
@@ -1,4 +1,4 @@
1From 7d2fea61a95e9498b5a19c8cffcb2ab5631d5685 Mon Sep 17 00:00:00 2001 1From 682b7d79a7b81ec8e38760381104b24ad549e8c0 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com> 2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Wed, 22 Feb 2017 15:53:30 +0200 3Date: Wed, 22 Feb 2017 15:53:30 +0200
4Subject: [PATCH] weston-launch: Provide a default version that doesn't require 4Subject: [PATCH] weston-launch: Provide a default version that doesn't require
@@ -18,16 +18,16 @@ Signed-off-by: Denys Dmytriyenko <denys@ti.com>
18Signed-off-by: Ming Liu <ming.liu@toradex.com> 18Signed-off-by: Ming Liu <ming.liu@toradex.com>
19--- 19---
20 libweston/meson.build | 16 ++++++++++++---- 20 libweston/meson.build | 16 ++++++++++++----
21 libweston/weston-launch.c | 20 ++++++++++++++++++++ 21 libweston/weston-launch.c | 21 +++++++++++++++++++++
22 meson_options.txt | 7 +++++++ 22 meson_options.txt | 7 +++++++
23 3 files changed, 39 insertions(+), 4 deletions(-) 23 3 files changed, 40 insertions(+), 4 deletions(-)
24 24
25diff --git a/libweston/meson.build b/libweston/meson.build 25diff --git a/libweston/meson.build b/libweston/meson.build
26index 33ab970..32f495a 100644 26index d8d3fc0..326683f 100644
27--- a/libweston/meson.build 27--- a/libweston/meson.build
28+++ b/libweston/meson.build 28+++ b/libweston/meson.build
29@@ -472,16 +472,24 @@ if get_option('renderer-gl') 29@@ -199,16 +199,24 @@ dep_vertex_clipping = declare_dependency(
30 endif 30 )
31 31
32 if get_option('weston-launch') 32 if get_option('weston-launch')
33- dep_pam = cc.find_library('pam') 33- dep_pam = cc.find_library('pam')
@@ -56,7 +56,7 @@ index 33ab970..32f495a 100644
56 install: true 56 install: true
57 ) 57 )
58diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c 58diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
59index 9064439..c6abe92 100644 59index 4962bd6..fc531c5 100644
60--- a/libweston/weston-launch.c 60--- a/libweston/weston-launch.c
61+++ b/libweston/weston-launch.c 61+++ b/libweston/weston-launch.c
62@@ -51,7 +51,9 @@ 62@@ -51,7 +51,9 @@
@@ -69,7 +69,7 @@ index 9064439..c6abe92 100644
69 69
70 #ifdef HAVE_SYSTEMD_LOGIN 70 #ifdef HAVE_SYSTEMD_LOGIN
71 #include <systemd/sd-login.h> 71 #include <systemd/sd-login.h>
72@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) 72@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd)
73 #endif 73 #endif
74 74
75 struct weston_launch { 75 struct weston_launch {
@@ -80,7 +80,7 @@ index 9064439..c6abe92 100644
80 int tty; 80 int tty;
81 int ttynr; 81 int ttynr;
82 int sock[2]; 82 int sock[2];
83@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl) 83@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl)
84 return false; 84 return false;
85 } 85 }
86 86
@@ -88,7 +88,7 @@ index 9064439..c6abe92 100644
88 static int 88 static int
89 pam_conversation_fn(int msg_count, 89 pam_conversation_fn(int msg_count,
90 const struct pam_message **messages, 90 const struct pam_message **messages,
91@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl) 91@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl)
92 92
93 return 0; 93 return 0;
94 } 94 }
@@ -96,7 +96,7 @@ index 9064439..c6abe92 100644
96 96
97 static int 97 static int
98 setup_launcher_socket(struct weston_launch *wl) 98 setup_launcher_socket(struct weston_launch *wl)
99@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status) 99@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status)
100 close(wl->signalfd); 100 close(wl->signalfd);
101 close(wl->sock[0]); 101 close(wl->sock[0]);
102 102
@@ -104,7 +104,7 @@ index 9064439..c6abe92 100644
104 if (wl->new_user) { 104 if (wl->new_user) {
105 err = pam_close_session(wl->ph, 0); 105 err = pam_close_session(wl->ph, 0);
106 if (err) 106 if (err)
107@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status) 107@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status)
108 err, pam_strerror(wl->ph, err)); 108 err, pam_strerror(wl->ph, err));
109 pam_end(wl->ph, err); 109 pam_end(wl->ph, err);
110 } 110 }
@@ -112,7 +112,7 @@ index 9064439..c6abe92 100644
112 112
113 if (ioctl(wl->tty, KDSKBMUTE, 0) && 113 if (ioctl(wl->tty, KDSKBMUTE, 0) &&
114 ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) 114 ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
115@@ -610,6 +618,7 @@ setup_session(struct weston_launch *wl, char **child_argv) 115@@ -660,6 +668,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
116 setenv("HOME", wl->pw->pw_dir, 1); 116 setenv("HOME", wl->pw->pw_dir, 1);
117 setenv("SHELL", wl->pw->pw_shell, 1); 117 setenv("SHELL", wl->pw->pw_shell, 1);
118 118
@@ -120,7 +120,7 @@ index 9064439..c6abe92 100644
120 env = pam_getenvlist(wl->ph); 120 env = pam_getenvlist(wl->ph);
121 if (env) { 121 if (env) {
122 for (i = 0; env[i]; ++i) { 122 for (i = 0; env[i]; ++i) {
123@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv) 123@@ -668,6 +677,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
124 } 124 }
125 free(env); 125 free(env);
126 } 126 }
@@ -128,7 +128,7 @@ index 9064439..c6abe92 100644
128 128
129 /* 129 /*
130 * We open a new session, so it makes sense 130 * We open a new session, so it makes sense
131@@ -685,8 +695,10 @@ static void 131@@ -739,8 +749,10 @@ static void
132 help(const char *name) 132 help(const char *name)
133 { 133 {
134 fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); 134 fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -139,7 +139,7 @@ index 9064439..c6abe92 100644
139 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" 139 fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
140 " e.g. -t /dev/tty4, requires -u option.\n"); 140 " e.g. -t /dev/tty4, requires -u option.\n");
141 fprintf(stderr, " -v, --verbose Be verbose\n"); 141 fprintf(stderr, " -v, --verbose Be verbose\n");
142@@ -700,7 +712,9 @@ main(int argc, char *argv[]) 142@@ -754,7 +766,9 @@ main(int argc, char *argv[])
143 int i, c; 143 int i, c;
144 char *tty = NULL; 144 char *tty = NULL;
145 struct option opts[] = { 145 struct option opts[] = {
@@ -149,21 +149,24 @@ index 9064439..c6abe92 100644
149 { "tty", required_argument, NULL, 't' }, 149 { "tty", required_argument, NULL, 't' },
150 { "verbose", no_argument, NULL, 'v' }, 150 { "verbose", no_argument, NULL, 'v' },
151 { "help", no_argument, NULL, 'h' }, 151 { "help", no_argument, NULL, 'h' },
152@@ -712,9 +726,13 @@ main(int argc, char *argv[]) 152@@ -766,11 +780,16 @@ main(int argc, char *argv[])
153 while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { 153 while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
154 switch (c) { 154 switch (c) {
155 case 'u': 155 case 'u':
156+#ifdef HAVE_PAM 156+#ifdef HAVE_PAM
157 wl.new_user = optarg; 157 wl.new_user = optarg;
158 if (getuid() != 0) 158 if (getuid() != 0) {
159 error(1, 0, "Permission denied. -u allowed for root only"); 159 fprintf(stderr, "weston: Permission denied. -u allowed for root only\n");
160 exit(EXIT_FAILURE);
161 }
160+#else 162+#else
161+ error(1, 0, "-u is unsupported in this weston-launch build"); 163+ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n");
164+ exit(EXIT_FAILURE);
162+#endif 165+#endif
163 break; 166 break;
164 case 't': 167 case 't':
165 tty = optarg; 168 tty = optarg;
166@@ -755,8 +773,10 @@ main(int argc, char *argv[]) 169@@ -822,8 +841,10 @@ main(int argc, char *argv[])
167 if (setup_tty(&wl, tty) < 0) 170 if (setup_tty(&wl, tty) < 0)
168 exit(EXIT_FAILURE); 171 exit(EXIT_FAILURE);
169 172
@@ -175,7 +178,7 @@ index 9064439..c6abe92 100644
175 if (setup_launcher_socket(&wl) < 0) 178 if (setup_launcher_socket(&wl) < 0)
176 exit(EXIT_FAILURE); 179 exit(EXIT_FAILURE);
177diff --git a/meson_options.txt b/meson_options.txt 180diff --git a/meson_options.txt b/meson_options.txt
178index 0e1d183..9a5c3d5 100644 181index d5bf1d5..254eb2b 100644
179--- a/meson_options.txt 182--- a/meson_options.txt
180+++ b/meson_options.txt 183+++ b/meson_options.txt
181@@ -73,6 +73,13 @@ option( 184@@ -73,6 +73,13 @@ option(
diff --git a/meta/recipes-graphics/wayland/weston_6.0.1.bb b/meta/recipes-graphics/wayland/weston_7.0.0.bb
index fe8f1b8c31..5d2a9336f3 100644
--- a/meta/recipes-graphics/wayland/weston_6.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_7.0.0.bb
@@ -9,11 +9,10 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
9 file://weston.png \ 9 file://weston.png \
10 file://weston.desktop \ 10 file://weston.desktop \
11 file://xwayland.weston-start \ 11 file://xwayland.weston-start \
12 file://0001-make-error-portable.patch \
13 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ 12 file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
14" 13"
15SRC_URI[md5sum] = "e7b10710ef1eac82258f97bfd41fe534" 14SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850"
16SRC_URI[sha256sum] = "bf2f6d5aae2e11cabb6bd69a76bcf9edb084f8c3e14ca769bea7234a513155b4" 15SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64"
17 16
18UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" 17UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
19 18
@@ -26,7 +25,7 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
26 25
27WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" 26WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
28 27
29EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false" 28EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
30 29
31PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ 30PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ 31 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \