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'.
gnu/build/shepherd.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Toggle diff (51 lines)
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index 0627bac5b9..384faa55f4 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Mathieu Othacehe <othacehe@gnu.org>
+;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
;;; This file is part of GNU Guix.
@@ -119,8 +120,9 @@ (define* (read-pid-file/container pid pid-file #:key (max-delay 5))
;; PID is always 1, but that's not what Shepherd needs to know.
-(define* (exec-command* command #:key user group log-file pid-file
- directory (environment-variables (environ)))
+(define* (exec-command* command #:key user group (supplementary-groups '())
+ log-file pid-file directory (environment-variables
"Like 'exec-command', but first restore signal handles modified by
;; First restore the default handlers.
@@ -135,6 +137,7 @@ (define* (exec-command* command #:key user group log-file pid-file
+ #:supplementary-groups supplementary-groups
#:environment-variables environment-variables))
@@ -146,6 +149,7 @@ (define* (make-forkexec-constructor/container command
+ (supplementary-groups '())
@@ -192,6 +196,8 @@ (define mounts