From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 07:52:51 2021 Received: (at 49969) by debbugs.gnu.org; 11 Aug 2021 11:52:51 +0000 Received: from localhost ([127.0.0.1]:33686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDmmw-0008B0-Pk for submit@debbugs.gnu.org; Wed, 11 Aug 2021 07:52:51 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:55302 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDmmt-0008Ag-SK for 49969@debbugs.gnu.org; Wed, 11 Aug 2021 07:52:49 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1628682758; bh=mUu3ZYNbj0rEuCPTSW05wUSPGH2rYcvj/IIYe8STTEQ=; h=From:To:Subject:In-Reply-To:References:Date; b=oXIqPlW+aJnV/hCxGJPLeXCSiVzqF1wVPFnNqU7xpB0nkv/ol3wEBlLj/uAFeFkAh IfDR6fCww+xc3C4ck7J42PgGkDcDqaP/ubZV3fyhMpeCBd8Qn0XvGPP0Y8KnggS0Es h7nU/QYjNHfZAKZGmeMepVjOdZUV3iFpivSuqzL8= To: muradm , 49969@debbugs.gnu.org Subject: Re: [bug#49969] [PATCH v2 5/7] gnu: desktop: Add seatd-service-type In-Reply-To: <20210810200756.9581-5-mail@muradm.net> References: <20210810193626.9186-1-mail@muradm.net> <20210810200756.9581-5-mail@muradm.net> Date: Wed, 11 Aug 2021 13:52:37 +0200 Message-ID: <87czqk19mi.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) 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: On Tue, Aug 10 2021, muradm wrote: > A seat management daemon, that does everything it needs to do. > Nothing more, nothing less. Depends only on libc. I don’t it is necessary to put this in the commit log. Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 49969 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: 2.9 (++) 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: On Tue, Aug 10 2021, muradm wrote: > A seat management daemon, that does everything it needs to do. > Nothing more, nothing less. Depends only on libc. I don’t it is necessary to put this in the commit log. Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Aug 10 2021, muradm wrote: > A seat management daemon, that does everything it needs to do. > Nothing more, nothing less. Depends only on libc. I don=E2=80=99t it is necessary to put this in the commit log. > * gnu/services/desktop.scm: Add seatd-service-type > --- > gnu/services/desktop.scm | 59 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 58 insertions(+), 1 deletion(-) > > diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm > index 64d0e85301..bfba9bccec 100644 > --- a/gnu/services/desktop.scm > +++ b/gnu/services/desktop.scm > @@ -13,6 +13,7 @@ > ;;; Copyright =C2=A9 2020 Tobias Geerinckx-Rice > ;;; Copyright =C2=A9 2020 Reza Alizadeh Majd > ;;; Copyright =C2=A9 2021 Brice Waegeneire > +;;; Copyright =C2=A9 2021 muradm > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -39,7 +40,9 @@ > #:use-module (gnu services networking) > #:use-module (gnu services sound) > #:use-module ((gnu system file-systems) > - #:select (%elogind-file-systems file-system)) > + #:select (%control-groups > + %elogind-file-systems > + file-system)) > #:use-module (gnu system) > #:use-module (gnu system setuid) > #:use-module (gnu system shadow) > @@ -154,6 +157,9 @@ > gnome-keyring-configuration? > gnome-keyring-service-type >=20=20 > + seatd-configuration > + seatd-service-type > + > %desktop-services)) >=20=20 > ;;; Commentary: > @@ -1182,6 +1188,57 @@ or setting its password with passwd."))) > (define polkit-wheel-service > (simple-service 'polkit-wheel polkit-service-type (list polkit-wheel))) >=20=20 > + > +;;; > +;;; seatd-service-type -- minimal seat management daemon > +;;; > + > +(define-record-type* seatd-configuration > + make-seatd-configuration > + seatd-configuration? > + (seatd seatd-package (default seatd)) > + (user seatd-user (default "root")) > + (group seatd-group (default "users")) > + (socket seatd-socket (default "/run/seatd/socket")) > + (loglevel seatd-loglevel (default "error"))) > + > +(define (seatd-shepherd-service config) > + (list (shepherd-service > + (requirement '()) > + ;; TODO: once cgroups is separate dependency > + ;; here we should depend on it rather than elogind > + (provision '(seatd elogind)) > + (start #~(make-forkexec-constructor > + (list #$(file-append (seatd-package config) "/bin/sea= td") > + "-u" #$(seatd-user config) > + "-g" #$(seatd-group config) > + "-s" #$(seatd-socket config)) > + #:environment-variables > + (list (string-append "SEATD_LOGLEVEL=3D" > + #$(seatd-loglevel config))) > + #:log-file "/tmp/seatd.log")) > + (stop #~(make-kill-destructor))))) =E2=80=98documentation=E2=80=99 field is missing. > + > +(define seatd-environment > + (match-lambda > + (($ _ _ _ socket) > + `(("SEATD_SOCK" . ,socket))))) > + > +(define seatd-service-type > + (service-type > + (name 'seatd) > + (extensions > + (list > + (service-extension session-environment-service-type > + seatd-environment) > + ;; TODO: once cgroups is separate dependency > + ;; we should not mount it here > + (service-extension file-system-service-type > + (const %control-groups)) > + (service-extension shepherd-root-service-type > + seatd-shepherd-service))) > + (default-value (seatd-configuration)))) Missing =E2=80=98description=E2=80=99 field. It might also be a good idea to write a system test for the service, you can look at the (gnu tests =E2=80=A6) modules for examples. I am not familiar with how seatd works, so I can=E2=80=99t really comment t= oo much. :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmETugUVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5g/sP/09zoh8FJFVKkhKxz8A12hXJ2zbK 7t7mF4zCif13GMTtGEtE5RQSTufyDg8nuI/i2cuhsFkdFNzviTUD2ch13uNyljzQ lIsURJZAMtW4gU3WMhmI3hoXuIrlplvAroKZgruP449C7v5qR6PS21ywZdXHuRew JC9KTylWh3neIk8Dzdj87ti15UuMOWQeGbllEJc93lPj1n3OLcKkeNjgPJ+5InOg jWgVGx8gBTKMdayShk22U8EpxgpqvqRHDVXbGQsl8NdCS+ucR+014BpD1UI4B+ly rv7VsNCay0/vye+xxl9oj23ftGeiXupQKFNv1jiFgxHGxm5X60c4nqg67P70MUGO MuesnFDvqX6gySi/LCWgZ0AHNCVeJAgZUJ0TufVn7lgAYA6JpGsmsZw5ifTjgdOP h6B8r7H45UkM+SLP9t7KzNMWIJy9HB7bdacqeFiQw7vgD8yuz/FynQDnY55bNgMM XnStazcSkpfR+lYFQ0xIkK+6X9XCxfJZzAiGpxNVBIiEf+iRObnaBL3uqfXbsLMc RA9+oHzFvLYqT4DBc1gmPpijSJ9GnGesTVtKaCFDZRnk8/JJvQXnog/egbUBb9VD iG2NbUN3dCiJxQCeaSaIdTBoiNjyZQqoZ+JTjSY0cpGVz7o1SqHnVw45XqfCpdH/ Dw0sUQwHDMC5n2+X =/VUR -----END PGP SIGNATURE----- --=-=-=--