weston: uprev to 7.0.0
PATCH 1/1 weston: uprev to 7.0.0
From: Ming Liu <[email protected]>
- Adjust patches to comply with weston-7.0.0.
- Also drop the obsolete patch 0001-make-error-portable.patch.
---
.../wayland/weston/0001-make-error-portable.patch | 80 ----------------------
...ch-Provide-a-default-version-that-doesn-t.patch | 38 +++++-----
.../wayland/{weston_6.0.1.bb => weston_7.0.0.bb} | 7 +-
3 files changed, 23 insertions(+), 102 deletions(-)
delete mode 100644 meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
rename meta/recipes-graphics/wayland/{weston_6.0.1.bb => weston_7.0.0.bb} (95%)meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted +0 -80
@@ -1,80 +0,0 @@ -From c4677e155736062e75687f1a655732c8902e912b Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Fri, 29 May 2015 20:56:00 -0700 -Subject: [PATCH] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj <[email protected]> -Signed-off-by: Ming Liu <[email protected]> ---- - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - meson.build | 1 + - 3 files changed, 22 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/weston-error.h -@@ -0,0 +1,20 @@ -+#ifndef _WESTON_ERROR_H -+#define _WESTON_ERROR_H -+ -+#if defined(HAVE_ERROR_H) -+#include <error.h> -+#else -+#include <err.h> -+#include <string.h> -+#define _weston_error(S, E, F, ...) do { \ -+ if (E) \ -+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ -+ else \ -+ err(S, F, ##__VA_ARGS__); \ -+} while(0) -+ -+#define error _weston_error -+#endif -+ -+#endif -+ -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index bf73e0d..9064439 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include <poll.h> - #include <errno.h> - --#include <error.h> - #include <getopt.h> - - #include <sys/types.h> -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - -diff --git a/meson.build b/meson.build -index 2155b7b..baa52d9 100644 ---- a/meson.build -+++ b/meson.build -@@ -94,6 +94,7 @@ foreach func : optional_libc_funcs - endforeach - - optional_system_headers = [ -+ 'error.h', - 'linux/sync_file.h' - ] - foreach hdr : optional_system_headers --- -2.7.4 -
meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +20 -18
@@ -23,11 +23,11 @@ Signed-off-by: Ming Liu <[email protected]> 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/libweston/meson.build b/libweston/meson.build -index 33ab970..32f495a 100644 +index d8d3fc0..326683f 100644 --- a/libweston/meson.build +++ b/libweston/meson.build -@@ -472,16 +472,24 @@ if get_option('renderer-gl') - endif +@@ -199,16 +199,24 @@ dep_vertex_clipping = declare_dependency( + ) if get_option('weston-launch') - dep_pam = cc.find_library('pam')
@@ -56,7 +56,7 @@ index 33ab970..32f495a 100644 install: true ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 9064439..c6abe92 100644 +index 4962bd6..03b6518 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@
@@ -69,7 +69,7 @@ index 9064439..c6abe92 100644 #ifdef HAVE_SYSTEMD_LOGIN #include <systemd/sd-login.h> -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch {
@@ -80,7 +80,7 @@ index 9064439..c6abe92 100644 int tty; int ttynr; int sock[2]; -@@ -191,6 +195,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; }
@@ -88,7 +88,7 @@ index 9064439..c6abe92 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -231,6 +236,7 @@ setup_pam(struct weston_launch *wl) +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) return 0; }
@@ -96,7 +96,7 @@ index 9064439..c6abe92 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -424,6 +430,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]);
@@ -104,7 +104,7 @@ index 9064439..c6abe92 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -431,6 +438,7 @@ quit(struct weston_launch *wl, int status) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); }
@@ -112,7 +112,7 @@ index 9064439..c6abe92 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -610,6 +618,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -660,6 +668,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1);
@@ -120,7 +120,7 @@ index 9064439..c6abe92 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -618,6 +627,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -668,6 +677,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); }
@@ -128,7 +128,7 @@ index 9064439..c6abe92 100644 /* * We open a new session, so it makes sense -@@ -685,8 +695,10 @@ static void +@@ -739,8 +749,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -139,7 +139,7 @@ index 9064439..c6abe92 100644 fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -700,7 +712,9 @@ main(int argc, char *argv[]) +@@ -754,7 +766,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = {
@@ -149,21 +149,23 @@ index 9064439..c6abe92 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -712,9 +726,13 @@ main(int argc, char *argv[]) +@@ -766,11 +780,15 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': +#ifdef HAVE_PAM wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } +#else + error(1, 0, "-u is unsupported in this weston-launch build"); +#endif break; case 't': tty = optarg; -@@ -755,8 +773,10 @@ main(int argc, char *argv[]) +@@ -822,8 +840,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE);
@@ -175,7 +177,7 @@ index 9064439..c6abe92 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); diff --git a/meson_options.txt b/meson_options.txt -index 0e1d183..9a5c3d5 100644 +index d5bf1d5..254eb2b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -73,6 +73,13 @@ option(
meta/recipes-graphics/wayland/weston_7.0.0.bb renamed from meta/recipes-graphics/wayland/weston_6.0.1.bb +3 -4
@@ -9,11 +9,10 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ file://weston.png \ file://weston.desktop \ file://xwayland.weston-start \ - file://0001-make-error-portable.patch \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ " -SRC_URI[md5sum] = "e7b10710ef1eac82258f97bfd41fe534" -SRC_URI[sha256sum] = "bf2f6d5aae2e11cabb6bd69a76bcf9edb084f8c3e14ca769bea7234a513155b4" +SRC_URI[md5sum] = "cbfda483bc2501d0831af3f33c707850" +SRC_URI[sha256sum] = "a00a6d207b6a45f95f4401c604772a307c3767e5e2beecf3d879110c43909a64" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
@@ -26,7 +25,7 @@ DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" -EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false" +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
Signature · 1 line
2.7.4
Quoted 6 lines · On 26/08/2019 02:14, [email protected] wrote:
From: Ming Liu <[email protected]>
- Adjust patches to comply with weston-7.0.0.
- Also drop the obsolete patch 0001-make-error-portable.patch.Signed-off-by Ming Liu <[email protected]>
Fails with musl:
../weston-7.0.0/libweston/weston-launch.c:790:4: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration]
790 | error(1, 0, "-u is unsupported in this weston-launch build");
| ^~~~~
| perrorRoss
Quoted 6 lines · Ross Burton
Quoted 5 lines · On 26/08/2019 02:14, [email protected] wrote:
From: Ming Liu <[email protected]>
- Adjust patches to comply with weston-7.0.0.
- Also drop the obsolete patch 0001-make-error-portable.patch.
Quoted 8 lines
Quoted 1 line
Signed-off-by Ming Liu <[email protected]>Fails with musl:
../weston-7.0.0/libweston/weston-launch.c:790:4: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration]
790 |error(1, 0, "-u is unsupported in this weston-launch build");
| ^~~~~
| perror
https://gitlab.freedesktop.org/wayland/weston/commit/a1450a8a71ef1adb921421f48bbea552a8e738e3
Ross
Quoted 9 lines · Ross Burton
Quoted 8 lines · Ross Burton
Quoted 6 lines · On 26/08/2019 02:14, [email protected] wrote:
From: Ming Liu <[email protected]>
- Adjust patches to comply with weston-7.0.0.
- Also drop the obsolete patch 0001-make-error-portable.patch.Signed-off-by Ming Liu <[email protected]>
Quoted 8 lines
Quoted 6 lines
Fails with musl:
../weston-7.0.0/libweston/weston-launch.c:790:4: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration] 790 |error(1, 0, "-u is unsupported in this weston-launch build");
| ^~~~~
| perrorhttps://gitlab.freedesktop.org/wayland/weston/commit/a1450a8a71ef1adb921421f48bbea552a8e738e3
Hm, no, that's in the 7.0.0 release already.
Ross
Quoted 6 lines · Ross Burton
Quoted 5 lines · On 26/08/2019 02:14, [email protected] wrote:
From: Ming Liu <[email protected]>
- Adjust patches to comply with weston-7.0.0.
- Also drop the obsolete patch 0001-make-error-portable.patch.
Quoted 8 lines
Quoted 1 line
Signed-off-by Ming Liu <[email protected]>Fails with musl:
../weston-7.0.0/libweston/weston-launch.c:790:4: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration]
790 |error(1, 0, "-u is unsupported in this weston-launch build");
| ^~~~~
| perror
This is from 0001-weston-launch-Provide-a-default-version-that-doesn-t.patch.
Ross