all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#61693] [PATCH] services: Remove etc-service procedure.
@ 2023-02-22  0:09 Bruno Victal
  2023-02-23 16:10 ` [bug#61693] [PATCH v2] services: etc-service: Deprecate " Bruno Victal
  2023-03-13 17:36 ` [bug#61693] [PATCH v3] services: etc-service: Deprecate " Bruno Victal
  0 siblings, 2 replies; 6+ messages in thread
From: Bruno Victal @ 2023-02-22  0:09 UTC (permalink / raw)
  To: 61693; +Cc: Bruno Victal

* gnu/services.scm (etc-service): Delete procedure.
* gnu/system.scm (operating-system-etc-service): Replace etc-service
with etc-service-type.
---

Note: This procedure is not documented in the manual so we skip the deprecation phase.

 gnu/services.scm |  8 +-----
 gnu/system.scm   | 68 ++++++++++++++++++++++++------------------------
 2 files changed, 35 insertions(+), 41 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 2abef557d4..fd073b60dd 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -121,8 +121,7 @@ (define-module (gnu services)
             linux-loadable-module-service-type
 
             %boot-service
-            %activation-service
-            etc-service)
+            %activation-service)
   #:re-export (;; Note: Re-export 'delete' to allow for proper syntax matching
                ;; in 'modify-services' forms.  See
                ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26805#16>.
@@ -804,11 +803,6 @@ (define etc-service-type
                 (extend append)
                 (description "Populate the @file{/etc} directory.")))
 
-(define (etc-service files)
-  "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))
-
 (define (setuid-program->activation-gexp programs)
   "Return an activation gexp for setuid-program from PROGRAMS."
   (let ((programs (map (lambda (program)
diff --git a/gnu/system.scm b/gnu/system.scm
index df60fda53b..779fe26049 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1093,40 +1093,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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-16 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-22  0:09 [bug#61693] [PATCH] services: Remove etc-service procedure Bruno Victal
2023-02-23 16:10 ` [bug#61693] [PATCH v2] services: etc-service: Deprecate " Bruno Victal
2023-03-14 14:42   ` [bug#61693] [PATCH] services: Remove " Ludovic Courtès
2023-03-14 15:46     ` Bruno Victal
2023-03-13 17:36 ` [bug#61693] [PATCH v3] services: etc-service: Deprecate " Bruno Victal
2023-03-16 10:52   ` bug#61693: [PATCH] services: Remove " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.