From patchwork Wed Jun 15 09:17:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40017 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EA21527BBEA; Wed, 15 Jun 2022 10:18:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9D42827BBE9 for ; Wed, 15 Jun 2022 10:18:35 +0100 (BST) Received: from localhost ([::1]:54872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PAY-0007xr-L9 for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:18:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PA4-0007v5-FB for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PA2-0002ra-VO for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PA2-0006p4-RD for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 1/8] gnu: crates-io: Add rust-enquote 1.1.0. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:18: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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528467526170 (code B ref 49969); Wed, 15 Jun 2022 09:18:02 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:17:55 +0000 Received: from localhost ([127.0.0.1]:36502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9r-0006np-UX for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:55 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43550 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9l-0006n4-GU for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:46 -0400 Received: from localhost ([127.0.0.1]:35082) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7Z-0003xV-VV for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=41KHYxDeMIq0Z60Ijd7P4iegnhE3lhaVnyFApjAZRhU=; b=rRWjazAfQ0eb+OZFFFcUqk2pX+ XQBrY4z56FLvzgJUI6EJGC8b3nFrUTu94m5r3zjc65+mnzTRsCtemGdtLu4/O/AFqYuWB2llqFiBx 29MmSm1ZLGh0vyVcvQb6T01vZ6AeKgw7w8ZskkaRND7q0qmmL6hVDrjsx+GdGbywoxLXeeumwjrF5 YD6x4i7vFEmSkufwJAB0p5STyRm9GQ7VVtuyIyfVXucdtqURwPg1OiGEqKEwIyZw+e2jC2S2LEYXV 9upm4N7VwtHRU45S9574Qd6vjkDBqR6bWVM4Lp1XKkWVxK/u3OftdykV4y+cVqEar6UYGviMJSFlG h2dR/+x0hUsqrCkbEivneQMtBxH8frtNCSl0vjlyWTa1wqhNF0twyKYIKtbEy29xSwPWxzoyJ5CK7 XYQIJl01LYn9S4FQf6VerAnpjNU7tGe/KbkDcI9eGwA/Mylsly4jhm8y2NRVglCv1wyItdaFZPpf0 jOn6q4fo/PKW/fB0EaBq0n8g; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9j-0004Oh-Q4 for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:43 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:35 +0300 Message-Id: <20220615091742.16880-2-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/crates-io.scm (rust-enquote-1): New variable --- gnu/packages/crates-io.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 86313f5e4f..a4d381899e 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2021 Antero Mejr ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Vinicius Monego +;;; Copyright © 2021 muradm ;;; Copyright © 2021, 2022 Petr Hodina ;;; Copyright © 2021, 2022 Ricardo Wurmus ;;; Copyright © 2021 Jacob Hrbek @@ -73053,3 +73054,20 @@ (define-public rust-shell2batch-0.4 and automatically convert it to a windows batch file, this library provides a way to convert simple shell commands to windows batch commands.") (license license:asl2.0))) + +(define-public rust-enquote-1 + (package + (name "rust-enquote") + (version "1.1.0") + (home-page "https://github.com/reujab/enquote") + (source (origin + (method url-fetch) + (uri (crate-uri "enquote" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0clrjghlfkkb7sndabs5wch0fz2nif6nj4b117s8kqxx3nqnrhq6")))) + (build-system cargo-build-system) + (synopsis "Rust library that quotes, unquotes, and unescapes strings") + (description "A Rust library quotes, unquotes, and unescapes strings") + (license license:unlicense))) From patchwork Wed Jun 15 09:17:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40020 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 88E5427BBEA; Wed, 15 Jun 2022 10:26:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 49FE427BBE9 for ; Wed, 15 Jun 2022 10:26:30 +0100 (BST) Received: from localhost ([::1]:34168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PID-00052G-D7 for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:26:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PA4-0007v7-HV for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PA3-0002rd-DL for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PA3-0006pB-9t for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 2/8] gnu: crates-io: Add rust-pam-sys 0.5.6. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:18:03 +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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528467626183 (code B ref 49969); Wed, 15 Jun 2022 09:18:03 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:17:56 +0000 Received: from localhost ([127.0.0.1]:36508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9v-0006o2-JB for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:56 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43552 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9m-0006nB-H9 for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:46 -0400 Received: from localhost ([127.0.0.1]:35084) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7b-0003xZ-AO for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:31 +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:To:From:Sender:Reply-To:Cc: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=aLHHNuqBMI5250Chq6uMa4We7eN4pnKT9R8u3hlKfJ8=; b=CqLZWYb2TymfmQ/yQY3bdTHFDx NxLUDwwUTwTSuzKxHwi4rkM07Tg19+w+BWwZbjYFjIBhWGZAmzsjzRyDupIXBkgHegF3HM4CpA59w QemJC4wzemrnVjGh3bAo8lfvKtsgAOjk7QMIsxtR7+P5dglKpTLcLB5zLR4CMdZf8PDzMG/T3Zl0q VjdKy9/+rZ5G54fJOWLhS/m3FEIg82PTtqvWcsdUib5FgKO98JokHQ72A9axhVjBPDqHNQtEzIGah cb/+xCuJP5DFAKeuiXswaR7DthDIONhNeCmRZF6vhbsljBEm8WA5N62GkeWMkCqGQgKcjosMYTRnY PxEwbJq62MItKwSAjQQifryAXZw/6YNG1D/4L56W1U7kKcfQ42EZpcz2dl8IoB7rC08nmnHWDMTsQ xWWUXafdYKOFwqaL5zJvnC2g+fRHcA+m6QXz+zY6la5jfOVKA2rPHcXOE5tUsDagrz2Oaw4UMd9ar H86nPmrYV/I4RPSszzc40DdD; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9k-0004Ok-UY for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:44 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:36 +0300 Message-Id: <20220615091742.16880-3-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/crates-io.scm (rust-pam-sys-0.5): New variable --- gnu/packages/crates-io.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index a4d381899e..f93b9b0eea 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -73071,3 +73071,25 @@ (define-public rust-enquote-1 (synopsis "Rust library that quotes, unquotes, and unescapes strings") (description "A Rust library quotes, unquotes, and unescapes strings") (license license:unlicense))) + +(define-public rust-pam-sys-0.5 + (package + (name "rust-pam-sys") + (version "0.5.6") + (home-page "https://github.com/1wilkens/pam-sys") + (source (origin + (method url-fetch) + (uri (crate-uri "pam-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0d14501d5vybjnzxfjf96321xa5wa36x1xvf02h02zq938qmhj6d")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-libc" ,rust-libc-0.2)))) + (inputs `(("linux-pam" ,linux-pam))) + (synopsis + "Rust FFI wrappers for the Linux Pluggable Authentication Modules (PAM)") + (description + "This crate uses bindgen to generate the raw FFI definitions for PAM. For a rustified API consider using pam.") + (license (list license:expat license:asl2.0)))) From patchwork Wed Jun 15 09:17:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40019 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B1C5B27BBEA; Wed, 15 Jun 2022 10:20:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2A4DC27BBE9 for ; Wed, 15 Jun 2022 10:20:53 +0100 (BST) Received: from localhost ([::1]:55718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PCm-00008X-7D for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:20:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PB2-000079-1m for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PB1-0002xq-GU for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PB0-0006rS-D5 for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 3/8] gnu: admin: Add greetd 0.8.0. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:19: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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528469426299 (code B ref 49969); Wed, 15 Jun 2022 09:19:02 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:18:14 +0000 Received: from localhost ([127.0.0.1]:36523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1PA9-0006px-UG for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:14 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43554 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9n-0006nU-Mu for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:00 -0400 Received: from localhost ([127.0.0.1]:35086) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7c-0003xc-EC for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=RozKN4irD+c6HlJfAmqLSZkvFzhfWCbNGOZYmXWR0n0=; b=qPzLZ0s4is1A97QF+YWZYnXWa3 90hs7km83escnP3+Hi5AqJp48XMA+sLDXUfD0u7C/cctlPG78ElHkn6AzFN/M62QZtXT4LdWU6rJz Ok61Jn24eE5itmMjs9V0MMzjZ8JXvsvMPyWSOOgPPh4TFcOnByM2sU2VO0p76OPWBg/6MdSEJ/S6V 89GXP7Esf8NH63cHWRhjq3XFBqJ6T2rC0ZCFzGgago3L2pb3XW5QAchh0iYZWyJ+WpiPWz+LvnFSk f71z5MpBCXuM2HbpGT5JwoADLtIK9imzvb1WxsbSLx7xZ5b1kFHj4X3eAhiHugnEsEr2Ivtl3/jP4 aPmF8r2DNhdEyx15BATQVd9vzXHKVrRtoPfWv4ajRLdR5R6Sy0x0ZdcpUWkr1dOlKJuydKBrvaoDA +UH6WMW9zDUaIag3djCRyMLVZ9AIIULKt5Iuh0oGDhUmnaLkCwZVkjKFRr0YWAhDeDIcONu90wvND 4AbL1bA28ybSI66pWGGCK+ga; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9m-0004On-5G for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:46 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:37 +0300 Message-Id: <20220615091742.16880-4-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (greetd): New variable --- gnu/packages/admin.scm | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 6acfff8881..73d70744e1 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -45,6 +45,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 muradm ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Artyom V. Poptsov ;;; Copyright © 2022 Wamm K. D. @@ -66,6 +67,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages admin) + #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system emacs) #:use-module (guix build-system glib-or-gtk) @@ -93,6 +95,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages c) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) #:use-module (gnu packages cross-base) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) @@ -4987,4 +4990,78 @@ (define-public udpcast (home-page "https://www.udpcast.linux.lu") (license license:gpl2+))) +(define-public greetd + (package + (name "greetd") + (version "0.8.0") + (home-page "https://git.sr.ht/~kennylevinsen/greetd") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x5c3jkw09kvj2grcxm899y2n6ws8p990cyp9cs0fy6lm4fzlh6v")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-nix" ,rust-nix-0.19) + ("rust-pam-sys" ,rust-pam-sys-0.5) + ("rust-rpassword" ,rust-rpassword-5) + ("rust-users" ,rust-users-0.11) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-tokio" ,rust-tokio-1) + ("rust-getopts" ,rust-getopts-0.2) + ("rust-thiserror" ,rust-thiserror-1) + ("rust-async-trait" ,rust-async-trait-0.1) + ("rust-enquote" ,rust-enquote-1)) + #:phases + (modify-phases %standard-phases + (delete 'package) + (add-after 'build 'build-man-pages + (lambda* (#:key inputs #:allow-other-keys) + (define (scdoc-cmd doc lvl) + (system (string-append "scdoc < " + doc "-" lvl ".scd > " + doc "." lvl))) + (with-directory-excursion "man" + (scdoc-cmd "greetd" "1") + (scdoc-cmd "greetd" "5") + (scdoc-cmd "greetd-ipc" "7") + (scdoc-cmd "agreety" "1")))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (sbin (string-append out "/sbin")) + (share (string-append out "/share")) + (man (string-append share "/man")) + (man1 (string-append man "/man1")) + (man5 (string-append man "/man5")) + (man7 (string-append man "/man7")) + (release "target/release") + (greetd-bin (string-append release "/greetd")) + (agreety-bin (string-append release "/agreety"))) + (install-file greetd-bin sbin) + (install-file agreety-bin bin) + (with-directory-excursion "man" + (install-file "greetd.1" man1) + (install-file "greetd.5" man5) + (install-file "greetd-ipc.7" man7) + (install-file "agreety.1" man1)))))))) + (native-inputs + `(("linux-pam" ,linux-pam) + ("scdoc" ,scdoc))) + (synopsis "minimal and flexible login manager daemon") + (description + "greetd is a minimal and flexible login manager daemon +that makes no assumptions about what you want to launch. +If you can run it from your shell in a TTY, greetd can start it. + +If it can be taught to speak a simple JSON-based IPC protocol, +then it can be a greeter.") + (license license:gpl3+))) From patchwork Wed Jun 15 09:17:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40016 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9035E27BBEA; Wed, 15 Jun 2022 10:18:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 41A2327BBE9 for ; Wed, 15 Jun 2022 10:18:30 +0100 (BST) Received: from localhost ([::1]:54852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PAT-0007wd-DP for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:18:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PA4-0007v8-HT for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PA3-0002rf-SX for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PA3-0006pJ-Oq for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 4/8] gnu: admin: Add greetd-pam-mount. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:18:03 +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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528467626191 (code B ref 49969); Wed, 15 Jun 2022 09:18:03 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:17:56 +0000 Received: from localhost ([127.0.0.1]:36510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9w-0006oC-9N for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:56 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43556 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9o-0006nW-Je for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:49 -0400 Received: from localhost ([127.0.0.1]:35088) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7d-0003xf-GP for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:33 +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:To:From:Sender:Reply-To:Cc: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=QJcCzGQEbK7Hay3t/cLTMcCKQeBOaopP00hsM6LgYUE=; b=gx1VcmdAkz7Q5Qn6QB4X2WZqEW kY62mUiuUzPsmoLI7ax5YTmyqgjJNNe3i6JWi6M6ISXiZ75pZuvdvSS8qvzBAUTdyyZGV4MzV/y3f gy0jqAqqfaOAPBQbVeqRCQMcnVvGuVX64mLJ7RJCyqjHaElI/b/8xDgcZMzdM5R9BkfeZWvT97iGG qMHPa5VjpxFP7ueTxp7bM614SQAN1EgHCDe7u1nL/fyn3N0Wwke8W4Qp3JTt0gFRj8mE9+N4EKH7v I4pP0MT/ZgGf99bb2kRg/FknyXCGFVsRBCCZUEZ9Uhy0PoPtjKQIS+Pze/cpFd7XlYzwfFkW1FBo+ B95lo/kr/TCGLd83y8nl2TgzFqkCPCWvBGZGsRwx8KYm5mD1S0vtVm1UBA1iJ4tyfzbwWa6VhJviK MYTBjPwNVEreWpEmF0b0L6HosR7qDOHqbWkWRegrICdxt3DizxejeZllSKcZDCP3iZJdraWclDTBJ Inea1CHlIMxYIAg17XTAdVNT; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9n-0004Oq-7Z for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:47 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:38 +0300 Message-Id: <20220615091742.16880-5-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (greetd-pam-mount): New variable --- gnu/packages/admin.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 73d70744e1..d6e1d819ab 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -5065,3 +5065,35 @@ (define (scdoc-cmd doc lvl) If it can be taught to speak a simple JSON-based IPC protocol, then it can be a greeter.") (license license:gpl3+))) + +(define-public greetd-pam-mount + (package + (inherit pam-mount) + (name "greetd-pam-mount") + (arguments + (substitute-keyword-arguments (package-arguments pam-mount) + ((#:configure-flags flags ''()) + #~(cons* "--with-rundir=/run/greetd" #$flags)) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-config-file-name + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/pam_mount.c" + ((".*define CONFIGFILE .*$") + "#define CONFIGFILE \"/etc/security/greetd_pam_mount.conf.xml\"\n") + (("pam_mount_config") "greetd_pam_mount_config") + (("pam_mount_system_authtok") "greetd_pam_mount_system_authtok")))))))) + (synopsis "pam-mount specifically compiled for use with greetd") + (description + "Pam-mount is a PAM module that can mount volumes when a user logs in. +It supports mounting local filesystems of any kind the normal mount utility +supports. It can also mount encrypted LUKS volumes using the password +supplied by the user when logging in. + +This package inherits pam-mount in the way that it is compiled specifically +for use with greetd daemon. It uses different configuration location and +name space for storing data in PAM. + +greetd-pam-mount is used in configuration of greetd to provide +auto-(mounting/unmounting) of XDG_RUNTIME_DIR in the way that it will not +interfere with default pam-mount configuration."))) From patchwork Wed Jun 15 09:17:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40018 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BADB327BBEA; Wed, 15 Jun 2022 10:20:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 63F2727BBE9 for ; Wed, 15 Jun 2022 10:20:45 +0100 (BST) Received: from localhost ([::1]:55516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PCd-0008R1-NI for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:20:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PA4-0007vA-Qa for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PA4-0002ru-Cr for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PA4-0006pQ-8g for guix-patches@gnu.org; Wed, 15 Jun 2022 05:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 5/8] gnu: base: Add greetd-service-type. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:18:04 +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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528468026205 (code B ref 49969); Wed, 15 Jun 2022 09:18:04 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:18:00 +0000 Received: from localhost ([127.0.0.1]:36512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9w-0006oO-Or for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:00 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43558 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9p-0006nd-Uy for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:50 -0400 Received: from localhost ([127.0.0.1]:35090) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7e-0003xi-Iy for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=j2WU1LsszHWe7mflP/Eu6HYcyIxRvEvzFmUrg20g4/w=; b=y8RDA67KphUCahaWvlvgba0D8B VxOkcPgPizuEph2vLT7VLFArD2/rgsOMYx4OKYTLIgvyBNJYbnHOBhvCp1P1RKB0NjE+618z137rU b3VX/er5ffDd7vmMOe+u6EZQ9PbkF0fQQDqmH0YngtbRo5hwyQHc62hbmOkT6TBShzgyNcoC216jb VKfA2Y6R/MLCgdV0J8wzkYi+A5199TdA2ekoAXyqe3jFQL2tN04isNAWX1kx2/zIRqEe/SQFiwl5d 1LKJ8R09iS90YvGUeg0C0MNUxNG9gyvzGtSlSgz3hV/y7FjzorU7QmIffZMGlaUevbRY1XHmO+KFe tHeZLaFjHbXhjPcSuySGmlaGiCWbTvnN4ZOim91yRTk4oFzydmsBbyBBJI/XsRytMp/AKdGaz3v4c Ru+sQ186z/6AzXNwDp5QgAyF42MQypWooUzcx+jT9iQPr5/fQxJD4J5Xm/4rJx8ggxWGT7FwHtx7n VQxNcSVXg/+ShTOA4kZsjWGU; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9o-0004Ot-AY for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:48 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:39 +0300 Message-Id: <20220615091742.16880-6-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/base.scm (greetd-service-type): New variable * gnu/services/base.scm (greetd-configuration): New data type * gnu/services/base.scm (greetd-terminal-configuration): New data type * gnu/services/base.scm (greetd-agreety-session): New data type * gnu/services/base.scm (pam-limits-service-type): Shoul be aware of greetd PAM service * gnu/services/pam-mount.scm (pam-mount-pam-service): Shoul be aware of greetd PAM service --- doc/guix.texi | 137 +++++++++++++++++++++++ gnu/services/base.scm | 223 ++++++++++++++++++++++++++++++++++++- gnu/services/pam-mount.scm | 2 +- 3 files changed, 360 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ea133d519a..997b93c831 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -96,6 +96,7 @@ Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* Copyright @copyright{} 2021 pukkamustard@* Copyright @copyright{} 2021 Alice Brenon@* +Copyright @copyright{} 2021 muradm@* Copyright @copyright{} 2021 Josselin Poiret@* Copyright @copyright{} 2021 Andrew Tropin@* Copyright @copyright{} 2021 Sarah Morgensen@* @@ -18019,6 +18020,142 @@ about the Pluggable Authentication Module (PAM) limits, refer to the @samp{pam_limits} man page from the @code{linux-pam} package. @end deffn +@defvr {Scheme Variable} greetd-service-type +@uref{https://git.sr.ht/~kennylevinsen/greetd, @code{greetd}} is a minimal and +flexible login manager daemon, that makes no assumptions about what you +want to launch. + +If you can run it from your shell in a TTY, greetd can start it. If it +can be taught to speak a simple JSON-based IPC protocol, then it can be +a geeter. + +@code{greetd-service-type} provides necessary infrastructure for logging +in users, including: + +@itemize @bullet +@item +@code{greetd} PAM service + +@item +Special variation of @code{pam-mount} to mount @code{XDG_RUNTIME_DIR} +@end itemize + +Here is example of switching from @code{mingetty-service-type} to +@code{greetd-service-type}, and how different terminals could be: + +@lisp + (append + (modify-services %base-services + ;; greetd-service-type provides "greetd" PAM service + (delete login-service-type) + ;; and can be used in place of mingetty-service-type + (delete mingetty-service-type)) + (list + (service greetd-service-type + (greetd-configuration + (terminals + (list + ;; we can make any terminal active by default + (greetd-terminal-configuration (terminal-vt "1") (terminal-switch #t)) + ;; we can make environment without XDG_RUNTIME_DIR set + ;; even provide our own environment variables + (greetd-terminal-configuration + (terminal-vt "2") + (default-session-command + (greetd-agreety-session + (extra-env '(("MY_VAR" . "1"))) + (xdg-env? #f)))) + ;; we can use different shell instead of default bash + (greetd-terminal-configuration + (terminal-vt "3") + (default-session-command + (greetd-agreety-session (command (file-append zsh "/bin/zsh"))))) + ;; we can use any other executable command as greeter + (greetd-terminal-configuration + (terminal-vt "4") + (default-session-command (program-file "my-noop-greeter" #~(exit)))) + (greetd-terminal-configuration (terminal-vt "5")) + (greetd-terminal-configuration (terminal-vt "6")))))) + ;; mingetty-service-type can be used in parallel + ;; if needed to do so, do not (delete login-service-type) + ;; as illustrated above + #| (service mingetty-service-type (mingetty-configuration (tty "tty8"))) |#)) +@end lisp +@end defvr + +@deftp {Data Type} greetd-configuration +Configuration record for the @code{greetd-service-type}. +@table @asis + +@item @code{motd} +A file-like object containing the ``message of the day''. + +@item @code{allow-empty-passwords?} (default: @code{#t}) +Allow empty passwords by default so that first-time users can log in when +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. +@end table +@end deftp + +@deftp {Data Type} greetd-terminal-configuration +Configuration record for per terminal greetd daemon service. + +@table @asis +@item @code{greetd} (default: @code{greetd}) +The greetd package to use. + +@item @code{config-file-name} +Configuration file name to use for greetd daemon. Generally, autogenerated +derivation based on @code{terminal-vt} value. + +@item @code{log-file-name} +Log file name to use for greetd daemon. Generally, autogenerated +name based on @code{terminal-vt} value. + +@item @code{terminal-vt} (default: @samp{"7"}) +The VT to run on. Use of a specific VT with appropriate conflict avoidance +is recommended. + +@item @code{terminal-switch} (default: @code{#f}) +Make this terminal active on start of @code{greetd}. + +@item @code{default-session-user} (default: @samp{"greeter"}) +The user to use for running the greeter. + +@item @code{default-session-command} (default: @code{(greetd-agreety-session)}) +Can be either instance of @code{greetd-agreety-session} configuration or +@code{gexp->script} like object to use as greeter. + +@end table +@end deftp + +@deftp {Data Type} greetd-agreety-session +Configuration record for the agreety greetd greeter. + +@table @asis +@item @code{agreety} (default: @code{greetd}) +The package with @command{/bin/agreety} command. + +@item @code{command} (default: @code{(file-append bash "/bin/bash")}) +Command to be started by @command{/bin/agreety} on successful login. + +@item @code{command-args} (default: @code{'("-l")}) +Command arguments to pass to command. + +@item @code{extra-env} (default: @code{'()}) +Extra environment variables to set on login. + +@item @code{xdg-env?} (default: @code{#t}) +If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set +before starting command. One should note that, @code{extra-env} variables +are set right after mentioned variables, so that they can be overriden. + +@end table +@end deftp + @node Scheduled Job Execution @subsection Scheduled Job Execution diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 6865d03f25..0e7bfe7f5a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2021 qblade ;;; Copyright © 2021 Hui Lu ;;; Copyright © 2021, 2022 Maxim Cournoyer +;;; Copyright © 2021 muradm ;;; Copyright © 2022 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. @@ -219,6 +220,11 @@ (define-module (gnu services base) pam-limits-service-type pam-limits-service + greetd-service-type + greetd-configuration + greetd-terminal-configuration + greetd-agreety-session + %base-services)) ;;; Commentary: @@ -1439,7 +1445,7 @@ (define pam-limits-service-type (module "pam_limits.so") (arguments '("conf=/etc/security/limits.conf"))))) (if (member (pam-service-name pam) - '("login" "su" "slim" "gdm-password" "sddm" + '("login" "greetd" "su" "slim" "gdm-password" "sddm" "sudo" "sshd")) (pam-service (inherit pam) @@ -2775,6 +2781,221 @@ (define %qemu-static-networking (provision '(networking)) (name-servers '("10.0.2.3")))) + +;;; +;;; greetd-service-type -- minimal and flexible login manager daemon +;;; + +(define-record-type* + greetd-agreety-session make-greetd-agreety-session + greetd-agreety-session? + (agreety greetd-agreety (default greetd)) + (command greetd-agreety-command (default (file-append bash "/bin/bash"))) + (command-args greetd-agreety-command-args (default '("-l"))) + (extra-env greetd-agreety-extra-env (default '())) + (xdg-env? greetd-agreety-xdg-env? (default #t))) + +(define greetd-agreety-tty-session-command + (match-lambda + (($ _ command args extra-env) + (program-file + "agreety-tty-session-command" + #~(begin + (use-modules (ice-9 match)) + (for-each (match-lambda ((var . val) (setenv var val))) + (quote (#$@extra-env))) + (apply execl #$command #$command (list #$@args))))))) + +(define greetd-agreety-tty-xdg-session-command + (match-lambda + (($ _ command args extra-env) + (program-file + "agreety-tty-xdg-session-command" + #~(begin + (use-modules (ice-9 match)) + (let* + ((username (getenv "USER")) + (useruid (passwd:uid (getpwuid username))) + (useruid (number->string useruid))) + (setenv "XDG_SESSION_TYPE" "tty") + (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))) + (for-each (match-lambda ((var . val) (setenv var val))) + (quote (#$@extra-env))) + (apply execl #$command #$command (list #$@args))))))) + +(define (make-greetd-agreety-session-command config command) + (let ((agreety (file-append (greetd-agreety config) "/bin/agreety"))) + (program-file + "agreety-command" + #~(execl #$agreety #$agreety "-c" #$command)))) + +(define (make-greetd-default-session-command config-or-command) + (cond ((greetd-agreety-session? config-or-command) + (cond ((greetd-agreety-xdg-env? config-or-command) + (make-greetd-agreety-session-command + config-or-command + (greetd-agreety-tty-xdg-session-command config-or-command))) + (#t + (make-greetd-agreety-session-command + config-or-command + (greetd-agreety-tty-session-command config-or-command))))) + (#t config-or-command))) + +(define-record-type* + greetd-terminal-configuration make-greetd-terminal-configuration + greetd-terminal-configuration? + (greetd greetd-package (default greetd)) + (config-file-name greetd-config-file-name (thunked) + (default (default-config-file-name this-record))) + (log-file-name greetd-log-file-name (thunked) + (default (default-log-file-name this-record))) + (terminal-vt greetd-terminal-vt (default "7")) + (terminal-switch greetd-terminal-switch (default #f)) + (default-session-user greetd-default-session-user (default "greeter")) + (default-session-command greetd-default-session-command + (default (greetd-agreety-session)) + (sanitize make-greetd-default-session-command))) + +(define (default-config-file-name config) + (string-join (list "config-" (greetd-terminal-vt config) ".toml") "")) + +(define (default-log-file-name config) + (string-join (list "/var/log/greetd-" (greetd-terminal-vt config) ".log") "")) + +(define (make-greetd-terminal-configuration-file config) + (let* + ((config-file-name (greetd-config-file-name config)) + (terminal-vt (greetd-terminal-vt config)) + (terminal-switch (greetd-terminal-switch config)) + (default-session-user (greetd-default-session-user config)) + (default-session-command (greetd-default-session-command config))) + (mixed-text-file + config-file-name + "[terminal]\n" + "vt = " terminal-vt "\n" + "switch = " (if terminal-switch "true" "false") "\n" + "[default_session]\n" + "user = " default-session-user "\n" + "command = " default-session-command "\n"))) + +(define %greetd-accounts + (list (user-account + (name "greeter") + (group "wheel") + (supplementary-groups '("users" "tty" "input" "video" "audio")) + (system? #t)))) + +(define %greetd-file-systems + (list (file-system + (device "none") + (mount-point "/run/greetd/pam_mount") + (type "tmpfs") + (check? #f) + (flags '(no-suid no-dev no-exec)) + (options "mode=0755") + (create-mount-point? #t)))) + +(define %greetd-pam-mount-rules + `((debug (@ (enable "0"))) + (volume (@ (sgrp "users") + (fstype "tmpfs") + (mountpoint "/run/user/%(USERUID)") + (options "noexec,nosuid,nodev,size=1g,mode=0700,uid=%(USERUID),gid=%(USERGID)"))) + (logout (@ (wait "0") + (hup "0") + (term "yes") + (kill "no"))) + (mkmountpoint (@ (enable "1") (remove "true"))))) + +(define-record-type* + greetd-configuration make-greetd-configuration + greetd-configuration? + (motd greetd-motd (default %default-motd)) + (allow-empty-passwords? greetd-allow-empty-passwords? (default #t)) + (terminals greetd-terminals (default '()))) + +(define (make-greetd-pam-mount-conf-file config) + (computed-file + "greetd_pam_mount.conf.xml" + #~(begin + (use-modules (sxml simple)) + (call-with-output-file #$output + (lambda (port) + (sxml->xml + '(*TOP* + (*PI* xml "version='1.0' encoding='utf-8'") + (pam_mount + #$@%greetd-pam-mount-rules + (pmvarrun + #$(file-append greetd-pam-mount + "/sbin/pmvarrun -u '%(USER)' -o '%(OPERATION)'")))) + port)))))) + +(define (greetd-etc-service config) + `(("security/greetd_pam_mount.conf.xml" + ,(make-greetd-pam-mount-conf-file config)))) + +(define (greetd-pam-service config) + (define optional-pam-mount + (pam-entry + (control "optional") + (module #~(string-append #$greetd-pam-mount "/lib/security/pam_mount.so")) + (arguments '("disable_interactive")))) + + (list + (unix-pam-service "greetd" + #:login-uid? #t + #:allow-empty-passwords? + (greetd-allow-empty-passwords? config) + #:motd + (greetd-motd config)) + (lambda (pam) + (if (member (pam-service-name pam) + '("login" "greetd" "su" "slim" "gdm-password")) + (pam-service + (inherit pam) + (auth (append (pam-service-auth pam) + (list optional-pam-mount))) + (session (append (pam-service-session pam) + (list optional-pam-mount)))) + pam)))) + +(define (greetd-shepherd-services config) + (map + (lambda (tc) + (let* + ((greetd-bin (file-append (greetd-package tc) "/sbin/greetd")) + (greetd-conf (make-greetd-terminal-configuration-file tc)) + (greetd-log (greetd-log-file-name tc)) + (greetd-vt (greetd-terminal-vt tc))) + (shepherd-service + (documentation "Minimal and flexible login manager daemon") + (requirement '(user-processes host-name udev virtual-terminal)) + (provision (list (symbol-append + 'term-tty + (string->symbol (greetd-terminal-vt tc))))) + (start #~(make-forkexec-constructor + (list #$greetd-bin "-c" #$greetd-conf) + #:log-file #$greetd-log)) + (stop #~(make-kill-destructor))))) + (greetd-terminals config))) + +(define greetd-service-type + (service-type + (name 'greetd) + (description "Provides necessary infrastructure for logging into the +system including @code{greetd} PAM service, @code{pam-mount} module to +mount/unmount /run/user/ directory for user and @code{greetd} +login manager daemon.") + (extensions + (list + (service-extension account-service-type (const %greetd-accounts)) + (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) + (service-extension shepherd-root-service-type greetd-shepherd-services))) + (default-value (greetd-configuration)))) + (define %base-services ;; Convenience variable holding the basic services. diff --git a/gnu/services/pam-mount.scm b/gnu/services/pam-mount.scm index 33649b0f7c..e60781d05b 100644 --- a/gnu/services/pam-mount.scm +++ b/gnu/services/pam-mount.scm @@ -90,7 +90,7 @@ (define optional-pam-mount (module #~(string-append #$pam-mount "/lib/security/pam_mount.so")))) (list (lambda (pam) (if (member (pam-service-name pam) - '("login" "su" "slim" "gdm-password" "sddm")) + '("login" "greetd" "su" "slim" "gdm-password" "sddm")) (pam-service (inherit pam) (auth (append (pam-service-auth pam) From patchwork Wed Jun 15 09:17:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40021 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4767227BBEB; Wed, 15 Jun 2022 10:26:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 79C1F27BBEA for ; Wed, 15 Jun 2022 10:26:52 +0100 (BST) Received: from localhost ([::1]:35398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PIZ-0005sv-Jv for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:26:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PB1-00006W-Jl for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PAz-0002xi-Q6 for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PAz-0006rD-KB for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 6/8] gnu: admin: Add libseat 0.8.0 and move seatd. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:19:01 +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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528468926278 (code B ref 49969); Wed, 15 Jun 2022 09:19:01 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:18:09 +0000 Received: from localhost ([127.0.0.1]:36519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1PA8-0006pl-SW for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:09 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43560 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9r-0006ng-3W for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:51 -0400 Received: from localhost ([127.0.0.1]:35092) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7f-0003xl-U6 for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=po1J4ShuM0sOY+4h1QcvWtZw4wM1NBH6QqFVX7ESczI=; b=q8oqcqF6pS3dZFg80xZZwOqIf9 2ylwx2pYwN1/Trl9nkeiygPHwn94Dlasi3nJpw2BKrQudY549Fu974JCQCTiByOrf6X9heMMnP4tx 1wch+sNjzgu2j2jYAim2H1jwbbqUQM8atOBXD5s6NwN6ahPPqADiTAm0makIo81n42xFQ6WSCp/n+ avUQYG9l7Am7fk4N/wsFXUVfpfggXKpu7Ox0hYASHHLdEl1zhMtmEi2aPeqDoQ3dWsHx+3dN6gMM4 Q7albZcs8y56rTYCqfZS6c27+paA2yPCUVzbT/xPX7lM3VU3I5suARwt/RFVpB+dcNVvXC3kj0BAz 7+fVvGDCLCDFQtY/+3XjoFlSkEtkvk0QNLeqg/UuBcRCNfsAVK8xsF+lx4SHksqJiwtua6OcHSmyR GylNr45CnQJkzsGp/ZSkujmfVpK0XlA3apW5R6IMxU7kkKMS5ba63VI5ivgKYxZhfdJMEdTgsHO0h xr5CwvEur2zuZsSW0nxPb01s; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9p-0004Ow-L1 for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:49 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:40 +0300 Message-Id: <20220615091742.16880-7-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (libseat): New variable * gnu/packages/admin.scm (seatd): New variable * gnu/packages/freedesktop.scm (seatd): Remove variable * gnu/packages/wm.scm (wlroots): Replace seatd input with libseat --- gnu/packages/admin.scm | 53 ++++++++++++++++++++++++++++++++++++ gnu/packages/freedesktop.scm | 29 -------------------- gnu/packages/wm.scm | 4 ++- 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d6e1d819ab..eb6450b4da 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -46,6 +46,7 @@ ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 muradm +;;; Copyright © 2021 pineapples ;;; Copyright © 2021 Petr Hodina ;;; Copyright © 2021 Artyom V. Poptsov ;;; Copyright © 2022 Wamm K. D. @@ -104,6 +105,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages elf) #:use-module (gnu packages file) #:use-module (gnu packages flex) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) @@ -5097,3 +5099,54 @@ (define-public greetd-pam-mount greetd-pam-mount is used in configuration of greetd to provide auto-(mounting/unmounting) of XDG_RUNTIME_DIR in the way that it will not interfere with default pam-mount configuration."))) + +(define-public libseat + (package + (name "libseat") + (version "0.7.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~kennylevinsen/seatd") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10f8387yy5as547xjjhl0cna6iywdgjmw0iq2nvcs8q6vlpnik4v")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags '("-Dlibseat-logind=elogind" + "-Dserver=disabled"))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("elogind" ,elogind))) + (home-page "https://sr.ht/~kennylevinsen/seatd") + (synopsis "Seat management library") + (description + "This package provides a universal seat management library that +allows applications to use whatever seat management is available.") + (license license:expat))) + +(define-public seatd + (package + (inherit libseat) + (name "seatd") + (arguments + `(#:configure-flags '("-Dlibseat-logind=elogind") + #:phases + (modify-phases %standard-phases + (add-after 'install 'remove-libs + (lambda* (#:key outputs #:allow-other-keys) + (with-directory-excursion (assoc-ref outputs "out") + (for-each delete-file-recursively '("lib" "include")))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("scdoc" ,scdoc))) + (inputs '()) + (synopsis "Seat management daemon") + (description + "This package provides a minimal seat management daemon whose task is to +mediate access to shared devices, such as graphics and input, for applications +that require it.") + (license license:expat))) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index fc2c45c1f1..309876867a 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -849,35 +849,6 @@ (define (source-file regexp) with localed. This package is extracted from the broader systemd package.") (license license:lgpl2.1+))) -(define-public seatd - (package - (name "seatd") - (version "0.5.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://git.sr.ht/~kennylevinsen/seatd") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1kglq8v4rnr3415mfaghyv2s2f8mxsy5s881gmm2908ig4n4j297")))) - (build-system meson-build-system) - (arguments - `(#:configure-flags '("-Dlogind=enabled"))) - (native-inputs - (list pkg-config scdoc)) - (propagated-inputs - (list elogind)) - (home-page "https://sr.ht/~kennylevinsen/seatd") - (synopsis "Seat management daemon and library") - (description - "This package provides a minimal seat management daemon whose task is to -mediate access to shared devices, such as graphics and input, for applications -that require it. It also provides a universal seat management library that -allows applications to use whatever seat management is available.") - (license license:expat))) - (define-public packagekit (package (name "packagekit") diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 123e6ca7e7..24d95ba86c 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2022 Daniel Meißner ;;; Copyright © 2022 Pier-Hugues Pellerin ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022 muradm ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,6 +89,7 @@ (define-module (gnu packages wm) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages bash) + #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -1537,7 +1539,7 @@ (define-public wlroots libxkbcommon mesa pixman - seatd + libseat wayland wayland-protocols xcb-util-errors From patchwork Wed Jun 15 09:17:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40023 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6920C27BBEA; Wed, 15 Jun 2022 10:27:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BF8B627BBE9 for ; Wed, 15 Jun 2022 10:27:44 +0100 (BST) Received: from localhost ([::1]:36238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PJP-0006SV-2T for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:27:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PB2-00007A-5G for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PB1-0002xy-TC for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PB0-0006rY-PN for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 7/8] gnu: desktop: Add seatd-service-type. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:19: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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528469426305 (code B ref 49969); Wed, 15 Jun 2022 09:19:02 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:18:14 +0000 Received: from localhost ([127.0.0.1]:36525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1PAE-0006q7-9o for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:14 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43562 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9s-0006nn-8O for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:01 -0400 Received: from localhost ([127.0.0.1]:35094) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7h-0003xo-2a for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=9OKNnQJMWqLxmJgn9iWyU3TM14PZmrTLw/2VCc0jci0=; b=RdINQj92gsx/euH6N77Fblu82Q YCUod6q0iyZ7JbMhK9LsEVbLJPcXYtKxHxSBM/fLF5CXATqZPGO7iSPeiQXVeTCdI8yjq7TEnak7H vpKScF9RHe6kgx4asPjOxMAK2MiAoIRQS+wBKZ2lktMYGDVtpBMnRJruyGK1vABL/vfz+0diP5zwf aJhcLe67el6IIsxJG7B+PmAEYXbXrwsZRsUpUHTOCH6F7TX2xT53vR6YUsI7ZAW/Hiky3TGLebqgd PwsCk2GUEWn9v21InNbvfKpPwp2y2fulVNq8EBvN2iWEYsJc9Ruz12VLbUJCWVmfOQkcE2dmOpl53 iVRXMufrTmeSkMyRgME+E+mPpKvZOF4KXVrKszo6c1YReuLDErzxRD2x4cc5if2IN24SPPOJV8NuR PF1nk/uet5UURcnHt7oyPNM0skBky+kW6YpdU55GAlRf7OC3hKKkGvDpQxisOU1GwthGaJ9AtPgI0 Hg2hIDlCbpb+uDLOxHuvpjRo; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9q-0004Oz-OO for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:50 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:41 +0300 Message-Id: <20220615091742.16880-8-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/desktop.scm (seatd-service-type): New variable * gnu/services/desktop.scm (seatd-configuration): New data type fix seatd path --- doc/guix.texi | 46 +++++++++++++++++++++++++++++ gnu/services/desktop.scm | 62 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 997b93c831..799ea932d7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22661,6 +22661,52 @@ and ``passwd'' is with the value @code{passwd}. @end table @end deftp +@defvr {Scheme Variable} seatd-service-type +@uref{https://sr.ht/~kennylevinsen/seatd/, seatd} is a minimal seat +management daemon. + +Seat management takes care of mediating access to shared devices (graphics, +input), without requiring the applications needing access to be root. + +@lisp +(append + (list + ;; make sure seatd is running + (service seatd-service-type)) + + ;; normally one would want %base-services + %base-services) + +@end lisp +@end defvr + +@deftp {Data Type} seatd-configuration +Configuration record for the seatd daemon service. + +@table @asis +@item @code{seatd} (default: @code{seatd}) +The seatd package to use. + +@item @code{user} (default: @samp{"root"}) +User to own the seatd socket. + +@item @code{group} (default: @samp{"users"}) +Group to own the seatd socket. + +@item @code{socket} (default: @samp{"/run/seatd.sock"}) +Where to create the seatd socket. + +@item @code{logfile} (default: @samp{"/var/log/seatd.log"}) +Log file to write to. + +@item @code{loglevel} (default: @samp{"error"}) +Log level to output logs. Possible values: @samp{"silent"}, @samp{"error"}, +@samp{"info"} and @samp{"debug"}. + +@end table +@end deftp + + @node Sound Services @subsection Sound Services diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 0499071436..29a3722f1b 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Reza Alizadeh Majd ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 muradm ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,7 +40,9 @@ (define-module (gnu services desktop) #: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)) #:autoload (gnu services sddm) (sddm-service-type) #:use-module (gnu system) #:use-module (gnu system setuid) @@ -157,6 +160,9 @@ (define-module (gnu services desktop) gnome-keyring-configuration? gnome-keyring-service-type + seatd-configuration + seatd-service-type + %desktop-services)) ;;; Commentary: @@ -1630,6 +1636,60 @@ (define polkit-wheel (define polkit-wheel-service (simple-service 'polkit-wheel polkit-service-type (list 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.sock")) + (logfile seatd-logfile (default "/var/log/seatd.log")) + (loglevel seatd-loglevel (default "info"))) + +(define (seatd-shepherd-service config) + (list (shepherd-service + (documentation "Minimal seat management daemon") + (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/seatd") + "-u" #$(seatd-user config) + "-g" #$(seatd-group config)) + #:environment-variables + (list (string-append "SEATD_LOGLEVEL=" + #$(seatd-loglevel config)) + (string-append "SEATD_DEFAULTPATH=" + #$(seatd-socket config))) + #:log-file #$(seatd-logfile config))) + (stop #~(make-kill-destructor))))) + +(define seatd-environment + (match-lambda + (($ _ _ _ socket) + `(("SEATD_SOCK" . ,socket))))) + +(define seatd-service-type + (service-type + (name 'seatd) + (description "Seat management takes care of mediating access +to shared devices (graphics, input), without requiring the +applications needing access to be root.") + (extensions + (list + (service-extension session-environment-service-type seatd-environment) + ;; TODO: once cgroups is separate dependency we should not mount it here + ;; for now it is mounted here, because elogind mounts it + (service-extension file-system-service-type (const %control-groups)) + (service-extension shepherd-root-service-type seatd-shepherd-service))) + (default-value (seatd-configuration)))) + ;;; ;;; The default set of desktop services. From patchwork Wed Jun 15 09:17:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 40022 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 91F5D27BBEA; Wed, 15 Jun 2022 10:27:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C628527BBE9 for ; Wed, 15 Jun 2022 10:27:02 +0100 (BST) Received: from localhost ([::1]:35830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1PIj-0006BG-Vk for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 05:27:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1PB1-00006X-KV for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1PB0-0002xj-4M for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1PB0-0006rK-0j for guix-patches@gnu.org; Wed, 15 Jun 2022 05:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v12 8/8] gnu: tests: Add seatd/greetd based minimal desktop system tests. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 09:19:01 +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: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.165528469026288 (code B ref 49969); Wed, 15 Jun 2022 09:19:01 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Jun 2022 09:18:10 +0000 Received: from localhost ([127.0.0.1]:36521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1PA9-0006pn-CL for submit@debbugs.gnu.org; Wed, 15 Jun 2022 05:18:09 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43564 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1P9t-0006nw-At for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 05:17:56 -0400 Received: from localhost ([127.0.0.1]:35096) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o1P7i-0003xr-6G for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 09:15:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=B5KCPTJa//Q3aMv6xoWZdlzY9NmWTpe/Ekmz7qbt6xk=; b=vdMF78aZwY+PkfnIdasOU5zl+w TUPO99ixBSBIEMhTzqPb+tgV4Vz5tPGdTiQpOkP0O6b1riXsGyOjne6CVMdZDqflJsAvrtEJbcnyf dShXCb9YKvA27KaXggbr+z2UoQysPD5bmVjVEOYgrpTVet1KTuRDq8fiNgErHtIWoOnQlr6sep25p Bl/oAnKB25gAPOhvbvUvcTe2dxLBFR4CrApNGtUkAIlCbaBGvwOUvy8zgAtLE7rSN1vTql+qSbd+C M5v6vRLnJ9NdQYMuHpbtAZDKOFiB+UeJI9ssJnyVdJDyg3EH7zfwMRQMCVf9rxwaD3aFND1TGLKFg +OLlwwNnCMUtDTIyzCokaUickPKKIMPIfQD2nXiUpMtjVI4QdbjhOKKmu0iO679rTJ4V5MAllLFj/ NvTKCf/kkQ0iQ8cmmwDe/oEfIIByrEA2RkbLyfY3t3kqdPcc6sVR8w1CBrLFvfx+f+Mb3taJpv7t4 i0GaSlf/unobhQHuoMDbBSFn; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o1P9r-0004P2-Qh for 49969@debbugs.gnu.org; Wed, 15 Jun 2022 12:17:51 +0300 From: muradm Date: Wed, 15 Jun 2022 12:17:42 +0300 Message-Id: <20220615091742.16880-9-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220615091742.16880-1-mail@muradm.net> References: <20220615091742.16880-1-mail@muradm.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/tests/desktop.scm (minimal-desktop): seatd/greetd based minimal desktop test fix tests --- gnu/tests/desktop.scm | 212 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 211 insertions(+), 1 deletion(-) diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm index 57069c0ede..25971f9225 100644 --- a/gnu/tests/desktop.scm +++ b/gnu/tests/desktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2021 Ludovic Courtès +;;; Copyright © 2021 muradm ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,13 +19,17 @@ (define-module (gnu tests desktop) #:use-module (gnu tests) + #:use-module (gnu packages shells) #:use-module (gnu services) + #:use-module (gnu services base) #:use-module (gnu services dbus) #:use-module (gnu services desktop) + #:use-module (gnu system) #:use-module (gnu system vm) #:use-module (guix gexp) #:use-module (srfi srfi-1) - #:export (%test-elogind)) + #:export (%test-elogind + %test-minimal-desktop)) ;;; @@ -100,3 +105,208 @@ (define %test-elogind #:imported-modules '((gnu services herd) (guix combinators))))) (run-elogind-test (virtual-machine os)))))) + + +;;; +;;; Seatd/greetd based minimal desktop +;;; + +(define %minimal-services + (append + (modify-services %base-services + ;; greetd-service-type provides "greetd" PAM service + (delete login-service-type) + ;; and can be used in place of mingetty-service-type + (delete mingetty-service-type)) + (list + (service seatd-service-type) + (service greetd-service-type + (greetd-configuration + (terminals + (list + ;; we can make any terminal active by default + (greetd-terminal-configuration (terminal-vt "1") (terminal-switch #t)) + ;; we can make environment without XDG_RUNTIME_DIR set + ;; even provide our own environment variables + (greetd-terminal-configuration + (terminal-vt "2") + (default-session-command + (greetd-agreety-session + (extra-env '(("MY_VAR" . "1"))) + (xdg-env? #f)))) + ;; we can use different shell instead of default bash + (greetd-terminal-configuration + (terminal-vt "3") + (default-session-command + (greetd-agreety-session (command (file-append zsh "/bin/zsh"))))) + ;; we can use any other executable command as greeter + (greetd-terminal-configuration + (terminal-vt "4") + (default-session-command (program-file "my-noop-greeter" #~(exit)))) + (greetd-terminal-configuration (terminal-vt "5")) + (greetd-terminal-configuration (terminal-vt "6")))))) + ;; mingetty-service-type can be used in parallel + ;; if needed to do so, do not (delete login-service-type) + ;; as illustrated above + #| (service mingetty-service-type (mingetty-configuration (tty "tty8"))) |#))) + +(define-syntax-rule (minimal-operating-system user-services ...) + "Return an operating system that includes USER-SERVICES in addition to +minimal %BASE-SERVICES." + (operating-system (inherit %simple-os) + (services (cons* user-services ... %minimal-services)))) + +(define (run-minimal-desktop-test os vm) + (define test + (with-imported-modules '((gnu build marionette) + (guix build syscalls)) + #~(begin + (use-modules (gnu build marionette) + (guix build syscalls) + (srfi srfi-1) + (srfi srfi-64) + (ice-9 pretty-print)) + + (define marionette + (make-marionette #$vm)) + + (define (file-get-all-strings fname) + (marionette-eval '(use-modules (rnrs io ports)) marionette) + (wait-for-file fname marionette #:read 'get-string-all)) + + (define (wait-for-unix-socket-m socket) + (wait-for-unix-socket socket marionette)) + + (mkdir #$output) + (chdir #$output) + + (test-runner-current (system-test-runner #$output)) + (test-begin "minimal-desktop") + + (test-assert "seatd is ready" + (wait-for-unix-socket-m "/run/seatd.sock")) + + (test-equal "login user on tty1" + "alice\n" + (begin + ;; Wait for tty1. + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'term-tty1)) + marionette) + (marionette-control "sendkey ctrl-alt-f1" marionette) + + ;; login as root change alice password and exit + ;; then login as alice + (for-each + (lambda (cmd) (marionette-type cmd marionette) (sleep 1)) + (list + "root\n" + "passwd alice\n" + "alice\n" + "alice\n" + "exit\n" + "alice\n" + "alice\n" + "id -un > logged-in\n")) + + (file-get-all-strings "/home/alice/logged-in"))) + + (test-equal "validate user environment" + '("SEATD_SOCK=/run/seatd.sock" + "XDG_RUNTIME_DIR=/run/user/1000" + "XDG_SEAT=seat0" + "XDG_VTNR=1") + + (begin + (marionette-type "env > env\n" marionette) + (sleep 1) + + (define user-env (string-tokenize + (file-get-all-strings "/home/alice/env"))) + + (define (expected-var var) + (any (lambda (s) (string-contains var s)) + '("SEATD_SOCK" + "XDG_RUNTIME_DIR" + "XDG_SEAT" + "XDG_VTNR"))) + + (sort (filter expected-var user-env) string env\n" marionette) + (sleep 1) + + (define (sock-var? var) + (any (lambda (s) (string-contains var s)) + '("SEATD_SOCK" "GREETD_SOCK"))) + + (define (sock-var-sock var) + (car (cdr (string-split var #\=)))) + + (let* + ((out (file-get-all-strings "/home/alice/env")) + (out (string-tokenize out)) + (out (filter sock-var? out)) + (socks (map sock-var-sock out)) + (socks (map wait-for-unix-socket-m socks))) + (and (= 2 (length socks)) (every identity socks))))) + + (test-assert "greetd is ready" + (begin + (marionette-type "ps -C greetd -o pid,args --no-headers > ps-greetd\n" + marionette) + (sleep 1) + + (define (greetd-daemon? cmd) + (string-contains cmd "config")) + + (define (greetd-cmd-to-pid cmd) + (car (string-split cmd #\space))) + + (define (greetd-pid-to-sock pid) + (string-append "/run/greetd-" pid ".sock")) + + (let* ((out (file-get-all-strings "/home/alice/ps-greetd")) + (out (string-split out #\newline)) + (out (map string-trim-both out)) + (out (filter greetd-daemon? out)) + (pids (map greetd-cmd-to-pid out)) + (socks (map greetd-pid-to-sock pids)) + (socks (map wait-for-unix-socket-m socks))) + (every identity socks)))) + + ;; a bit weak, but tests everything at once actually + (test-equal "check /run/user/ mounted and writable" + "alice\n" + (begin + (marionette-type "echo alice > /run/user/1000/test\n" marionette) + (file-get-all-strings "/run/user/1000/test"))) + + (test-assert "screendump" + (begin + (marionette-control (string-append "screendump " #$output + "/tty1.ppm") + marionette) + (file-exists? "tty1.ppm"))) + + (test-end)))) + + (gexp->derivation "minimal-desktop" test)) + +(define %test-minimal-desktop + (system-test + (name "minimal-desktop") + (description + "Test whether we can log in when seatd and greetd is enabled") + (value + (let* ((os (marionette-operating-system + (minimal-operating-system) + #:imported-modules '((gnu services herd) + (guix combinators)))) + (vm (virtual-machine os))) + (run-minimal-desktop-test (virtualized-operating-system os '()) + #~(list #$vm))))))