From 94ee287730b16820003aece648e790923a9a5b79 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Wed, 18 Jan 2023 20:47:11 -0500 Subject: Run agl-compositor in system scope for QEMU+KVM demo image To allow usefully depending on the native-shell-client "homescreen" application from the systemd units running QEMU, tweak things to drop the use of agl-session from the agl-kvm-demo-platform host image. The motivation for this is to have the VM guest start up ordering work as expected, avoiding unnecessary delays from race failures on boot. Changes: - Rework agl-kvm template to use conf/include/agl-kvm.inc include file to match other featurs and simplify development. - Add include files for the host ("default" in BitBake) and guest (so agl-kvm-guest) multiconfigs to allow disabling the agl-demo feature in the host build, which disables agl-session. - Update native-shell-client systemd unit to run at system scope and depend upon agl-compositor directly. - Update agl-qemu-runner systemd template unit to depend directly on native-shell-client. Note that a consequence of these changes is that building images other than agl-kvm-demo-platform when the "agl-kvm" feature is used will likely not yield the desired results. Future work will investigate avoiding this problem, or forcing explicit compatibility errors to avoid user confusion. Bug-AGL: SPEC-4618 Change-Id: I7f2f2ad9a453b5d99bed4cfc33d99eb3002bcceb Signed-off-by: Scott Murray --- .../native-shell-client/files/native-shell-client.service | 7 ++++--- .../native-shell-client/native-shell-client_agldemo.inc | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'recipes-demo/native-shell-client') diff --git a/recipes-demo/native-shell-client/files/native-shell-client.service b/recipes-demo/native-shell-client/files/native-shell-client.service index 4d77513a9..d7a2fe684 100644 --- a/recipes-demo/native-shell-client/files/native-shell-client.service +++ b/recipes-demo/native-shell-client/files/native-shell-client.service @@ -1,11 +1,12 @@ [Unit] -Requires=agl-compositor.service -After=agl-compositor.service +Requires=weston.service +After=weston.service [Service] Type=simple +Environment=XDG_RUNTIME_DIR=/run/user/200 ExecStart=/usr/bin/native-shell-client Restart=on-failure [Install] -WantedBy=agl-session.target +WantedBy=multi-user.target diff --git a/recipes-demo/native-shell-client/native-shell-client_agldemo.inc b/recipes-demo/native-shell-client/native-shell-client_agldemo.inc index 5e2538ee3..4c1dc1012 100644 --- a/recipes-demo/native-shell-client/native-shell-client_agldemo.inc +++ b/recipes-demo/native-shell-client/native-shell-client_agldemo.inc @@ -2,12 +2,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://native-shell-client.service" +inherit systemd + +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + do_install:append() { - install -d ${D}${systemd_user_unitdir}/agl-session.target.wants - install -m0644 ${WORKDIR}/native-shell-client.service ${D}${systemd_user_unitdir}/native-shell-client.service - ln -s ../native-shell-client.service ${D}${systemd_user_unitdir}/agl-session.target.wants/native-shell-client.service + install -D -m 0644 ${WORKDIR}/native-shell-client.service ${D}${systemd_system_unitdir}/native-shell-client.service } -FILES:${PN} += " ${systemd_user_unitdir}" - RCONFLICTS:${PN} = "homescreen" -- cgit 1.2.3-korg