From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MPAAB+la+mPPRgAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 20:00:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sIwhBula+mPeswAAG6o9tA (envelope-from ) for ; Sat, 25 Feb 2023 20:00:57 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D8DD2B072 for ; Sat, 25 Feb 2023 20:00:56 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677351656; a=rsa-sha256; cv=none; b=I06+zUEF/qgHOiBEBYoU0e+Y/HhoaRLbn/X22wwTvjdoKIQcf62sUiXsI/jTMFdwXez4TT 8CWNTxw4Wf1FVBgsbIZPZXJ5jfg8d1Zeq39fqgV+pS/C6rOne2xBM3yeyca73vFJEn6cN6 4BZK3pbxeLlFQsoeQlT1remOHbKEbGvPDf7lfOm2W9VVQX0AGwiZ0C98bXhcne9ktuqRxc rKDtJc4M/m1FqciTGm1dVAEJZdM68v8gfIThSaogIw30xIAtVh2LiozhH/qh/zJe1g9+/X CPGb3kzTbNYWmrFGcQEkqYfX4AmX9zPPOjEiHo+JqykefixucNmL7q4bkzR4cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677351656; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=jjrdnbHz+NTIajzdGVpHEOBu4tdM5EFGbMg8YI28VvQ=; b=ZcsE5iZFwqn734uYgGkoCnf2CMtwyUX5kYnLbpJ1hzI0u7pJwWGLvhIS+fpujW91FuLQFH 3i0n4uwL04U8rzJtuvqtRnbcRyAN8zNCfA5L3BNqh8jP7n6J2vu0tVNYJQE9pOuV7QsP7H sySsyA8b2GNeQetcwhnff3AAWBp6CKGtiJvxfx2uu6k/S1m+KlrtK3x7c9h/6kUs2XfEK1 MnKn/6W8PlBEvy9uV5j6Uo5A68VkircXn/LnUeWeX7Irw5hewdqYfwS+RxumgQ33R5r4TO LVL8xbjWJHqVKpZkxh6ejFrXxJS0UirAkDDnPbw3dDdHlywEDmHg8MQWVw+rZg== 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 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: D8DD2B072 X-Spam-Score: -3.18 X-Migadu-Spam-Score: -3.18 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: GeMHDZRsHFGL * 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." -- 2.39.1