aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-01-23 17:01:07 -0500
committerMark H Weaver <mhw@netris.org>2018-01-23 17:01:07 -0500
commita102d359a68ce7219a1880e47dd6f9332cbbce3a (patch)
treed879e718f08d776ad84c456c91a349e59941d1f2 /gnu/services
parent07b8ea841e1e2eda5b367f35cf68d23d0520cc4d (diff)
parentf3a13a21e50fa3751fc39e5768ea6843bfc19df2 (diff)
downloadpatches-a102d359a68ce7219a1880e47dd6f9332cbbce3a.tar
patches-a102d359a68ce7219a1880e47dd6f9332cbbce3a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/herd.scm9
-rw-r--r--gnu/services/shepherd.scm36
-rw-r--r--gnu/services/version-control.scm6
3 files changed, 30 insertions, 21 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 5c894af6fd..d882c232cf 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -83,7 +83,12 @@ return the socket."
(define-syntax-rule (with-shepherd connection body ...)
"Evaluate BODY... with CONNECTION bound to an open socket to PID 1."
(let ((connection (open-connection)))
- body ...))
+ (dynamic-wind
+ (const #t)
+ (lambda ()
+ body ...)
+ (lambda ()
+ (close-port connection)))))
(define-condition-type &shepherd-error &error
shepherd-error?)
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 7281746ab2..f7c6983cb0 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
@@ -66,7 +66,7 @@
(define (shepherd-boot-gexp services)
- (mlet %store-monad ((shepherd-conf (shepherd-configuration-file services)))
+ (with-monad %store-monad
(return #~(begin
;; Keep track of the booted system.
(false-if-exception (delete-file "/run/booted-system"))
@@ -84,7 +84,8 @@
;; Start shepherd.
(execl #$(file-append shepherd "/bin/shepherd")
- "shepherd" "--config" #$shepherd-conf)))))
+ "shepherd" "--config"
+ #$(shepherd-configuration-file services))))))
(define shepherd-root-service-type
(service-type
@@ -203,25 +204,24 @@ stored."
(define (shepherd-service-file service)
"Return a file defining SERVICE."
- (gexp->file (shepherd-service-file-name service)
- (with-imported-modules %default-imported-modules
- #~(begin
- (use-modules #$@(shepherd-service-modules service))
-
- (make <service>
- #:docstring '#$(shepherd-service-documentation service)
- #:provides '#$(shepherd-service-provision service)
- #:requires '#$(shepherd-service-requirement service)
- #:respawn? '#$(shepherd-service-respawn? service)
- #:start #$(shepherd-service-start service)
- #:stop #$(shepherd-service-stop service))))))
+ (scheme-file (shepherd-service-file-name service)
+ (with-imported-modules %default-imported-modules
+ #~(begin
+ (use-modules #$@(shepherd-service-modules service))
+
+ (make <service>
+ #:docstring '#$(shepherd-service-documentation service)
+ #:provides '#$(shepherd-service-provision service)
+ #:requires '#$(shepherd-service-requirement service)
+ #:respawn? '#$(shepherd-service-respawn? service)
+ #:start #$(shepherd-service-start service)
+ #:stop #$(shepherd-service-stop service))))))
(define (shepherd-configuration-file services)
"Return the shepherd configuration file for SERVICES."
(assert-valid-graph services)
- (mlet %store-monad ((files (mapm %store-monad
- shepherd-service-file services)))
+ (let ((files (map shepherd-service-file services)))
(define config
#~(begin
(use-modules (srfi srfi-34)
@@ -252,7 +252,7 @@ stored."
(filter shepherd-service-auto-start?
services)))))))
- (gexp->file "shepherd.conf" config)))
+ (scheme-file "shepherd.conf" config)))
(define* (shepherd-service-lookup-procedure services
#:optional
diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm
index 6bf656949a..7166ed3d4f 100644
--- a/gnu/services/version-control.scm
+++ b/gnu/services/version-control.scm
@@ -263,7 +263,11 @@ access to exported repositories under @file{/srv/git}."
(list (service-extension activation-service-type
cgit-activation)
(service-extension nginx-service-type
- cgit-configuration-nginx-config)))
+ cgit-configuration-nginx-config)
+
+ ;; Make sure fcgiwrap is instantiated.
+ (service-extension fcgiwrap-service-type
+ (const #t))))
(default-value (cgit-configuration))
(description
"Run the Cgit web interface, which allows users to browse Git