From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sJKuGCy6E2HiNAEAgWs5BA (envelope-from ) for ; Wed, 11 Aug 2021 13:53:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YAs/FCy6E2FmPgAAbx9fmQ (envelope-from ) for ; Wed, 11 Aug 2021 11:53:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AA3FC1F91E for ; Wed, 11 Aug 2021 13:53:15 +0200 (CEST) Received: from localhost ([::1]:37868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDmnK-00013n-Hr for larch@yhetil.org; Wed, 11 Aug 2021 07:53:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDmn8-00012d-VB for guix-patches@gnu.org; Wed, 11 Aug 2021 07:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDmn8-0001Qt-Nn for guix-patches@gnu.org; Wed, 11 Aug 2021 07:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDmn8-0008BV-Cl for guix-patches@gnu.org; Wed, 11 Aug 2021 07:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v2 5/7] gnu: desktop: Add seatd-service-type Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Aug 2021 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: muradm , 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.162868277131439 (code B ref 49969); Wed, 11 Aug 2021 11:53:02 +0000 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= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628682796; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=7beYfAlamAiebVoQQy88ZhO2GXtpKIYJxadamb4Rmes=; b=cer98L61ko2PjNEfZulpdEziM0ybYmWRH9Ap3giGlRzmzuNS8AKre7m5wxF/lrPB+CwIan AL1dekq/vSJoqacW38L8s01I5gEq14Qp16sl+TAXnHSu5tM218vXhqzihnILzv/0+S8ten wHXUiLGj+uBrl+XXFEKLjjeQWhUMAIVFefkOXhIosoL3xTMVo3nHOdK/XARnou2sTz6ywm Fs9Q51xYCSoqUjMw0bsob2+4lzabOX9Y1kNQ+vQDDHwys4r6M5iyeFsNyaxcLgpBEEduQR ofR09cb0Fa43cC3eL0sxRDB5ZKgk6DhshqG0FPKDkPnswhkOA9dD23772jizFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628682796; a=rsa-sha256; cv=none; b=b2WTttJTOg/7qlTOtfZfeYq7PUnX7WLSPBEUupoqbURsTwT5Ipc9pmIsP7ovI0R79+4LkC 0kAjT7zjBR663qCyPjhTt1XGTbkg+RgKcIDKqErt3+P52mHit7OXJpql8+YjlgH+bTBuHu /40vjqQk+E4zwG+Lty3VfgkY9vZGXAS/eUinnibmmnAnlAtfjVxpH/NuUxpbFEeBrVIcGj 469WzotbIq2naEO74R3DEikwPmcGczkoU8qyII0AMpI7MrfEAfbrmUzlgSu+AW2GLt/j1P IsgL+mdxbx/93DIGgkE6ite8ulauutrgBswr2a1n4AN+2MQ0FheXw5USkklcXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=oXIqPlW+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=oXIqPlW+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: AA3FC1F91E X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: mZ+wume42miE --=-=-= 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----- --=-=-=--