From patchwork Sat Feb 25 18:57:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47315 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 46E1D16B70; Sat, 25 Feb 2023 19:00:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 8D52216AFC for ; Sat, 25 Feb 2023 19:00:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlC-0001p8-4z; Sat, 25 Feb 2023 13:59:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0001o2-3p for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl7-0000bB-Rd for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl7-0007vi-KU for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 01/27] services: base: Deprecate 'host-name-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735150130198 (code B ref 61789); Sat, 25 Feb 2023 18:59:01 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:21 +0000 Received: from localhost ([127.0.0.1]:41414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkT-0007qu-BN for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:21 -0500 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:48848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkQ-0007qY-I6 for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:19 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id B4C032079A for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6647A8009A; Sat, 25 Feb 2023 19:58:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AAc4XPOBZTQo; Sat, 25 Feb 2023 19:58:17 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E8BCD80079; Sat, 25 Feb 2023 19:58:16 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:47 +0000 Message-Id: <08a1b5a6e81b4b9b9600ddfd24465978eada34bb.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (operating-system Reference): Reorder cross-reference. Add an anchor to be used ... (Base services): ... here by host-name-service-type. Document host-name-service-type. * gnu/services/base.scm: Export host-name-service-type. (host-name-service): Deprecate procedure. * gnu/system.scm (operating-system-default-essential-services): Use host-name-service-type. --- doc/guix.texi | 16 ++++++++++------ gnu/services/base.scm | 6 ++++-- gnu/system.scm | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a7ef00f421..9d5dd495c0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16640,12 +16640,14 @@ operating-system Reference @item @code{services} (default: @code{%base-services}) A list of service objects denoting system services. @xref{Services}. +@anchor{operating-system-essential-services} @cindex essential services @item @code{essential-services} (default: ...) The list of ``essential services''---i.e., things like instances of -@code{system-service-type} and @code{host-name-service-type} (@pxref{Service -Reference}), which are derived from the operating system definition itself. -As a user you should @emph{never} need to touch this field. +@code{system-service-type} (@pxref{Service Reference}) and +@code{host-name-service-type}, which are derived from the operating +system definition itself. As a user you should @emph{never} need to +touch this field. @item @code{pam-services} (default: @code{(base-pam-services)}) @cindex PAM @@ -18018,9 +18020,11 @@ Base Services @end lisp @end deffn -@deffn {Scheme Procedure} host-name-service @var{name} -Return a service that sets the host name to @var{name}. -@end deffn +@defvar host-name-service-type +Type of the service that sets the system host name, whose value +is a string. This service is included in @code{operating-system} by +default (@pxref{operating-system-essential-services,@code{essential-services}}). +@end defvar @defvar console-font-service-type Install the given fonts on the specified ttys (fonts are per diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 7ad1e765bd..c471107883 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -99,7 +99,8 @@ (define-module (gnu services base) file-system-service-type file-system-utilities swap-service - host-name-service + host-name-service ; deprecated + host-name-service-type %default-console-font console-font-service-type console-font-service @@ -778,7 +779,8 @@ (define host-name-service-type (one-shot? #t))) (description "Initialize the machine's host name."))) -(define (host-name-service name) +(define-deprecated (host-name-service name) + host-name-service-type "Return a service that sets the host name to @var{name}." (service host-name-service-type name)) diff --git a/gnu/system.scm b/gnu/system.scm index 53f3c62bb0..bb26d7c9a5 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -782,7 +782,7 @@ (define (operating-system-default-essential-services os) (operating-system-file-systems os))) (session-environment-service (operating-system-environment-variables os)) - (host-name-service host-name) + (service host-name-service-type host-name) procs root-fs (service setuid-program-service-type (operating-system-setuid-programs os)) From patchwork Sat Feb 25 18:57:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47323 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 996E516AFC; Sat, 25 Feb 2023 19:01:04 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 DFA9716BBA for ; Sat, 25 Feb 2023 19:00:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rR-7R; Sat, 25 Feb 2023 13:59:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0001o4-CE for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0000bH-3l for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl8-0007vp-0o for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 02/27] services: base: Deprecate 'login-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735150230204 (code B ref 61789); Sat, 25 Feb 2023 18:59:01 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:22 +0000 Received: from localhost ([127.0.0.1]:41416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkT-0007r1-P9 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:22 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:45952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkQ-0007qZ-Pd for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:20 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 12E6C20D4A for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id AE89C8009B; Sat, 25 Feb 2023 19:58:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Vynbh14QySMq; Sat, 25 Feb 2023 19:58:17 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 4509380098; Sat, 25 Feb 2023 19:58:17 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:48 +0000 Message-Id: <3f2d8fea6e785811c1a139f4fb0efc17a6b4be44.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace with login-service-type. * gnu/services/base.scm (login-service): Deprecate procedure. * gnu/system/install.scm (%installation-services): Use login-service-type. --- doc/guix.texi | 12 ++++++------ gnu/services/base.scm | 5 +++-- gnu/system/install.scm | 5 +++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9d5dd495c0..cb0d18ebdc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18101,14 +18101,14 @@ Base Services host names. @end defun -@deffn {Scheme Procedure} login-service @var{config} -Return a service to run login according to @var{config}, a -@code{} object, which specifies the message of the day, -among other things. -@end deffn +@defvar login-service-type +Type of the service that provides a console login service, whose value +is a @code{} object. +@end defvar @deftp {Data Type} login-configuration -This is the data type representing the configuration of login. +Data type representing the configuration of login, which specifies the +@acronym{MOTD, message of the day}, among other things. @table @asis diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c471107883..8dfd92aacf 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -158,7 +158,7 @@ (define-module (gnu services base) login-configuration login-configuration? login-service-type - login-service + login-service ; deprecated agetty-configuration agetty-configuration? @@ -937,7 +937,8 @@ (define login-service-type "Provide a console log-in service as specified by its configuration value, a @code{login-configuration} object."))) -(define* (login-service #:optional (config (login-configuration))) +(define-deprecated (login-service #:optional (config (login-configuration))) + login-service-type "Return a service configure login according to @var{config}, which specifies the message of the day, among other things." (service login-service-type config)) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index b3cf7a1bd8..8c7585f188 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -347,8 +347,9 @@ (define* (%installation-services #:key (system (or (and=> (virtual-terminal "tty1") (login-program (installer-program)))) - (login-service (login-configuration - (motd motd))) + (service login-service-type + (login-configuration + (motd motd))) ;; Documentation. The manual is in UTF-8, but ;; 'console-font-service' sets up Unicode support and loads a font From patchwork Sat Feb 25 18:57:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47321 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 3D47B16AFC; Sat, 25 Feb 2023 19:01:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 C26AB16B96 for ; Sat, 25 Feb 2023 19:00:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rZ-C9; Sat, 25 Feb 2023 13:59:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlA-0001op-Gf for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlA-0000br-8K for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlA-0007wU-1m for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 03/27] services: base: Deprecate 'mingetty-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151130320 (code B ref 61789); Sat, 25 Feb 2023 18:59:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:31 +0000 Received: from localhost ([127.0.0.1]:41438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkd-0007ss-9N for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:31 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:45978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkV-0007rN-Ua for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:24 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 658BB20D4F for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 12D268009A; Sat, 25 Feb 2023 19:58:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uCCHdpSfcLM8; Sat, 25 Feb 2023 19:58:17 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9A29D80079; Sat, 25 Feb 2023 19:58:17 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:49 +0000 Message-Id: <1d46c585596ea41630eb7e388035ad45079e3ad3.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace mingetty-service with mingetty-service-type. * gnu/services/base.scm (mingetty-service): Deprecate procedure. --- doc/guix.texi | 15 +++++++-------- gnu/services/base.scm | 5 +++-- gnu/system/install.scm | 7 ++++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cb0d18ebdc..2225b25a47 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18123,18 +18123,17 @@ Base Services @end table @end deftp -@deffn {Scheme Procedure} mingetty-service @var{config} -Return a service to run mingetty according to @var{config}, a -@code{} object, which specifies the tty to run, among -other things. -@end deffn +@defvar mingetty-service-type +Type of the service that runs Mingetty, an implementation of the +virtual console log-in. The value for this service is a +@code{} object. +@end defvar @deftp {Data Type} mingetty-configuration -This is the data type representing the configuration of Mingetty, which -provides the default implementation of virtual console log-in. +Data type representing the configuration of Mingetty, which specifies +the tty to run, among other things. @table @asis - @item @code{tty} The name of the console this Mingetty runs on---e.g., @code{"tty1"}. diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 8dfd92aacf..c762485054 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -173,7 +173,7 @@ (define-module (gnu services base) mingetty-configuration-clear-on-logout? mingetty-configuration-mingetty mingetty-configuration? - mingetty-service + mingetty-service ; deprecated mingetty-service-type %nscd-default-caches @@ -1275,7 +1275,8 @@ (define mingetty-service-type "Provide console login using the @command{mingetty} program."))) -(define* (mingetty-service config) +(define-deprecated (mingetty-service config) + mingetty-service-type "Return a service to run mingetty according to @var{config}, which specifies the tty to run, among other things." (service mingetty-service-type config)) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 8c7585f188..1b05a862c6 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -331,9 +331,10 @@ (define* (%installation-services #:key (system (or (and=> Access documentation at any time by pressing Alt-F2.\x1b[0m "))) (define (normal-tty tty) - (mingetty-service (mingetty-configuration (tty tty) - (auto-login "root") - (login-pause? #t)))) + (service mingetty-service-type + (mingetty-configuration (tty tty) + (auto-login "root") + (login-pause? #t)))) (define bare-bones-os (load "examples/bare-bones.tmpl")) From patchwork Sat Feb 25 18:57:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47307 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 537FC16BA5; Sat, 25 Feb 2023 18:59:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 4E6C216AF4 for ; Sat, 25 Feb 2023 18:59:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sY-SD; Sat, 25 Feb 2023 13:59:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlD-0001rG-BH for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlD-0000cU-3A for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlC-0007xQ-Ug for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 04/27] services: base: Deprecate 'agetty-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151530384 (code B ref 61789); Sat, 25 Feb 2023 18:59:06 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:35 +0000 Received: from localhost ([127.0.0.1]:41453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkh-0007u0-A8 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:35 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:45990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzka-0007s3-EU for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id BAB4A20D54 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6D2AF8009B; Sat, 25 Feb 2023 19:58:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hDAKzevRLkUR; Sat, 25 Feb 2023 19:58:18 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id EB67580098; Sat, 25 Feb 2023 19:58:17 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:50 +0000 Message-Id: <9e10d3396829a145398ae0e762d85e2a2c3fa3ec.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace agetty-service with agetty-service-type. * gnu/services/base.scm (agetty-service): Deprecate procedure. * gnu/system/examples/beaglebone-black.tmpl (operating-system)[services]: Use agetty-service-type. --- doc/guix.texi | 17 ++++++++--------- gnu/services/base.scm | 5 +++-- gnu/system/examples/beaglebone-black.tmpl | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2225b25a47..cab42d46e4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18160,19 +18160,18 @@ Base Services @end table @end deftp -@deffn {Scheme Procedure} agetty-service @var{config} -Return a service to run agetty according to @var{config}, an -@code{} object, which specifies the tty to run, -among other things. -@end deffn +@defvar agetty-service-type +Type of the service that runs agetty, which implements virtual and +serial console log-in. The value for this service is a +@code{} object. +@end defvar @deftp {Data Type} agetty-configuration -This is the data type representing the configuration of agetty, which -implements virtual and serial console log-in. See the @code{agetty(8)} -man page for more information. +Data type representing the configuration of agetty, which specifies the +tty to run, among other things@footnote{See the @code{agetty(8)} +man page for more information.}. @table @asis - @item @code{tty} The name of the console this agetty runs on, as a string---e.g., @code{"ttyS0"}. This argument is optional, it will default to diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c762485054..c5fd0cf5b4 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -162,7 +162,7 @@ (define-module (gnu services base) agetty-configuration agetty-configuration? - agetty-service + agetty-service ; deprecated agetty-service-type mingetty-configuration @@ -1210,7 +1210,8 @@ (define agetty-service-type "Provide console login using the @command{agetty} program."))) -(define* (agetty-service config) +(define-deprecated (agetty-service config) + agetty-service-type "Return a service to run agetty according to @var{config}, which specifies the tty to run, among other things." (service agetty-service-type config)) diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl index 40d0a76a37..18bbb2723c 100644 --- a/gnu/system/examples/beaglebone-black.tmpl +++ b/gnu/system/examples/beaglebone-black.tmpl @@ -48,10 +48,10 @@ (services (append (list (service dhcp-client-service-type) ;; mingetty does not work on serial lines. ;; Use agetty with board-specific serial parameters. - (agetty-service - (agetty-configuration - (extra-options '("-L")) - (baud-rate "115200") - (term "vt100") - (tty "ttyO0")))) - %base-services))) + (service agetty-service-type + (agetty-configuration + (extra-options '("-L")) + (baud-rate "115200") + (term "vt100") + (tty "ttyO0")))) + %base-services))) From patchwork Sat Feb 25 18:57:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47319 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 B72E916BA5; Sat, 25 Feb 2023 19:00:58 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 CD23D16B96 for ; Sat, 25 Feb 2023 19:00:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlD-0001r8-M4; Sat, 25 Feb 2023 13:59:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzl9-0001o7-6M for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0000bW-UN for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl8-0007w6-Rp for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 05/27] doc: kmscon-service-type: Use @defvar @-command. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151030291 (code B ref 61789); Sat, 25 Feb 2023 18:59:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:30 +0000 Received: from localhost ([127.0.0.1]:41431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkb-0007sO-Nq for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:29 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]:44066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkU-0007qj-6E for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:22 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id C192E208FC for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 817648009E; Sat, 25 Feb 2023 19:58:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wNhwXnNSKXyy; Sat, 25 Feb 2023 19:58:18 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 4AD8880079; Sat, 25 Feb 2023 19:58:18 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:51 +0000 Message-Id: <1e095fa1c35ed14562ffa5cb9581de2028c70484.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Use @defvar @-command for kmscon-service-type. --- doc/guix.texi | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cab42d46e4..f4bdb6b211 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18342,18 +18342,17 @@ Base Services @end table @end deftp -@deffn {Scheme Procedure} kmscon-service-type @var{config} -Return a service to run @uref{https://www.freedesktop.org/wiki/Software/kmscon,kmscon} -according to @var{config}, a @code{} object, which -specifies the tty to run, among other things. -@end deffn +@defvar kmscon-service-type +Type of the service that runs @uref{https://www.freedesktop.org/wiki/Software/kmscon,kmscon}, +which implements virtual console log-in. The value for this service is a +@code{} object. +@end defvar @deftp {Data Type} kmscon-configuration -This is the data type representing the configuration of Kmscon, which -implements virtual console log-in. +Data type representing the configuration of Kmscon, which specifies the +tty to run, among other things. @table @asis - @item @code{virtual-terminal} The name of the console this Kmscon runs on---e.g., @code{"tty1"}. From patchwork Sat Feb 25 18:57:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47334 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 6479216B96; Sat, 25 Feb 2023 19:05:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 1CE0616B42 for ; Sat, 25 Feb 2023 19:05:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzqz-0004tf-9i; Sat, 25 Feb 2023 14:05:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzqx-0004tG-J9 for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzqx-0002Oz-8w for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzqx-0008E6-3q for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 06/27] services: base: Deprecate 'nscd-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735187231566 (code B ref 61789); Sat, 25 Feb 2023 19:05:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 19:04:32 +0000 Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzqS-0008Cz-96 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 14:04:32 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]:36272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzqP-0008Ch-Mm for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 14:04:30 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 016F520D5C for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 20:04:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 3DD808009B; Sat, 25 Feb 2023 19:58:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Kn8aYiy1FlvD; Sat, 25 Feb 2023 19:58:18 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9AFE480098; Sat, 25 Feb 2023 19:58:18 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:52 +0000 Message-Id: <0da8efddd398e31d71fd879745c9f3da7fd735db.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Application Setup): Compress @cindex entries. (Base Services): Compress @cindex entries. Delete %nscd-default-configuration. Replace 'nscd-service' with 'nscd-service-type'. * gnu/services/base.scm (%nscd-default-configuration): Deprecate variable. (nscd-service): Deprecate procedure. * gnu/system/install.scm (%installation-services): Use nscd-service-type. --- doc/guix.texi | 25 +++++++------------------ gnu/services/base.scm | 12 +++++++----- gnu/system/install.scm | 5 +++-- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f4bdb6b211..86edc58b40 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1976,8 +1976,7 @@ Application Setup @cindex name service switch, glibc @cindex NSS (name service switch), glibc -@cindex nscd (name service caching daemon) -@cindex name service caching daemon (nscd) +@cindex @abbr{nscd, name service cache daemon} When using Guix on a foreign distro, we @emph{strongly recommend} that the system run the GNU C library's @dfn{name service cache daemon}, @command{nscd}, which should be listening on the @@ -18390,20 +18389,17 @@ Base Services @end table @end deftp -@cindex name service cache daemon -@cindex nscd -@deffn {Scheme Procedure} nscd-service [@var{config}] [#:glibc glibc] @ - [#:name-services '()] -Return a service that runs the libc name service cache daemon (nscd) with the -given @var{config}---an @code{} object. @xref{Name -Service Switch}, for an example. +@cindex @abbr{nscd, name service cache daemon} +@defvar nscd-service-type +Type of the service that runs the libc @abbr{nscd, name service cache +daemon}, whose value is a @code{} object. For convenience, the Shepherd service for nscd provides the following actions: @table @code @item invalidate -@cindex cache invalidation, nscd @cindex nscd, cache invalidation +@cindex cache invalidation, nscd This invalidate the given cache. For instance, running: @example @@ -18417,17 +18413,10 @@ Base Services Running @command{herd statistics nscd} displays information about nscd usage and caches. @end table - -@end deffn - -@defvar %nscd-default-configuration -This is the default @code{} value (see below) used -by @code{nscd-service}. It uses the caches defined by -@code{%nscd-default-caches}; see below. @end defvar @deftp {Data Type} nscd-configuration -This is the data type representing the name service cache daemon (nscd) +Data type representing the @abbr{nscd, name service cache daemon} configuration. @table @asis diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c5fd0cf5b4..423a38e39d 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -177,7 +177,7 @@ (define-module (gnu services base) mingetty-service-type %nscd-default-caches - %nscd-default-configuration + %nscd-default-configuration ; deprecated nscd-configuration nscd-configuration? @@ -186,7 +186,7 @@ (define-module (gnu services base) nscd-cache? nscd-service-type - nscd-service + nscd-service ; deprecated syslog-configuration syslog-configuration? @@ -1343,7 +1343,8 @@ (define %nscd-default-caches (check-files? #t) ;check /etc/services changes (persistent? #t)))) -(define %nscd-default-configuration +(define-deprecated %nscd-default-configuration + #f ;; Default nscd configuration. (nscd-configuration)) @@ -1497,13 +1498,14 @@ (define nscd-service-type (name-services (append (nscd-configuration-name-services config) name-services))))) - (default-value %nscd-default-configuration) + (default-value (nscd-configuration)) (description "Runs libc's @dfn{name service cache daemon} (nscd) with the given configuration---an @code{} object. @xref{Name Service Switch}, for an example."))) -(define* (nscd-service #:optional (config %nscd-default-configuration)) +(define-deprecated (nscd-service #:optional (config (nscd-configuration))) + nscd-service-type "Return a service that runs libc's name service cache daemon (nscd) with the given @var{config}---an @code{} object. @xref{Name Service Switch}, for an example." diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 1b05a862c6..f7de0d6a09 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -426,8 +426,9 @@ (define* (%installation-services #:key (system (or (and=> ;; Since this is running on a USB stick with a overlayfs as the root ;; file system, use an appropriate cache configuration. - (nscd-service (nscd-configuration - (caches %nscd-minimal-caches))) + (service nscd-service-type + (nscd-configuration + (caches %nscd-minimal-caches))) ;; Having /bin/sh is a good idea. In particular it allows Tramp ;; connections to this system to work. From patchwork Sat Feb 25 18:57:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47308 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 9B9E016BA4; Sat, 25 Feb 2023 18:59:43 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 3B3C416B42 for ; Sat, 25 Feb 2023 18:59:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rc-An; Sat, 25 Feb 2023 13:59:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0001o5-P2 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0000bQ-Gk for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl8-0007vy-DV for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 07/27] services: base: Deprecate 'syslog-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735150930283 (code B ref 61789); Sat, 25 Feb 2023 18:59:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:29 +0000 Received: from localhost ([127.0.0.1]:41429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkb-0007sL-5L for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:29 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:39268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkS-0007qm-Mk for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:21 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id E83EF203BE for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9014580079; Sat, 25 Feb 2023 19:58:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eJE4eUV7KMoj; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E952F8009A; Sat, 25 Feb 2023 19:58:18 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:53 +0000 Message-Id: <7adf5f5b68372e7b590c1af7e92c3823e748752e.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type. * gnu/services/base.scm (%default-syslog.conf): Place before . (syslog-service-type): Set default value. (syslog-service): Deprecate procedure. (%base-services): Use syslog-service-type. * gnu/system/hurd.scm (%base-services/hurd): Ditto. * gnu/system/install.scm (%installation-services): Ditto. --- doc/guix.texi | 19 ++++++------- gnu/services/base.scm | 61 +++++++++++++++++++++--------------------- gnu/system/hurd.scm | 2 +- gnu/system/install.scm | 2 +- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 86edc58b40..5072bcc11f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18494,11 +18494,15 @@ Base Services external name servers do not even need to be queried. @end defvar -@anchor{syslog-configuration-type} @cindex syslog @cindex logging +@defvar syslog-service-type +Type of the service that runs the syslog daemon, whose value is a +@code{} object. +@end defvar + @deftp {Data Type} syslog-configuration -This data type represents the configuration of the syslog daemon. +Data type representing the configuration of the syslog daemon. @table @asis @item @code{syslogd} (default: @code{#~(string-append #$inetutils "/libexec/syslogd")}) @@ -18506,19 +18510,12 @@ Base Services @item @code{config-file} (default: @code{%default-syslog.conf}) The syslog configuration file to use. +@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more +information on the configuration file syntax. @end table @end deftp -@anchor{syslog-service} -@cindex syslog -@deffn {Scheme Procedure} syslog-service @var{config} -Return a service that runs a syslog daemon according to @var{config}. - -@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more -information on the configuration file syntax. -@end deffn - @defvar guix-service-type This is the type of the service that runs the build daemon, @command{guix-daemon} (@pxref{Invoking guix-daemon}). Its value must be a diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 423a38e39d..45e6c5f448 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -190,7 +190,7 @@ (define-module (gnu services base) syslog-configuration syslog-configuration? - syslog-service + syslog-service ; deprecated syslog-service-type %default-syslog.conf @@ -1511,6 +1511,32 @@ (define-deprecated (nscd-service #:optional (config (nscd-configuration))) Service Switch}, for an example." (service nscd-service-type config)) +;; Snippet adapted from the GNU inetutils manual. +(define %default-syslog.conf + (plain-file "syslog.conf" " + # Log all error messages, authentication messages of + # level notice or higher and anything of level err or + # higher to the console. + # Don't log private authentication messages! + *.alert;auth.notice;authpriv.none -/dev/console + + # Log anything (except mail) of level info or higher. + # Don't log private authentication messages! + *.info;mail.none;authpriv.none -/var/log/messages + + # Log \"debug\"-level entries and nothing else. + *.=debug -/var/log/debug + + # Same, in a different place. + *.info;mail.none;authpriv.none -/dev/tty12 + + # The authpriv file has restricted access. + # 'fsync' the file after each line (hence the lack of a leading dash). + authpriv.* /var/log/secure + + # Log all the mail messages in one place. + mail.* -/var/log/maillog +")) (define-record-type* syslog-configuration make-syslog-configuration @@ -1540,37 +1566,12 @@ (define syslog-service-type (umask mask) pid)))) (stop #~(make-kill-destructor)))) + (syslog-configuration) (description "Run the syslog daemon, @command{syslogd}, which is responsible for logging system messages."))) -;; Snippet adapted from the GNU inetutils manual. -(define %default-syslog.conf - (plain-file "syslog.conf" " - # Log all error messages, authentication messages of - # level notice or higher and anything of level err or - # higher to the console. - # Don't log private authentication messages! - *.alert;auth.notice;authpriv.none -/dev/console - - # Log anything (except mail) of level info or higher. - # Don't log private authentication messages! - *.info;mail.none;authpriv.none -/var/log/messages - - # Log \"debug\"-level entries and nothing else. - *.=debug -/var/log/debug - - # Same, in a different place. - *.info;mail.none;authpriv.none -/dev/tty12 - - # The authpriv file has restricted access. - # 'fsync' the file after each line (hence the lack of a leading dash). - authpriv.* /var/log/secure - - # Log all the mail messages in one place. - mail.* -/var/log/maillog -")) - -(define* (syslog-service #:optional (config (syslog-configuration))) +(define-deprecated (syslog-service #:optional (config (syslog-configuration))) + syslog-service-type "Return a service that runs @command{syslogd} and takes @var{} as a parameter. @@ -3294,7 +3295,7 @@ (define %base-services (cons tty %default-console-font)) '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) - (syslog-service) + (service syslog-service-type) (service agetty-service-type (agetty-configuration (extra-options '("-L")) ; no carrier detect (term "vt100") diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 24fc6dbcae..20dc4ae735 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -93,7 +93,7 @@ (define %base-services/hurd `(("/bin/sh" ,(file-append bash "/bin/sh")) ("/usr/bin/env" ,(file-append coreutils "/bin/env")))) - (syslog-service)) + (service syslog-service-type)) (map (lambda (n) (service hurd-getty-service-type (hurd-getty-configuration diff --git a/gnu/system/install.scm b/gnu/system/install.scm index f7de0d6a09..8c7752df0e 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -367,7 +367,7 @@ (define* (%installation-services #:key (system (or (and=> (normal-tty "tty6") ;; The usual services. - (syslog-service) + (service syslog-service-type) ;; Use the Avahi daemon to discover substitute servers on the local ;; network. It can be faster than fetching from remote servers. From patchwork Sat Feb 25 18:57:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47309 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 AE0D916B42; Sat, 25 Feb 2023 18:59:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 13DFB16AFC for ; Sat, 25 Feb 2023 18:59:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sX-P7; Sat, 25 Feb 2023 13:59:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rL-2L for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlD-0000ck-QD for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlD-0007xi-Md for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 08/27] services: base: Deprecate 'udev-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735154630578 (code B ref 61789); Sat, 25 Feb 2023 18:59:07 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:06 +0000 Received: from localhost ([127.0.0.1]:41474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlB-0007wx-M1 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzke-0007tB-E2 for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:33 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 2C71820D4A for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id D2B7E8009E; Sat, 25 Feb 2023 19:58:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lJgKbWAiwf86; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 585728009D; Sat, 25 Feb 2023 19:58:19 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:54 +0000 Message-Id: <09d5091f0636e7fd4eb5d63184e0fb5ca962227c.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace udev-service with udev-service-type. Document . Use @defun @-commands for udev-rules-service, udev-rule and file->udev-rule. * gnu/services/base.scm (udev-service): Deprecate procedure. * gnu/system/install.scm (%installation-services): Use udev-service-type. --- doc/guix.texi | 52 +++++++++++++++++++++++++++--------------- gnu/services/base.scm | 5 ++-- gnu/system/install.scm | 4 +++- 3 files changed, 39 insertions(+), 22 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5072bcc11f..283524245a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18675,15 +18675,30 @@ Base Services @end table @end deftp -@deffn {Scheme Procedure} udev-service [#:udev @var{eudev} #:rules @code{'()}] -Run @var{udev}, which populates the @file{/dev} directory dynamically. -udev rules can be provided as a list of files through the @var{rules} -variable. The procedures @code{udev-rule}, @code{udev-rules-service} -and @code{file->udev-rule} from @code{(gnu services base)} simplify the -creation of such rule files. -@end deffn +@defvar udev-service-type +Type of the service that runs udev, a service which populates the +@file{/dev} directory dynamically, whose value is a +@code{} object. + +This service type can be @emph{extended} using procedures +@code{udev-rules-service} along with @code{file->udev-rule} or +@code{udev-rule} which simplify the process of writing udev rules. +@end defvar -@deffn {Scheme Procedure} udev-rule [@var{file-name} @var{contents}] +@deftp {Data Type} udev-configuration +Data type representing the configuration of udev. + +@table @asis +@item @code{udev} (default: @code{eudev}) (type: file-like) +Package object of the udev service. + +@item @code{rules} (default: @var{'()}) (type: list-of-file-like) +List of file-like objects denoting udev-rule files. + +@end table +@end deftp + +@defun udev-rule @var{file-name} @var{contents} Return a udev-rule file named @var{file-name} containing the rules defined by the @var{contents} literal. @@ -18699,18 +18714,17 @@ Base Services "ATTR@{product@}==\"Example\", " "RUN+=\"/path/to/script\""))) @end lisp -@end deffn +@end defun -@deffn {Scheme Procedure} udev-rules-service [@var{name} @var{rules}] @ - [#:groups @var{groups}] -Return a service that extends @code{udev-service-type } with @var{rules} +@defun udev-rules-service @var{name} @var{rules} [#:groups '()] +Return a service that extends @code{udev-service-type} with @var{rules} and @code{account-service-type} with @var{groups} as system groups. This works by creating a singleton service type @code{@var{name}-udev-rules}, of which the returned service is an instance. -Here we show how it can be used to extend @code{udev-service-type} with the -previously defined rule @code{%example-udev-rule}. +Here we show how it can be used to extend @code{udev-service-type} +with the previously defined rule @code{%example-udev-rule}. @lisp (operating-system @@ -18719,11 +18733,11 @@ Base Services (cons (udev-rules-service 'usb-thing %example-udev-rule) %desktop-services))) @end lisp -@end deffn +@end defun -@deffn {Scheme Procedure} file->udev-rule [@var{file-name} @var{file}] -Return a udev file named @var{file-name} containing the rules defined -within @var{file}, a file-like object. +@defun file->udev-rule @var{file-name} @var{file} +Return a udev-rule file named @var{file-name} containing the rules +defined within @var{file}, a file-like object. The following example showcases how we can use an existing rule file. @@ -18743,7 +18757,7 @@ Base Services (sha256 (base32 "0lmmagpyb6xsq6zcr2w1cyx9qmjqmajkvrdbhjx32gqf1d9is003")))))) @end lisp -@end deffn +@end defun Additionally, Guix package definitions can be included in @var{rules} in order to extend the udev rules with the definitions found under their diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 45e6c5f448..b183cf58c1 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -150,7 +150,7 @@ (define-module (gnu services base) udev-configuration? udev-configuration-rules udev-service-type - udev-service + udev-service ; deprecated udev-rule file->udev-rule udev-rules-service @@ -2351,7 +2351,8 @@ (define udev-service-type directory dynamically. Get extra rules from the packages listed in the @code{rules} field of its value, @code{udev-configuration} object."))) -(define* (udev-service #:key (udev eudev) (rules '())) +(define-deprecated (udev-service #:key (udev eudev) (rules '())) + udev-service-type "Run @var{udev}, which populates the @file{/dev} directory dynamically. Get extra rules from the packages listed in @var{rules}." (service udev-service-type diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 8c7752df0e..dd965f312b 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -388,7 +388,9 @@ (define* (%installation-services #:key (system (or (and=> ;; Start udev so that useful device nodes are available. ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for ;; regulations-compliant WiFi access. - (udev-service #:rules (list lvm2 crda)) + (service udev-service-type + (udev-configuration + (rules (list lvm2 crda)))) ;; Add the 'cow-store' service, which users have to start manually ;; since it takes the installation directory as an argument. From patchwork Sat Feb 25 18:57:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47320 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 F331416BC5; Sat, 25 Feb 2023 19:00:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 ECAD616AF4 for ; Sat, 25 Feb 2023 19:00:56 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlD-0001qC-Vk; Sat, 25 Feb 2023 13:59:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlA-0001oq-W1 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlA-0000by-Nb for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlA-0007wb-JI for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 09/27] services: base: Deprecate 'rngd-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151230334 (code B ref 61789); Sat, 25 Feb 2023 18:59:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:32 +0000 Received: from localhost ([127.0.0.1]:41440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkd-0007sz-Lv for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:32 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:39286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkW-0007rT-Pe for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:25 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id C26B6203BE for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6B771800A1; Sat, 25 Feb 2023 19:58:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mU-fc08-Yun5; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id A93338009A; Sat, 25 Feb 2023 19:58:19 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:55 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace rngd-service with rngd-service-type. Document . * gnu/services/base.scm (): Set default values from the values in the now deprecated 'rngd-service' procedure. (rngd-service): Deprecate procedure. (rngd-service-type): Set default value. --- doc/guix.texi | 25 ++++++++++++++++++------- gnu/services/base.scm | 15 +++++++++------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 283524245a..ec6f2d9c31 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18919,13 +18919,24 @@ Base Services @end table @end deftp -@anchor{rngd-service} -@deffn {Scheme Procedure} rngd-service [#:rng-tools @var{rng-tools}] @ - [#:device "/dev/hwrng"] -Return a service that runs the @command{rngd} program from @var{rng-tools} -to add @var{device} to the kernel's entropy pool. The service will fail if -@var{device} does not exist. -@end deffn +@defvar rngd-service-type +Type of the service that runs rng-tools rngd, whose value is a +@code{} object. +@end defvar + +@deftp {Data Type} rngd-configuration +Data type representing the configuration of rngd. + +@table @asis +@item @code{rng-tools} (default: @code{rng-tools}) (type: file-like) +Package object of the rng-tools rngd. + +@item @code{device} (default: @var{"/dev/hwrng"}) (type: string) +Path of the device to add to the kernel's entropy pool. The service +will fail if @var{device} does not exist. + +@end table +@end deftp @anchor{pam-limits-service} @cindex session limits diff --git a/gnu/services/base.scm b/gnu/services/base.scm index b183cf58c1..1423ab6767 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -239,7 +239,7 @@ (define-module (gnu services base) rngd-configuration rngd-configuration? rngd-service-type - rngd-service + rngd-service ; deprecated kmscon-configuration kmscon-configuration? @@ -662,8 +662,10 @@ (define urandom-seed-service-type (define-record-type* rngd-configuration make-rngd-configuration rngd-configuration? - (rng-tools rngd-configuration-rng-tools) ;file-like - (device rngd-configuration-device)) ;string + (rng-tools rngd-configuration-rng-tools ;file-like + (default rng-tools)) + (device rngd-configuration-device ;string + (default "/dev/hwrng"))) (define rngd-service-type (shepherd-service-type @@ -682,12 +684,13 @@ (define rngd-service-type (provision '(trng)) (start #~(make-forkexec-constructor '#$rngd-command)) (stop #~(make-kill-destructor)))) + (rngd-configuration) (description "Run the @command{rngd} random number generation daemon to supply entropy to the kernel's pool."))) -(define* (rngd-service #:key - (rng-tools rng-tools) - (device "/dev/hwrng")) +(define-deprecated (rngd-service #:key (rng-tools rng-tools) + (device "/dev/hwrng")) + rngd-service-type "Return a service that runs the @command{rngd} program from @var{rng-tools} to add @var{device} to the kernel's entropy pool. The service will fail if @var{device} does not exist." From patchwork Sat Feb 25 18:57:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47328 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 9FC7E16BBC; Sat, 25 Feb 2023 19:01:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 3862216AFC for ; Sat, 25 Feb 2023 19:01:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlH-0001u4-45; Sat, 25 Feb 2023 13:59:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sV-Mu for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlF-0000d7-Dz for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlF-0007yJ-Aa for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 10/27] services: base: Deprecate 'pam-limits-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735154830627 (code B ref 61789); Sat, 25 Feb 2023 18:59:09 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:08 +0000 Received: from localhost ([127.0.0.1]:41483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlD-0007xb-CW for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzki-0007uE-Ln for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:37 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 7CF8220D56 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 30FCD800A3; Sat, 25 Feb 2023 19:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PEjatA_IURTo; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 067E880079; Sat, 25 Feb 2023 19:58:19 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:56 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Base Services): Replace pam-limits-service with pam-limits-service-type. * gnu/packages/benchmark.scm (python-locust)[description]: Update index anchor to manual. * gnu/services/base.scm (pam-limits-service-type): Accept both lists and file-like objects for compatibility. (pam-limits-service): Deprecate procedure. --- doc/guix.texi | 18 ++++++++--------- gnu/packages/benchmark.scm | 2 +- gnu/services/base.scm | 41 +++++++++++++++++++++++++++----------- 3 files changed, 39 insertions(+), 22 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ec6f2d9c31..f9ca809e47 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18938,7 +18938,6 @@ Base Services @end table @end deftp -@anchor{pam-limits-service} @cindex session limits @cindex ulimit @cindex priority @@ -18946,19 +18945,20 @@ Base Services @cindex jackd @cindex nofile @cindex open file descriptors -@deffn {Scheme Procedure} pam-limits-service [#:limits @code{'()}] - -Return a service that installs a configuration file for the +@anchor{pam-limits-service-type} +@defvar pam-limits-service-type +Type of the service that installs a configuration file for the @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html, -@code{pam_limits} module}. The procedure optionally takes a list of -@code{pam-limits-entry} values, which can be used to specify +@code{pam_limits} module}. The value for this service type is +a list of @code{pam-limits-entry} values, which can be used to specify @code{ulimit} limits and @code{nice} priority limits to user sessions. +By default, the value is the empty list. The following limits definition sets two hard and soft limits for all login sessions of users in the @code{realtime} group: @lisp -(pam-limits-service +(service pam-limits-service-type (list (pam-limits-entry "@@realtime" 'both 'rtprio 99) (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) @@ -18973,7 +18973,7 @@ Base Services descriptors that can be used: @lisp -(pam-limits-service +(service pam-limits-service-type (list (pam-limits-entry "*" 'both 'nofile 100000))) @end lisp @@ -18984,7 +18984,7 @@ Base Services else the users would be prevented from login in. For more information about the Pluggable Authentication Module (PAM) limits, refer to the @samp{pam_limits} man page from the @code{linux-pam} package. -@end deffn +@end defvar @defvar greetd-service-type @uref{https://git.sr.ht/~kennylevinsen/greetd, @code{greetd}} is a minimal and diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 33e2466da9..fd8513f41d 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -458,7 +458,7 @@ (define-public python-locust Note: Locust will complain if the available open file descriptors limit for the user is too low. To raise such limit on a Guix System, refer to -@samp{info guix --index-search=pam-limits-service}.") +@samp{info guix --index-search=pam-limits-service-type}.") (license license:expat))) (define-public interbench diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 1423ab6767..bda38abae3 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -40,7 +40,7 @@ (define-module (gnu services base) #:use-module (guix store) #:use-module (guix deprecation) - #:autoload (guix diagnostics) (warning &fix-hint) + #:autoload (guix diagnostics) (warning report-error &fix-hint) #:autoload (guix i18n) (G_) #:use-module (guix combinators) #:use-module (gnu services) @@ -246,7 +246,7 @@ (define-module (gnu services base) kmscon-service-type pam-limits-service-type - pam-limits-service + pam-limits-service ; deprecated greetd-service-type greetd-configuration @@ -1584,17 +1584,13 @@ (define-deprecated (syslog-service #:optional (config (syslog-configuration))) (define pam-limits-service-type - (let ((security-limits - ;; Create /etc/security containing the provided "limits.conf" file. - (lambda (limits-file) - `(("security/limits.conf" - ,limits-file)))) - (pam-extension + (let ((pam-extension (lambda (pam) (let ((pam-limits (pam-entry (control "required") (module "pam_limits.so") - (arguments '("conf=/etc/security/limits.conf"))))) + (arguments + '("conf=/etc/security/limits.conf"))))) (if (member (pam-service-name pam) '("login" "greetd" "su" "slim" "gdm-password" "sddm" "sudo" "sshd")) @@ -1602,7 +1598,26 @@ (define pam-limits-service-type (inherit pam) (session (cons pam-limits (pam-service-session pam)))) - pam))))) + pam)))) + + ;; XXX: Using file-like objects is deprecated, use lists instead. + ;; This is to be reduced into the list? case when the deprecated + ;; code gets removed. + ;; Create /etc/security containing the provided "limits.conf" file. + (security-limits + (match-lambda + ((? file-like? obj) + (warning (G_ "Using file-like value for 'pam-limits-service-type' +is deprecated~%")) + obj) + ((? list? lst) + `(("security/limits.conf" + ,(plain-file "limits.conf" + (string-join (map pam-limits-entry->string lst) + "\n" 'suffix))))) + (_ (report-error + (G_ "invalid input for 'pam-limits-service-type'~%")))))) + (service-type (name 'limits) (extensions @@ -1612,9 +1627,11 @@ (define pam-limits-service-type (description "Install the specified resource usage limits by populating @file{/etc/security/limits.conf} and using the @code{pam_limits} -authentication module.")))) +authentication module.") + (default-value '())))) -(define* (pam-limits-service #:optional (limits '())) +(define-deprecated (pam-limits-service #:optional (limits '())) + pam-limits-service-type "Return a service that makes selected programs respect the list of pam-limits-entry specified in LIMITS via pam_limits.so." (service pam-limits-service-type From patchwork Sat Feb 25 18:57:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47305 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 BD9FD16B42; Sat, 25 Feb 2023 18:59:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 48B3016AFC for ; Sat, 25 Feb 2023 18:59:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlN-0001wS-Pj; Sat, 25 Feb 2023 13:59:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzl9-0001oK-K2 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl9-0000bb-Bt for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl9-0007wD-8g for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 11/27] services: tor: Deprecate 'tor-hidden-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151030305 (code B ref 61789); Sat, 25 Feb 2023 18:59:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:30 +0000 Received: from localhost ([127.0.0.1]:41434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkc-0007sW-0t for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:30 -0500 Received: from smtpm6.myservices.hosting ([185.26.105.207]:35942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkU-0007rD-Ux for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:23 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm6.myservices.hosting (Postfix) with ESMTP id 2F29D20D47 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E03BB800A1; Sat, 25 Feb 2023 19:58:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id egqr4PT5j_MU; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 5A9C28009D; Sat, 25 Feb 2023 19:58:20 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:57 +0000 Message-Id: <55d9d97eabbb72cf59713b31015e654d028d8623.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Due to (now renamed) 'hidden-service' record type not being exported, the only way hidden services could have worked is through the now deprecated 'tor-hidden-service' procedure which also had the issue that it can only be used once since the returned service always had the same name. This commit fixes the Tor service documentation and deprecates 'tor-hidden-service' procedure, correcting some inconsistencies along the way. * doc/guix.texi (Networking Services): Add examples for Tor hidden services. Document . Remove mention of 'tor-hidden-service' procedure. * gnu/services/networking.scm: Export tor-configuration-tor, tor-configuration-config-file, tor-configuration-hidden-services, tor-configuration-socks-socket-type, tor-configuration-control-socket-path, tor-hidden-service-configuration, tor-hidden-service-configuration?, tor-hidden-service-configuration-name, tor-hidden-service-configuration-mapping. ()[control-socket?]: Rename accessor. (): Rename to ... (): ... this. (tor-configuration->torrc): Update record-type name. (tor-activation): Ditto. (tor-service-type): Tweak comment. (tor-hidden-service-type): Remove variable. (tor-hidden-service): Deprecate procedure. --- doc/guix.texi | 55 +++++++++++++++++++++++-------------- gnu/services/networking.scm | 47 +++++++++++++++++-------------- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f9ca809e47..eeb2efa488 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20494,11 +20494,21 @@ Networking Services @cindex Tor @defvar tor-service-type -This is the type for a service that runs the @uref{https://torproject.org, -Tor} anonymous networking daemon. The service is configured using a +Type for a service that runs the @uref{https://torproject.org, Tor} +anonymous networking daemon. The service is configured using a @code{} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. +In addition to adding Tor @dfn{hidden service}s records to the service +configuration directly, this service can be extended by other services to add +hidden services, as in this example: + +@lisp +(simple-service 'my-extra-hidden-service tor-service-type + (list (tor-hidden-service-configuration + (name "extra-hidden-service") + (mapping '((80 "127.0.0.1:8080")))))) +@end lisp @end defvar @deftp {Data Type} tor-configuration @@ -20517,11 +20527,10 @@ Networking Services syntax. @item @code{hidden-services} (default: @code{'()}) -The list of @code{} records to use. For any hidden service -you include in this list, appropriate configuration to enable the hidden -service will be automatically added to the default configuration file. You -may conveniently create @code{} records using the -@code{tor-hidden-service} procedure described below. +The list of @code{} records to use. +For any hidden service you include in this list, appropriate +configuration to enable the hidden service will be automatically added to +the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) The default socket type that Tor should use for its SOCKS socket. This must @@ -20546,26 +20555,32 @@ Networking Services @end table @end deftp -@cindex hidden service -@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} -Define a new Tor @dfn{hidden service} called @var{name} and implementing -@var{mapping}. @var{mapping} is a list of port/host tuples, such as: +@cindex hidden service, tor +@deftp {Data Type} tor-hidden-service-configuration +Data Type representing a Tor @dfn{hidden service} configuration. +See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor +project's documentation} for more information. + +@table @asis +@item @code{name} (type: string) +Name for the Tor @dfn{hidden service}. +This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, +where the @file{hostname} file contains the @samp{.onion} host name for +the hidden service. + +@item @code{mapping} (type: list-of-list) +List of host---@dfn{hidden-service} port mappings, such as: @example - '((22 "127.0.0.1:22") - (80 "127.0.0.1:8080")) +'((22 "127.0.0.1:22") + (80 "127.0.0.1:8080")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and port 80 is mapped to local port 8080. -This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, where -the @file{hostname} file contains the @code{.onion} host name for the hidden -service. - -See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor -project's documentation} for more information. -@end deffn +@end table +@end deftp The @code{(gnu services rsync)} module provides the following services: diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..d6e1877ef5 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -138,7 +138,16 @@ (define-module (gnu services networking) tor-configuration tor-configuration? - tor-hidden-service + tor-configuration-tor + tor-configuration-config-file + tor-configuration-hidden-services + tor-configuration-socks-socket-type + tor-configuration-control-socket-path + tor-hidden-service-configuration + tor-hidden-service-configuration? + tor-hidden-service-configuration-name + tor-hidden-service-configuration-mapping + tor-hidden-service ; deprecated tor-service-type network-manager-configuration @@ -919,7 +928,7 @@ (define-record-type* (default '())) (socks-socket-type tor-configuration-socks-socket-type ; 'tcp or 'unix (default 'tcp)) - (control-socket? tor-control-socket-path + (control-socket? tor-configuration-control-socket-path (default #f))) (define %tor-accounts @@ -933,11 +942,11 @@ (define %tor-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define-record-type - (hidden-service name mapping) - hidden-service? - (name hidden-service-name) ;string - (mapping hidden-service-mapping)) ;list of port/address tuples +(define-record-type + (tor-hidden-service-configuration name mapping) + tor-hidden-service-configuration? + (name tor-hidden-service-configuration-name) ;string + (mapping tor-hidden-service-configuration-mapping)) ;list of port/address tuples (define (tor-configuration->torrc config) "Return a 'torrc' file for CONFIG." @@ -977,7 +986,7 @@ (define (tor-configuration->torrc config) tcp-port host)) ports hosts))) '#$(map (match-lambda - (($ name mapping) + (($ name mapping) (cons name mapping))) hidden-services)) @@ -1064,7 +1073,7 @@ (define (tor-activation config) (chmod "/var/lib" #o755) (for-each initialize - '#$(map hidden-service-name + '#$(map tor-hidden-service-configuration-name (tor-configuration-hidden-services config))))) (define tor-service-type @@ -1077,7 +1086,7 @@ (define tor-service-type (service-extension activation-service-type tor-activation))) - ;; This can be extended with hidden services. + ;; This can be extended with tor hidden services. (compose concatenate) (extend (lambda (config services) (tor-configuration @@ -1090,15 +1099,8 @@ (define tor-service-type "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define tor-hidden-service-type - ;; A type that extends Tor with hidden services. - (service-type (name 'tor-hidden-service) - (extensions - (list (service-extension tor-service-type list))) - (description - "Define a new Tor @dfn{hidden service}."))) - -(define (tor-hidden-service name mapping) +(define-deprecated (tor-hidden-service name mapping) + #f "Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @@ -1116,8 +1118,11 @@ (define (tor-hidden-service name mapping) See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information." - (service tor-hidden-service-type - (hidden-service name mapping))) + (simple-service 'tor-hidden-service + tor-service-type + (list (tor-hidden-service-configuration + (name name) + (mapping mapping))))) ;;; From patchwork Sat Feb 25 18:57:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47311 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 7163B16B42; Sat, 25 Feb 2023 18:59:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 4617B16AFC for ; Sat, 25 Feb 2023 18:59:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001s0-OC; Sat, 25 Feb 2023 13:59:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0001p5-DN for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0000c3-4L for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlB-0007wj-0F for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 12/27] services: ssh: Deprecate 'lsh-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151330348 (code B ref 61789); Sat, 25 Feb 2023 18:59:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:33 +0000 Received: from localhost ([127.0.0.1]:41442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzke-0007tD-6a for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:33 -0500 Received: from smtpmciv7.myservices.hosting ([185.26.106.202]:50930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkW-0007rK-1Y for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:25 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv7.myservices.hosting (Postfix) with ESMTP id 9B71E20DDF for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 51C5C80079; Sat, 25 Feb 2023 19:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id shW_OlgsffUs; Sat, 25 Feb 2023 19:58:21 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id AFDD68009E; Sat, 25 Feb 2023 19:58:20 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:58 +0000 Message-Id: <2f88379eaa173fea422efe9a60175d73bbc4123e.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Networking Services): Remove mention of lsh-service. Document lsh-service-type and lsh-service-configuration. * gnu/services/ssh.scm (): Set default values based on the now deprecated 'lsh-service' procedure. (lsh-service-type): Set default value. (lsh-service): Deprecate procedure. --- doc/guix.texi | 98 +++++++++++++++++++++++++++++--------------- gnu/services/ssh.scm | 68 ++++++++++++++++++------------ 2 files changed, 106 insertions(+), 60 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index eeb2efa488..50ac49e65f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20740,41 +20740,71 @@ Networking Services @cindex SSH @cindex SSH server -@deffn {Scheme Procedure} lsh-service [#:host-key "/etc/lsh/host-key"] @ - [#:daemonic? #t] [#:interfaces '()] [#:port-number 22] @ - [#:allow-empty-passwords? #f] [#:root-login? #f] @ - [#:syslog-output? #t] [#:x11-forwarding? #t] @ - [#:tcp/ip-forwarding? #t] [#:password-authentication? #t] @ - [#:public-key-authentication? #t] [#:initialize? #t] -Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. -@var{host-key} must designate a file containing the host key, and readable -only by root. - -When @var{daemonic?} is true, @command{lshd} will detach from the -controlling terminal and log its output to syslogd, unless one sets -@var{syslog-output?} to false. Obviously, it also makes lsh-service -depend on existence of syslogd service. When @var{pid-file?} is true, -@command{lshd} writes its PID to the file called @var{pid-file}. - -When @var{initialize?} is true, automatically create the seed and host key -upon service activation if they do not exist yet. This may take long and -require interaction. - -When @var{initialize?} is false, it is up to the user to initialize the -randomness generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to create -a key pair with the private key stored in file @var{host-key} (@pxref{lshd -basics,,, lsh, LSH Manual}). - -When @var{interfaces} is empty, lshd listens for connections on all the -network interfaces; otherwise, @var{interfaces} must be a list of host names -or addresses. - -@var{allow-empty-passwords?} specifies whether to accept log-ins with empty -passwords, and @var{root-login?} specifies whether to accept log-ins as -root. +@defvar lsh-service-type +Type of the service that runs the GNU@tie{}lsh secure shell (SSH) +daemon, @command{lshd}. The value for this service is a +@code{} object. +@end defvar -The other options should be self-descriptive. -@end deffn +@deftp {Data Type} lsh-configuration +Data type representing the configuration of @command{lshd}. + +@table @asis +@item @code{lsh} (default: @code{lsh}) (type: file-like) +The package object of the GNU@tie{}lsh secure shell (SSH) daemon. + +@item @code{daemonic?} (default: @code{#t}) (type: boolean) +Whether to detach from the controlling terminal. + +@item @code{host-key} (default: @code{"/etc/lsh/host-key"}) (type: string) +File containing the @dfn{host key}. This file must be readable by +root only. + +@item @code{interfaces} (default: @code{()}) (type: list) +List of host names or addresses that @command{lshd} will listen on. +If empty, @command{lshd} listens for connections on all the network +interfaces. + +@item @code{port-number} (default: @code{22}) (type: integer) +Port to listen on. + +@item @code{allow-empty-passwords?} (default: @code{#f}) (type: boolean) +Whether to accept log-ins with empty passwords. + +@item @code{root-login?} (default: @code{#f}) (type: boolean) +Whether to accept log-ins as root. + +@item @code{syslog-output?} (default: @code{#t}) (type: boolean) +Whether to log @command{lshd} standard output to syslogd. +This will make the service depend on the existence of a syslogd service. + +@item @code{pid-file?} (default: @code{#f}) (type: boolean) +When @code{#t}, @command{lshd} writes its PID to the file specified in +@var{pid-file}. + +@item @code{pid-file} (default: @code{"/var/run/lshd.pid"}) (type: string) +File that @command{lshd} will write its PID to. + +@item @code{x11-forwarding?} (default: @code{#t}) (type: boolean) +Whether to enable X11 forwarding. + +@item @code{tcp/ip-forwarding?} (default: @code{#t}) (type: boolean) +Whether to enable TCP/IP forwarding. + +@item @code{password-authentication?} (default: @code{#t}) (type: boolean) +Whether to accept log-ins using password authentication. + +@item @code{public-key-authentication?} (default: @code{#t}) (type: boolean) +Whether to accept log-ins using public key authentication. + +@item @code{initialize?} (default: @code{#t}) (type: boolean) +When @code{#f}, it is up to the user to initialize the randomness +generator (@pxref{lsh-make-seed,,, lsh, LSH Manual}), and to create +a key pair with the private key stored in file @var{host-key} +(@pxref{lshd basics,,, lsh, LSH Manual}). + +@end table +@end deftp @cindex SSH @cindex SSH server diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 7b038e6ac6..3baa55731d 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -42,7 +42,7 @@ (define-module (gnu services ssh) #:use-module (ice-9 vlist) #:export (lsh-configuration lsh-configuration? - lsh-service + lsh-service ; deprecated lsh-service-type openssh-configuration @@ -74,20 +74,34 @@ (define-record-type* lsh-configuration? (lsh lsh-configuration-lsh (default lsh)) - (daemonic? lsh-configuration-daemonic?) - (host-key lsh-configuration-host-key) - (interfaces lsh-configuration-interfaces) - (port-number lsh-configuration-port-number) - (allow-empty-passwords? lsh-configuration-allow-empty-passwords?) - (root-login? lsh-configuration-root-login?) - (syslog-output? lsh-configuration-syslog-output?) - (pid-file? lsh-configuration-pid-file?) - (pid-file lsh-configuration-pid-file) - (x11-forwarding? lsh-configuration-x11-forwarding?) - (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding?) - (password-authentication? lsh-configuration-password-authentication?) - (public-key-authentication? lsh-configuration-public-key-authentication?) - (initialize? lsh-configuration-initialize?)) + (daemonic? lsh-configuration-daemonic? + (default #t)) + (host-key lsh-configuration-host-key + (default "/etc/lsh/host-key")) + (interfaces lsh-configuration-interfaces + (default '())) + (port-number lsh-configuration-port-number + (default 22)) + (allow-empty-passwords? lsh-configuration-allow-empty-passwords? + (default #f)) + (root-login? lsh-configuration-root-login? + (default #f)) + (syslog-output? lsh-configuration-syslog-output? + (default #t)) + (pid-file? lsh-configuration-pid-file? + (default #f)) + (pid-file lsh-configuration-pid-file + (default "/var/run/lshd.pid")) + (x11-forwarding? lsh-configuration-x11-forwarding? + (default #t)) + (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding? + (default #t)) + (password-authentication? lsh-configuration-password-authentication? + (default #t)) + (public-key-authentication? lsh-configuration-public-key-authentication? + (default #t)) + (initialize? lsh-configuration-initialize? + (default #t))) (define %yarrow-seed "/var/spool/lsh/yarrow-seed-file") @@ -203,19 +217,20 @@ (define (lsh-pam-services config) (lsh-configuration-allow-empty-passwords? config)))) (define lsh-service-type - (service-type (name 'lsh) - (description - "Run the GNU@tie{}lsh secure shell (SSH) daemon, + (service-type + (name 'lsh) + (extensions + (list (service-extension shepherd-root-service-type + lsh-shepherd-service) + (service-extension pam-root-service-type + lsh-pam-services) + (service-extension activation-service-type + lsh-activation))) + (description "Run the GNU@tie{}lsh secure shell (SSH) daemon, @command{lshd}.") - (extensions - (list (service-extension shepherd-root-service-type - lsh-shepherd-service) - (service-extension pam-root-service-type - lsh-pam-services) - (service-extension activation-service-type - lsh-activation))))) + (default-value (lsh-configuration)))) -(define* (lsh-service #:key +(define-deprecated (lsh-service #:key (lsh lsh) (daemonic? #t) (host-key "/etc/lsh/host-key") @@ -231,6 +246,7 @@ (define* (lsh-service #:key (password-authentication? #t) (public-key-authentication? #t) (initialize? #t)) + lsh-service-type "Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. @var{host-key} must designate a file containing the host key, and readable only by root. From patchwork Sat Feb 25 18:57:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47335 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 71E5116B96; Sat, 25 Feb 2023 19:05:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 996A216AF4 for ; Sat, 25 Feb 2023 19:05:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzqz-0004te-3X; Sat, 25 Feb 2023 14:05:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzqx-0004ss-6c for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzqw-0002Kt-Po for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzqw-0008Dz-Kx for guix-patches@gnu.org; Sat, 25 Feb 2023 14:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 13/27] services: ssh: Deprecate 'dropbear-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735187231560 (code B ref 61789); Sat, 25 Feb 2023 19:05:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 19:04:32 +0000 Received: from localhost ([127.0.0.1]:41551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzqR-0008Cw-TH for submit@debbugs.gnu.org; Sat, 25 Feb 2023 14:04:32 -0500 Received: from smtpm6.myservices.hosting ([185.26.105.207]:37098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzqP-0008Ci-Id for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 14:04:30 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm6.myservices.hosting (Postfix) with ESMTP id 23EE920D46 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 20:04:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id DAB19800A1; Sat, 25 Feb 2023 19:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id i8aF-s3EGx8o; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 0A2408009F; Sat, 25 Feb 2023 19:58:20 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:59 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Networking Services): Replace 'dropbear-service' with 'dropbear-service-type'. * gnu/services/ssh.scm (dropbear-service): Deprecate procedure. --- doc/guix.texi | 17 ++++++++--------- gnu/services/ssh.scm | 6 ++++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 50ac49e65f..9f6f1f8794 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20998,19 +20998,18 @@ Networking Services @end table @end deftp -@deffn {Scheme Procedure} dropbear-service [@var{config}] -Run the @uref{https://matt.ucc.asn.au/dropbear/dropbear.html,Dropbear SSH -daemon} with the given @var{config}, a @code{} -object. +@defvar dropbear-service-type +Type of the service that runs the +@url{https://matt.ucc.asn.au/dropbear/dropbear.html, Dropbear SSH daemon}, +whose value is a @code{} object. -For example, to specify a Dropbear service listening on port 1234, add -this call to the operating system's @code{services} field: +For example, to specify a Dropbear service listening on port 1234: @lisp -(dropbear-service (dropbear-configuration - (port-number 1234))) +(service dropbear-service-type (dropbear-configuration + (port-number 1234))) @end lisp -@end deffn +@end defvar @deftp {Data Type} dropbear-configuration This data type represents the configuration of a Dropbear SSH daemon. diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 3baa55731d..b76544c1a8 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -52,7 +52,7 @@ (define-module (gnu services ssh) dropbear-configuration dropbear-configuration? dropbear-service-type - dropbear-service + dropbear-service ; deprecated autossh-configuration autossh-configuration? @@ -717,7 +717,9 @@ (define dropbear-service-type dropbear-activation))) (default-value (dropbear-configuration)))) -(define* (dropbear-service #:optional (config (dropbear-configuration))) +(define-deprecated (dropbear-service #:optional + (config (dropbear-configuration))) + dropbear-service-type "Run the @uref{https://matt.ucc.asn.au/dropbear/dropbear.html,Dropbear SSH daemon} with the given @var{config}, a @code{} object." From patchwork Sat Feb 25 18:58:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47312 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 0843E16B70; Sat, 25 Feb 2023 18:59:56 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 C968716AF4 for ; Sat, 25 Feb 2023 18:59:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sP-KR; Sat, 25 Feb 2023 13:59:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlA-0001oX-0R for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl9-0000bk-OL for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl9-0007wK-L5 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 14/27] services: xorg: Deprecate 'screen-locker-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151130313 (code B ref 61789); Sat, 25 Feb 2023 18:59:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:31 +0000 Received: from localhost ([127.0.0.1]:41436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkc-0007sk-P2 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:31 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:59546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkV-0007rL-TP for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:24 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 41D8E20EFB for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A70D680079; Sat, 25 Feb 2023 19:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BtaOX_Gwdrwq; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 5D93B800A0; Sat, 25 Feb 2023 19:58:21 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:00 +0000 Message-Id: <9e2b1d0ac1148daefe99a9075fdd99b440f11f74.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (X Window): Replace 'screen-locker-service' with 'screen-locker-service-type'. Document . * gnu/services/desktop.scm (desktop-services-for-system): Use screen-locker-service-type. * gnu/services/xorg.scm: Export accessors for . (): Rename to ... (): ... this. ()[empty?]: Rename to ... ()[allow-empty-password?]: ... this. (screen-locker-pam-services): Update record name. (screen-locker-setuid-programs): Update accessor name. (screen-locker-service): Deprecate procedure. --- doc/guix.texi | 32 ++++++++++++++++++++++----- gnu/services/desktop.scm | 8 +++++-- gnu/services/xorg.scm | 47 +++++++++++++++++++++++++--------------- 3 files changed, 62 insertions(+), 25 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9f6f1f8794..05900d514a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22221,18 +22221,38 @@ X Window @end deffn -@deffn {Scheme Procedure} screen-locker-service @var{package} [@var{program}] -Add @var{package}, a package for a screen locker or screen saver whose -command is @var{program}, to the set of setuid programs and add a PAM entry -for it. For example: +@defvar screen-locker-service-type +Type for a service that adds a package for a screen locker or screen +saver to the set of setuid programs and add a PAM entry for it. The +value for this service is a @code{} object. + +For example, to make XlockMore usable: @lisp -(screen-locker-service xlockmore "xlock") +(service screen-locker-service-type + (screen-locker-configuration + "xlock" (file-append xlockmore "/bin/xlock") #f)) @end lisp makes the good ol' XlockMore usable. -@end deffn +@end defvar +@deftp {Data Type} screen-locker-configuration +Data type representing the configuration of +@code{screen-locker-service-type}. + +@table @asis +@item @code{name} (type: string) +Name of the screen locker. + +@item @code{program} (type: gexp) +Path to the executable for the screen locker as a G-Expression. + +@item @code{allow-empty-password?} (type: boolean) +Whether to allow empty passwords. + +@end table +@end deftp @node Printing Services @subsection Printing Services diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index fe1f0fd20a..d4ac88311f 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1755,8 +1755,12 @@ (define* (desktop-services-for-system #:optional (service sddm-service-type)) ;; Screen lockers are a pretty useful thing and these are small. - (screen-locker-service slock) - (screen-locker-service xlockmore "xlock") + (service screen-locker-service-type + (screen-locker-configuration + "slock" (file-append slock "/bin/slock") #f)) + (service screen-locker-service-type + (screen-locker-configuration + "xlock" (file-append xlockmore "/bin/xlock") #f)) ;; Add udev rules for MTP devices so that non-root users can access ;; them. diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 5f073d05d3..c4745cecf5 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -107,10 +107,13 @@ (define-module (gnu services xorg) slim-service-type - screen-locker - screen-locker? + screen-locker-configuration + screen-locker-configuration? + screen-locker-configuration-name + screen-locker-configuration-program + screen-locker-configuration-allow-empty-password? screen-locker-service-type - screen-locker-service + screen-locker-service ; deprecated localed-configuration localed-configuration? @@ -683,21 +686,30 @@ (define slim-service-type ;;; Screen lockers & co. ;;; -(define-record-type - (screen-locker name program empty?) +(define-record-type + (screen-locker-configuration name program allow-empty-password?) + screen-locker-configuration? + (name screen-locker-configuration-name) ;string + (program screen-locker-configuration-program) ;gexp + (allow-empty-password? + screen-locker-configuration-allow-empty-password?)) ;Boolean + +(define-deprecated/public-alias + screen-locker + screen-locker-configuration) + +(define-deprecated/public-alias screen-locker? - (name screen-locker-name) ;string - (program screen-locker-program) ;gexp - (empty? screen-locker-allows-empty-passwords?)) ;Boolean + screen-locker-configuration?) (define screen-locker-pam-services (match-lambda - (($ name _ empty?) + (($ name _ empty?) (list (unix-pam-service name #:allow-empty-passwords? empty?))))) (define screen-locker-setuid-programs - (compose list file-like->setuid-program screen-locker-program)) + (compose list file-like->setuid-program screen-locker-configuration-program)) (define screen-locker-service-type (service-type (name 'screen-locker) @@ -711,10 +723,11 @@ (define screen-locker-service-type the graphical server by making it setuid-root, so it can authenticate users, and by creating a PAM service for it."))) -(define* (screen-locker-service package - #:optional - (program (package-name package)) - #:key allow-empty-passwords?) +(define-deprecated (screen-locker-service package + #:optional + (program (package-name package)) + #:key allow-empty-passwords?) + screen-locker-service-type "Add @var{package}, a package for a screen locker or screen saver whose command is @var{program}, to the set of setuid programs and add a PAM entry for it. For example: @@ -725,9 +738,9 @@ (define* (screen-locker-service package makes the good ol' XlockMore usable." (service screen-locker-service-type - (screen-locker program - (file-append package "/bin/" program) - allow-empty-passwords?))) + (screen-locker-configuration program + (file-append package "/bin/" program) + allow-empty-passwords?))) ;;; From patchwork Sat Feb 25 18:58:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47324 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 550B116BA4; Sat, 25 Feb 2023 19:01:05 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 A90F916B42 for ; Sat, 25 Feb 2023 19:00:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmB-0002as-Id; Sat, 25 Feb 2023 14:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm8-0002Wf-Kb for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm8-00011D-At for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm8-00081n-7i for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 15/27] services: desktop: Deprecate 'elogind-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156530722 (code B ref 61789); Sat, 25 Feb 2023 19:00:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:25 +0000 Received: from localhost ([127.0.0.1]:41500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlU-0007zK-R3 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:25 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkq-0007ut-Tk for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:45 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id D3AE520D4F for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id BFD638009E; Sat, 25 Feb 2023 19:58:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FwEiYe_yrp0O; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id AEB838009A; Sat, 25 Feb 2023 19:58:21 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:01 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace 'elogind-service' with 'elogind-service-type'. * gnu/services/desktop.scm (elogind-service): Deprecate procedure. (desktop-services-for-system): Use elogind-service-type. * gnu/tests/lightdm.scm (minimal-desktop-services): Ditto. --- doc/guix.texi | 166 ++++++++++++++++++++++++--------------- gnu/services/desktop.scm | 7 +- gnu/tests/lightdm.scm | 2 +- 3 files changed, 106 insertions(+), 69 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 05900d514a..2d69f94aa0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23312,77 +23312,113 @@ Desktop Services @var{services} must be equal to @code{(list avahi)}. @end deffn -@deffn {Scheme Procedure} elogind-service [#:config @var{config}] -Return a service that runs the @code{elogind} login and -seat management daemon. @uref{https://github.com/elogind/elogind, -Elogind} exposes a D-Bus interface that can be used to know which users +@subsubheading Elogind + +@uref{https://github.com/elogind/elogind, Elogind} is a login and seat +management daemon that also handles most system-level power events for a +computer, for example suspending the system when a lid is closed, or +shutting it down when the power button is pressed. + +It also provides a D-Bus interface that can be used to know which users are logged in, know what kind of sessions they have open, suspend the system, inhibit system suspend, reboot the system, and other tasks. -Elogind handles most system-level power events for a computer, for -example suspending the system when a lid is closed, or shutting it down -when the power button is pressed. +@defvar elogind-service-type +Type of the service that runs @command{elogind}, a login and +seat management daemon. The value for this service is a +@code{} object. +@end defvar -The @var{config} keyword argument specifies the configuration for -elogind, and should be the result of an @code{(elogind-configuration -(@var{parameter} @var{value})...)} invocation. Available parameters and -their default values are: +@c TODO: field descriptions. This is best done by refactoring +@c elogind-configuration to use define-configuration which embeds the +@c descriptions in the code and then use configuration->documentation. +@deftp {Data Type} elogind-configuration +Data type representing the configuration of @command{elogind}. + +@table @asis +@item @code{elogind} (default: @code{elogind}) (type: file-like) +... + +@item @code{kill-user-processes?} (default: @code{#f}) (type: boolean) +... + +@item @code{kill-only-users} (default: @code{'()}) (type: list) +... + +@item @code{kill-exclude-users} (default: @code{'("root")}) (type: list-of-string) +... + +@item @code{inhibit-delay-max-seconds} (default: @code{5}) (type: integer) +... + +@item @code{handle-power-key} (default: @code{'poweroff}) (type: symbol) +... + +@item @code{handle-suspend-key} (default: @code{'suspend}) (type: symbol) +... + +@item @code{handle-hibernate-key} (default: @code{'hibernate}) (type: symbol) +... + +@item @code{handle-lid-switch} (default: @code{'suspend}) (type: symbol) +... + +@item @code{handle-lid-switch-docked} (default: @code{'ignore}) (type: symbol) +... + +@item @code{handle-lid-switch-external-power} (default: @code{*unspecified*}) (type: symbol) +... + +@item @code{power-key-ignore-inhibited?} (default: @code{#f}) (type: boolean) +... + +@item @code{suspend-key-ignore-inhibited?} (default: @code{#f}) (type: boolean) +... + +@item @code{hibernate-key-ignore-inhibited?} (default: @code{#f}) (type: boolean) +... + +@item @code{lid-switch-ignore-inhibited?} (default: @code{#t}) (type: boolean) +... + +@item @code{holdoff-timeout-seconds} (default: @code{30}) (type: integer) +... + +@item @code{idle-action} (default: @code{'ignore}) (type: symbol) +... + +@item @code{idle-action-seconds} (default: @code{(* 30 60)}) (type: integer) +... + +@item @code{runtime-directory-size-percent} (default: @code{10}) (type: integer) +... + +@item @code{runtime-directory-size} (default: @code{#f}) (type: integer) +... + +@item @code{remove-ipc?} (default: @code{#t}) (type: boolean) +... + +@item @code{suspend-state} (default: @code{'("mem" "standby" "freeze")}) (type: list) +... + +@item @code{suspend-mode} (default: @code{'()}) (type: list) +... + +@item @code{hibernate-state} (default: @code{'("disk")}) (type: list) +... + +@item @code{hibernate-mode} (default: @code{'("platform" "shutdown")}) (type: list) +... + +@item @code{hybrid-sleep-state} (default: @code{'("disk")}) (type: list) +... + +@item @code{hybrid-sleep-mode} (default: @code{'("suspend" "platform" "shutdown")}) (type: list) +... -@table @code -@item kill-user-processes? -@code{#f} -@item kill-only-users -@code{()} -@item kill-exclude-users -@code{("root")} -@item inhibit-delay-max-seconds -@code{5} -@item handle-power-key -@code{poweroff} -@item handle-suspend-key -@code{suspend} -@item handle-hibernate-key -@code{hibernate} -@item handle-lid-switch -@code{suspend} -@item handle-lid-switch-docked -@code{ignore} -@item handle-lid-switch-external-power -@code{*unspecified*} -@item power-key-ignore-inhibited? -@code{#f} -@item suspend-key-ignore-inhibited? -@code{#f} -@item hibernate-key-ignore-inhibited? -@code{#f} -@item lid-switch-ignore-inhibited? -@code{#t} -@item holdoff-timeout-seconds -@code{30} -@item idle-action -@code{ignore} -@item idle-action-seconds -@code{(* 30 60)} -@item runtime-directory-size-percent -@code{10} -@item runtime-directory-size -@code{#f} -@item remove-ipc? -@code{#t} -@item suspend-state -@code{("mem" "standby" "freeze")} -@item suspend-mode -@code{()} -@item hibernate-state -@code{("disk")} -@item hibernate-mode -@code{("platform" "shutdown")} -@item hybrid-sleep-state -@code{("disk")} -@item hybrid-sleep-mode -@code{("suspend" "platform" "shutdown")} @end table -@end deffn +@end deftp @deffn {Scheme Procedure} accountsservice-service @ [#:accountsservice @var{accountsservice}] diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index d4ac88311f..bc8f4eb026 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -114,7 +114,7 @@ (define-module (gnu services desktop) elogind-configuration elogind-configuration? - elogind-service + elogind-service ; deprecated elogind-service-type %gdm-file-system @@ -1216,7 +1216,8 @@ (define elogind-service-type their session types (graphical, console, remote, etc.). It can also clean up after users when they log out."))) -(define* (elogind-service #:key (config (elogind-configuration))) +(define-deprecated (elogind-service #:key (config (elogind-configuration))) + elogind-service-type "Return a service that runs the @command{elogind} login and seat management service. The @command{elogind} service integrates with PAM to allow other system components to know the set of logged-in users as well as their session @@ -1807,7 +1808,7 @@ (define* (desktop-services-for-system #:optional (service colord-service-type) (geoclue-service) (service polkit-service-type) - (elogind-service) + (service elogind-service-type) (dbus-service) (service ntp-service-type) diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm index 57d029a75a..25fa06a9f1 100644 --- a/gnu/tests/lightdm.scm +++ b/gnu/tests/lightdm.scm @@ -48,7 +48,7 @@ (define minimal-desktop-services (service upower-service-type) (accountsservice-service) (service polkit-service-type) - (elogind-service) + (service elogind-service-type) (dbus-service) x11-socket-directory-service)) From patchwork Sat Feb 25 18:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47316 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 6245716B70; Sat, 25 Feb 2023 19:00:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 A826116AF4 for ; Sat, 25 Feb 2023 19:00:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzm9-0002XP-J5; Sat, 25 Feb 2023 14:00:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm7-0002WM-RA for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm7-0000tA-Hq for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm7-00081V-6T for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 16/27] services: elogind-configuration: Do not ignore 'handle-hibernate-key' by default. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156430706 (code B ref 61789); Sat, 25 Feb 2023 19:00:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:24 +0000 Received: from localhost ([127.0.0.1]:41496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlT-0007zA-SX for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:24 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkn-0007uc-3P for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:41 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 9EE1120D57 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 1D864800A4; Sat, 25 Feb 2023 19:58:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZDZ3_XmGPfKL; Sat, 25 Feb 2023 19:58:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 0BCE38009D; Sat, 25 Feb 2023 19:58:21 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:02 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/desktop.scm ()[handle-hibernate-key]: Set default value to 'hibernate. --- gnu/services/desktop.scm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index bc8f4eb026..cd3d8efa55 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -964,11 +964,7 @@ (define-record-type* elogind-configuration (handle-suspend-key elogind-handle-suspend-key (default 'suspend)) (handle-hibernate-key elogind-handle-hibernate-key - ;; (default 'hibernate) - ;; XXX Ignore it for now, since we don't - ;; yet handle resume-from-hibernation in - ;; our initrd. - (default 'ignore)) + (default 'hibernate)) (handle-lid-switch elogind-handle-lid-switch (default 'suspend)) (handle-lid-switch-docked elogind-handle-lid-switch-docked From patchwork Sat Feb 25 18:58:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47318 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 E75B816BA5; Sat, 25 Feb 2023 19:00:57 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 4F98016B42 for ; Sat, 25 Feb 2023 19:00:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlP-0001xp-Kd; Sat, 25 Feb 2023 13:59:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0001p7-QQ for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0000cC-HK for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlB-0007wq-E4 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 17/27] services: desktop: Deprecate 'accountsservice-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151330358 (code B ref 61789); Sat, 25 Feb 2023 18:59:05 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:33 +0000 Received: from localhost ([127.0.0.1]:41446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkf-0007tN-93 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:33 -0500 Received: from smtpm7.myservices.hosting ([185.26.105.208]:59302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkX-0007rb-3F for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:26 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm7.myservices.hosting (Postfix) with ESMTP id 70DB620D32 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 7AC208009D; Sat, 25 Feb 2023 19:58:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3-gXCSMj1o02; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 6991F8009E; Sat, 25 Feb 2023 19:58:22 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:03 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace 'accountsservice-service' with 'accountsservice-service-type'. * gnu/services/desktop.scm (accountsservice-service): Deprecate procedure. (desktop-services-for-system): Use accountsservice-service-type. * gnu/tests/lightdm.scm (minimal-desktop-services): Ditto. --- doc/guix.texi | 15 +++++++-------- gnu/services/desktop.scm | 8 +++++--- gnu/tests/lightdm.scm | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2d69f94aa0..1831528ef3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23420,18 +23420,17 @@ Desktop Services @end table @end deftp -@deffn {Scheme Procedure} accountsservice-service @ - [#:accountsservice @var{accountsservice}] -Return a service that runs AccountsService, a system service that can +@defvar accountsservice-service-type +Type for the service that runs AccountsService, a system service that can list available accounts, change their passwords, and so on. AccountsService integrates with PolicyKit to enable unprivileged users to acquire the capability to modify their system configuration. -@uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the -accountsservice web site} for more information. +See @url{https://www.freedesktop.org/wiki/Software/AccountsService/, +AccountsService} for more information. -The @var{accountsservice} keyword argument is the @code{accountsservice} -package to expose as a service. -@end deffn +The value for this service is a file-like object, by default it is +set to @code{accountsservice} (the package object for AccountsService). +@end defvar @deffn {Scheme Procedure} polkit-service @ [#:polkit @var{polkit}] diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index cd3d8efa55..24d9d9f0c3 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -124,7 +124,7 @@ (define-module (gnu services desktop) fontconfig-file-system-service accountsservice-service-type - accountsservice-service + accountsservice-service ; deprecated cups-pk-helper-service-type sane-service-type @@ -1281,7 +1281,9 @@ (define accountsservice-service-type on. AccountsService integrates with PolicyKit to enable unprivileged users to acquire the capability to modify their system configuration."))) -(define* (accountsservice-service #:key (accountsservice accountsservice)) +(define-deprecated + (accountsservice-service #:key (accountsservice accountsservice)) + accountsservice-service-type "Return a service that runs AccountsService, a system service that can list available accounts, change their passwords, and so on. AccountsService integrates with PolicyKit to enable unprivileged users to @@ -1799,7 +1801,7 @@ (define* (desktop-services-for-system #:optional (service avahi-service-type) (udisks-service) (service upower-service-type) - (accountsservice-service) + (service accountsservice-service-type) (service cups-pk-helper-service-type) (service colord-service-type) (geoclue-service) diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm index 25fa06a9f1..aa97a96939 100644 --- a/gnu/tests/lightdm.scm +++ b/gnu/tests/lightdm.scm @@ -46,7 +46,7 @@ (define-module (gnu tests lightdm) (define minimal-desktop-services (list polkit-wheel-service (service upower-service-type) - (accountsservice-service) + (service accountsservice-service-type) (service polkit-service-type) (service elogind-service-type) (dbus-service) From patchwork Sat Feb 25 18:58:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47325 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 28D2516B70; Sat, 25 Feb 2023 19:01:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 E777516AF4 for ; Sat, 25 Feb 2023 19:01:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlH-0001ur-QL; Sat, 25 Feb 2023 13:59:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sI-9y for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlF-0000d1-0z for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlE-0007y5-Sq for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 18/27] services: dbus: Deprecate 'polkit-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735154730607 (code B ref 61789); Sat, 25 Feb 2023 18:59:08 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:07 +0000 Received: from localhost ([127.0.0.1]:41480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlC-0007xL-OO for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:59574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzke-0007t6-4c for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:36 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id A4BE520EFC for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0A18380079; Sat, 25 Feb 2023 19:58:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4XjuZ4MzHTj4; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id BB33A800A0; Sat, 25 Feb 2023 19:58:22 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:04 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace 'polkit-service' with 'polkit-service-type'. * gnu/services/dbus.scm (polkit-service): Deprecate procedure. * gnu/tests/docker.scm (%docker-os): Use polkit-service-type. * gnu/tests/virtualization.scm (%libvirt-os): Ditto. --- doc/guix.texi | 14 +++++++++----- gnu/services/dbus.scm | 6 ++++-- gnu/tests/docker.scm | 2 +- gnu/tests/virtualization.scm | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1831528ef3..4ed77d6715 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23432,16 +23432,20 @@ Desktop Services set to @code{accountsservice} (the package object for AccountsService). @end defvar -@deffn {Scheme Procedure} polkit-service @ - [#:polkit @var{polkit}] -Return a service that runs the -@uref{https://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege +@defvar polkit-service-type +Type for the service that runs the +@url{https://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege management service}, which allows system administrators to grant access to privileged operations in a structured way. By querying the Polkit service, a privileged system component can know when it should grant additional capabilities to ordinary users. For example, an ordinary user can be granted the capability to suspend the system if the user is logged in locally. -@end deffn + +The value for this service is a @code{} object. +@end defvar + +@c TODO: Document , preferably by refactoring this to use +@c define-configuration and generating documentation from it. @defvar polkit-wheel-service Service that adds the @code{wheel} group as admins to the Polkit diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 5efd6bdadf..ea2593501f 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -28,6 +28,7 @@ (define-module (gnu services dbus) #:use-module ((gnu packages glib) #:select (dbus)) #:use-module (gnu packages polkit) #:use-module (gnu packages admin) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module ((guix packages) #:select (package-name)) #:use-module (guix records) @@ -43,7 +44,7 @@ (define-module (gnu services dbus) polkit-configuration polkit-configuration? polkit-service-type - polkit-service)) + polkit-service)) ; deprecated ;;; ;;; D-Bus. @@ -404,7 +405,8 @@ (define polkit-service-type privileged operations in a structured way. Polkit is a requirement for most desktop environments, such as GNOME."))) -(define* (polkit-service #:key (polkit polkit)) +(define-deprecated (polkit-service #:key (polkit polkit)) + polkit-service-type "Return a service that runs the @uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege management service}, which allows system administrators to grant access to diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm index 4267ff89a8..e464ec587e 100644 --- a/gnu/tests/docker.scm +++ b/gnu/tests/docker.scm @@ -49,7 +49,7 @@ (define %docker-os (simple-operating-system (service dhcp-client-service-type) (dbus-service) - (polkit-service) + (service polkit-service-type) (service elogind-service-type) (service docker-service-type))) diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index 60789fbb5b..6749ade4bd 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -50,7 +50,7 @@ (define %libvirt-os (simple-operating-system (service dhcp-client-service-type) (dbus-service) - (polkit-service) + (service polkit-service-type) (service libvirt-service-type))) (define (run-libvirt-test) From patchwork Sat Feb 25 18:58:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47306 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 0E79316B42; Sat, 25 Feb 2023 18:59:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 370D216AF4 for ; Sat, 25 Feb 2023 18:59:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlF-0001sH-8C; Sat, 25 Feb 2023 13:59:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlC-0001qn-Le for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlC-0000cP-D3 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlC-0007x8-7C for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 19/27] services: desktop: Deprecate 'udisks-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151530377 (code B ref 61789); Sat, 25 Feb 2023 18:59:06 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:35 +0000 Received: from localhost ([127.0.0.1]:41451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkg-0007ti-8i for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:34 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:59560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzka-0007s1-3Y for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id CD15520EFB for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 38494800A4; Sat, 25 Feb 2023 19:58:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Qs6hyGogXaXt; Sat, 25 Feb 2023 19:58:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 1C784800A3; Sat, 25 Feb 2023 19:58:23 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:05 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace 'udisks-service' with 'udisks-service-type'. Document . * gnu/packages/kde-multimedia.scm (k3b)[description]: Replace 'udisks-service' with 'udisks-service-type'. * gnu/services/desktop.scm (udisks-service-type): Set default value. (udisks-service): Deprecate procedure. (desktop-services-for-system): Use udisks-service-type. --- doc/guix.texi | 21 +++++++++++++++++---- gnu/packages/kde-multimedia.scm | 4 ++-- gnu/services/desktop.scm | 10 ++++++---- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4ed77d6715..2c9f55cd19 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23529,9 +23529,10 @@ Desktop Services @end table @end deftp -@deffn {Scheme Procedure} udisks-service [#:udisks @var{udisks}] -Return a service for @uref{https://udisks.freedesktop.org/docs/latest/, -UDisks}, a @dfn{disk management} daemon that provides user interfaces +@defvar udisks-service-type +Type for the service that runs +@uref{https://udisks.freedesktop.org/docs/latest/, UDisks}, +a @dfn{disk management} daemon that provides user interfaces with notifications and ways to mount/unmount disks. Programs that talk to UDisks include the @command{udisksctl} command, part of UDisks, and GNOME Disks. Note that Udisks relies on the @command{mount} command, so @@ -23539,7 +23540,19 @@ Desktop Services system profile. For example if you want to be able to mount NTFS file-systems in read and write fashion, you'll need to have @code{ntfs-3g} installed system-wide. -@end deffn + +The value for this service is a @code{} object. +@end defvar + +@deftp {Data Type} udisks-configuration +Data type representing the configuration for @code{udisks-service-type}. + +@table @asis +@item @code{udisks} (default: @code{udisks}) (type: file-like) +Package object for UDisks. + +@end table +@end deftp @defvar colord-service-type This is the type of the service that runs @command{colord}, a system diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm index d635eca26d..e3de6db432 100644 --- a/gnu/packages/kde-multimedia.scm +++ b/gnu/packages/kde-multimedia.scm @@ -460,8 +460,8 @@ (define-public k3b from .WAV and .MP3 audio files, configuring external programs and configuring devices. -The @code{udisks-service} should be enabled for @command{k3b} to discover the -available CD drives.") +The @code{udisks-service-type} should be enabled for @command{k3b} to discover +the available CD drives.") (license ;; GPL for programs, FDL for documentation (list license:gpl2+ license:fdl1.2+)))) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 24d9d9f0c3..701c64a75d 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -95,7 +95,7 @@ (define-module (gnu services desktop) udisks-configuration udisks-configuration? - udisks-service + udisks-service ; deprecated udisks-service-type colord-service-type @@ -931,9 +931,11 @@ (define udisks-service-type (description "Run UDisks, a @dfn{disk management} daemon that provides user interfaces with notifications and ways to mount/unmount disks. Programs that talk to UDisks include the @command{udisksctl} command, -part of UDisks, and GNOME Disks.")))) +part of UDisks, and GNOME Disks.") + (default-value (udisks-configuration))))) -(define* (udisks-service #:key (udisks udisks)) +(define-deprecated (udisks-service #:key (udisks udisks)) + udisks-service-type "Return a service for @uref{http://udisks.freedesktop.org/docs/latest/, UDisks}, a @dfn{disk management} daemon that provides user interfaces with notifications and ways to mount/unmount disks. Programs that talk to UDisks @@ -1799,7 +1801,7 @@ (define* (desktop-services-for-system #:optional ;; The D-Bus clique. (service avahi-service-type) - (udisks-service) + (service udisks-service-type) (service upower-service-type) (service accountsservice-service-type) (service cups-pk-helper-service-type) From patchwork Sat Feb 25 18:58:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47322 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 C29E416AFC; Sat, 25 Feb 2023 19:01:02 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 A962A16B70 for ; Sat, 25 Feb 2023 19:00:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzm9-0002Wx-2u; Sat, 25 Feb 2023 14:00:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm7-0002W2-3N for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm6-0000q7-F7 for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm6-00081E-Bs for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 20/27] services: desktop: Deprecate 'geoclue-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156330691 (code B ref 61789); Sat, 25 Feb 2023 19:00:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:23 +0000 Received: from localhost ([127.0.0.1]:41492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlS-0007yw-Tf for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:23 -0500 Received: from smtpm7.myservices.hosting ([185.26.105.208]:59318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkb-0007sM-Me for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:30 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm7.myservices.hosting (Postfix) with ESMTP id 9720F20D38 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A77C98009D; Sat, 25 Feb 2023 19:58:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I38oc8BglHNl; Sat, 25 Feb 2023 19:58:24 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7781680079; Sat, 25 Feb 2023 19:58:23 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:06 +0000 Message-Id: <37d20c1e196b03cfc432586ec58a569e65c98b9f.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace 'geoclue-service' with 'geoclue-service-type'. * gnu/services/desktop.scm (): Set default values based on the values from the now deprecated geoclue-service procedure. (geoclue-service): Deprecate procedure. (desktop-services-for-system): Use geoclue-service-type. --- doc/guix.texi | 26 ++++++++--------- gnu/services/desktop.scm | 61 ++++++++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 39 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2c9f55cd19..f9fb891df0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23625,20 +23625,18 @@ Desktop Services know the user's location. @end defvar -@deffn {Scheme Procedure} geoclue-service [#:colord @var{colord}] @ - [#:whitelist '()] @ - [#:wifi-geolocation-url "https://location.services.mozilla.com/v1/geolocate?key=geoclue"] @ - [#:submit-data? #f] - [#:wifi-submission-url "https://location.services.mozilla.com/v1/submit?key=geoclue"] @ - [#:submission-nick "geoclue"] @ - [#:applications %standard-geoclue-applications] -Return a service that runs the GeoClue location service. This service -provides a D-Bus interface to allow applications to request access to a -user's physical location, and optionally to add information to online -location databases. See -@uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the GeoClue -web site} for more information. -@end deffn +@defvar geoclue-service-type +Type for the service that runs the +@url{https://wiki.freedesktop.org/www/Software/GeoClue/, GeoClue} +location service. This service provides a D-Bus interface to allow +applications to request access to a user's physical location, and +optionally to add information to online location databases. + +The value for this service is a @code{} object. +@end defvar + +@c TODO: Document , preferably by refactoring this to use +@c define-configuration and generating documentation from it. @deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @ [@w{#:auto-enable? #f}] diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 701c64a75d..c5212ee9aa 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -104,7 +104,7 @@ (define-module (gnu services desktop) geoclue-configuration geoclue-configuration? %standard-geoclue-applications - geoclue-service + geoclue-service ; deprecated geoclue-service-type bluetooth-service-type @@ -304,19 +304,6 @@ (define upower-service-type ;;; GeoClue D-Bus service. ;;; -;; TODO: Export. -(define-record-type* - geoclue-configuration make-geoclue-configuration - geoclue-configuration? - (geoclue geoclue-configuration-geoclue - (default geoclue)) - (whitelist geoclue-configuration-whitelist) - (wifi-geolocation-url geoclue-configuration-wifi-geolocation-url) - (submit-data? geoclue-configuration-submit-data?) - (wifi-submission-url geoclue-configuration-wifi-submission-url) - (submission-nick geoclue-configuration-submission-nick) - (applications geoclue-configuration-applications)) - (define* (geoclue-application name #:key (allowed? #t) system? (users '())) "Configure default GeoClue access permissions for an application. NAME is the Desktop ID of the application, without the .desktop part. If ALLOWED? is @@ -336,6 +323,28 @@ (define %standard-geoclue-applications (geoclue-application "epiphany" #:system? #f) (geoclue-application "firefox" #:system? #f))) +;; TODO: Use define-configuration and export accessors. +(define-record-type* + geoclue-configuration make-geoclue-configuration + geoclue-configuration? + (geoclue geoclue-configuration-geoclue + (default geoclue)) + (whitelist geoclue-configuration-whitelist + (default '())) + (wifi-geolocation-url + geoclue-configuration-wifi-geolocation-url + ;; Mozilla geolocation service: + (default "https://location.services.mozilla.com/v1/geolocate?key=geoclue")) + (submit-data? geoclue-configuration-submit-data? + (default #f)) + (wifi-submission-url + geoclue-configuration-wifi-submission-url + (default "https://location.services.mozilla.com/v1/submit?key=geoclue")) + (submission-nick geoclue-configuration-submission-nick + (default "geoclue")) + (applications geoclue-configuration-applications + (default %standard-geoclue-applications))) + (define* (geoclue-configuration-file config) "Return a geoclue configuration file." (plain-file "geoclue.conf" @@ -383,16 +392,18 @@ (define geoclue-service-type access to a user's physical location, and optionally to add information to online location databases."))) -(define* (geoclue-service #:key (geoclue geoclue) - (whitelist '()) - (wifi-geolocation-url - ;; Mozilla geolocation service: - "https://location.services.mozilla.com/v1/geolocate?key=geoclue") - (submit-data? #f) - (wifi-submission-url - "https://location.services.mozilla.com/v1/submit?key=geoclue") - (submission-nick "geoclue") - (applications %standard-geoclue-applications)) +(define-deprecated + (geoclue-service #:key (geoclue geoclue) + (whitelist '()) + (wifi-geolocation-url + ;; Mozilla geolocation service: + "https://location.services.mozilla.com/v1/geolocate?key=geoclue") + (submit-data? #f) + (wifi-submission-url + "https://location.services.mozilla.com/v1/submit?key=geoclue") + (submission-nick "geoclue") + (applications %standard-geoclue-applications)) + geoclue-service-type "Return a service that runs the @command{geoclue} location service. This service provides a D-Bus interface to allow applications to request access to a user's physical location, and optionally to add information to online @@ -1806,7 +1817,7 @@ (define* (desktop-services-for-system #:optional (service accountsservice-service-type) (service cups-pk-helper-service-type) (service colord-service-type) - (geoclue-service) + (service geoclue-service-type) (service polkit-service-type) (service elogind-service-type) (dbus-service) From patchwork Sat Feb 25 18:58:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47314 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 5525916B42; Sat, 25 Feb 2023 19:00:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 8B18416AF4 for ; Sat, 25 Feb 2023 19:00:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmA-0002Ys-Ve; Sat, 25 Feb 2023 14:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm7-0002W6-AY for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm6-0000qI-Rt for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm6-00081O-Oq for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 21/27] services: desktop: Deprecate 'bluetooth-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156330698 (code B ref 61789); Sat, 25 Feb 2023 19:00:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:23 +0000 Received: from localhost ([127.0.0.1]:41494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlT-0007yy-G5 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:23 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:39306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkb-0007sE-12 for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:31 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id E8FA6203BE for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9DB4D800A0; Sat, 25 Feb 2023 19:58:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JWelvh6qEoPv; Sat, 25 Feb 2023 19:58:24 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id D76328009A; Sat, 25 Feb 2023 19:58:23 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:07 +0000 Message-Id: <456e1b687000caec23aa261c2f68339e64df810d.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Remove mention of 'bluetooth-service'. * gnu/services/desktop.scm (bluetooth-service): Deprecate procedure. --- doc/guix.texi | 9 --------- gnu/services/desktop.scm | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f9fb891df0..7bae5717df 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23638,15 +23638,6 @@ Desktop Services @c TODO: Document , preferably by refactoring this to use @c define-configuration and generating documentation from it. -@deffn {Scheme Procedure} bluetooth-service [#:bluez @var{bluez}] @ - [@w{#:auto-enable? #f}] -Return a service that runs the @command{bluetoothd} daemon, which -manages all the Bluetooth devices and provides a number of D-Bus -interfaces. When AUTO-ENABLE? is true, the bluetooth controller is -powered automatically at boot, which can be useful when using a -bluetooth keyboard or mouse. -@end deffn - @defvar bluetooth-service-type This is the type for the @uref{https://bluez.org/, Linux Bluetooth Protocol Stack} (BlueZ) system, which generates the @file{/etc/bluetooth/main.conf} diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index c5212ee9aa..202bf1de80 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -110,7 +110,7 @@ (define-module (gnu services desktop) bluetooth-service-type bluetooth-configuration bluetooth-configuration? - bluetooth-service + bluetooth-service ; deprecated elogind-configuration elogind-configuration? @@ -845,7 +845,8 @@ (define bluetooth-service-type (description "Run the @command{bluetoothd} daemon, which manages all the Bluetooth devices and provides a number of D-Bus interfaces."))) -(define* (bluetooth-service #:key (bluez bluez) (auto-enable? #f)) +(define-deprecated (bluetooth-service #:key (bluez bluez) (auto-enable? #f)) + bluetooth-service-type "Return a service that runs the @command{bluetoothd} daemon, which manages all the Bluetooth devices and provides a number of D-Bus interfaces. When AUTO-ENABLE? is true, the bluetooth controller is powered automatically at From patchwork Sat Feb 25 18:58:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47317 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 F1F9416BA5; Sat, 25 Feb 2023 19:00:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 CF7A116AF4 for ; Sat, 25 Feb 2023 19:00:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmB-0002ai-E5; Sat, 25 Feb 2023 14:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm9-0002X2-2R for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm8-00011M-Mv for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm8-00081u-Jq for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 22/27] services: mail: Deprecate 'dovecot-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156630729 (code B ref 61789); Sat, 25 Feb 2023 19:00:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:26 +0000 Received: from localhost ([127.0.0.1]:41502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlV-0007zT-Ds for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:25 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkv-0007v7-0c for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:49 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id EDF7020D5C for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8DF718009E; Sat, 25 Feb 2023 19:58:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XBkOs2YILeSb; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 52021800A3; Sat, 25 Feb 2023 19:58:24 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:08 +0000 Message-Id: <2bfcd388d8f900b67d95f5e0708d5c9bc406e899.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Mail Services): Replace 'dovecot-service' with 'dovecot-service-type'. * gnu/services/mail.scm (dovecot-service-type): Set default value. (dovecot-service): Deprecate procedure. * gnu/tests/mail.scm (%dovecot-os): Use dovecot-service-type. --- doc/guix.texi | 13 +++++++------ gnu/services/mail.scm | 9 ++++++--- gnu/tests/mail.scm | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7bae5717df..282c6ce276 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24701,9 +24701,10 @@ Mail Services @subsubheading Dovecot Service -@deffn {Scheme Procedure} dovecot-service [#:config (dovecot-configuration)] -Return a service that runs the Dovecot IMAP/POP3/LMTP mail server. -@end deffn +@defvar dovecot-service-type +Type for the service that runs the Dovecot IMAP/POP3/LMTP mail server, +whose value is a @code{} object. +@end defvar By default, Dovecot does not need much configuration; the default configuration object created by @code{(dovecot-configuration)} will @@ -24718,9 +24719,9 @@ Mail Services one would instantiate the Dovecot service like this: @lisp -(dovecot-service #:config - (dovecot-configuration - (mail-location "maildir:~/.mail"))) +(service dovecot-service-type + (dovecot-configuration + (mail-location "maildir:~/.mail"))) @end lisp The available configuration parameters follow. Each parameter diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 6f588679b1..bf4948dcfb 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -35,6 +35,7 @@ (define-module (gnu services mail) #:use-module (gnu packages admin) #:use-module (gnu packages dav) #:use-module (gnu packages tls) + #:use-module (guix deprecation) #:use-module (guix modules) #:use-module (guix records) #:use-module (guix packages) @@ -42,7 +43,7 @@ (define-module (gnu services mail) #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (srfi srfi-1) - #:export (dovecot-service + #:export (dovecot-service ; deprecated dovecot-service-type dovecot-configuration opaque-dovecot-configuration @@ -1601,9 +1602,11 @@ (define dovecot-service-type (service-extension activation-service-type %dovecot-activation))) (description "Run Dovecot, a mail server that can run POP3, -IMAP, and LMTP."))) +IMAP, and LMTP.") + (default-value (dovecot-configuration)))) -(define* (dovecot-service #:key (config (dovecot-configuration))) +(define-deprecated (dovecot-service #:key (config (dovecot-configuration))) + dovecot-service-type "Return a service that runs @command{dovecot}, a mail server that can run POP3, IMAP, and LMTP. @var{config} should be a configuration object created by @code{dovecot-configuration}. @var{config} may also be created by diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index f13751b72f..dc1f18b3f1 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -293,16 +293,16 @@ (define %test-exim (define %dovecot-os (simple-operating-system (service dhcp-client-service-type) - (dovecot-service #:config - (dovecot-configuration - (disable-plaintext-auth? #f) - (ssl? "no") - (auth-mechanisms '("anonymous")) - (auth-anonymous-username "alice") - (mail-location - (string-append "maildir:~/Maildir" - ":INBOX=~/Maildir/INBOX" - ":LAYOUT=fs")))))) + (service dovecot-service-type + (dovecot-configuration + (disable-plaintext-auth? #f) + (ssl? "no") + (auth-mechanisms '("anonymous")) + (auth-anonymous-username "alice") + (mail-location + (string-append "maildir:~/Maildir" + ":INBOX=~/Maildir/INBOX" + ":LAYOUT=fs")))))) (define (run-dovecot-test) "Return a test of an OS running Dovecot service." From patchwork Sat Feb 25 18:58:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47304 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 8D57116B42; Sat, 25 Feb 2023 18:59:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 75B0016AF4 for ; Sat, 25 Feb 2023 18:59:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlG-0001tU-9L; Sat, 25 Feb 2023 13:59:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rw-Kl for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlE-0000cv-CE for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlE-0007xq-6e for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 23/27] services: vpn: Deprecate 'openvpn-client-service' & 'openvpn-server-service' procedures. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735154630590 (code B ref 61789); Sat, 25 Feb 2023 18:59:08 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:06 +0000 Received: from localhost ([127.0.0.1]:41477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlC-0007x7-65 for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from smtpm7.myservices.hosting ([185.26.105.208]:59332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkg-0007tb-29 for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:34 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm7.myservices.hosting (Postfix) with ESMTP id 4A1EF20D32 for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id ECBAF80079; Sat, 25 Feb 2023 19:58:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ho_3TATtXXGW; Sat, 25 Feb 2023 19:58:25 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id C1F4E800A5; Sat, 25 Feb 2023 19:58:24 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:09 +0000 Message-Id: <7ae425083b38612fb7bf17ab532b5774dbc70fc0.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (VPN Services): Replace 'openvpn-client-service' & 'openvpn-server-service' procedures with their service-type counterparts. * gnu/services/vpn.scm (openvpn-client-service, openvpn-server-service): Deprecate procedure. (openvpn-server-service-type, openvpn-client-service-type): Set default value. --- doc/guix.texi | 22 ++++++++++++---------- gnu/services/vpn.scm | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 282c6ce276..880972d112 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31851,20 +31851,22 @@ VPN Services It provides a @emph{client} service for your machine to connect to a VPN, and a @emph{server} service for your machine to host a VPN@. +Both @code{openvpn-client-service-type} and +@code{openvpn-server-service-type} can be run simultaneously. -@deffn {Scheme Procedure} openvpn-client-service @ - [#:config (openvpn-client-configuration)] +@defvar openvpn-client-service-type +Type of the service that runs @command{openvpn}, a VPN daemon, as a client. -Return a service that runs @command{openvpn}, a VPN daemon, as a client. -@end deffn - -@deffn {Scheme Procedure} openvpn-server-service @ - [#:config (openvpn-server-configuration)] +The value for this service is a @code{} +object. +@end defvar -Return a service that runs @command{openvpn}, a VPN daemon, as a server. +@defvar openvpn-server-service-type +Type of the service that runs @command{openvpn}, a VPN daemon, as a server. -Both can be run simultaneously. -@end deffn +The value for this service is a @code{} +object. +@end defvar @c %automatically generated documentation diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 4103f89ecf..a884d71eb2 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -39,11 +39,12 @@ (define-module (gnu services vpn) #:use-module (guix records) #:use-module (guix gexp) #:use-module (guix i18n) + #:use-module (guix deprecation) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:use-module (ice-9 regex) - #:export (openvpn-client-service - openvpn-server-service + #:export (openvpn-client-service ; deprecated + openvpn-server-service ; deprecated openvpn-client-service-type openvpn-server-service-type openvpn-client-configuration @@ -531,7 +532,8 @@ (define openvpn-server-service-type (service-extension activation-service-type (const %openvpn-activation)))) (description "Run the OpenVPN server, which allows you to -@emph{host} a @acronym{VPN, virtual private network}."))) +@emph{host} a @acronym{VPN, virtual private network}.") + (default-value (openvpn-server-configuration)))) (define openvpn-client-service-type (service-type (name 'openvpn-client) @@ -544,12 +546,17 @@ (define openvpn-client-service-type (const %openvpn-activation)))) (description "Run the OpenVPN client service, which allows you to connect -to an existing @acronym{VPN, virtual private network}."))) +to an existing @acronym{VPN, virtual private network}.") + (default-value (openvpn-client-configuration)))) -(define* (openvpn-client-service #:key (config (openvpn-client-configuration))) +(define-deprecated + (openvpn-client-service #:key (config (openvpn-client-configuration))) + openvpn-client-service-type (service openvpn-client-service-type config)) -(define* (openvpn-server-service #:key (config (openvpn-server-configuration))) +(define-deprecated + (openvpn-server-service #:key (config (openvpn-server-configuration))) + openvpn-server-service-type (service openvpn-server-service-type config)) (define (generate-openvpn-server-documentation) From patchwork Sat Feb 25 18:58:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47326 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 9092A16B96; Sat, 25 Feb 2023 19:01:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 11E4B16AF4 for ; Sat, 25 Feb 2023 19:01:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlP-0001xq-Ki; Sat, 25 Feb 2023 13:59:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlC-0001pL-6U for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0000cH-TR for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlB-0007wy-QK for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 24/27] services: lirc: Deprecate 'lirc-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151430365 (code B ref 61789); Sat, 25 Feb 2023 18:59:05 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:34 +0000 Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkf-0007ta-Pk for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:34 -0500 Received: from smtpmciv8.myservices.hosting ([185.26.106.203]:35030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkZ-0007s0-Do for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv8.myservices.hosting (Postfix) with ESMTP id A81AD20D6F for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6695F8009E; Sat, 25 Feb 2023 19:58:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xFFip-sBd-6E; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 38E8A800A0; Sat, 25 Feb 2023 19:58:25 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:10 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Miscellaneous Services): Replace 'lirc-service' with 'lirc-service-type'. Document . * gnu/services/lirc.scm (): Set default values based on the arguments from the now deprecated 'lirc-service' procedure. (lirc-service-type): Set default value. (lirc-service): Deprecate procedure. --- doc/guix.texi | 40 +++++++++++++++++++++++++++------------- gnu/services/lirc.scm | 18 ++++++++++++------ 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 880972d112..466c6c98c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37718,24 +37718,38 @@ Miscellaneous Services @end table @end deftp -@cindex lirc -@subsubheading Lirc Service +@cindex LIRC +@subsubheading LIRC Service The @code{(gnu services lirc)} module provides the following service. -@deffn {Scheme Procedure} lirc-service [#:lirc lirc] @ - [#:device #f] [#:driver #f] [#:config-file #f] @ - [#:extra-options '()] -Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that -decodes infrared signals from remote controls. +@defvar lirc-service-type +Type for a service that runs @url{http://www.lirc.org, LIRC}, a daemon +that decodes infrared signals from remote controls. -Optionally, @var{device}, @var{driver} and @var{config-file} -(configuration file name) may be specified. See @command{lircd} manual -for details. +The value for this service is a @code{} object. +@end defvar -Finally, @var{extra-options} is a list of additional command-line options -passed to @command{lircd}. -@end deffn +@deftp {Data Type} lirc-configuration +Data type representing the configuration of @command{lircd}. + +@table @asis +@item @code{lirc} (default: @code{lirc}) (type: file-like) +Package object for @command{lirc}. + +@item @code{device} (default: @code{#f}) (type: string) +@itemx @code{driver} (default: @code{#f}) (type: string) +@itemx @code{config-file} (default: @code{#f}) (type: string-or-file-like) +TODO. See @command{lircd} manual for details. + +@item @code{extra-options} (default: @code{'()}) (type: list-of-string) +Additional command-line options to pass to @command{lircd}. + +@end table +@end deftp + +@c TODO: Document , preferably by refactoring this to use +@c define-configuration and generating documentation from it. @cindex spice @subsubheading Spice Service diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm index 492d77defa..92784b65ca 100644 --- a/gnu/services/lirc.scm +++ b/gnu/services/lirc.scm @@ -21,12 +21,13 @@ (define-module (gnu services lirc) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu packages lirc) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix records) #:use-module (ice-9 match) #:export (lirc-configuration lirc-configuation? - lirc-service + lirc-service ; deprecated lirc-service-type)) ;;; Commentary: @@ -40,9 +41,12 @@ (define-record-type* lirc-configuation? (lirc lirc-configuration-lirc ;file-like (default lirc)) - (device lirc-configuration-device) ;string - (driver lirc-configuration-driver) ;string - (config-file lirc-configuration-file) ;string | file-like object + (device lirc-configuration-device ;string + (default #f)) + (driver lirc-configuration-driver ;string + (default #f)) + (config-file lirc-configuration-file ;string | file-like object + (default #f)) (extra-options lirc-configuration-options ;list of strings (default '()))) @@ -81,11 +85,13 @@ (define lirc-service-type (service-extension activation-service-type (const %lirc-activation)))) (description "Run LIRC, a daemon that decodes infrared signals -from remote controls."))) +from remote controls.") + (default-value (lirc-configuration)))) -(define* (lirc-service #:key (lirc lirc) +(define-deprecated (lirc-service #:key (lirc lirc) device driver config-file (extra-options '())) + lirc-service-type "Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that decodes infrared signals from remote controls. From patchwork Sat Feb 25 18:58:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47313 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 D22CE16B70; Sat, 25 Feb 2023 19:00:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 0124516AF4 for ; Sat, 25 Feb 2023 19:00:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmC-0002b1-5T; Sat, 25 Feb 2023 14:00:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm9-0002XT-GR for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm9-00011W-59 for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm9-000822-14 for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 25/27] services: spice: Deprecate 'spice-vdagent-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156630735 (code B ref 61789); Sat, 25 Feb 2023 19:00:04 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:26 +0000 Received: from localhost ([127.0.0.1]:41504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlV-0007za-RT for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:26 -0500 Received: from smtpm8.myservices.hosting ([185.26.105.209]:46080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzky-0007vL-Ua for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:55 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id 1023A20D5D for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C2ED080079; Sat, 25 Feb 2023 19:58:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uzf6gadtJqK6; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id AA1C7800A3; Sat, 25 Feb 2023 19:58:25 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:11 +0000 Message-Id: <0645b758f5fb1d1b371ecd6fe57cb8ad18d768f7.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Miscellaneous Services): Replace 'spice-vdagent-service' with 'spice-vdagent-service-type'. Document . * gnu/services/spice.scm (spice-vdagent-service): Deprecate procedure. --- doc/guix.texi | 25 ++++++++++++++++++------- gnu/services/spice.scm | 7 ++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 466c6c98c9..7aa9f3a5e8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37751,16 +37751,27 @@ Miscellaneous Services @c TODO: Document , preferably by refactoring this to use @c define-configuration and generating documentation from it. -@cindex spice -@subsubheading Spice Service +@cindex SPICE +@subsubheading SPICE Service The @code{(gnu services spice)} module provides the following service. -@deffn {Scheme Procedure} spice-vdagent-service [#:spice-vdagent] -Returns a service that runs @url{https://www.spice-space.org,VDAGENT}, a daemon -that enables sharing the clipboard with a vm and setting the guest display -resolution when the graphical console window resizes. -@end deffn +@defvar spice-vdagent-service-type +Type of the service that runs @url{https://www.spice-space.org, VDAGENT}, +a daemon that enables sharing the clipboard with a vm and setting the +guest display resolution when the graphical console window resizes. +@end defvar + +@deftp {Data Type} spice-vdagent-configuration +Data type representing the configuration of +@code{spice-vdagent-service-type}. + +@table @asis +@item @code{spice-vdagent} (default: @code{spice-vdagent}) (type: file-like) +Package object for VDAGENT. + +@end table +@end deftp @cindex inputattach @subsubheading inputattach Service diff --git a/gnu/services/spice.scm b/gnu/services/spice.scm index e5ec46b9b5..b8d2f8486e 100644 --- a/gnu/services/spice.scm +++ b/gnu/services/spice.scm @@ -21,12 +21,13 @@ (define-module (gnu services spice) #:use-module (gnu packages spice) #:use-module (gnu services) #:use-module (gnu services shepherd) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix records) #:export (spice-vdagent-configuration spice-vdagent-configuration? spice-vdagent-service-type - spice-vdagent-service)) + spice-vdagent-service)) ; deprecated (define-record-type* spice-vdagent-configuration make-spice-vdagent-configuration @@ -74,8 +75,8 @@ (define spice-vdagent-service-type from the @code{spice-vdagent} package to enable window resizing and clipboard sharing for @acronym{VM, virtual machine} guests."))) -(define* (spice-vdagent-service - #:optional (config (spice-vdagent-configuration))) +(define-deprecated (spice-vdagent-service + #:optional (config (spice-vdagent-configuration))) "Start the @command{vdagentd} and @command{vdagent} daemons from @var{spice-vdagent} to enable guest window resizing and clipboard sharing." From patchwork Sat Feb 25 18:58:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47310 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 66DF116B42; Sat, 25 Feb 2023 18:59:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 1911D16AF4 for ; Sat, 25 Feb 2023 18:59:47 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlL-0001uw-O6; Sat, 25 Feb 2023 13:59:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlG-0001t5-1R for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlF-0000dC-PS for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlF-0007yQ-MW for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 26/27] services: dict: Deprecate 'dicod-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735154930637 (code B ref 61789); Sat, 25 Feb 2023 18:59:09 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:09 +0000 Received: from localhost ([127.0.0.1]:41487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlE-0007xy-Bj for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:08 -0500 Received: from smtpm7.myservices.hosting ([185.26.105.208]:59346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkk-0007uN-3o for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:38 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm7.myservices.hosting (Postfix) with ESMTP id 3D9C620D3E for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E3C858009A; Sat, 25 Feb 2023 19:58:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MyvPg2O1l0fi; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 11C068009D; Sat, 25 Feb 2023 19:58:25 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:12 +0000 Message-Id: <78a98543d37badae1619ffd46b47f1e866606fd1.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Miscellaneous Services): Remove 'dicod-service' mention. * gnu/services/dict.scm (dicod-service): Deprecate procedure. --- doc/guix.texi | 17 ++--------------- gnu/services/dict.scm | 6 ++++-- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7aa9f3a5e8..a40d88455b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37814,19 +37814,6 @@ Miscellaneous Services implementation of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}). @end defvar -@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)] -Return a service that runs the @command{dicod} daemon, an implementation -of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}). - -The optional @var{config} argument specifies the configuration for -@command{dicod}, which should be a @code{} object, by -default it serves the GNU Collaborative International Dictionary of English. - -You can add @command{open localhost} to your @file{~/.dico} file to make -@code{localhost} the default server for @command{dico} client -(@pxref{Initialization File,,, dico, GNU Dico Manual}). -@end deffn - @deftp {Data Type} dicod-configuration Data type representing the configuration of dicod. @@ -37890,10 +37877,10 @@ Miscellaneous Services Dictionary of English using the @code{gcide} package. @end defvar -The following is an example @code{dicod-service} configuration. +The following is an example @code{dicod-service-type} configuration. @lisp -(dicod-service #:config +(service dicod-service-type (dicod-configuration (handlers (list (dicod-handler (name "wordnet") diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index 35253a0077..5a61085316 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -19,6 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu services dict) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix modules) @@ -34,7 +35,7 @@ (define-module (gnu services dict) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (dicod-service + #:export (dicod-service ; deprecated dicod-service-type dicod-configuration dicod-handler @@ -202,7 +203,8 @@ (define dicod-service-type implements the standard DICT protocol supported by clients such as @command{dico} and GNOME Dictionary."))) -(define* (dicod-service #:key (config (dicod-configuration))) +(define-deprecated (dicod-service #:key (config (dicod-configuration))) + dicod-service-type "Return a service that runs the @command{dicod} daemon, an implementation of DICT server (@pxref{Dicod,,, dico, GNU Dico Manual}). From patchwork Sat Feb 25 18:58:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47327 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 3450716B42; Sat, 25 Feb 2023 19:01:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=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 9EF0316AFC for ; Sat, 25 Feb 2023 19:01:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzmC-0002b4-CG; Sat, 25 Feb 2023 14:00:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzm8-0002WV-8r for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzm7-0000x6-Rs for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzm7-00081g-NC for guix-patches@gnu.org; Sat, 25 Feb 2023 14:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 27/27] services: dbus: Deprecate 'dbus-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 19:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735156430714 (code B ref 61789); Sat, 25 Feb 2023 19:00:03 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:59:24 +0000 Received: from localhost ([127.0.0.1]:41498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzlU-0007zD-6S for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:59:24 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]:59602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkl-0007uV-GP for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:40 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id A178920EFD for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 4748E8009A; Sat, 25 Feb 2023 19:58:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RzUOSlrv7KG3; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 6355480079; Sat, 25 Feb 2023 19:58:26 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:13 +0000 Message-Id: <2b272d95354b74a2aefeaa16a8e8485035cc3ff4.1677350250.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Desktop Services): Replace with 'dbus-root-service-type'. Document dbus-configuration. * gnu/services/dbus.scm (dbus-service): Define with 'define-deprecated'. * gnu/services/desktop.scm (desktop-services-for-system): Replace with dbus-root-service-type. * gnu/system/install.scm (%installation-services): Ditto. * gnu/tests/base.scm (%avahi-os): Ditto. * gnu/tests/docker.scm (%docker-os): Ditto. * gnu/tests/lightdm.scm (minimal-desktop-services): Ditto. * gnu/tests/virtualization.scm (%libvirt-os): Ditto. --- doc/guix.texi | 49 +++++++++++++++++++++++------------- gnu/services/dbus.scm | 5 ++-- gnu/services/desktop.scm | 2 +- gnu/system/install.scm | 2 +- gnu/tests/base.scm | 2 +- gnu/tests/docker.scm | 2 +- gnu/tests/lightdm.scm | 2 +- gnu/tests/virtualization.scm | 2 +- 8 files changed, 40 insertions(+), 26 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a40d88455b..2dc3ca7d1f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23293,24 +23293,37 @@ Desktop Services provided by @code{(gnu services dbus)} and @code{(gnu services desktop)} are described below. -@deffn {Scheme Procedure} dbus-service [#:dbus @var{dbus}] [#:services '()] @ - [#:verbose?] -Return a service that runs the ``system bus'', using @var{dbus}, with -support for @var{services}. When @var{verbose?} is true, it causes the -@samp{DBUS_VERBOSE} environment variable to be set to @samp{1}; a -verbose-enabled D-Bus package such as @code{dbus-verbose} should be -provided as @var{dbus} in this scenario. The verbose output is logged -to @file{/var/log/dbus-daemon.log}. - -@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process communication -facility. Its system bus is used to allow system services to communicate -and to be notified of system-wide events. - -@var{services} must be a list of packages that provide an -@file{etc/dbus-1/system.d} directory containing additional D-Bus configuration -and policy files. For example, to allow avahi-daemon to use the system bus, -@var{services} must be equal to @code{(list avahi)}. -@end deffn +@defvar dbus-root-service-type +Type for a service that runs the D-Bus ``system bus''. +@footnote{@uref{https://dbus.freedesktop.org/, D-Bus} is an inter-process +communication facility. Its system bus is used to allow system services +to communicate and to be notified of system-wide events.} + +The value for this service type is a @code{} record. +@end defvar + +@deftp {Data Type} dbus-configuration +Data type representing the configuration for @code{dbus-root-service-type}. + +@table @asis +@item @code{dbus} (default: @code{dbus}) (type: file-like) +Package object for dbus. + +@item @code{services} (default: @code{()}) (type: list) +List of packages that provide an @file{etc/dbus-1/system.d} directory +containing additional D-Bus configuration and policy files. +For example, to allow avahi-daemon to use the system bus, @var{services} +must be equal to @code{(list avahi)}. + +@item @code{verbose?} (default: @code{#f}) (type: boolean) +When @code{#t}, D-Bus is launched with environment variable +@samp{DBUS_VERBOSE} set to @samp{1}. A verbose-enabled D-Bus package +such as @code{dbus-verbose} should be provided to @var{dbus} in this +scenario. The verbose output is logged to +@file{/var/log/dbus-daemon.log}. + +@end table +@end deftp @subsubheading Elogind diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index ea2593501f..e9c9346f56 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -38,7 +38,7 @@ (define-module (gnu services dbus) #:export (dbus-configuration dbus-configuration? dbus-root-service-type - dbus-service + dbus-service ; deprecated wrapped-dbus-service polkit-configuration @@ -245,7 +245,8 @@ (define dbus-root-service-type bus. It allows programs and daemons to communicate and is also responsible for spawning (@dfn{activating}) D-Bus services on demand."))) -(define* (dbus-service #:key (dbus dbus) (services '()) verbose?) +(define-deprecated (dbus-service #:key (dbus dbus) (services '()) verbose?) + dbus-root-service-type "Return a service that runs the \"system bus\", using @var{dbus}, with support for @var{services}. When @var{verbose?} is true, it causes the @samp{DBUS_VERBOSE} environment variable to be set to @samp{1}; a diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 202bf1de80..2d39b4f9d1 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1821,7 +1821,7 @@ (define* (desktop-services-for-system #:optional (service geoclue-service-type) (service polkit-service-type) (service elogind-service-type) - (dbus-service) + (service dbus-root-service-type) (service ntp-service-type) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index dd965f312b..7a68c19606 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -442,7 +442,7 @@ (define* (%installation-services #:key (system (or (and=> (list %loopback-static-networking)) (service wpa-supplicant-service-type) - (dbus-service) + (service dbus-root-service-type) (service connman-service-type (connman-configuration (disable-vpn? #t))) diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 3e72e193d7..97edbbc6ad 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -962,7 +962,7 @@ (define %avahi-os (name-service-switch %mdns-host-lookup-nss) (services (cons* (service avahi-service-type (avahi-configuration (debug? #t))) - (dbus-service) + (service dbus-root-service-type) (service dhcp-client-service-type) ;needed for multicast ;; Enable heavyweight debugging output. diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm index e464ec587e..0276e398a7 100644 --- a/gnu/tests/docker.scm +++ b/gnu/tests/docker.scm @@ -48,7 +48,7 @@ (define-module (gnu tests docker) (define %docker-os (simple-operating-system (service dhcp-client-service-type) - (dbus-service) + (service dbus-root-service-type) (service polkit-service-type) (service elogind-service-type) (service docker-service-type))) diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm index aa97a96939..dda472bd74 100644 --- a/gnu/tests/lightdm.scm +++ b/gnu/tests/lightdm.scm @@ -49,7 +49,7 @@ (define minimal-desktop-services (service accountsservice-service-type) (service polkit-service-type) (service elogind-service-type) - (dbus-service) + (service dbus-root-service-type) x11-socket-directory-service)) (define %lightdm-os diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm index 6749ade4bd..effdeb4cfa 100644 --- a/gnu/tests/virtualization.scm +++ b/gnu/tests/virtualization.scm @@ -49,7 +49,7 @@ (define-module (gnu tests virtualization) (define %libvirt-os (simple-operating-system (service dhcp-client-service-type) - (dbus-service) + (service dbus-root-service-type) (service polkit-service-type) (service libvirt-service-type)))