emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#54845: closed ([PATCH] shepherd: Add #:supplementary-groups.)


From: GNU bug Tracking System
Subject: bug#54845: closed ([PATCH] shepherd: Add #:supplementary-groups.)
Date: Tue, 12 Apr 2022 21:42:01 +0000

Your message dated Tue, 12 Apr 2022 23:40:58 +0200
with message-id <87y20aask5.fsf@gnu.org>
and subject line Re: bug#54845: [PATCH] shepherd: Add #:supplementary-groups.
has caused the debbugs.gnu.org bug report #54845,
regarding [PATCH] shepherd: Add #:supplementary-groups.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54845: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54845
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] shepherd: Add #:supplementary-groups. Date: Mon, 11 Apr 2022 01:00:08 +0300
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(-)

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
@@ -1,6 +1,7 @@
 ;;; 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.
      pid)))
 
-(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
+                                                     (environ)))
   "Like 'exec-command', but first restore signal handles modified by
 shepherd (PID 1)."
   ;; First restore the default handlers.
@@ -135,6 +137,7 @@ (define* (exec-command* command #:key user group log-file 
pid-file
   (exec-command command
                 #:user user
                 #:group group
+                #:supplementary-groups supplementary-groups
                 #:log-file log-file
                 #:directory directory
                 #:environment-variables environment-variables))
@@ -146,6 +149,7 @@ (define* (make-forkexec-constructor/container command
                                               (mappings '())
                                               (user #f)
                                               (group #f)
+                                              (supplementary-groups '())
                                               (log-file #f)
                                               pid-file
                                               (pid-file-timeout 5)
@@ -192,6 +196,8 @@ (define mounts
                                 (exec-command* command
                                                #:user user
                                                #:group group
+                                               #:supplementary-groups
+                                               supplementary-groups
                                                #:pid-file pid-file
                                                #:log-file log-file
                                                #:directory directory
-- 
2.34.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#54845: [PATCH] shepherd: Add #:supplementary-groups. Date: Tue, 12 Apr 2022 23:40:58 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi,

Leo Nikkilä <hello@lnikki.la> skribis:

> 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'.

Applied, thanks!

Ludo’.


--- End Message ---

reply via email to

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