From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AKZ9LGqQ92NA1AAAbAwnHQ (envelope-from ) for ; Thu, 23 Feb 2023 17:12:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mBhLLGqQ92P/sQAAauVa8A (envelope-from ) for ; Thu, 23 Feb 2023 17:12:26 +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 2184FE3D6 for ; Thu, 23 Feb 2023 17:12:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVECR-0003df-B3; Thu, 23 Feb 2023 11:12:03 -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 1pVECQ-0003dQ-Aj for guix-patches@gnu.org; Thu, 23 Feb 2023 11:12:02 -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 1pVECQ-0000bT-4X for guix-patches@gnu.org; Thu, 23 Feb 2023 11:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVECP-0001LA-L1 for guix-patches@gnu.org; Thu, 23 Feb 2023 11:12:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61693] [PATCH v2] services: etc-service: Deprecate etc-service procedure. References: In-Reply-To: Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Feb 2023 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61693 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61693@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61693-submit@debbugs.gnu.org id=B61693.16771686725094 (code B ref 61693); Thu, 23 Feb 2023 16:12:01 +0000 Received: (at 61693) by debbugs.gnu.org; 23 Feb 2023 16:11:12 +0000 Received: from localhost ([127.0.0.1]:35102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVEBc-0001K6-Cc for submit@debbugs.gnu.org; Thu, 23 Feb 2023 11:11:12 -0500 Received: from smtpmciv6.myservices.hosting ([185.26.106.201]:46332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVEBZ-0001Jx-Uq for 61693@debbugs.gnu.org; Thu, 23 Feb 2023 11:11:10 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv6.myservices.hosting (Postfix) with ESMTP id 0A19920DD5 for <61693@debbugs.gnu.org>; Thu, 23 Feb 2023 17:11:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id AB4BB80097; Thu, 23 Feb 2023 17:11:07 +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 MhSM7QJhjb61; Thu, 23 Feb 2023 17:11:04 +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 F057680079; Thu, 23 Feb 2023 17:11:03 +0100 (CET) From: Bruno Victal Date: Thu, 23 Feb 2023 16:10:54 +0000 Message-Id: <17305168b7a65be0b9398951bf85abe3309f0494.1677168632.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 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=1677168746; 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=qxvAtQv1XBBo0Qqg+ORb6PHuCUpV62gfgxE1PeAwaAs=; b=Eop90OCgVzSY2CG9whVQojgDEfIO4RCRhHonK4nVspXnD92cOM+iUHtqn6IDHPHcT+pVtR p217cD8je1byf8WM6QLE/J+7j8eyFATnk9oh9v4VQTJvYqIoZub4NVlhR5cOSXczw/ceVs 3nqTlHXzoxchjdNV+2osNJFNUvmZmVf3AJf6kDfYRkVPN1jCI6gYzLqmxhKxUFpqsihkf3 80IRXbuNZGPR1dHj1tiNyvDgmvEPlvrDI9y8ydUTB6qSTyYc2jKUeklPLATOOevdgQ65Cw N6MlQbXy/LbFu0QWc4jtPFDNLoEY/Ps7l3DIzGuDqJuxWAkI5Ito6X9hzci9kA== 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=1677168746; a=rsa-sha256; cv=none; b=A49wlu6XPsMMM3YDiW8zn2uPy9HL57vHp87waoq4tUHAvYE87bhgMk0bwqJVLmhEB72EUp a2DcxKGK9ey38VRhlA3ylANmvQB8n4EenqjwkO46cleVQN1GnCyl4t7GoUnJGLhXmn5ock Wr4U7HGr/PSkY6XSJzaUk1d5/B6uYFBKHavxY6X62D6NZSLcUHGCR4eKfX8ulYEkObZd/c NIJCQ4hpdnlBu67+VD62DvMlhQwK9YvE1JeJ7tbQf7GhN28qS0r76QSQqcPDrWcuaVAOGW qw4jlfFLkW6o0WImopmHUvqnzQZpG/su++Nn88+WEj8K0Rpp7QdaXrpbJOynfQ== X-Migadu-Spam-Score: -0.17 X-Spam-Score: -0.17 X-Migadu-Queue-Id: 2184FE3D6 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-TUID: 6jXRvONGrgwN * gnu/services.scm (etc-service): Deprecate procedure. * gnu/system.scm (operating-system-etc-service): Replace etc-service with etc-service-type. --- gnu/services.scm | 6 +++-- gnu/system.scm | 68 ++++++++++++++++++++++++------------------------ 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/gnu/services.scm b/gnu/services.scm index 2abef557d4..d6c7ad0553 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -39,6 +39,7 @@ (define-module (gnu services) #:use-module (guix modules) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix deprecation) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages hurd) @@ -122,7 +123,7 @@ (define-module (gnu services) %boot-service %activation-service - etc-service) + etc-service) ; deprecated #:re-export (;; Note: Re-export 'delete' to allow for proper syntax matching ;; in 'modify-services' forms. See ;; . @@ -804,7 +805,8 @@ (define etc-service-type (extend append) (description "Populate the @file{/etc} directory."))) -(define (etc-service files) +(define-deprecated (etc-service files) + etc-service-type "Return a new service of ETC-SERVICE-TYPE that populates /etc with FILES. FILES must be a list of name/file-like object pairs." (service etc-service-type files)) diff --git a/gnu/system.scm b/gnu/system.scm index 53f3c62bb0..ca661c4d86 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1092,40 +1092,40 @@ (define* (operating-system-etc-service os) # as those in ~/.guix-profile and /run/current-system/profile. source /run/current-system/profile/etc/profile.d/bash_completion.sh fi\n"))) - (etc-service - `(("os-release" ,#~#$(os-release)) - ("services" ,(file-append net-base "/etc/services")) - ("protocols" ,(file-append net-base "/etc/protocols")) - ("rpc" ,(file-append net-base "/etc/rpc")) - ("login.defs" ,#~#$login.defs) - ("issue" ,#~#$issue) - ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '()) - ("profile" ,#~#$profile) - ("bashrc" ,#~#$bashrc) - ;; Write the operating-system-host-name to /etc/hostname to prevent - ;; NetworkManager from changing the system's hostname when connecting - ;; to certain networks. Some discussion at - ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html - ("hostname" ,(plain-file "hostname" (operating-system-host-name os))) - ;; Some programs (e.g., GLib) look at /etc/timezone to find the - ;; name of the current timezone. For details, see - ;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html - ;; Some programs expect a terminating newline. - ("timezone" ,(plain-file "timezone" - (string-append - (string-trim-both - (operating-system-timezone os)) - "\n"))) - ("localtime" ,(file-append tzdata "/share/zoneinfo/" - (operating-system-timezone os))) - ,@(if sudoers - `(("sudoers" ,(validated-sudoers-file sudoers))) - '()) - ,@(if hurd - `(("login" ,(file-append hurd "/etc/login")) - ("motd" ,(file-append hurd "/etc/motd")) - ("ttys" ,(file-append hurd "/etc/ttys"))) - '()))))) + (service etc-service-type + `(("os-release" ,#~#$(os-release)) + ("services" ,(file-append net-base "/etc/services")) + ("protocols" ,(file-append net-base "/etc/protocols")) + ("rpc" ,(file-append net-base "/etc/rpc")) + ("login.defs" ,#~#$login.defs) + ("issue" ,#~#$issue) + ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '()) + ("profile" ,#~#$profile) + ("bashrc" ,#~#$bashrc) + ;; Write the operating-system-host-name to /etc/hostname to prevent + ;; NetworkManager from changing the system's hostname when connecting + ;; to certain networks. Some discussion at + ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html + ("hostname" ,(plain-file "hostname" (operating-system-host-name os))) + ;; Some programs (e.g., GLib) look at /etc/timezone to find the + ;; name of the current timezone. For details, see + ;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html + ;; Some programs expect a terminating newline. + ("timezone" ,(plain-file "timezone" + (string-append + (string-trim-both + (operating-system-timezone os)) + "\n"))) + ("localtime" ,(file-append tzdata "/share/zoneinfo/" + (operating-system-timezone os))) + ,@(if sudoers + `(("sudoers" ,(validated-sudoers-file sudoers))) + '()) + ,@(if hurd + `(("login" ,(file-append hurd "/etc/login")) + ("motd" ,(file-append hurd "/etc/motd")) + ("ttys" ,(file-append hurd "/etc/ttys"))) + '()))))) (define %root-account ;; Default root account. -- 2.39.1