From e7fa96a78194e2da122d88ed3cec4d3574950cfd Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Thu, 20 Jun 2024 18:39:57 +0200 Subject: [PATCH] stm-st-stm32mp: weston-init: miscellaneous fixes Check that weston-start exists before modifying it: after a recent change in poky's weston-init recipe, this file only gets installed in non-systemd images. Remove hardcoded systemd service path: some of the code ported from meta-st-openstlinux assumes that the original weston-init systemd services are installed under /lib, and it uses hardcoded paths to detect them. Yocto 5.0 now has usrmerge enabled, so the services are installed in /usr/lib instead, causing the check to fail. Replace the hardcoded path with its respective variable. https://onedigi.atlassian.net/browse/DEL-9011 https://onedigi.atlassian.net/browse/DEL-9045 Signed-off-by: Gabriel Valcazar --- .../recipes-graphics/wayland/weston-init.bbappend | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend index 68ea572ce..acaf4589a 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston-init.bbappend @@ -39,9 +39,8 @@ do_install:append() { install -d ${D}${systemd_system_unitdir} ${D}${sbindir} - install -d ${D}/lib/systemd/system/ - if [ -e ${D}/lib/systemd/system/weston.service ]; then - rm ${D}/lib/systemd/system/weston.service ${D}/lib/systemd/system/weston.socket + if [ -e ${D}/${systemd_system_unitdir}/weston.service ]; then + rm ${D}/${systemd_system_unitdir}/weston.service ${D}/${systemd_system_unitdir}/weston.socket install -D -p -m0644 ${WORKDIR}/weston-launch.service ${D}${systemd_system_unitdir}/weston-launch.service sed -i -e s:/etc:${sysconfdir}:g \ -e s:/usr/bin:${bindir}:g \ @@ -59,7 +58,10 @@ do_install:append() { # uncomment modules line for support of xwayland sed -i -e 's,#xwayland=true,xwayland=true,g' ${D}${sysconfdir}/xdg/weston/weston.ini fi - sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start + + if [ -e ${D}${bindir}/weston-start ]; then + sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start + fi # /etc/default/weston install -d ${D}${sysconfdir}/default echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston