From patchwork Fri Jun 23 16:24:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1382BC001DF for ; Fri, 23 Jun 2023 16:25:08 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by mx.groups.io with SMTP id smtpd.web10.2802.1687537501856043831 for ; Fri, 23 Jun 2023 09:25:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=w3eA/jOT; spf=pass (domain: ti.com, ip: 198.47.23.248, mailfrom: rs@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOsWG121551; Fri, 23 Jun 2023 11:24:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537494; bh=kcmnSFKAKvZksiktN2cB/XtDnrMbH0v+L8dj4c/tTKg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=w3eA/jOTp/PsVV52xIibgnOCLpq3Av4mcG4mYnVth1kWgjHOpkIiqX02Ri+NbphLh fCmK4OS3uFoa8BzBZAc3GiWZJvM4YFta9Hh5Sxuh+T8w+W942m2o4g8P+wwYxyZfjD WjmzQ/IfzfwfI3QkBbRynjC4gRvTGMPRQbwRMOy4= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOsBI020270 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:54 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:54 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1B023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , , ssuesens , Alexandre Belloni Subject: [oe-core][kirkstone][PATCHv2 1/8] weston.init: enabled xwayland Date: Fri, 23 Jun 2023 11:24:41 -0500 Message-ID: <20230623162448.3162089-2-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183345 From: ssuesens set xwayland support in weston.init file to true Signed-off-by: ssuesens Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 497d8602038..77dda03cf55 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -50,6 +50,10 @@ do_install() { sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini fi + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" = "yes" ]; then + sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini + fi + if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini fi From patchwork Fri Jun 23 16:24:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1356BC001DD for ; Fri, 23 Jun 2023 16:25:08 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web11.2882.1687537501578795447 for ; Fri, 23 Jun 2023 09:25:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=gq92UJBe; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: rs@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOtA3120715; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=tMByJ/0L4+ZAR132jXOnzdqOJ7eQmOF1P9vq25Ntn6s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gq92UJBeHyaMIe9rtfPR+1Fd3V9HxZg75nP2Dleo6Ph4Wdl/Azhqry/t7m1c5QyKM 83WLs/JcvL7ARVsTZ0NiVB3kwBBp6btOkecOfFfLdc1JiTOHiBTnfMHGG5OlfHNACV VXqNhs4x7itDIR6ZAGXl4d6FEb7TEGCy4R6dYfPI= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOtHU020277 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:54 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1C023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , , Ming Liu Subject: [oe-core][kirkstone][PATCHv2 2/8] weston-init: introduce xwayland PACKAGECONFIG Date: Fri, 23 Jun 2023 11:24:42 -0500 Message-ID: <20230623162448.3162089-3-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183344 From: Ming Liu Some BSPs dont support xwayland in weston, this is easier for them to control that. Signed-off-by: Ming Liu Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 77dda03cf55..a7adce7fda8 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -14,10 +14,11 @@ SRC_URI = "file://init \ S = "${WORKDIR}" -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', '', d)}" PACKAGECONFIG:append:qemuriscv64 = " use-pixman" PACKAGECONFIG:append:qemuppc64 = " use-pixman" +PACKAGECONFIG[xwayland] = ",," PACKAGECONFIG[no-idle-timeout] = ",," PACKAGECONFIG[use-pixman] = ",," @@ -50,7 +51,7 @@ do_install() { sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini fi - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" = "yes" ]; then + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then sed -i -e "/^\[core\]/a xwayland=true" ${D}${sysconfdir}/xdg/weston/weston.ini fi From patchwork Fri Jun 23 16:24:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07E4EC001B3 for ; Fri, 23 Jun 2023 16:25:08 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.2800.1687537500159076860 for ; Fri, 23 Jun 2023 09:25:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=ig041BnL; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: rs@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOtnI126930; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=3KSTizJ3J2hCV2PBVQ5o5HQsW8aNGpiJF1d53FrteUQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ig041BnLE/HmPhHfUicOOujCmCUKDFPZTescZz/e5o4fchv2prqOjjhbDC9RCnejL ZVtqMg6XqRPqXqzx9AdGyBhc0ULOwmo/VH/wtPbePf7L3I1pTxjc8AftL+DVsrmp0w MpyauMYMqU6nDq1kuC8NQJQTMcHpORwbOz0RzlK8= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOtgA009767 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:54 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1D023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , , Alexandre Belloni Subject: [oe-core][kirkstone][PATCHv2 3/8] weston-init: make sure the render group exists Date: Fri, 23 Jun 2023 11:24:43 -0500 Message-ID: <20230623162448.3162089-4-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183342 From: Randolph Sapp Add the render group explicitly here to make sure it exists for the useradd command. Signed-off-by: Randolph Sapp Signed-off-by: Alexandre Belloni --- meta/recipes-graphics/wayland/weston-init.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index a7adce7fda8..b637fa6a4a5 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -94,5 +94,5 @@ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/we SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston" -GROUPADD_PARAM:${PN} = "-r wayland" +GROUPADD_PARAM:${PN} = "-r wayland; -r render" From patchwork Fri Jun 23 16:24:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05A68C001DB for ; Fri, 23 Jun 2023 16:25:08 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.2801.1687537500531852699 for ; Fri, 23 Jun 2023 09:25:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=di1X4jB6; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: rs@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOtvP126934; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=hmi1IWxoKhj+UxVsoRQjd306xBuAdEI4bwOVg6IadtU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=di1X4jB6KXA9LJA4bQFbriIr0lfv7o+A55usXYCbLESuNpVFgGs2pl1h54Gju82Gr yml/d+9bwIuATG9j/lE4urdi1qm+CLyfxAUDJ2lWhbMga9e8e7ZQxijEimPlU1vrjl iUC54c6ywcG6fIu2QSajjlHzOs4E7exGBIExlPlY= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOt2Q118763 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:54 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1E023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , , Alexandre Belloni Subject: [oe-core][kirkstone][PATCHv2 4/8] weston-init: add weston user to the render group Date: Fri, 23 Jun 2023 11:24:44 -0500 Message-ID: <20230623162448.3162089-5-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183343 From: Randolph Sapp The weston user must be in the render group in order to access render device nodes for standard user-space graphics. Signed-off-by: Randolph Sapp Signed-off-by: Alexandre Belloni --- meta/recipes-graphics/wayland/weston-init.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index b637fa6a4a5..6d62993d7da 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -93,6 +93,6 @@ FILES:${PN} += "\ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" -USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render weston" GROUPADD_PARAM:${PN} = "-r wayland; -r render" From patchwork Fri Jun 23 16:24:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAAD8EB64D7 for ; Fri, 23 Jun 2023 16:25:07 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web10.2797.1687537499254458193 for ; Fri, 23 Jun 2023 09:24:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=ehM1cIRJ; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: rs@ti.com) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOthe130002; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=8gChUgM4jEbDFX2AonIe5mTX/XGT0ZRgWLpkNAIRR7Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ehM1cIRJA0371k2l63KHtgg+hq0mvDNAVLwEn6dc8MF7DU9bCKgkRqEtyS9FQ1ecE Z2MB1kZ6Mqwv7R7MzRlsSxDYoVLC0e8rmAk/qcjWHBBidS5mNdsimRcbEj+X19PX+Q MXJRlRrZcA2BLyoHvQkh3qspLosQbk47xAoaaGlE= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOtdm020274 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:54 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1F023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , , Alexandre Belloni Subject: [oe-core][kirkstone][PATCHv2 5/8] weston-init: add the weston user to the wayland group Date: Fri, 23 Jun 2023 11:24:45 -0500 Message-ID: <20230623162448.3162089-6-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183339 From: Randolph Sapp Add the weston user to the wayland group so all users accessing the global weston socket in /run all share a group. Signed-off-by: Randolph Sapp Signed-off-by: Alexandre Belloni --- meta/recipes-graphics/wayland/weston-init.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 6d62993d7da..4fa302c8333 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -93,6 +93,6 @@ FILES:${PN} += "\ CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" SYSTEMD_SERVICE:${PN} = "weston.service weston.socket" -USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render weston" +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,wayland weston" GROUPADD_PARAM:${PN} = "-r wayland; -r render" From patchwork Fri Jun 23 16:24:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECC0FEB64DD for ; Fri, 23 Jun 2023 16:25:07 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web10.2796.1687537498815884629 for ; Fri, 23 Jun 2023 09:24:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=wvb0ukur; spf=pass (domain: ti.com, ip: 198.47.23.249, mailfrom: rs@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOtgS130006; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=03nAUVdJw381x1LEjTFhml60hh6BrgP/YtyyLpe3Tc4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wvb0ukurz4GPykbuPs4iJv/dNsX3ldk4BvYIUKsUJsufSK42ZSXnqIUV6VjWYaKVl vAJwNZDagHH/fAZHEtmQW3LGl9jHtD4MdQvrwuBSBjGdl3DbETtTdivsmnFTC4fzME KHAeUhy+1lIcVnRs+soaial+22Oqiuxfpg2yqF/8= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOt0V118766 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:54 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:55 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1G023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , Subject: [oe-core][kirkstone][PATCHv2 6/8] weston-init: fix the mixed indentation Date: Fri, 23 Jun 2023 11:24:46 -0500 Message-ID: <20230623162448.3162089-7-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183337 From: Randolph Sapp I know my text editor is going to get angry at me if this continues. Signed-off-by: Randolph Sapp Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 4fa302c8333..e538469a58b 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -26,19 +26,19 @@ DEFAULTBACKEND ??= "" DEFAULTBACKEND:qemuall ?= "drm" do_install() { - if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then + if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston - fi + fi install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston # Install Weston systemd service and accompanying udev rule install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin - fi + fi sed -i -e s:/etc:${sysconfdir}:g \ -e s:/usr/bin:${bindir}:g \ -e s:/var:${localstatedir}:g \ @@ -47,7 +47,7 @@ do_install() { install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start - if [ -n "${DEFAULTBACKEND}" ]; then + if [ -n "${DEFAULTBACKEND}" ]; then sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini fi From patchwork Fri Jun 23 16:24:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED5E6C3DA40 for ; Fri, 23 Jun 2023 16:25:07 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web11.2881.1687537499788021247 for ; Fri, 23 Jun 2023 09:24:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=enW5WrvB; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: rs@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOtmp120723; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=DNMZmWCwOgSqjXN4kbcHLEA97bTcsuqrpIbWmtMrsQQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=enW5WrvBDskJxgiMnR3kbema2VO8phlDPI+7BWy/Z8F0pU2X79UQMNM5GiRyMgAf1 IU7avFkrSY7R8y4C753scnZccT3VHrvHLUPsNdhvGxOnFh0OZesRjl6PFQIp2ss9zv xJy+RiIdi4yXakBLMb3zfKsNEm3W79VfnDA7ihhg= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOtU6023688 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:55 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:55 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1H023142; Fri, 23 Jun 2023 11:24:54 -0500 From: To: , , CC: , Subject: [oe-core][kirkstone][PATCHv2 7/8] weston-init: guard against systemd configs Date: Fri, 23 Jun 2023 11:24:47 -0500 Message-ID: <20230623162448.3162089-8-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183340 From: Randolph Sapp Just as sysvinit scripts shouldn't be present in a distro using systemd, systemd scripts shouldn't be present in a system not using systemd. Signed-off-by: Randolph Sapp Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 29 ++++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index e538469a58b..9d892d58f2f 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -26,27 +26,32 @@ DEFAULTBACKEND ??= "" DEFAULTBACKEND:qemuall ?= "drm" do_install() { + # Install weston-start script if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then + install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start + sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start + sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston fi - install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini - install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston # Install Weston systemd service and accompanying udev rule - install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service + install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_system_unitdir}/weston.service + fi + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin fi - sed -i -e s:/etc:${sysconfdir}:g \ - -e s:/usr/bin:${bindir}:g \ - -e s:/var:${localstatedir}:g \ - ${D}${systemd_system_unitdir}/weston.service - # Install weston-start script - install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start - sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start - sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start + + install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini + install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston + if [ -n "${DEFAULTBACKEND}" ]; then sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini fi From patchwork Fri Jun 23 16:24:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 26344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 059D3C001B0 for ; Fri, 23 Jun 2023 16:25:08 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by mx.groups.io with SMTP id smtpd.web10.2799.1687537499908857791 for ; Fri, 23 Jun 2023 09:25:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=SaSeR0QZ; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: rs@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOt0l120719; Fri, 23 Jun 2023 11:24:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687537495; bh=Hr7ed2qeZ0DtAImasVgjWiMOMFuvcX3eGLxKTAuHfF8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SaSeR0QZEAYVi8dOxg88GatYGYDYctMep1f73QcQ6g6pwp7zF4I7AhoLAZyrLIaUq 7aSH0QQRcjoGidIaAbadxuocp7NOyfiNXWa7AFlrB2iF27Bls9iP6W2fJyrXlKhyiN EHoBeBDre/j/TozmuwktlKV4LmLy3dEVu0mHRNwE= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35NGOtHp023687 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jun 2023 11:24:55 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 23 Jun 2023 11:24:55 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 23 Jun 2023 11:24:55 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35NGOs1I023142; Fri, 23 Jun 2023 11:24:55 -0500 From: To: , , CC: , Subject: [oe-core][kirkstone][PATCHv2 8/8] weston-init: add profile to point users to global socket Date: Fri, 23 Jun 2023 11:24:48 -0500 Message-ID: <20230623162448.3162089-9-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230623162448.3162089-1-rs@ti.com> References: <20230623162448.3162089-1-rs@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 23 Jun 2023 16:25:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/183341 From: Randolph Sapp Add profile script to point users capable of interacting with the global socket to it by default. Signed-off-by: Randolph Sapp Signed-off-by: Richard Purdie --- meta/recipes-graphics/wayland/weston-init.bb | 3 +++ .../wayland/weston-init/weston-socket.sh | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 9d892d58f2f..1884b5d4401 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -9,6 +9,7 @@ SRC_URI = "file://init \ file://weston.ini \ file://weston.service \ file://weston.socket \ + file://weston-socket.sh \ file://weston-autologin \ file://weston-start" @@ -39,6 +40,7 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket + install -D -p -m0644 ${WORKDIR}/weston-socket.sh ${D}${sysconfdir}/profile.d/weston-socket.sh sed -i -e s:/etc:${sysconfdir}:g \ -e s:/usr/bin:${bindir}:g \ -e s:/var:${localstatedir}:g \ @@ -88,6 +90,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." FILES:${PN} += "\ ${sysconfdir}/xdg/weston/weston.ini \ + ${sysconfdir}/profile.d/weston-socket.sh \ ${systemd_system_unitdir}/weston.service \ ${systemd_system_unitdir}/weston.socket \ ${sysconfdir}/default/weston \ diff --git a/meta/recipes-graphics/wayland/weston-init/weston-socket.sh b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh new file mode 100755 index 00000000000..86389d63a3b --- /dev/null +++ b/meta/recipes-graphics/wayland/weston-init/weston-socket.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# set weston variables for use with global weston socket +global_socket="/run/wayland-0" +if [ -e "$global_socket" ]; then + weston_group=$(stat -c "%G" "$global_socket") + if [ "$(id -u)" = "0" ]; then + export WAYLAND_DISPLAY="$global_socket" + else + case "$(groups "$USER")" in + *"$weston_group"*) + export WAYLAND_DISPLAY="$global_socket" + ;; + *) + ;; + esac + fi + unset weston_group +fi +unset global_socket