From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 OMULGtJa+mORQwAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 20:00:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eIzwGdJa+mNRdAEAauVa8A (envelope-from ) for ; Sat, 25 Feb 2023 20:00:34 +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 80561B196 for ; Sat, 25 Feb 2023 20:00:26 +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=1677351626; a=rsa-sha256; cv=none; b=qyCHNGlXgOCeb9dHS+7t/82iD/oPn4BVmvxb76mbFq8ObqVphLxhbLyR9xRJSifdUkJmgN 37wy4uIZvLFDjuv9WP73syyv+UxsiClczwPRw4RG2GI4MYIUCSiDyM+CPA5unNFdXuCNwb G0UWgf5ZXhR5cQSbseCAc+AEkt0KdJPdh/MLooZ2dM/jWZSwUnO2JEafWn+c40HQO3xw1g lyvmwq5/aPmg+8p+ekfnu6bAMR2rHsQHU22q5eQGd5jo2ak1lR31VFajtLmji0EEmvwj8a tvsbzhfDwU8rn4U6PKTDr3CuqqcxxYx/P0PnCWXGf+WKknEPCawcTuxR2q7Oog== 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=1677351626; 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=Er++navKzxCSHjM18iWg6+7eOusz7psIekyxScO43OA=; b=OIYklHGDe3qw31XCOkb8X3gDVsBm2kDbfS86NuwBiuw684Yqh37ETkSiW133Ic1W5vDyYv Y+nv0CM9rFHro/Wh84gER5MmXCqJfv4io/a2bRGZumreEmEHZBlNbZLoyAZ0CGOGyiKOKJ ++PEXsXJgTk73MQZn1Z14mlY7BdYBHFmIkTAWHO2ZE/owX4d1JyQxQvsoq4CKFgoALu3iS eFiN6aQUKlj05BEzsOGS8KgMXydX+3FOAsPjqgYMKlk7SGtnNDvC60OyEhwWS3xg+f8djR eVIq5fnXVOCvhvRltKqyrFYUQtWKTzsfaEJyTAKYxIjCGLSsHBmZ+anrm4I8MA== 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 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: 80561B196 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: rLwo93WJwpyA * 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)) -- 2.39.1