summaryrefslogtreecommitdiff
path: root/gnu/build/shepherd.scm
diff options
context:
space:
mode:
authorLeo Nikkilä <hello@lnikki.la>2022-04-11 01:00:08 +0300
committerLudovic Courtès <ludo@gnu.org>2022-04-12 23:40:44 +0200
commite1f0c88ea221d846b5a533c4dc88e99e953af63e (patch)
tree98bbfe52dc1ae54ad483d04e3ce5ad005e944bb1 /gnu/build/shepherd.scm
parent8805c7eab1d375846dd648065979d8d1a062f176 (diff)
shepherd: Add #:supplementary-groups.
To support the argument introduced in Shepherd 0.9.0 when defining container-bound services. * gnu/build/shepherd.scm (exec-command*) (make-forkexec-constructor/container): Add '#:supplementary-groups'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/build/shepherd.scm')
-rw-r--r--gnu/build/shepherd.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index 595db40f2e1..d52e53eb78c 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -1,6 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org> 3;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
4;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
4;;; 5;;;
5;;; This file is part of GNU Guix. 6;;; This file is part of GNU Guix.
6;;; 7;;;
@@ -120,6 +121,7 @@ separate mount and PID name space. Return the \"outer\" PID. "
120 pid))) 121 pid)))
121 122
122(define* (exec-command* command #:key user group log-file pid-file 123(define* (exec-command* command #:key user group log-file pid-file
124 (supplementary-groups '())
123 (directory "/") (environment-variables (environ))) 125 (directory "/") (environment-variables (environ)))
124 "Like 'exec-command', but first restore signal handles modified by 126 "Like 'exec-command', but first restore signal handles modified by
125shepherd (PID 1)." 127shepherd (PID 1)."
@@ -135,6 +137,7 @@ shepherd (PID 1)."
135 (exec-command command 137 (exec-command command
136 #:user user 138 #:user user
137 #:group group 139 #:group group
140 #:supplementary-groups supplementary-groups
138 #:log-file log-file 141 #:log-file log-file
139 #:directory directory 142 #:directory directory
140 #:environment-variables environment-variables)) 143 #:environment-variables environment-variables))
@@ -146,6 +149,7 @@ shepherd (PID 1)."
146 (mappings '()) 149 (mappings '())
147 (user #f) 150 (user #f)
148 (group #f) 151 (group #f)
152 (supplementary-groups '())
149 (log-file #f) 153 (log-file #f)
150 pid-file 154 pid-file
151 (pid-file-timeout 5) 155 (pid-file-timeout 5)
@@ -192,6 +196,8 @@ namespace, in addition to essential bind-mounts such /proc."
192 (exec-command* command 196 (exec-command* command
193 #:user user 197 #:user user
194 #:group group 198 #:group group
199 #:supplementary-groups
200 supplementary-groups
195 #:pid-file pid-file 201 #:pid-file pid-file
196 #:log-file log-file 202 #:log-file log-file
197 #:directory directory 203 #:directory directory