From patchwork Mon Mar 13 17:36:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47942 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 62A6916E3A; Mon, 13 Mar 2023 17:37: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 6F61316DFF for ; Mon, 13 Mar 2023 17:37:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbm6a-00011z-Ol; Mon, 13 Mar 2023 13:37:04 -0400 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 1pbm6Y-00011c-He for guix-patches@gnu.org; Mon, 13 Mar 2023 13:37:02 -0400 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 1pbm6Y-0007Fj-54 for guix-patches@gnu.org; Mon, 13 Mar 2023 13:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pbm6X-0006A3-Ov for guix-patches@gnu.org; Mon, 13 Mar 2023 13:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#61693] [PATCH v3] 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: Mon, 13 Mar 2023 17:37: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.167872899423641 (code B ref 61693); Mon, 13 Mar 2023 17:37:01 +0000 Received: (at 61693) by debbugs.gnu.org; 13 Mar 2023 17:36:34 +0000 Received: from localhost ([127.0.0.1]:35548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbm66-00069E-4M for submit@debbugs.gnu.org; Mon, 13 Mar 2023 13:36:34 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:55406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbm64-000695-10 for 61693@debbugs.gnu.org; Mon, 13 Mar 2023 13:36:32 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 92E5420D56 for <61693@debbugs.gnu.org>; Mon, 13 Mar 2023 18:36:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 2E4BD80098; Mon, 13 Mar 2023 18:36: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 2e1m3EIDv0_d; Mon, 13 Mar 2023 18:36: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 E56E28009A; Mon, 13 Mar 2023 18:36:24 +0100 (CET) From: Bruno Victal Date: Mon, 13 Mar 2023 17:36:14 +0000 Message-Id: <83cc0ca68a18f451ef9d2e888707e1977701f91d.1678728933.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 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.scm (etc-service): Deprecate procedure. * gnu/system.scm (operating-system-etc-service): Replace etc-service with etc-service-type. --- Changes from v2 to v3: * Resolved merge conflict. gnu/services.scm | 6 ++++-- gnu/system.scm | 2 +- 2 files changed, 5 insertions(+), 3 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 887e537b48..48cc68f449 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1090,7 +1090,7 @@ (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 + (service etc-service-type `(("os-release" ,os-release) ("services" ,(file-append net-base "/etc/services")) ("protocols" ,(file-append net-base "/etc/protocols"))