guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

11/12: services: Remove unnecessary references to (gnu build shepherd).


From: guix-commits
Subject: 11/12: services: Remove unnecessary references to (gnu build shepherd).
Date: Thu, 21 Dec 2023 18:36:54 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 3d6583727ec90732ad7bd97808fd4fca8f6d8bdc
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Nov 14 11:48:50 2023 +0100

    services: Remove unnecessary references to (gnu build shepherd).
    
    * gnu/services/databases.scm (memcached-shepherd-service): Remove
    ‘with-imported-modules’ form and ‘modules’ field.
    * gnu/services/security-token.scm (pcscd-shepherd-service): Remove
    ‘with-imported-modules’ form.
    * gnu/services/web.scm (hpcguix-web-shepherd-service): Likewise.
    
    Change-Id: Ieb817508f1751e0c1ff551a0e078789a4a813c1c
---
 gnu/services/databases.scm      | 41 ++++++++++++++++-------------------
 gnu/services/security-token.scm | 29 +++++++++++--------------
 gnu/services/web.scm            | 48 ++++++++++++++++++++---------------------
 3 files changed, 55 insertions(+), 63 deletions(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index d3fee2a8ef..580031cb42 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -512,28 +512,25 @@ created after the PostgreSQL database is started.")))
   (match-lambda
     (($ <memcached-configuration> memcached interfaces tcp-port udp-port
                                   additional-options)
-     (with-imported-modules (source-module-closure
-                             '((gnu build shepherd)))
-       (list (shepherd-service
-              (provision '(memcached))
-              (documentation "Run the Memcached daemon.")
-              (requirement '(user-processes loopback))
-              (modules '((gnu build shepherd)))
-              (start #~(make-forkexec-constructor
-                        `(#$(file-append memcached "/bin/memcached")
-                          "-l" #$(string-join interfaces ",")
-                          "-p" #$(number->string tcp-port)
-                          "-U" #$(number->string udp-port)
-                          "--daemon"
-                          ;; Memcached changes to the memcached user prior to
-                          ;; writing the pid file, so write it to a directory
-                          ;; that memcached owns.
-                          "-P" "/var/run/memcached/pid"
-                          "-u" "memcached"
-                          ,#$@additional-options)
-                        #:log-file "/var/log/memcached"
-                        #:pid-file "/var/run/memcached/pid"))
-              (stop #~(make-kill-destructor))))))))
+     (list (shepherd-service
+            (provision '(memcached))
+            (documentation "Run the Memcached daemon.")
+            (requirement '(user-processes loopback))
+            (start #~(make-forkexec-constructor
+                      `(#$(file-append memcached "/bin/memcached")
+                        "-l" #$(string-join interfaces ",")
+                        "-p" #$(number->string tcp-port)
+                        "-U" #$(number->string udp-port)
+                        "--daemon"
+                        ;; Memcached changes to the memcached user prior to
+                        ;; writing the pid file, so write it to a directory
+                        ;; that memcached owns.
+                        "-P" "/var/run/memcached/pid"
+                        "-u" "memcached"
+                        ,#$@additional-options)
+                      #:log-file "/var/log/memcached"
+                      #:pid-file "/var/run/memcached/pid"))
+            (stop #~(make-kill-destructor)))))))
 
 (define memcached-service-type
   (service-type (name 'memcached)
diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm
index 2356273398..d971091e73 100644
--- a/gnu/services/security-token.scm
+++ b/gnu/services/security-token.scm
@@ -50,22 +50,19 @@
 (define pcscd-shepherd-service
   (match-lambda
     (($ <pcscd-configuration> pcsc-lite)
-     (with-imported-modules (source-module-closure
-                             '((gnu build shepherd)))
-       (shepherd-service
-        (documentation "PC/SC Smart Card Daemon")
-        (provision '(pcscd))
-        (requirement '(syslogd))
-        (modules '((gnu build shepherd)))
-        (start #~(lambda _
-                   (let ((socket "/run/pcscd/pcscd.comm"))
-                     (when (file-exists? socket)
-                       (delete-file socket)))
-                   (fork+exec-command
-                    (list #$(file-append pcsc-lite "/sbin/pcscd")
-                          "--foreground")
-                    #:log-file "/var/log/pcscd.log")))
-        (stop #~(make-kill-destructor)))))))
+     (shepherd-service
+      (documentation "PC/SC Smart Card Daemon")
+      (provision '(pcscd))
+      (requirement '(syslogd))
+      (start #~(lambda _
+                 (let ((socket "/run/pcscd/pcscd.comm"))
+                   (when (file-exists? socket)
+                     (delete-file socket)))
+                 (fork+exec-command
+                  (list #$(file-append pcsc-lite "/sbin/pcscd")
+                        "--foreground")
+                  #:log-file "/var/log/pcscd.log")))
+      (stop #~(make-kill-destructor))))))
 
 (define pcscd-activation
   (match-lambda
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 55cc095d90..05fd71f994 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1232,31 +1232,29 @@ a webserver.")
   (let* ((specs       (hpcguix-web-configuration-specs config))
          (config-file (and specs (scheme-file "hpcguix-web.scm" specs)))
          (hpcguix-web (hpcguix-web-package config)))
-    (with-imported-modules (source-module-closure
-                            '((gnu build shepherd)))
-      (shepherd-service
-       (documentation "hpcguix-web daemon")
-       (provision     '(hpcguix-web))
-       (requirement   '(networking))
-       (start #~(make-forkexec-constructor
-                 (list #$(file-append hpcguix-web "/bin/hpcguix-web")
-                       (string-append "--listen="
-                                      #$(hpcguix-web-configuration-address
-                                         config))
-                       "-p"
-                       #$(number->string
-                          (hpcguix-web-configuration-port config))
-                       #$@(if specs
-                              #~((string-append "--config=" #$config-file))
-                              #~()))
-                 #:user "hpcguix-web"
-                 #:group "hpcguix-web"
-                 #:environment-variables
-                 (list "XDG_CACHE_HOME=/var/cache/guix/web"
-                       "SSL_CERT_DIR=/etc/ssl/certs")
-                 #:log-file #$%hpcguix-web-log-file))
-       (stop #~(make-kill-destructor))
-       (actions (list (shepherd-configuration-action config-file)))))))
+    (shepherd-service
+     (documentation "hpcguix-web daemon")
+     (provision     '(hpcguix-web))
+     (requirement   '(networking))
+     (start #~(make-forkexec-constructor
+               (list #$(file-append hpcguix-web "/bin/hpcguix-web")
+                     (string-append "--listen="
+                                    #$(hpcguix-web-configuration-address
+                                       config))
+                     "-p"
+                     #$(number->string
+                        (hpcguix-web-configuration-port config))
+                     #$@(if specs
+                            #~((string-append "--config=" #$config-file))
+                            #~()))
+               #:user "hpcguix-web"
+               #:group "hpcguix-web"
+               #:environment-variables
+               (list "XDG_CACHE_HOME=/var/cache/guix/web"
+                     "SSL_CERT_DIR=/etc/ssl/certs")
+               #:log-file #$%hpcguix-web-log-file))
+     (stop #~(make-kill-destructor))
+     (actions (list (shepherd-configuration-action config-file))))))
 
 (define hpcguix-web-service-type
   (service-type



reply via email to

[Prev in Thread] Current Thread [Next in Thread]