summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-01-20 00:17:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-25 12:06:55 +0000
commite256885889fdea215be100f204277f675f7b5c2d (patch)
tree9c89d360b4cf10331ab985fbf9fda7604df2b755 /meta
parentc72a9d0a6db9ec3bead34de1a11ccad18e95197e (diff)
downloadpoky-e256885889fdea215be100f204277f675f7b5c2d.tar.gz
Revert "weston: Use systemd notify,"
Commit 4efdcc1090 ("weston: Use systemd notify,") has non-trivial to backport dependencies without which it cannot work, revert backport. In oe-core dunfell, weston is still started using /usr/bin/weston-start script in meta/recipes-graphics/wayland/weston-init/weston@.service . Since 76ed534267 ("weston-init: Use weston-launch when starting weston as the first windowing system"), the weston-start script starts weston using weston-launch executable in case $DISPLAY is not set, i.e. when weston is started as the primary compositor. When weston is started via weston-launch, the notification to systemd is not delivered, and weston service fails to start with the following: " weston@root.service: start operation timed out. Terminating. " The weston systemd service has been reworked considerably since oe-core dunfell in commit c21fa5a291 ("weston-init: Redefine weston service and add socket activation option"), which replaced the use of weston-start in weston@.service with plain weston, and has been further improved in commit dd83fb40f7 ("weston-init: Stop running weston as root") . The commit reverted here, oe-core/master commit c8aa0222ce ("weston: wrapper for weston modules argument"), landed only with the two aforementioned reworks already in place, therefore the commit could have never been tested with weston started via weston-launch executable and the timeout at delivering systemd notification could not have happened in master. Both c21fa5a291 ("weston-init: Redefine weston service and add socket activation option") and dd83fb40f7 ("weston-init: Stop running weston as root") are large feature patches and thus unsuitable for stable backports, hence this revert seems to be the least problematic way. (From OE-Core rev: dabd41819563ec63fc5bd5fd0f4af64230e58130) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Joshua Watt <JPEWhacker@gmail.com> Cc: Pavel Zhukov <pavel.zhukov@huawei.com> Cc: Steve Sakoman <steve@sakoman.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-graphics/wayland/weston-init/weston-start12
-rw-r--r--meta/recipes-graphics/wayland/weston-init/weston@.service6
-rw-r--r--meta/recipes-graphics/wayland/weston/systemd-notify.weston-start9
-rw-r--r--meta/recipes-graphics/wayland/weston/xwayland.weston-start3
-rw-r--r--meta/recipes-graphics/wayland/weston_8.0.0.bb6
5 files changed, 2 insertions, 34 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index 97471df80d..ccc7093425 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -23,15 +23,6 @@ add_openvt_argument() {
23 openvt_args="$openvt_args $1" 23 openvt_args="$openvt_args $1"
24} 24}
25 25
26## Add module to --modules argument
27add_weston_module() {
28 if [ -z "${weston_modules}" ]; then
29 weston_modules="--modules "
30 fi;
31 weston_modules="${weston_modules}${1},"
32}
33
34
35if [ -n "$WAYLAND_DISPLAY" ]; then 26if [ -n "$WAYLAND_DISPLAY" ]; then
36 echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet." 27 echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
37 exit 1 28 exit 1
@@ -74,9 +65,6 @@ if [ -d "$modules_dir" ]; then
74 # process module 65 # process module
75 . $m 66 . $m
76 done 67 done
77 if [ -n "${weston_modules}" ]; then
78 add_weston_argument "${weston_modules} "
79 fi;
80fi 68fi
81 69
82if test -z "$XDG_RUNTIME_DIR"; then 70if test -z "$XDG_RUNTIME_DIR"; then
diff --git a/meta/recipes-graphics/wayland/weston-init/weston@.service b/meta/recipes-graphics/wayland/weston-init/weston@.service
index 70c706d75c..39e193014a 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston@.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston@.service
@@ -1,7 +1,3 @@
1# SPDX-FileCopyrightText: Huawei Inc.
2#
3# SPDX-License-Identifier: Apache-2.0
4
5[Unit] 1[Unit]
6Description=Weston Wayland Compositor 2Description=Weston Wayland Compositor
7RequiresMountsFor=/run 3RequiresMountsFor=/run
@@ -9,8 +5,6 @@ Conflicts=plymouth-quit.service
9After=systemd-user-sessions.service plymouth-quit-wait.service 5After=systemd-user-sessions.service plymouth-quit-wait.service
10 6
11[Service] 7[Service]
12Type=notify
13NotifyAccess=all
14User=%i 8User=%i
15PAMName=login 9PAMName=login
16EnvironmentFile=-/etc/default/weston 10EnvironmentFile=-/etc/default/weston
diff --git a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start b/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
deleted file mode 100644
index fdb48cb609..0000000000
--- a/meta/recipes-graphics/wayland/weston/systemd-notify.weston-start
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3# SPDX-FileCopyrightText: Huawei Inc.
4# SPDX-License-Identifier: Apache-2.0
5
6
7if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
8 add_weston_module "systemd-notify.so"
9fi
diff --git a/meta/recipes-graphics/wayland/weston/xwayland.weston-start b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
index 22984f50a4..b483c97cf1 100644
--- a/meta/recipes-graphics/wayland/weston/xwayland.weston-start
+++ b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
@@ -2,5 +2,6 @@
2 2
3if type Xwayland >/dev/null 2>/dev/null; then 3if type Xwayland >/dev/null 2>/dev/null; then
4 mkdir -p /tmp/.X11-unix 4 mkdir -p /tmp/.X11-unix
5 add_weston_module "xwayland.so" 5
6 add_weston_argument "--modules=xwayland.so"
6fi 7fi
diff --git a/meta/recipes-graphics/wayland/weston_8.0.0.bb b/meta/recipes-graphics/wayland/weston_8.0.0.bb
index e647fbc686..5e4e2032c9 100644
--- a/meta/recipes-graphics/wayland/weston_8.0.0.bb
+++ b/meta/recipes-graphics/wayland/weston_8.0.0.bb
@@ -5,11 +5,9 @@ LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ 5LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
6 file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" 6 file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
7 7
8
9SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ 8SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
10 file://weston.png \ 9 file://weston.png \
11 file://weston.desktop \ 10 file://weston.desktop \
12 file://systemd-notify.weston-start \
13 file://xwayland.weston-start \ 11 file://xwayland.weston-start \
14 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 \
15 file://0002-desktop-shell-Remove-no-op-de-activation-of-the-xdg-.patch \ 13 file://0002-desktop-shell-Remove-no-op-de-activation-of-the-xdg-.patch \
@@ -106,10 +104,6 @@ do_install_append() {
106 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland 104 install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
107 fi 105 fi
108 106
109 if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
110 install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
111 fi
112
113 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then 107 if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
114 chmod u+s ${D}${bindir}/weston-launch 108 chmod u+s ${D}${bindir}/weston-launch
115 fi 109 fi