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.
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>
openvt_args="$openvt_args $1"
}
-## Add module to --modules argument
-add_weston_module() {
- if [ -z "${weston_modules}" ]; then
- weston_modules="--modules "
- fi;
- weston_modules="${weston_modules}${1},"
-}
-
-
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
exit 1
# process module
. $m
done
- if [ -n "${weston_modules}" ]; then
- add_weston_argument "${weston_modules} "
- fi;
fi
if test -z "$XDG_RUNTIME_DIR"; then
-# SPDX-FileCopyrightText: Huawei Inc.
-#
-# SPDX-License-Identifier: Apache-2.0
-
[Unit]
Description=Weston Wayland Compositor
RequiresMountsFor=/run
After=systemd-user-sessions.service plymouth-quit-wait.service
[Service]
-Type=notify
-NotifyAccess=all
User=%i
PAMName=login
EnvironmentFile=-/etc/default/weston
+++ /dev/null
-#!/bin/sh
-
-# SPDX-FileCopyrightText: Huawei Inc.
-# SPDX-License-Identifier: Apache-2.0
-
-
-if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
- add_weston_module "systemd-notify.so"
-fi
if type Xwayland >/dev/null 2>/dev/null; then
mkdir -p /tmp/.X11-unix
- add_weston_module "xwayland.so"
+
+ add_weston_argument "--modules=xwayland.so"
fi
LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a"
-
SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
- file://systemd-notify.weston-start \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
file://0002-desktop-shell-Remove-no-op-de-activation-of-the-xdg-.patch \
install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
fi
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
- install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
- fi
-
if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
chmod u+s ${D}${bindir}/weston-launch
fi