From patchwork Wed Nov 27 19:59:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 53327 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 975C3D6D235 for ; Wed, 27 Nov 2024 19:59:12 +0000 (UTC) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.web11.80587.1732737548855309138 for ; Wed, 27 Nov 2024 11:59:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bbDJ7KXg; spf=pass (domain: gmail.com, ip: 209.85.214.177, mailfrom: raj.khem@gmail.com) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-21260cfc918so484065ad.0 for ; Wed, 27 Nov 2024 11:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732737547; x=1733342347; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4OHwTOUk2ynTdbld0Knl9EFB1JcfPdz3LjpXtSRgWhE=; b=bbDJ7KXgm7VyK8DxhX/2fDGJZSi3kAvGhxUkF19bcQRkBrbY038iPZvIiQdPKykM5C FjQV3Dw9tIbxY/IxZqqcuUFJo9yLmYmiuqp8NWCT/d1C6+/NNOFW1NQidZr1rF8GEhA0 m7VIw2Op8FP3IwZYyasHf3EhNrzPwryx91nQHhSZslSTe1Q4SDH5wyaxYAt+oBgtmkS/ 4JXMTIr1G+lLQRFIYx+18qItHzhilOzxEiXxMECh7e5KgVlFZpn6zxXE/oKJH/fuDHRg od38uRev84mNXNzLC37NpE28zYQ9Y5/LB1P3fdo24knWEXk3kgr+V7X9wWWIZegG5oko ArKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732737547; x=1733342347; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4OHwTOUk2ynTdbld0Knl9EFB1JcfPdz3LjpXtSRgWhE=; b=G9dtxptNotoMCLHJ724MQcxVg6XeK3LXzErc7CPW+ZK+x4OJgD+aJzBU+tCFdlA78s 7z0YD5mCdlpKbr2PvQEwE01Dmbt7a4hbrG1A+7EPEezCE+f1eYnsG3vnCIrGhN2UuqHn Ts9IVmdiTE0nCJqYD2wcYoNl9spXyM0pAWzpcsv97/BYxBRrNGVoy6NHgkv/+EDqv5Y8 dB/uqmiWAPJIVu9MZt1fF+/5S1YHTVcZkR791PiPvsliwVPPURcW4BnhYCckAb5o1h7A E3QkKaSA416TSDGzixeMjfBmMsMHsK45xgxJSSmjkO3cgei8amHwXEIsIRuFVCXU7jMr K6Pg== X-Gm-Message-State: AOJu0YwC30JkI+ZK+x5+OyN5PJlQbH8Jt9mA9a2ZmVFdPu+RFh49dwFu JC5j9lWcXv+ewcmLUDePJSIJ+1aBNafQoNJoAZqe2/KE66m/xucLq6mxJsWA X-Gm-Gg: ASbGncsu+wlTsl12pMTxN305tNWpQT6q1z7EOFV0BWM4zc0KLEAyhQE3WxD2A6oL4Ag LCEH8VMd6HdGzu5DKdTdtrBqb7p/wtmRHZu+XUMAJ97osDY9UapDRBun5Eysux1KBGFkjO/XYWS WQzfI27bAtzhay7JewpYD67wkHTjOD274UV3fwCL+n4aF8qo6+HnDWX/PsKI6D4JYTnH5J/gAjU Dey9MsPNZt0u8KGh7Oa9bbZp43IsdquPBHdgpqIyNxSw3whf8R+ X-Google-Smtp-Source: AGHT+IH9paPyu1qhUBLktFoBna5uWcduAHRWWgaK1+A73kPtapGgB1EPZIyoI+K4lZrHlUm1Ey4P9g== X-Received: by 2002:a17:902:cf07:b0:20c:5909:cc48 with SMTP id d9443c01a7336-21501b63d18mr60586135ad.40.1732737547040; Wed, 27 Nov 2024 11:59:07 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8201:fd20::4338]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2129dba5a7esm106958465ad.83.2024.11.27.11.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 11:59:06 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH v2 1/2] seatd: Create seat user and package systemd service Date: Wed, 27 Nov 2024 11:59:03 -0800 Message-ID: <20241127195904.91647-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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 ; Wed, 27 Nov 2024 19:59:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207963 With latest version seatd does not work properly if user access permissions are not correctly set, therefore create 'seat' group and package the seatd.service file and enable it by default with systemd distro feature set logind to systemd when using systemd as default init system Signed-off-by: Khem Raj --- v2: Use seat group instead of video group in init file meta/recipes-core/seatd/seatd/init | 2 +- meta/recipes-core/seatd/seatd_0.9.1.bb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/seatd/seatd/init b/meta/recipes-core/seatd/seatd/init index 0589c765ac7..405000c16f3 100644 --- a/meta/recipes-core/seatd/seatd/init +++ b/meta/recipes-core/seatd/seatd/init @@ -15,7 +15,7 @@ killproc() { case "$1" in start) - seatd -g video -n 1 > /tmp/seatd-start-notify & + seatd -g seat -n 1 > /tmp/seatd-start-notify & [ -s /tmp/seatd-start-notify ] && exit 0 sleep 0.1 [ -s /tmp/seatd-start-notify ] && exit 0 diff --git a/meta/recipes-core/seatd/seatd_0.9.1.bb b/meta/recipes-core/seatd/seatd_0.9.1.bb index 8da57acc567..8ee43a3dc8f 100644 --- a/meta/recipes-core/seatd/seatd_0.9.1.bb +++ b/meta/recipes-core/seatd/seatd_0.9.1.bb @@ -11,7 +11,7 @@ SRC_URI = "git://git.sr.ht/~kennylevinsen/seatd;protocol=https;branch=master \ SRCREV = "566ffeb032af42865dc1210e48cec08368059bb9" S = "${WORKDIR}/git" -inherit meson pkgconfig update-rc.d +inherit meson pkgconfig systemd update-rc.d useradd # https://www.openwall.com/lists/musl/2020/01/20/3 CFLAGS:append:libc-musl:powerpc64le = " -Wno-error=overflow" @@ -22,14 +22,21 @@ PACKAGECONFIG ?= " \ " PACKAGECONFIG[libseat-builtin] = "-Dlibseat-builtin=enabled,-Dlibseat-builtin=disabled" -PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[systemd] = "-Dlibseat-logind=systemd,,systemd" do_install:append() { if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd + else + install -Dm644 ${S}/contrib/systemd/seatd.service ${D}${systemd_unitdir}/system/seatd.service fi } +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM:${PN} = "-r seat" + INITSCRIPT_NAME = "seatd" INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" + +SYSTEMD_SERVICE:${PN} = "seatd.service" From patchwork Wed Nov 27 19:59:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 53326 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 975EDD6D236 for ; Wed, 27 Nov 2024 19:59:12 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web11.80586.1732737548651363071 for ; Wed, 27 Nov 2024 11:59:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zrw7lWff; spf=pass (domain: gmail.com, ip: 209.85.214.182, mailfrom: raj.khem@gmail.com) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2128383b86eso593595ad.2 for ; Wed, 27 Nov 2024 11:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732737548; x=1733342348; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fF2uGsGMOUadHoG3HTDFPl9W3TZuViS91e4qkLTwOo8=; b=Zrw7lWffm0VStiYkiGEN/Q0LxupF5VslFELIuqhsJ7GJwXrjWHwuVU4VPgIR4ww5sc H/IjVV6jSULq4mq0rzUp0n3RtV9/OCAKrbRiJc+IvSvMH8oO6Bnk+J5/6+Mm6WiD5v2q w8gm2hh0xw2+UZnoNd2A2HmnzkCK8qaqAh4GAhF3lUgkmx4UJ+JlGoUxXWG0cf5/ByHk PbYn3mSCWLUTXzJ2yEcvWhxlwSlMgtYOg3i5MBomjmgKS+agsH73jomiftQ8m6X+HiG7 5Vmn9Lg5rfoXZJtIjLyZuTjAZwVva5XBOw66RHL+bfQGB+tgEY1KGBjRJV8cJJNG1d0/ L2BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732737548; x=1733342348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fF2uGsGMOUadHoG3HTDFPl9W3TZuViS91e4qkLTwOo8=; b=lKZlQ8dHvE0GKG5QpCZ5VosrNJZoGJY1ebjexT6BJcWSRp6SLJ1Rppk4/4cqSZuOqP XBBWxwyomAS0m+PCR4lKHxAHJ6MsSOdzlzAAR747BWfcwRZ3YmPeV4c4Yo1xcVfCLY+X cpjjVNUyJmpsFtpkh2KQil6dB9RNstvImbFU3d+Tn3HfUAza65u+/wDBQ1WT9krxOyAi UyzXgJrnSmdfzm6XrpDLIhKHP1fCeFHr45qjMNVAOxqsX9GlirGSe5CSuIPQZ2Sc5c+7 MahQP0uNQidg81vHVwClXsIl7+tyoJNMRLreffLO+CiZ+YH523e0MA+/EY/RWSsjqFSX GPfA== X-Gm-Message-State: AOJu0YxWVCxuOGBqH5pWEYNgbGLkOsRuOfkQNiTiLG9eYN/jNLzAui16 Cw7gRJdh49wdppSML7BTRCY5z5gyoI5uTB9xLDNPa6x/HyMRtQmN67txOZrp X-Gm-Gg: ASbGncttivIMrY1StR5qN0aHEinMUscYX6uq8OEJe1H3K5A25Y7aEzD+nqNenJtuk8j 4CdIZ+ykEZitLL0wZoyeMQUbpv6gBMcf9mXtJSHn+sUX9U4DjBfGATZEK5kSgbGawGnZGowW9Vb jCqUZNzTW/JR4JDppOHnY6lBNXEQ7pvr9cN+m0CjnotHax1/P0KPjYnYUjur+CsMH3dGjeWLqPf Q8nt3edPBlioAB7vEFv8Pr+HeVJSjbKJeDeLCWgVHYV9m8oHf4C X-Google-Smtp-Source: AGHT+IE/dJ1Va08iALTpypyDsVIFbUseMFx40Zu63XHsJlko0q4e9JsoAF+6Dw+8pLpwmMKYgD5HBA== X-Received: by 2002:a17:902:db03:b0:211:ef94:7a92 with SMTP id d9443c01a7336-21501d58398mr41347025ad.55.1732737547786; Wed, 27 Nov 2024 11:59:07 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8201:fd20::4338]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2129dba5a7esm106958465ad.83.2024.11.27.11.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 11:59:07 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH v2 2/2] weston-init: Make weston user member of seat group Date: Wed, 27 Nov 2024 11:59:04 -0800 Message-ID: <20241127195904.91647-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241127195904.91647-1-raj.khem@gmail.com> References: <20241127195904.91647-1-raj.khem@gmail.com> MIME-Version: 1.0 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 ; Wed, 27 Nov 2024 19:59:12 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207962 This enables weston launch to access the seatd socket /run/seatd.sock to communicate properly to acquire seat Signed-off-by: Khem Raj --- v2: Create seat group as well meta/recipes-graphics/wayland/weston-init.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 3de697ec34e..5723655a9bb 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb @@ -102,6 +102,5 @@ 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,wayland weston" -GROUPADD_PARAM:${PN} = "-r wayland; -r render" - +USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input,render,seat,wayland weston" +GROUPADD_PARAM:${PN} = "-r wayland; -r render; -r seat"