guix-commits
[Top][All Lists]
Advanced

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

04/05: services: guix-publish: Use ‘make-systemd-constructor’ unconditio


From: guix-commits
Subject: 04/05: services: guix-publish: Use ‘make-systemd-constructor’ unconditionally.
Date: Thu, 21 Mar 2024 12:47:06 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit a2077e5beed8956406bd16c1dd42796e75ed48ae
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Mar 21 16:24:29 2024 +0100

    services: guix-publish: Use ‘make-systemd-constructor’ unconditionally.
    
    The #:lazy-start? parameter was added in the Shepherd 0.10.0, which is
    required since commit 477d4f7d241165b5a5fd315c27efd7803fad4a04.
    
    * gnu/services/base.scm (guix-publish-shepherd-service): Use
    ‘make-systemd-constructor’ unconditionally and pass #:lazy-start?.
    
    Change-Id: I95aa079732cd21e32091c7deea2ed2f1bc50f2f2
---
 gnu/services/base.scm | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 60388a22dd..4c3821d4e3 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015, 2016, 2020 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
@@ -2174,15 +2174,10 @@ raise a deprecation warning if the 'compression-level' 
field was used."
 
              ;; Use lazy socket activation unless ADVERTISE? is true: in that
              ;; case the process should start right away to advertise itself.
-             (start #~(if (and (defined? 'make-systemd-constructor) ;> 0.9.0?
-                               #$(not advertise?))
-                          (make-systemd-constructor
-                           #$command #$endpoints #$@options)
-                          (make-forkexec-constructor #$command #$@options)))
-             (stop #~(if (and (defined? 'make-systemd-destructor)
-                              #$(not advertise?))
-                         (make-systemd-destructor)
-                         (make-kill-destructor))))))))
+             (start #~(make-systemd-constructor
+                       #$command #$endpoints #$@options
+                       #:lazy-start? #$(not advertise?)))
+             (stop #~(make-systemd-destructor)))))))
 
 (define %guix-publish-accounts
   (list (user-group (name "guix-publish") (system? #t))



reply via email to

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