From unknown Fri Aug 15 15:33:01 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#57047 <57047@debbugs.gnu.org> To: bug#57047 <57047@debbugs.gnu.org> Subject: Status: [PATCH v2] gnu: greetd-service-type: Add greeter-extra-groups config field. Reply-To: bug#57047 <57047@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:33:01 +0000 retitle 57047 [PATCH v2] gnu: greetd-service-type: Add greeter-extra-groups= config field. reassign 57047 guix-patches submitter 57047 muradm severity 57047 normal tag 57047 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 07 17:48:16 2022 Received: (at submit) by debbugs.gnu.org; 7 Aug 2022 21:48:17 +0000 Received: from localhost ([127.0.0.1]:38423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKo88-0000EA-Am for submit@debbugs.gnu.org; Sun, 07 Aug 2022 17:48:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:35308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKo87-0000E3-DC for submit@debbugs.gnu.org; Sun, 07 Aug 2022 17:48:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKo87-0003F4-6z for guix-patches@gnu.org; Sun, 07 Aug 2022 17:48:15 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:34170 helo=nomad-cl1.muradm.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKo85-00028T-Lc for guix-patches@gnu.org; Sun, 07 Aug 2022 17:48:14 -0400 Received: from localhost ([127.0.0.1]:48752) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oKo7V-0001ZE-22; Sun, 07 Aug 2022 21:47:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Iyo7Kt/OBpisvavYZ9vzVLreMLacPDasYHjYyUdAVM4=; b=QVym5EFbwuxWJSwOS1JVRYaBPj x0RD0BGWhLIKFMOEEuF4IBVcz4i94wO78cUNESeUgH56zbGPQBAx6vatNsgvfeh30eO4CmkqDs6h8 ACdz5hrqPKEtENBSS//quOuVN2lPy3uIp5SvzV71WkzF8wBs6G9bIA51lHMTH6tUwTBX7/hUGXCs9 4JuyK2pAup/7TbWOEgz1CoARr50RQvKfRl11BgIO5WmlLT3N4CJlTOW6m8K6hp2xMmTOj0QPbDZYC 2K7Z82cffZpiIK26hzg4BTx3S4dnpzOEe0smMAo9xmgfKypHXub0KTpQnczenGjUMcq4UxsgaJtkr eiPC6yYNabctwaL+KV2itLeVxdqHIxaspkHvGGOU91E8VYgs426IU2Jxdtg6+GcwlgO6dFoCup4VV tI1bcQP+IGXipgmo2X+Cyk7se3ZbBZlRFUnFXAeFaXTJcKp+xYRi4fijo8WI0ld6l7xx8wt2w7Ku1 FXxY54qTnPFn+PW2IdE69f3F; Received: from muradm by localhost with local (Exim 4.96) (envelope-from ) id 1oKo7w-0005oB-21; Mon, 08 Aug 2022 00:48:04 +0300 From: muradm To: 56699@debbugs.gnu.org, Liliana Marie Prikler Subject: [PATCH v2] gnu: greetd-service-type: Add greeter-extra-groups config field. Date: Mon, 8 Aug 2022 00:48:04 +0300 Message-Id: <20220807214804.22323-1-mail@muradm.net> X-Mailer: git-send-email 2.37.1 In-Reply-To: <874jyn20et.fsf@muradm.net> References: <874jyn20et.fsf@muradm.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.162.159.157; envelope-from=mail@muradm.net; helo=nomad-cl1.muradm.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit Cc: "\(" , guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/services/base.scm (greetd-service-type): Added configurable groups. [extensions]: Switching accounts-service-type from const to function. (): Added greeter-groups field of type list. (greetd-accounts-service): New variable, function returning list necessary accounts for accounts-service-type, including the greeter-extra-groups. (%greetd-accounts): Removed. * gnu/tests/desktop.scm (%minimal-services): Add test for greeter-groups. * doc/guix.texi: Mention greeter-extra-groups field with example. --- doc/guix.texi | 8 ++++++++ gnu/services/base.scm | 24 +++++++++++------------- gnu/tests/desktop.scm | 7 +++++++ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 21cee4e369..2b09bea3b0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18509,6 +18509,14 @@ the 'root' account has just been created. @item @code{terminals} (default: @code{'()}) List of @code{greetd-terminal-configuration} per terminal for which @code{greetd} should be started. + +@item @code{greeter-groups} (default: @code{'()}) +List of groups which should be added to @code{greeter} user. For instance: +@lisp +(greeter-groups '("seat" "video")) +@end lisp +Note that, however it will fail if @code{seatd-service-type} is not present, +or to be more specific, @code{seat} group is not present. @end table @end deftp diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 27eae75c46..85de6decfe 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2918,17 +2918,6 @@ (define (make-greetd-terminal-configuration-file config) "user = " default-session-user "\n" "command = " default-session-command "\n"))) -(define %greetd-accounts - (list (user-account - (name "greeter") - (group "greeter") - ;; video group is required for graphical greeters. - (supplementary-groups '("video")) - (system? #t)) - (user-group - (name "greeter") - (system? #t)))) - (define %greetd-file-systems (list (file-system (device "none") @@ -2956,7 +2945,16 @@ (define-record-type* greetd-configuration? (motd greetd-motd (default %default-motd)) (allow-empty-passwords? greetd-allow-empty-passwords? (default #t)) - (terminals greetd-terminals (default '()))) + (terminals greetd-terminals (default '())) + (greeter-groups greetd-greeter-groups (default '()))) + +(define (greetd-accounts-service config) + (list (user-group (name "greeter") (system? #t)) + (user-account + (name "greeter") + (group "greeter") + (supplementary-groups (greetd-greeter-groups config)) + (system? #t)))) (define (make-greetd-pam-mount-conf-file config) (computed-file @@ -3033,7 +3031,7 @@ (define greetd-service-type login manager daemon.") (extensions (list - (service-extension account-service-type (const %greetd-accounts)) + (service-extension account-service-type greetd-accounts-service) (service-extension file-system-service-type (const %greetd-file-systems)) (service-extension etc-service-type greetd-etc-service) (service-extension pam-root-service-type greetd-pam-service) diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm index 25971f9225..ef4a7e0ec9 100644 --- a/gnu/tests/desktop.scm +++ b/gnu/tests/desktop.scm @@ -122,6 +122,7 @@ (define %minimal-services (service seatd-service-type) (service greetd-service-type (greetd-configuration + (greeter-groups '("input" "video")) (terminals (list ;; we can make any terminal active by default @@ -286,6 +287,12 @@ (define (greetd-pid-to-sock pid) (marionette-type "echo alice > /run/user/1000/test\n" marionette) (file-get-all-strings "/run/user/1000/test"))) + (test-equal "check greeter user has correct groups" + "greeter input video\n" + (begin + (marionette-type "id -Gn greeter > /run/user/1000/greeter-groups\n" marionette) + (file-get-all-strings "/run/user/1000/greeter-groups"))) + (test-assert "screendump" (begin (marionette-control (string-append "screendump " #$output -- 2.37.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 07 17:57:39 2022 Received: (at 57047) by debbugs.gnu.org; 7 Aug 2022 21:57:39 +0000 Received: from localhost ([127.0.0.1]:38443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKoHC-0000Ss-O7 for submit@debbugs.gnu.org; Sun, 07 Aug 2022 17:57:38 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:42012 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKoHB-0000Sd-C9; Sun, 07 Aug 2022 17:57:37 -0400 Received: from localhost ([127.0.0.1]:44690) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oKoGY-0001ZW-0v; Sun, 07 Aug 2022 21:56:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JubEel9UcLWr7+XhBLZvkiHaJnNH+H1f5G9YqoJsSIk=; b=FFpczj5e4RsnT3J/XPtuXlY2Ti qn2yptBiZLu1dpxkb6pXVxDowHAiGROGLDoNRVJo5sY4s2/bF8yzvaN9cv1VLywK9+7J5iuizP9vz 7bX+c5p7b7mAwgfuigJ1anKhSZUH0GodIYwoCPwFwI3LK1cxibmFIlajewjpRpvvV/fdoPVGgulP1 pVJ7kCGuFuoGlbtN1CSqqKrgutcGqCxjPY4iAz1ET02O2TyYETfV7zzTjw8607UaUYfyRZSKM2Bo6 O3UNbDrTAk/FERwTwSTHG5sk9l/73kn6r8OJ8kkAeO12bM2HDXd2y56ckE/fUYyBgt8G9TEX+OGLb R1qCZIWxSNhRplCSS4KYxcAbexY3WHnYUVBbiaEeukqj2DpBroo8J/ouHYbACgHQ2trH/LGq90LWS jTOFaXBiL8FhpyfLSeTQML+EvtJvcw5Gjq2S6cM07oFy63z4h7MQFLX8YGwb2yRte5C2IQrhxfGXD yMbgXYCFov0pwQgdB9lVnUdA; Received: from muradm by localhost with local (Exim 4.96) (envelope-from ) id 1oKoGz-0005qp-0M; Mon, 08 Aug 2022 00:57:25 +0300 User-agent: mu4e 1.8.7; emacs 29.0.50 From: muradm To: 57047@debbugs.gnu.org, control@debbugs.gnu.org Subject: RE: [PATCH v2] gnu: greetd-service-type: Add greeter-extra-groups config field. Date: Mon, 08 Aug 2022 00:56:23 +0300 Message-ID: <87zggfzph7.fsf@muradm.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close should not be opened Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: muradm.net] X-Debbugs-Envelope-To: 57047 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; format=flowed close should not be opened --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmLwNUQACgkQ6M7O0mLO BeLjzBAA09710tgT/OIdsAVpVoKr1mKLaXJkPHi9pVGgdiCAw3qrZg7NhNDGcesF YJJq+pNt+MU3BdivJQmMdMRqjeYveRwvmWXMpFSyxQD7uyq+BY3EIFB0adD70m7v PhAI+rWZ2LBctfLj1khzt3TIDcvAis8jH8aMnkowqaiQM++zLE0D87rXo95kqii+ i3NRYJ/qOmhI4ouK8WwQLPdGz5QjibLFSsI8I/9mENDSKx4vUP+OK5WznRIHS34i aAt5Xh0ojspZGseIaI7DC4XoybR0Qe4FyZAZ+eQKh46lA7k+XlvQIe3gUO59fvUT ewF4MN478dsHhUyK9ZfHN0Cpz4vaq1coNXw7Kvhhiojlg9qdQWwEaM95AExctCEW DWVNd5SkTIxeLgRRw+kQYneKRZ9zFK+geV4IRnpS9rnwdsjw3dTMUXvxspPSFjZe wczXIJlZUVmNFubifF+h6edvcPcwIxVCCOQ75Cqx+EmJNT/iO1CQTKnHudUKH85v NqQ3VKIsGJQtUpz96UWy3VX3Z++uh2DigjTyxzufYiexwN+5ogs4ed/dA4qESGV8 OdCcsEanJOUXgEY77p6VXk9sOQwTBJB0jM1DL9cMK+U/JTSyR3vHkVJZbcP1TY0T owDb49lCiKTQ9NG5FYALS10CzyMHE2NovyiLE77R6Fip9oVcg40= =6N4v -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 07 18:01:20 2022 Received: (at control) by debbugs.gnu.org; 7 Aug 2022 22:01:20 +0000 Received: from localhost ([127.0.0.1]:38468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKoKm-0002kp-DD for submit@debbugs.gnu.org; Sun, 07 Aug 2022 18:01:20 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:52704 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKoKl-0002kc-4M for control@debbugs.gnu.org; Sun, 07 Aug 2022 18:01:19 -0400 Received: from localhost ([127.0.0.1]:39476) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oKoK8-0001Zi-0e for control@debbugs.gnu.org; Sun, 07 Aug 2022 22:00:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Type:MIME-Version:Message-ID:In-reply-to:Date:Subject:To: From:References:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=IqwYXPbGPx58HcIBC4b5Dt2oBNOAit9gNRDY3c2kgIE=; b=kxpgC5pO4owwZ8BZd/O/0ghFPT 29h5i0TWxOi3vElmNeyvrDxQ2iX/6wfN6qA2qimvJQ1qAphKtdG8gqwLXNb5kk9jyiPJxBtyJFJqQ 90eOsA5/GCb0tDAfo2IoesDtHWBVCAr8NU6irD99adCalGOtYc8pki9X8UMA/as5ztf9RmOr4LvRp eJ4Web0wVIHJj/OxNhbSzxgsXHgisQUzGrBh/QyE5sNNiUxSkpRyw1Fno0EqNAfruxeDKAZosdleZ iRZw9tm2b6y6HEiVzpGEgYaj7QWAOHbzs7/qxVLXYU5r7JbOhGZBhWUv9peSHPi1/5Hq26AOXRmvd HE2t7BuYo3Ff5sCYfI0jPltSyiUP++KBQwZ5zgjEF1gpNeiOIoABGM75tdnWnkMhLUo1imugsk487 GEgl1lVjAAdQCBBX62WNmEEPrCUp9oPzaJ7J8XJpxc38h73TfVlUOKuB+HWjb2GC93hfKD/b2tNnP 7prW0gq0Ah/8Ln1TC13UgwSq; Received: from muradm by localhost with local (Exim 4.96) (envelope-from ) id 1oKoKe-0005sC-1J for control@debbugs.gnu.org; Mon, 08 Aug 2022 01:01:12 +0300 References: <87zggfzph7.fsf@muradm.net> User-agent: mu4e 1.8.7; emacs 29.0.50 From: muradm To: control@debbugs.gnu.org Subject: Re: [PATCH v2] gnu: greetd-service-type: Add greeter-extra-groups config field. Date: Mon, 08 Aug 2022 01:00:47 +0300 In-reply-to: <87zggfzph7.fsf@muradm.net> Message-ID: <87v8r3zpaw.fsf@muradm.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 57047 muradm writes: > [[PGP Signed Part:Undecided]] > > close > > should not be opened > > [[End of PGP Signed Part]] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: muradm.net] X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; format=flowed close 57047 muradm writes: > [[PGP Signed Part:Undecided]] > > close > > should not be opened > > [[End of PGP Signed Part]] --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmLwNicACgkQ6M7O0mLO BeLtow/7B87FTas1VhAEhFhVQ6+TzEiv6T30s+C98vwLAsBRW0+P4k1Jdch1KR1k 0Pb5QaRCCw7eXJq4ZX9iHzPGjC0boC46pN5+Tc51yjIgDPjJDGiLNil2C4XlgMzH AxBmkC/nJHLeeSDM+zdiisOS4QXrZRmvWFazxIXIcdMrHlSLlAehMlVARvgxPFZ8 SdgbBlb5CZhCE2/w1oLIKs3OL2u5JdxCRbbqaPy71QeLKn6P12K+e3XI2DYWumRz co3Wd/CxkSVyt2dz6o377WOZsaV5iLVbt83ipRj4+mABEBVPVNPkk2t/yEyZ3G7P E8ab4dJFcJKlp2CTXRlROD2BCIe2pwu9iVc/EvVigW97O9zNnWtHSeoBPP/V9IKa qkDjxe6pwSdCOtr0RmcMVpSL1ZvpLYumwWMU1u+GQt3w5MIlAF7WJJ1NKdDGDhgs hBl/ac0s0T147PvPIrJ4bNErWAnOKBVpAAGIhy2zcUh66Lcz1ELlOUTlihcSwD0Y 8v/Bg9+SAnh20EvIRyPa+7/MBvhY3nZnnMY4N77Jst8gn9/ab66M3KfdDOTPOghj 6KjxZTv+//LCfmwAr4U/dGZ2nTiNAIi6ZPEfH8Dp8l2sKjJ68eqUSYD2eahj4uGi tjg17C9nWzQGGYBtT5U+GhwCEwo3bGaDmg6vIMTFKipUKUlV6Xg= =qCM/ -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Aug 15 15:33:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 05 Sep 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator