From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ELrFJAQ0FGGxlgAAgWs5BA (envelope-from ) for ; Wed, 11 Aug 2021 22:33:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kIxyIAQ0FGHKdQAA1q6Kng (envelope-from ) for ; Wed, 11 Aug 2021 20:33:08 +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 B091812EF0 for ; Wed, 11 Aug 2021 22:33:07 +0200 (CEST) Received: from localhost ([::1]:53922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDuuQ-0007IN-Li for larch@yhetil.org; Wed, 11 Aug 2021 16:33:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDuuM-0007IE-El for guix-patches@gnu.org; Wed, 11 Aug 2021 16:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDuuM-0008At-8W for guix-patches@gnu.org; Wed, 11 Aug 2021 16:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDuuM-0004Oe-5n for guix-patches@gnu.org; Wed, 11 Aug 2021 16:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v2 5/7] gnu: desktop: Add seatd-service-type Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Aug 2021 20:33: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: Xinglu Chen Cc: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.162871392516824 (code B ref 49969); Wed, 11 Aug 2021 20:33:02 +0000 Received: (at 49969) by debbugs.gnu.org; 11 Aug 2021 20:32:05 +0000 Received: from localhost ([127.0.0.1]:36737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDutN-0004Mo-60 for submit@debbugs.gnu.org; Wed, 11 Aug 2021 16:32:05 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:44648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDutG-0004MN-QI for 49969@debbugs.gnu.org; Wed, 11 Aug 2021 16:31:59 -0400 Received: by mail-ed1-f46.google.com with SMTP id z11so5666832edb.11 for <49969@debbugs.gnu.org>; Wed, 11 Aug 2021 13:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=cAnU0+oTEvRv+0C0+oifOooHRuVbO4IagIY/Pc6QO88=; b=RGSLYCP4btlc95APRE8ouMgLnBtKUL7F2Pf1vCnOlDAD+EPKw5+Ceh9cuTg3PAzBlc yu82vjMFtjsUd3gMTHF59e7uZ15ALWdA5ve8cS+GbiMRI9DVPjwX/LJ1HXPr5gYvEd4T qpSRKZTXbTsrcs8JKB4G4bGNgB7DmaoaMdof/c3QUukVgCmGhHuqf1Sv+0JiQUeoJ+hY lQfSGu8wrDDS9YsgnxZY+09rHv9/ZUSfKoa1rddFTqzXuqsWctGPAxPYJIK1ed41Si8/ jYYmq4srlF7U1MK1Gl0YGo3ENj0BUOR8qcDko63iGDfK6h6V1hJ6dFVKD5/SL3btN3+I ph9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=cAnU0+oTEvRv+0C0+oifOooHRuVbO4IagIY/Pc6QO88=; b=i49388/Q4TjjpWwlYAsXgcYN4D8O4mMYURBAeTLK6Km/ykMPbHw+B8fa0HmwqAkZb9 PzP8KQIgQjFimzqwZlcfORSIpYXfxrG5GC0G1FSq2IEemJLDDiNEGYVayVSK8pC9vc4j Hp5cZfyuWATd8Nh+V7oqixbM0XtSs7rl9LBJxDmWqSxCOc51R0pWdQKYAO+lDf8mQAIi 3n7tmEFUeF73n9YxtjtUC7mdidtwHfBrkTryc559i3VjVeB5sHNiWW1sKtv+22pkbThS 5J0re+QJ8Dbi47VNUTYdkCijmgPIPbWioAEgk3J0FR0d0p+7eVahEOXGXrq6xuUuCqa/ /iAA== X-Gm-Message-State: AOAM5328w2ED+8+8VwDDKBahtLgs3yTB3zVqB5BUc5oB2jN1XIHqa2VM dN462Fombg1LRW95rsNnIgAzijPJM004Tw== X-Google-Smtp-Source: ABdhPJzJRsu4aIq80PMz/4hVTyPO2EBYU1yRZ4KVXF/Ppu9bbzcZm9zt5QqTdBErm9vOrNy2B5X0Tw== X-Received: by 2002:a50:a69e:: with SMTP id e30mr905804edc.332.1628713908289; Wed, 11 Aug 2021 13:31:48 -0700 (PDT) Received: from nomad-lp1 ([31.142.104.228]) by smtp.gmail.com with ESMTPSA id j13sm137126edr.89.2021.08.11.13.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 13:31:47 -0700 (PDT) References: <20210810193626.9186-1-mail@muradm.net> <20210810200756.9581-5-mail@muradm.net> <87czqk19mi.fsf@yoctocell.xyz> User-agent: mu4e 1.4.15; emacs 28.0.50 From: muradm In-reply-to: <87czqk19mi.fsf@yoctocell.xyz> Date: Wed, 11 Aug 2021 23:31:44 +0300 Message-ID: <87eeaz67v3.fsf@muradm.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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=1628713988; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=szS/U/mdzXeKyu/h81vj8CWTTpGrYVwGlwR6BlRThD0=; b=RN8GQnKVLQMoqqX3Sjv0wo2srJCbkwEB0HdB3ILyVg4hEbwG42oVJ8+0nH7Trxg5XIoRma laGYoG9INH3qh2sVg0kn31zZrXjzvZo2uhLLU/IeK4l8Mm+l8TdVYXqTpSHkQT5fc/ZS4r F2hQ1k/KwfVyAmi+Qhytc9hLzDs6rdwpwVvx9DqwofBFFJZS1XzhdM2SC2Ux3RbzwseyZ6 gfx873y6f7m3lbB5hmwoqOopimenRlvTD3uf/GY58IduQgdiVFvw+eMAoIq+L/5cdFcEFM UdzsVu3qQ4ff1mnzrwB+aPE9/kBfwTO7etfrRDlwZ3fFhrrGJAzqvyfIEVezZA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628713988; a=rsa-sha256; cv=none; b=PFgt3GyGV3BsIOjJ2aPf1WTp0MJntIdOOIY7ssZBzp78IVBoFQ7n5hIiRtVsDAnc8Zwr4K 5C3J0f3bt5YqMKA+bA+ZdqJfj1HpHnkyTBMnuaAM6XoUIUlTv5odYAQI9rBVIrUfc09AXv kg5umVhyPHzgermD7VxlRfgmwEcyOiUhZXzEHBVDUMZ51PI7OtBx/sU1fC/bSRiYTyfzYS sGDFQmXIq9GhFwbI58Qj5TbojpRvWWSecdXp18rcLlcL47m4jZKmv54fUHMo4+P03WJZp7 fuQUuHWyHKGcsUPVHURH1kO9beECItcWV7o5c5dn3qBvM9FfqEUAy0RufnmrEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=RGSLYCP4; dmarc=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: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=RGSLYCP4; dmarc=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: B091812EF0 X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6g7+W0wQCIxA Noted for next update, thanks Xinglu Chen writes: > 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=20 >> +++++++++++++++++++++++++++++++++++++++- >> 1 file changed, 58 insertions(+), 1 deletion(-) >> >> diff --git a/gnu/services/desktop.scm=20 >> 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 >> >> + seatd-configuration >> + seatd-service-type >> + >> %desktop-services)) >> >> ;;; Commentary: >> @@ -1182,6 +1188,57 @@ or setting its password with passwd."))) >> (define polkit-wheel-service >> (simple-service 'polkit-wheel polkit-service-type (list=20 >> polkit-wheel))) >> >> + >> +;;; >> +;;; 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)=20 >> "/bin/seatd") >> + "-u" #$(seatd-user config) >> + "-g" #$(seatd-group config) >> + "-s" #$(seatd-socket config)) >> + #:environment-variables >> + (list (string-append "SEATD_LOGLEVEL=3D" >> + #$(seatd-loglevel=20 >> 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=20 > 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=20 > comment too > much. :-)