From patchwork Thu Jun 15 21:04:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25719 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 E4C9AEB64DB for ; Thu, 15 Jun 2023 21:04:33 +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.30002.1686863071334650475 for ; Thu, 15 Jun 2023 14:04:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=TIpPaDqb; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: rs@ti.com) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4Pj7123054; Thu, 15 Jun 2023 16:04:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863065; bh=Zl48p7QV4SoUwOBZ1QCZfbB43fSjcF6SkJCjtJXgu9E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=TIpPaDqbySfbRJwhlslmlR0VrHwhwoEKGZQgji2j/9P+HdYSmmRcUv9csmkBWes3d ojsMe6f0EJhSONb+JU0/5VykYkqMatKQ0rGLsf7vNoeWxJipzPSl3jhokLbFCw2Ox+ 32gglnQSrtnrCBuu3BD53m9mO9FLnCIJ5Pgfa9+8= 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 35FL4PQS006392 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:25 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4PsV024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , ssuesens , Alexandre Belloni Subject: [OE-Core][kirkstone][PATCH 1/8] weston.init: enabled xwayland Date: Thu, 15 Jun 2023 16:04:13 -0500 Message-ID: <20230615210420.725559-2-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182884 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 497d860203..77dda03cf5 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 Thu Jun 15 21:04:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25722 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 04313C001B1 for ; Thu, 15 Jun 2023 21:04:34 +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.29997.1686863069578305612 for ; Thu, 15 Jun 2023 14:04:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=Ve29wfGU; spf=pass (domain: ti.com, ip: 198.47.19.141, mailfrom: rs@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4QJR123058; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=jMp3CIW98fp77d96TP8zeg6dJbpzFRG4S5xNYrod/F8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ve29wfGUi5yu6TP751bKRriN2iB6DwIn0aWj4b8RE9MN4AyBWNZkHLjOR2poelVxw T4nqHZ2EvXSkZpfbHP5qSLk/1jKGvwJO0xK7ymRyr3vL+ITEoCJY9KwFrsWVxoTj9L ePQ1R8hEyB6JOwBeUpP1XuNKK287YuEBQbdDi+vU= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4Qqw016336 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4PsW024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , Ming Liu Subject: [OE-Core][kirkstone][PATCH 2/8] weston-init: introduce xwayland PACKAGECONFIG Date: Thu, 15 Jun 2023 16:04:14 -0500 Message-ID: <20230615210420.725559-3-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182880 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 77dda03cf5..a7adce7fda 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 Thu Jun 15 21:04:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25726 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 1342DC001DC for ; Thu, 15 Jun 2023 21:04:34 +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.30000.1686863071126139621 for ; Thu, 15 Jun 2023 14:04:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=hqxJAKOW; 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 35FL4Qvj053695; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=8aTO/Xp9z9SRW/YuNQah8siviAu6WfuNPh08q5v2A3E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hqxJAKOWMfp/DoVJcY8rUtxTGTIP0OD+MiXPFadrx4UN1bgIi77p+duMcWqgD+YlG W6bpZDFOBkue5ho8glSEnjgK4pqcji3o0qeL5F//FkOBbZe6EYDdqn3ZGKLpmFOAHH g5N3k5iFU1UGgeLqwPSLIoui08KayepiYBdubOV0= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4Q1p016339 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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 via Frontend Transport; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4PsX024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , Randolph Sapp , Alexandre Belloni Subject: [OE-Core][kirkstone][PATCH 3/8] weston-init: make sure the render group exists Date: Thu, 15 Jun 2023 16:04:15 -0500 Message-ID: <20230615210420.725559-4-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182882 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 a7adce7fda..b637fa6a4a 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 Thu Jun 15 21:04:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25721 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 1245FC0015E for ; Thu, 15 Jun 2023 21:04:34 +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.29887.1686863071289750786 for ; Thu, 15 Jun 2023 14:04:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=Ym+9uo9+; 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 35FL4Q3R123064; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=+rtEP75GuWVrvLGK/7Rc7RKgrTqiIFgfLYxmEttOcZA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ym+9uo9+jB/v2KP0NPpyAyfHD0TURwjlXQpXB+wRM6min/fF9/CbIfTetLwz5k0lo wSG97XLeYJ82lzORjIe7FjsOjFw5EZIijFUVq09l1rdHmA2p2ONbeg048jybeQuSbM rvIXnjGxajBTH8zAND5wn2uiCXdhDmbXg5Chvzzg= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4QLS122274 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4PsY024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , Randolph Sapp , Alexandre Belloni Subject: [OE-Core][kirkstone][PATCH 4/8] weston-init: add weston user to the render group Date: Thu, 15 Jun 2023 16:04:16 -0500 Message-ID: <20230615210420.725559-5-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182883 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 b637fa6a4a..6d62993d7d 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 Thu Jun 15 21:04:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25725 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 1702CC001DE for ; Thu, 15 Jun 2023 21:04:34 +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.29998.1686863070990423382 for ; Thu, 15 Jun 2023 14:04:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=d7O0qIPE; spf=pass (domain: ti.com, ip: 198.47.23.248, mailfrom: rs@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4QNj011735; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=Da8ByJ9KDVuIXZKzrWtlwp2rTZ0aE7B7LI1Uh5ydFso=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d7O0qIPEALGNW89jJgf/x/2nt3M7qcPOtoaDyeu/IxWSG92pdd1LxWyfLirLpaGGv 1tJhcEWyxCzUD1d9QSYFkADecUxCd9uA/6o1yoF9YhmdKwn/eV7WzkNWXnn+NOlAgi bA0MP406HGagpzQ4O+COKgmQpk/xZ9+pUPEWpcQo= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4QDa016343 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4PsZ024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , Randolph Sapp , Alexandre Belloni Subject: [OE-Core][kirkstone][PATCH 5/8] weston-init: add the weston user to the wayland group Date: Thu, 15 Jun 2023 16:04:17 -0500 Message-ID: <20230615210420.725559-6-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182881 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 6d62993d7d..4fa302c833 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 Thu Jun 15 21:04:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25724 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 E5B48EB64DC for ; Thu, 15 Jun 2023 21:04:33 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by mx.groups.io with SMTP id smtpd.web11.29884.1686863068524703169 for ; Thu, 15 Jun 2023 14:04:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=DcrjN+NQ; spf=pass (domain: ti.com, ip: 198.47.23.248, mailfrom: rs@ti.com) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4QGf011739; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=QRfNLZN9sVHdaXSnUJVtQecyE0aBAidMMusfIBJBt+c=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=DcrjN+NQ9RKS2nsTOXtnTIlqPPa/EcqeW56TYgQTLfd7q45aTIXHRo3TGwhpsLjpR vEgcqJekBQR/gXetBbNP/lq+UG9I4J3MFqYBS5JXmnpO4/zBBRfqv248jwp4/HgXLQ N3OoEuy/e5vZLqMDw5VtjAZEy85MTpuENBDw3tVY= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4Qkw064281 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 15 Jun 2023 16:04:26 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE105.ent.ti.com (157.170.170.35) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4Psa024205; Thu, 15 Jun 2023 16:04:25 -0500 From: To: , , , CC: , , Randolph Sapp Subject: [OE-Core][kirkstone][PATCH 6/8] weston-init: fix the mixed indentation Date: Thu, 15 Jun 2023 16:04:18 -0500 Message-ID: <20230615210420.725559-7-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182877 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 4fa302c833..e538469a58 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 Thu Jun 15 21:04:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25720 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 F2470EB64DA for ; Thu, 15 Jun 2023 21:04:33 +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.29885.1686863068798956887 for ; Thu, 15 Jun 2023 14:04:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=ADSWpIHM; 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 35FL4Qdf123071; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=7flcMFbA1MBq9R5NjUgfCbAduVCDV8roUu2sPVvt6x0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ADSWpIHMAkw8MKmS4tqWdfpPSV938YTkswHxGZVOKXfQLl2ST2Lb/PD34tvlQh7Q1 o4NQVxrveap/jQbb9E/mgl0RWeeXbmBrHTpqa2CB7N1gfNeyjL+6LJ/b1pVf+MNCK9 +ZGKakxte4hrPeHs4AuGWeXnEugR87N88Kzs1Gzg= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35FL4QFZ122280 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) 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; Thu, 15 Jun 2023 16:04:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) 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; Thu, 15 Jun 2023 16:04:26 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4Psb024205; Thu, 15 Jun 2023 16:04:26 -0500 From: To: , , , CC: , , Randolph Sapp Subject: [OE-Core][kirkstone][PATCH 7/8] weston-init: guard against systemd configs Date: Thu, 15 Jun 2023 16:04:19 -0500 Message-ID: <20230615210420.725559-8-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182878 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 e538469a58..9d892d58f2 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 Thu Jun 15 21:04:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randolph Sapp X-Patchwork-Id: 25723 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 02653EB64DD for ; Thu, 15 Jun 2023 21:04:34 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by mx.groups.io with SMTP id smtpd.web11.29886.1686863068949084500 for ; Thu, 15 Jun 2023 14:04:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17q1 header.b=YPZMTSXX; 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 35FL4QfB125298; Thu, 15 Jun 2023 16:04:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686863066; bh=8YrlUNpQo/WgnwZIHMNcTan6hto6J0xfNa2CgQ3+epM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YPZMTSXXJutOhUMFCzt3+xBf0tjYCfqWUrsRQwA8qoY0bVd8DL20zffCV8GoCiU3o 0EzfSm5I24GcaJoT6lLU59BcEBLzd2ValwUyqnly7cp/KKpAulqi2ui8s/yvYgTN2a TO1NR25CsniuNG9A5Ru7dYihyXaIthfUUeq0FcH8= 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 35FL4Qsb122277 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jun 2023 16:04:26 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) 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; Thu, 15 Jun 2023 16:04:26 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE106.ent.ti.com (10.64.6.27) 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; Thu, 15 Jun 2023 16:04:26 -0500 Received: from rs-desk.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35FL4Psc024205; Thu, 15 Jun 2023 16:04:26 -0500 From: To: , , , CC: , , Randolph Sapp Subject: [OE-Core][kirkstone][PATCH 8/8] weston-init: add profile to point users to global socket Date: Thu, 15 Jun 2023 16:04:20 -0500 Message-ID: <20230615210420.725559-9-rs@ti.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615210420.725559-1-rs@ti.com> References: <20230615210420.725559-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 ; Thu, 15 Jun 2023 21:04:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182879 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 9d892d58f2..1884b5d440 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 0000000000..86389d63a3 --- /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