From patchwork Mon Jun 13 14:45:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39950 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 F174127BBEB; Mon, 13 Jun 2022 15:48: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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 83DCC27BBE9 for ; Mon, 13 Jun 2022 15:48:03 +0100 (BST) Received: from localhost ([::1]:47600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lMI-0001c3-HF for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:48:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLL-00010f-Go for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLK-0001Zn-Og for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLK-0006vd-Nn for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 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: Mon, 13 Jun 2022 14:47: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.165513156823876 (code B ref 49969); Mon, 13 Jun 2022 14:47:02 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:08 +0000 Received: from localhost ([127.0.0.1]:60082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKO-00069f-3R for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:08 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43528 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lK9-0005yv-Ht for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:54 -0400 Received: from localhost ([127.0.0.1]:35052) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI0-0003jD-8d for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:36 +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=FktNa6N7xN48RxvpWN6hL3emzg JoBaVgbWu44kunjRdhM8oT5BNsJS+lPQZvZ+WKTG2MCrggpqh6y2t2nbztsjojiopfRgEzDmLfZuZ SVekldQUURANeri23StdS8dRywn7vA7+MqI3aS4p8VtZOkXbXNHQrSIM4YMDS6Dh24pgkZDmFOH0v M3Le7MeAh7mrpn5ps98xAfhIIdlqJsnDIdx+uJTUveFZbJhBvFG4T7PzGN4FQc0+ZYFokPRB9yJrA YDP0ywyRkTTfKdePUUTze0QBoNia5C8ACuXQyL+JwarUFfzV1E6wjYejblvPXfu/0ST5/Bh6uet2p H4fQZAVq2LlKSbs5VK1h+Y1kv1C4nX4GhFj89eanpP4/LienYx14lW5d4zUMS4NK3tcjnSlz5ih66 75iNpso3L2kjYJ26Vb8jbO5nUqCUcM4P63HxC4gJb6P+jt51lgkrw9TnEQ4EvoMPXhQyaFFW+nUi8 q0hQVkEzlo3i9veYoAeU2NaF; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lK8-0002ws-3O for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:48 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:39 +0300 Message-Id: <20220613144546.11306-2-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39946 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 637C627BBEA; Mon, 13 Jun 2022 15:46:15 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 1E35C27BBE9 for ; Mon, 13 Jun 2022 15:46:15 +0100 (BST) Received: from localhost ([::1]:45232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lKY-0008IX-7C for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:46:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lKO-0008De-13 for guix-patches@gnu.org; Mon, 13 Jun 2022 10:46:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lKN-0001TW-Or for guix-patches@gnu.org; Mon, 13 Jun 2022 10:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lKN-00069J-Ja for guix-patches@gnu.org; Mon, 13 Jun 2022 10:46:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 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: Mon, 13 Jun 2022 14:46: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.165513155823412 (code B ref 49969); Mon, 13 Jun 2022 14:46:03 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:45:58 +0000 Received: from localhost ([127.0.0.1]:60074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKH-00065M-UH for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:58 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43532 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKA-00060C-Pj for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:51 -0400 Received: from localhost ([127.0.0.1]:35054) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI1-0003jG-Ea for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject: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=r1iFffKRV3ed5ky2Mv+eSP3If8 OpFO9jI9z+/vP2oO7Ja2h0XO09N/K7+99SlIf2iYl338MWu4vt5bRngAh1wPpTdvlrRi6xauNnE0a ZrbMP/oqpI54bltzBdf6bQjJuPmPp6MUioPnxDKBg/P+ofsDzkQH0cbt18o89wmET48nueH8ua/Rn 93+Wd1oKc1GfkERcCZ/RkojOQ9i6nUouJTI6fpWaxbEj9UdWtIdoSOk88OoLRAUU+3Yc/gmBaltvi TTphUDE+2/PwgifosA6Vd8HlB3GH0TM0BgugAHspgXUWrqTeQmZyZdSFipTlNvR0wB4/XJTEcGYMD qbpxkREeDiH5HZWHy3kvQpsn1sXGq8BTGVDhHBqmGKA8iR38ENCh4kNwWaXxfc1ou8x2YNxiNWb+X gpeGjGgwUveScsJ5gRK6yeSZaz0mQyVOOFHll9U3f3PuQNRLDCId3ENa6ROg8V7ICn78wMTVsWzlp VKISa532fKbPleGzN9TgeRrf; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lK9-0002wv-7B for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:49 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:40 +0300 Message-Id: <20220613144546.11306-3-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39947 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 38EC027BBEA; Mon, 13 Jun 2022 15:47:47 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 8E31927BBE9 for ; Mon, 13 Jun 2022 15:47:46 +0100 (BST) Received: from localhost ([::1]:46786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lM1-00012C-Mi for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:47:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLL-00010e-GZ for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLJ-0001Zj-VT for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLJ-0006uk-Sc for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 3/8] gnu: admin: Add greetd 0.8.0. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 14:47: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.165513156323639 (code B ref 49969); Mon, 13 Jun 2022 14:47:01 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:03 +0000 Received: from localhost ([127.0.0.1]:60076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKI-00065b-Cr for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:03 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43534 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKC-00061A-0m for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:53 -0400 Received: from localhost ([127.0.0.1]:35056) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI2-0003jK-Jx for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43: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=RozKN4irD+c6HlJfAmqLSZkvFzhfWCbNGOZYmXWR0n0=; b=RfXT6/3MzYIyy1ZJShHWKQ/ehE IUHwt+PsMbrHgyQI5m44+6uWqYdjRDkQ/6zpe0E4Xke8M8LAAHOs5BcJkKG+V3y0WMi4BwuFtP3sH ckuCcNlAarPU23d930GkbnfSkOV30ltX3vInhgORvumDh6vx5OCAvACXfYqoqkWpWT8xafftVB2h9 30v/7ZFP+raxxE8ytRI/Eaqma9Irj/4vepBVFUiN1b7lMLBW4vJX1TdDKJcjp1vXVeMG9aILieb+v KqKCnwLKrKlGIP8fD1kB0f0n/j+ceWEV1vQMV6OmH+q2IT49DrAtCbDZfeucassEyrt7KyszaVZqh C9VTCLjkcvzFPVa6Lh5nxWvz86KsXBQITQ26GnzuTUD6pRvZb9Mm/4aPyu12Mirn+fMjxpOT7feT2 SMAcJR0NOJ5OWX/TywvjnqyOGJu/ryHuO0L2zcHBA2ZKndCQqb4UKrGO4PFtcxjHq0JMyzE8K5wyV c809yYnzpziXPKf1yqLrIvr/; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKA-0002wy-BY for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:50 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:41 +0300 Message-Id: <20220613144546.11306-4-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39949 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 2E59F27BBEA; Mon, 13 Jun 2022 15:47:50 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 9A49F27BBE9 for ; Mon, 13 Jun 2022 15:47:49 +0100 (BST) Received: from localhost ([::1]:46840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lM4-00014c-FA for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:47:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLL-00010d-GW for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLK-0001Zm-B2 for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLK-0006vC-A6 for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 4/8] gnu: admin: Add greetd-pam-mount. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 14:47: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.165513156423669 (code B ref 49969); Mon, 13 Jun 2022 14:47:02 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:04 +0000 Received: from localhost ([127.0.0.1]:60079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKN-00069B-CJ for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:04 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43536 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKC-00061p-Vx for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:53 -0400 Received: from localhost ([127.0.0.1]:35058) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI3-0003jN-Oq for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:39 +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=ha8PJxItjBZZvFD6Oh6LyWXb5C szRE3KOe60IPnfuk+iQSk9b8avE/dQYU5V4tf966i6iCTJeU5tMsLa0TU5904eRSJeLfZKU77pWFk g9m5hLCj49+dyvz0RgzS8k5juVzMmOdruzbCPFYMfcGU+SYznyjgbYFMDRybQkROLE+IEgRWqmulF pfPzMqG4Cy2Y7zqPqe9C2wKLAkDi4dbde+P3GewTO/3wk+WNqGSc0kOu2ytJr/bkCTa6yEWM/MoUV VdpLbqzLwsBLFtLnEUonQbO8a9OEy49hbdKoYbaFvjLCvTao/V4zTpqESo4SEjDf8wV3lsF6r9A+0 n4xrn1yfIngf6lXOW17Pkf0SJk8dpGTxXD/YMlu15UBRGK819AMhn4TnoY4CTHtzrFaUMsHKxHFlR 6jvt+/vck6YQTjrI43M0vMjvEghxyWrq1aRp6Gqh/la/76kGEU6z5zZYAiNBU+aLx7wmaMgVFkVVz 8R2XPmz46sD6Mu3UxtRVJf+O; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKB-0002x1-HQ for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:51 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:42 +0300 Message-Id: <20220613144546.11306-5-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39952 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 D312627BBEA; Mon, 13 Jun 2022 15:48:16 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 8164127BBE9 for ; Mon, 13 Jun 2022 15:48:15 +0100 (BST) Received: from localhost ([::1]:48418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lMU-0002AI-M8 for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:48:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLL-00010h-Gw for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLL-0001Zo-6x for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLL-0006w5-5M for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 5/8] gnu: base: Add greetd-service-type. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 14:47: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.165513157023933 (code B ref 49969); Mon, 13 Jun 2022 14:47:03 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:10 +0000 Received: from localhost ([127.0.0.1]:60084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKS-0006D2-DN for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:09 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43538 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKE-00062b-A0 for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:55 -0400 Received: from localhost ([127.0.0.1]:35060) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI4-0003jQ-Q4 for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:41 +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=KWbl/hEh5uAo7Rzkbi8FDSpyDs dgWi8lUCHGsgHHyQCCZ1zzEOcrDABq/TSVVJb/TzF9IR/PlI+1PVhY82wwIw02etqWeCTHXh8F5WQ Ry5UU4/ZkYsx0YYN8JqeMsuZ6Yzd23e0PmlqpqPYuXEWeLnscK3RdRi+QLmBuMqgZrdvWCAvWav5c G7Vt51HHTQht0oVMaplYVLnhBxn730x2Vo7w+3RYJEezEVQK1lS/B3kOxYGGRSkUP6Ul/dImSSUZO /OvefnxIlPR/pfVkG3nRvTxS/k2HXMYJMq4D3/IKLwjS15wXoQ/JNrvJVt6qI2OZX/7HrM/q0eh2s m1K+QPkZrGiRkLQFjQrZSiJa/ZUyPvg7SLqE3j0ca0aA0hRdh9gz8UmzprpdekwoRvE/WuSWl+Wdj MyBCCVBZyCBJa72xCxQ7Mcu2Dfloc6ZAcOnWHEUX5bHAKnM8U4FlRScoOwbPuVwCZpYzwxMYQuRH7 xE8jqhwXNh2cK8DMf2GllH+x; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKC-0002x4-J8 for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:52 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:43 +0300 Message-Id: <20220613144546.11306-6-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39951 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 23BD627BBEA; Mon, 13 Jun 2022 15:48:07 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 4215927BBE9 for ; Mon, 13 Jun 2022 15:48:06 +0100 (BST) Received: from localhost ([::1]:47680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lML-0001f2-9j for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:48:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLN-000126-DI for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLL-0001aA-KY for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLL-0006wY-JS for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 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: Mon, 13 Jun 2022 14:47: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.165513157023970 (code B ref 49969); Mon, 13 Jun 2022 14:47:03 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:10 +0000 Received: from localhost ([127.0.0.1]:60086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKT-0006Dw-V3 for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:10 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43540 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKF-00063P-Cv for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:56 -0400 Received: from localhost ([127.0.0.1]:35062) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI6-0003jT-2T for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:42 +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=Yx0dvDFuyFn8ewNHEcF+1JQ8rQ oQL30t3ZAWXuyWGBl+XhCZbnQWZhdyyp9sRvQfhIcBbFzXpx8Jr4Ww7mtVwzOonF0bbXz/CfcqigS uqcsdQFE7Q/r5XcsHOogB4Bd30SXjrJRZwbYasiInP7wEnSil69oX8udtfITi0KeZaJMOEI+XJ8WD gSgWSqekPiaHVkKoL+3Ngwnd2qO23eRYbTS95JxAVGl9BD0k00aDPin8RxWD/7YrE5l3cU11QIDJY dRIZb4EmlpVXNF1EGiNDd0zJHC4R+8BXPEjDMoWpeZOwNyqagzkQ3k10sFSKQIMZBFd+ozasD1EAL cBga6W5zU8iiQ7XtGiDZm5zIyjP5FGsspXMK93+eY92jbi0YIGMK0FTxPFwv+mnV9o7GSdiKlqiEm FchIlsElVd6frkvfGBRgrZO/DyYxXCkayJm+n+vzk6hidQIFXjBk+ojOP0lwAlykNwgfEXPM9YEzG Z/cssevmE9U3kQPkgIPT4q94; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKD-0002x7-R9 for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:53 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:44 +0300 Message-Id: <20220613144546.11306-7-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39953 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 1F05527BBEA; Mon, 13 Jun 2022 15:48:28 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 74B1A27BBE9 for ; Mon, 13 Jun 2022 15:48:27 +0100 (BST) Received: from localhost ([::1]:48876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lMg-0002Tf-KR for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:48:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLN-000123-Cw for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLM-0001aB-1M for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLM-0006wy-0G for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 7/8] gnu: desktop: Add seatd-service-type. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jun 2022 14:47: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.165513159925613 (code B ref 49969); Mon, 13 Jun 2022 14:47:03 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:39 +0000 Received: from localhost ([127.0.0.1]:60088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKj-0006Sl-QK for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:39 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43542 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKG-000643-Dt for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:57 -0400 Received: from localhost ([127.0.0.1]:35064) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI7-0003jW-4i for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:43 +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=mJYBgS2Hg8mBy/7EqNoz+p12e4 Z8+PwQgxiI2mSVHfmSPk+MzVwlLoUXHmcVGOOj3lrNNMx3K46cBZnOUvXvhcGfAUw++2TPBN4RQyG SrPIwKLKBfZ6kz46aoMzcrAmmHXoGcHQIrZP8ACgl5JAb+lA7+NrE4auZcZQmm2806FwpsSGl5DiH vWRM3wdqj5GQI1mZAiwaApLUhKCtMhvhgXSE9x9ieHGjxhmjC6BkW74GomJGiIg73y1NyxISrp7xb NEJTlVVNPWpFuzXGutZQoVuavbZkpMjdgZshd6drucCxma0MlFpUjVKM3qpAS7VIomSRWZVshhmql 4zoQOC1UoMkyH7VH/uIWC6P1u9cfR478hw53oRGpYNdwB/bQXQbfFNJcmBtdNjBJ2bvYApHFcpvNR klTeHXSi6Uomw/iKN1q1Fx0SLmWc3mPomwKP58m6lJSzUqkGRTmQqvC3AKFk8m8rf59XzwYKVXXhj tj3vhAx3NHh31UFHW/kBuW7D; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKE-0002xC-SE for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:54 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:45 +0300 Message-Id: <20220613144546.11306-8-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 Mon Jun 13 14:45:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 39948 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 8C96A27BBEA; Mon, 13 Jun 2022 15:47:49 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 ACE4B27BBE9 for ; Mon, 13 Jun 2022 15:47:48 +0100 (BST) Received: from localhost ([::1]:46824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0lM3-00014G-DU for patchwork@mira.cbaines.net; Mon, 13 Jun 2022 10:47:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0lLN-000124-D8 for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0lLM-0001aD-Fk for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0lLM-0006xQ-EP for guix-patches@gnu.org; Mon, 13 Jun 2022 10:47:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v11 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: Mon, 13 Jun 2022 14:47: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.165513159925648 (code B ref 49969); Mon, 13 Jun 2022 14:47:04 +0000 Received: (at 49969) by debbugs.gnu.org; 13 Jun 2022 14:46:39 +0000 Received: from localhost ([127.0.0.1]:60090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKx-0006f2-3J for submit@debbugs.gnu.org; Mon, 13 Jun 2022 10:46:39 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:43544 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0lKH-00064l-Fn for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 10:45:58 -0400 Received: from localhost ([127.0.0.1]:35066) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o0lI8-0003jZ-8G for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 14:43:44 +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=V50/s1aHPz1lg/xFgnuRBtKadEuLaqkQs6hVma7/WWM=; b=Un4ToJH9Nwa0qq9rPP9dg0Vzr9 FeWUgLD4iUTFNp9DsRxoDzBHnl7+L1LRTfiOMvP/EbdrTNmWCie5tKagHOOn2XWfaRPVpQSBleyzE d3dKZvlUErV3l3j7O4NLJYdciJkJvzZgrIBqHIYesWn3cmWJgIEzMIzTwiTz4lrL5CmqN+ANL7uAj 01hqhr3QXvohiXnTUxNG26B3GZCoVOtzsvxH2oyVkDyWKogWw+f53oOT1FT9Lr4D9hDOeTEu2COzR nuloxKXmS76Iu7ZG6brPsWWqSTXTbp4RtejQxelrKNZa+0MMxjKTJs8kOKSDaCoJwYSLTlS0ufZra DACNgKs1/GD60H3vC84TO/J0rJZ5BVVrcOscZuKE4eQifTYwCVUchQsFH9mRBMqKJQrmEi+zUtuTa TSHZfzLMFKvXH2HWfzP/v3p4ZNqp+dRwmPl5OZ9sd6D6ETLJ/QVLYJ8UofmQZpgXahtPiLPTk4JYl fqXbNmheJlp4PWxKJg0QdHmq; Received: from muradm by localhost with local (Exim 4.95) (envelope-from ) id 1o0lKF-0002xL-WB for 49969@debbugs.gnu.org; Mon, 13 Jun 2022 17:45:56 +0300 From: muradm Date: Mon, 13 Jun 2022 17:45:46 +0300 Message-Id: <20220613144546.11306-9-mail@muradm.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613144546.11306-1-mail@muradm.net> References: <6e4bf02cf382ff003951fc2f2bdf96289384ece2.camel@telenet.be> <20220613144546.11306-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 --- 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..7cc837f42e 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-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) + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (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))))))