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 yE1pDelb+mPPRgAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 20:05:13 +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 2E+KDOlb+mNdPwAAG6o9tA (envelope-from ) for ; Sat, 25 Feb 2023 20:05:13 +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 DB08CB49E for ; Sat, 25 Feb 2023 20:05:12 +0100 (CET) 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 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: 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677351913; 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=yAau/pA7QUDwP4uGm31CRmwcsuhuU15ryJtw4QXoH9g=; b=hoABQGf2NH9zl7mm03VxniVOpYAzH8CpuXLhlMdQLWe4u71tTcnauD9AgqvAijRH5JIirB u9iNzrTjHP6bmnZhnEEzfBKaBfDWZwU4EhWgD9fiaJMn6NSwM71UIwBY6PEJdmuPc3IDgI El49tl1hKAFeMMiMhOTpIBpL/13JWG8+SSRmU/JqTg/0iPph8zp90sNooNv0S+m9se+l5a hwfzKS3j4LWeiyM9h7qTtJGa7sexwiX3iQbbzJGrx/cm1S9h+RRAbqCvTkhbm0XUdEa0Dn Pj9yzECdNQF7VuCLo8aByO91dscwYqW5auiefF4VKHbfkMQUlK1awjNXYD1j2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677351913; a=rsa-sha256; cv=none; b=Al8dXqbVjNgCQ/kHKkrnRfBNIMr9VDSR2/PahItCIRClbaCvF6Oa6PytP8yUtIBXxTkS3+ qIX8kSTRtODzTblKwkqfZ1BMLknc4HznkvxXa4NbkAKjFnfwAsAo/NYQMCqUHPihTJLjmM YGeZEusGDieNJxJw+p8y5tvUwWOg1b47L8UNQvCNXp7kzUj4+8Ggy+ljLTSZp43djzimFI Jj2hJaEOLm1M2/4VcRBqJpJXHXsaJrAaxdv90voYQRN7r0R40ZtFmwg6HqSTlt5kLkrlFR qfwGBrfj/SNve8ZbfgN+wtrvnIrSKKLxg44HZPj6l6KMsR83zLXl5GA1QrRsSQ== X-Spam-Score: -1.68 X-Migadu-Queue-Id: DB08CB49E X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Spam-Score: -1.68 X-TUID: sL7ifrE3b1up * 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. -- 2.39.1