all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
@ 2021-01-22 19:57 Maxime Devos
  2021-01-23  8:25 ` Leo Prikler
  2021-01-25  8:48 ` Maxime Devos
  0 siblings, 2 replies; 13+ messages in thread
From: Maxime Devos @ 2021-01-22 19:57 UTC (permalink / raw)
  To: 46043, maximedevos


[-- Attachment #1.1: Type: text/plain, Size: 468 bytes --]

[previous e-mail was bogus. ggrr emacs, why can't I open e-mail
I was composing and saved with C-x C-f and continue later,
even if I set mml-mode]

Hi Guix,

If I didn't miss anything, this patch allows for booting with a non-standard
shepherd package, which may be useful for using features from a not-yet
released shepherd (presuming you've packaged the custom shepherd first :)).

I'll send a follow-up e-mail to confirm/disconfirm whether this works
well.

Maxime

[-- Attachment #1.2: the patch --]
[-- Type: text/x-patch, Size: 6550 bytes --]

From e4f6743a5502eb6c878ee2c3bf7f7153f8006e01 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 22 Jan 2021 20:06:55 +0100
Subject: [PATCH] services: shepherd: allow custom 'shepherd' package

* gnu/services/shepherd.scm
  (<shepherd-configuration>): New record.
  (shepherd-boot-gexp, shepherd-root-service-type): Use it.
  (scm->go, shepherd-configuration-file): Allow passing custom
  shepherd package.
* doc/guix.texi (Shepherd Services). Document it.
---
 doc/guix.texi             | 17 +++++++++++++-
 gnu/services/shepherd.scm | 48 +++++++++++++++++++++++++++++----------
 2 files changed, 52 insertions(+), 13 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index a765b3792e..344ffcfea5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32707,9 +32707,24 @@ The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
 
 This is the service type that extensions target when they want to create
 shepherd services (@pxref{Service Types and Services}, for an example).
-Each extension must pass a list of @code{<shepherd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}. Its
+value must be a @code{shepherd-configuration}, as described below:
 @end defvr
 
+@deftp {Data Type} shepherd-configuration
+This data type represents shepherd's configuration.
+
+@table @code
+@item shepherd (default: @code{shepherd})
+The shepherd package to use.
+
+@item services (default: @code{'()})
+A list of @code{<shepherd-service>} to start.
+You should probably use the service extension
+mechanism instead (@pxref{Shepherd Services}).
+@end table
+@end deftp
+
 @defvr {Scheme Variable} %shepherd-root-service
 This service represents PID@tie{}1.
 @end defvr
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d2f9776288..748b19957a 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,12 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:export (shepherd-root-service-type
+  #:export (shepherd-configuration
+            shepherd-configuration?
+            shepherd-configuration-shepherd
+            shepherd-configuration-services
+
+            shepherd-root-service-type
             %shepherd-root-service
             shepherd-service-type
 
@@ -76,7 +82,18 @@
 ;;; Code:
 
 
-(define (shepherd-boot-gexp services)
+(define-record-type* <shepherd-configuration>
+  shepherd-configuration make-shepherd-configuration
+  shepherd-configuration?
+  (shepherd shepherd-configuration-shepherd
+            (default shepherd)) ; package
+  (services shepherd-configuration-services
+            (default '()))) ; list of <shepherd-service>
+
+(define (shepherd-boot-gexp config)
+  "Return a gexp starting the shepherd service."
+  (let ((shepherd (shepherd-configuration-shepherd config))
+        (services (shepherd-configuration-services config)))
   #~(begin
       ;; Keep track of the booted system.
       (false-if-exception (delete-file "/run/booted-system"))
@@ -95,7 +112,7 @@
       ;; Start shepherd.
       (execl #$(file-append shepherd "/bin/shepherd")
              "shepherd" "--config"
-             #$(shepherd-configuration-file services))))
+             #$(shepherd-configuration-file services #:shepherd shepherd)))))
 
 (define shepherd-root-service-type
   (service-type
@@ -103,20 +120,25 @@
    ;; Extending the root shepherd service (aka. PID 1) happens by
    ;; concatenating the list of services provided by the extensions.
    (compose concatenate)
-   (extend append)
+   (extend (lambda (config extra-services)
+             (shepherd-configuration
+               (inherit config)
+               (services (append (shepherd-configuration-services config)
+                                 extra-services)))))
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
                                         (const (list shepherd)))))
+   (default-value (shepherd-configuration))
    (description
     "Run the GNU Shepherd as PID 1---i.e., the operating system's first
 process.  The Shepherd takes care of managing services such as daemons by
 ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
-  ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
-  ;; <shepherd-service> objects.
-  (service shepherd-root-service-type '()))
+  ;; The root shepherd service, aka. PID 1.  Its parameter is a
+  ;; <shepherd-configuration>.
+  (service shepherd-root-service-type))
 
 (define-syntax shepherd-service-type
   (syntax-rules (description)
@@ -270,9 +292,9 @@ stored."
                                    #~(#$name #$doc #$proc)))
                                 (shepherd-service-actions service))))))))
 
-(define (scm->go file)
+(define* (scm->go file #:key (shepherd shepherd))
   "Compile FILE, which contains code to be loaded by shepherd's config file,
-and return the resulting '.go' file."
+and return the resulting '.go' file. SHEPHERD is used as shepherd package."
   (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
@@ -294,11 +316,13 @@ and return the resulting '.go' file."
                      #:options '(#:local-build? #t
                                  #:substitutable? #f)))))
 
-(define (shepherd-configuration-file services)
-  "Return the shepherd configuration file for SERVICES."
+(define* (shepherd-configuration-file services #:key (shepherd shepherd))
+  "Return the shepherd configuration file for SERVICES. SHEPHERD is used
+as shepherd package."
   (assert-valid-graph services)
 
-  (let ((files (map shepherd-service-file services)))
+  (let ((files (map shepherd-service-file services))
+        (scm->go (cute scm->go <> #:shepherd shepherd)))
     (define config
       #~(begin
           (use-modules (srfi srfi-34)
-- 
2.30.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-22 19:57 [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed) Maxime Devos
@ 2021-01-23  8:25 ` Leo Prikler
  2021-01-23 15:11   ` Maxime Devos
  2021-01-25  8:48 ` Maxime Devos
  1 sibling, 1 reply; 13+ messages in thread
From: Leo Prikler @ 2021-01-23  8:25 UTC (permalink / raw)
  To: Maxime Devos, 46043

Hi Maxime,

Am Freitag, den 22.01.2021, 20:57 +0100 schrieb Maxime Devos:
>     (compose concatenate)
> -   (extend append)
> +   (extend (lambda (config extra-services)
> +             (shepherd-configuration
> +               (inherit config)
> +               (services (append (shepherd-configuration-services
> config)
> +                                 extra-services)))))
I think you should also patch compose or drop it.  I sadly don't know,
what impact that would have, but IIUC you should only spawn one
shepherd-root-service anyway.

Regards,
Leo







^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-23  8:25 ` Leo Prikler
@ 2021-01-23 15:11   ` Maxime Devos
  2021-01-23 15:25     ` Leo Prikler
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2021-01-23 15:11 UTC (permalink / raw)
  To: Leo Prikler, 46043

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Hi Leo,
On Sat, 2021-01-23 at 09:25 +0100, Leo Prikler wrote:
> Hi Maxime,
> 
> Am Freitag, den 22.01.2021, 20:57 +0100 schrieb Maxime Devos:
> >     (compose concatenate)
> > -   (extend append)
> > +   (extend (lambda (config extra-services)
> > +             (shepherd-configuration
> > +               (inherit config)
> > +               (services (append (shepherd-configuration-services
> > config)
> > +                                 extra-services)))))
> I think you should also patch compose or drop it.  I sadly don't know,
> what impact that would have, but IIUC you should only spawn one
> shepherd-root-service anyway.

Only one shepherd-root-service-type should be spawned, correct.
In practice, this means you'll need to use a construct like this
(if I didn't make any errors):

  (modify-services %base-services
    (shepherd-root-service-type c =>
      (shepherd-configuration
        (inherit c)
        (shepherd a-custom-shepherd))))

For clarification: shepherd services should be added
via the service-extension mechanism, not by
manually changing the 'services' field
(though the latter is a possibility now).

About compose and concatenate: I think it is correct as-is.
If compose is dropped, then shepherd-root-service-type wouldn't be
extensible anymore. I don't see how it could be patched
in a way that makes sense.

Compare with udev-service-type as described in the manual,
which follows the same structure.

Regards,
Maxime
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-23 15:11   ` Maxime Devos
@ 2021-01-23 15:25     ` Leo Prikler
  0 siblings, 0 replies; 13+ messages in thread
From: Leo Prikler @ 2021-01-23 15:25 UTC (permalink / raw)
  To: 46043; +Cc: Maxime Devos

Hi,

Am Samstag, den 23.01.2021, 16:11 +0100 schrieb Maxime Devos:
> [...]
> 
> About compose and concatenate: I think it is correct as-is.
> If compose is dropped, then shepherd-root-service-type wouldn't be
> extensible anymore. I don't see how it could be patched
> in a way that makes sense.
Ahh, my bad.  It seems I don't have a strong enough understanding of
the difference between compose and extend yet.  Nvm then.

Regards,
Leo






^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-22 19:57 [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed) Maxime Devos
  2021-01-23  8:25 ` Leo Prikler
@ 2021-01-25  8:48 ` Maxime Devos
  2021-01-26 20:49   ` Ludovic Courtès
  1 sibling, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2021-01-25  8:48 UTC (permalink / raw)
  To: 46043; +Cc: Maxime Devos


[-- Attachment #1.1: Type: text/plain, Size: 128 bytes --]

Version 2 of the patch is attached. This version also uses
the custom package for /run/current-system/profile/bin/shepherd.


[-- Attachment #1.2: 0001-services-shepherd-allow-custom-shepherd-package.patch --]
[-- Type: text/x-patch, Size: 6529 bytes --]

From b3102f72cd66dee4442596d89e29900b8215e1be Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 22 Jan 2021 20:06:55 +0100
Subject: [PATCH] services: shepherd: allow custom 'shepherd' package

* gnu/services/shepherd.scm
  (<shepherd-configuration>): New record.
  (shepherd-boot-gexp, shepherd-root-service-type): Use it.
  (scm->go, shepherd-configuration-file): Allow passing custom
  shepherd package.
* doc/guix.texi (Shepherd Services). Document it.
---
 doc/guix.texi             | 17 ++++++++++++-
 gnu/services/shepherd.scm | 53 +++++++++++++++++++++++++++++----------
 2 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index a765b3792e..344ffcfea5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32707,9 +32707,24 @@ The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
 
 This is the service type that extensions target when they want to create
 shepherd services (@pxref{Service Types and Services}, for an example).
-Each extension must pass a list of @code{<shepherd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}. Its
+value must be a @code{shepherd-configuration}, as described below:
 @end defvr
 
+@deftp {Data Type} shepherd-configuration
+This data type represents shepherd's configuration.
+
+@table @code
+@item shepherd (default: @code{shepherd})
+The shepherd package to use.
+
+@item services (default: @code{'()})
+A list of @code{<shepherd-service>} to start.
+You should probably use the service extension
+mechanism instead (@pxref{Shepherd Services}).
+@end table
+@end deftp
+
 @defvr {Scheme Variable} %shepherd-root-service
 This service represents PID@tie{}1.
 @end defvr
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d2f9776288..14a6aa14db 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,12 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:export (shepherd-root-service-type
+  #:export (shepherd-configuration
+            shepherd-configuration?
+            shepherd-configuration-shepherd
+            shepherd-configuration-services
+
+            shepherd-root-service-type
             %shepherd-root-service
             shepherd-service-type
 
@@ -76,7 +82,18 @@
 ;;; Code:
 
 
-(define (shepherd-boot-gexp services)
+(define-record-type* <shepherd-configuration>
+  shepherd-configuration make-shepherd-configuration
+  shepherd-configuration?
+  (shepherd shepherd-configuration-shepherd
+            (default shepherd)) ; package
+  (services shepherd-configuration-services
+            (default '()))) ; list of <shepherd-service>
+
+(define (shepherd-boot-gexp config)
+  "Return a gexp starting the shepherd service."
+  (let ((shepherd (shepherd-configuration-shepherd config))
+        (services (shepherd-configuration-services config)))
   #~(begin
       ;; Keep track of the booted system.
       (false-if-exception (delete-file "/run/booted-system"))
@@ -95,7 +112,10 @@
       ;; Start shepherd.
       (execl #$(file-append shepherd "/bin/shepherd")
              "shepherd" "--config"
-             #$(shepherd-configuration-file services))))
+             #$(shepherd-configuration-file services #:shepherd shepherd)))))
+
+(define shepherd-packages
+  (compose list shepherd-configuration-shepherd))
 
 (define shepherd-root-service-type
   (service-type
@@ -103,20 +123,25 @@
    ;; Extending the root shepherd service (aka. PID 1) happens by
    ;; concatenating the list of services provided by the extensions.
    (compose concatenate)
-   (extend append)
+   (extend (lambda (config extra-services)
+             (shepherd-configuration
+               (inherit config)
+               (services (append (shepherd-configuration-services config)
+                                 extra-services)))))
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
-                                        (const (list shepherd)))))
+                                        shepherd-packages)))
+   (default-value (shepherd-configuration))
    (description
     "Run the GNU Shepherd as PID 1---i.e., the operating system's first
 process.  The Shepherd takes care of managing services such as daemons by
 ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
-  ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
-  ;; <shepherd-service> objects.
-  (service shepherd-root-service-type '()))
+  ;; The root shepherd service, aka. PID 1.  Its parameter is a
+  ;; <shepherd-configuration>.
+  (service shepherd-root-service-type))
 
 (define-syntax shepherd-service-type
   (syntax-rules (description)
@@ -270,9 +295,9 @@ stored."
                                    #~(#$name #$doc #$proc)))
                                 (shepherd-service-actions service))))))))
 
-(define (scm->go file)
+(define* (scm->go file #:key (shepherd shepherd))
   "Compile FILE, which contains code to be loaded by shepherd's config file,
-and return the resulting '.go' file."
+and return the resulting '.go' file. SHEPHERD is used as shepherd package."
   (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
@@ -294,11 +319,13 @@ and return the resulting '.go' file."
                      #:options '(#:local-build? #t
                                  #:substitutable? #f)))))
 
-(define (shepherd-configuration-file services)
-  "Return the shepherd configuration file for SERVICES."
+(define* (shepherd-configuration-file services #:key (shepherd shepherd))
+  "Return the shepherd configuration file for SERVICES. SHEPHERD is used
+as shepherd package."
   (assert-valid-graph services)
 
-  (let ((files (map shepherd-service-file services)))
+  (let ((files (map shepherd-service-file services))
+        (scm->go (cute scm->go <> #:shepherd shepherd)))
     (define config
       #~(begin
           (use-modules (srfi srfi-34)
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-25  8:48 ` Maxime Devos
@ 2021-01-26 20:49   ` Ludovic Courtès
  2021-01-27 13:24     ` Maxime Devos
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2021-01-26 20:49 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46043

Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

> Version 2 of the patch is attached. This version also uses
> the custom package for /run/current-system/profile/bin/shepherd.
>
> From b3102f72cd66dee4442596d89e29900b8215e1be Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 22 Jan 2021 20:06:55 +0100
> Subject: [PATCH] services: shepherd: allow custom 'shepherd' package
>
> * gnu/services/shepherd.scm
>   (<shepherd-configuration>): New record.
>   (shepherd-boot-gexp, shepherd-root-service-type): Use it.
>   (scm->go, shepherd-configuration-file): Allow passing custom
>   shepherd package.
> * doc/guix.texi (Shepherd Services). Document it.

Nice!  Overall LGTM.  Nitpicking:

>  shepherd services (@pxref{Service Types and Services}, for an example).
> -Each extension must pass a list of @code{<shepherd-service>}.
> +Each extension must pass a list of @code{<shepherd-service>}. Its

Please leave two spaces after end-of-sentence periods.

> +value must be a @code{shepherd-configuration}, as described below:

End with period rather than colon.

> +@deftp {Data Type} shepherd-configuration
> +This data type represents shepherd's configuration.

s/shepherd/the Shepherd/ (referring to the software).

> +@table @code
> +@item shepherd (default: @code{shepherd})
> +The shepherd package to use.

“Shepherd” (capitalized).

> +(define* (scm->go file #:key (shepherd shepherd))

[...]

> +(define* (shepherd-configuration-file services #:key (shepherd shepherd))

I’d made the second argument compulsory instead of a keyword parameter.

That’s all.  Could you send an updated patch?

Thanks for addressing this longstanding shortcoming!

Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-26 20:49   ` Ludovic Courtès
@ 2021-01-27 13:24     ` Maxime Devos
  2021-01-27 23:09       ` bug#46043: " Ludovic Courtès
  2021-01-27 23:15       ` [bug#46043] " Ludovic Courtès
  0 siblings, 2 replies; 13+ messages in thread
From: Maxime Devos @ 2021-01-27 13:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46043


[-- Attachment #1.1: Type: text/plain, Size: 68 bytes --]

> That’s all.  Could you send an updated patch?
See attachment.

[-- Attachment #1.2: does anyone ever read these descriptions? --]
[-- Type: text/x-patch, Size: 6477 bytes --]

From 1b1e49f4aad95b766126fadd4166acf5ab6fbd31 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 22 Jan 2021 20:06:55 +0100
Subject: [PATCH] services: shepherd: allow custom 'shepherd' package

* gnu/services/shepherd.scm
  (<shepherd-configuration>): New record.
  (shepherd-boot-gexp, shepherd-root-service-type): Use it.
  (scm->go, shepherd-configuration-file): Allow passing custom
  shepherd package.
* doc/guix.texi (Shepherd Services). Document it.
---
 doc/guix.texi             | 17 ++++++++++++-
 gnu/services/shepherd.scm | 53 +++++++++++++++++++++++++++++----------
 2 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2249583e46..9d9e60aefb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32735,9 +32735,24 @@ The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
 
 This is the service type that extensions target when they want to create
 shepherd services (@pxref{Service Types and Services}, for an example).
-Each extension must pass a list of @code{<shepherd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}.  Its
+value must be a @code{shepherd-configuration}, as described below.
 @end defvr
 
+@deftp {Data Type} shepherd-configuration
+This data type represents the Shepherd's configuration.
+
+@table @code
+@item shepherd (default: @code{shepherd})
+The Shepherd package to use.
+
+@item services (default: @code{'()})
+A list of @code{<shepherd-service>} to start.
+You should probably use the service extension
+mechanism instead (@pxref{Shepherd Services}).
+@end table
+@end deftp
+
 @defvr {Scheme Variable} %shepherd-root-service
 This service represents PID@tie{}1.
 @end defvr
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d2f9776288..e2ec59f5aa 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,12 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:export (shepherd-root-service-type
+  #:export (shepherd-configuration
+            shepherd-configuration?
+            shepherd-configuration-shepherd
+            shepherd-configuration-services
+
+            shepherd-root-service-type
             %shepherd-root-service
             shepherd-service-type
 
@@ -76,7 +82,18 @@
 ;;; Code:
 
 
-(define (shepherd-boot-gexp services)
+(define-record-type* <shepherd-configuration>
+  shepherd-configuration make-shepherd-configuration
+  shepherd-configuration?
+  (shepherd shepherd-configuration-shepherd
+            (default shepherd)) ; package
+  (services shepherd-configuration-services
+            (default '()))) ; list of <shepherd-service>
+
+(define (shepherd-boot-gexp config)
+  "Return a gexp starting the shepherd service."
+  (let ((shepherd (shepherd-configuration-shepherd config))
+        (services (shepherd-configuration-services config)))
   #~(begin
       ;; Keep track of the booted system.
       (false-if-exception (delete-file "/run/booted-system"))
@@ -95,7 +112,10 @@
       ;; Start shepherd.
       (execl #$(file-append shepherd "/bin/shepherd")
              "shepherd" "--config"
-             #$(shepherd-configuration-file services))))
+             #$(shepherd-configuration-file services shepherd)))))
+
+(define shepherd-packages
+  (compose list shepherd-configuration-shepherd))
 
 (define shepherd-root-service-type
   (service-type
@@ -103,20 +123,25 @@
    ;; Extending the root shepherd service (aka. PID 1) happens by
    ;; concatenating the list of services provided by the extensions.
    (compose concatenate)
-   (extend append)
+   (extend (lambda (config extra-services)
+             (shepherd-configuration
+               (inherit config)
+               (services (append (shepherd-configuration-services config)
+                                 extra-services)))))
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
-                                        (const (list shepherd)))))
+                                        shepherd-packages)))
+   (default-value (shepherd-configuration))
    (description
     "Run the GNU Shepherd as PID 1---i.e., the operating system's first
 process.  The Shepherd takes care of managing services such as daemons by
 ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
-  ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
-  ;; <shepherd-service> objects.
-  (service shepherd-root-service-type '()))
+  ;; The root shepherd service, aka. PID 1.  Its parameter is a
+  ;; <shepherd-configuration>.
+  (service shepherd-root-service-type))
 
 (define-syntax shepherd-service-type
   (syntax-rules (description)
@@ -270,9 +295,9 @@ stored."
                                    #~(#$name #$doc #$proc)))
                                 (shepherd-service-actions service))))))))
 
-(define (scm->go file)
+(define (scm->go file shepherd)
   "Compile FILE, which contains code to be loaded by shepherd's config file,
-and return the resulting '.go' file."
+and return the resulting '.go' file. SHEPHERD is used as shepherd package."
   (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
@@ -294,11 +319,13 @@ and return the resulting '.go' file."
                      #:options '(#:local-build? #t
                                  #:substitutable? #f)))))
 
-(define (shepherd-configuration-file services)
-  "Return the shepherd configuration file for SERVICES."
+(define (shepherd-configuration-file services shepherd)
+  "Return the shepherd configuration file for SERVICES.  SHEPHERD is used
+as shepherd package."
   (assert-valid-graph services)
 
-  (let ((files (map shepherd-service-file services)))
+  (let ((files (map shepherd-service-file services))
+        (scm->go (cute scm->go <> shepherd)))
     (define config
       #~(begin
           (use-modules (srfi srfi-34)
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* bug#46043: [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-27 13:24     ` Maxime Devos
@ 2021-01-27 23:09       ` Ludovic Courtès
  2021-01-27 23:15       ` [bug#46043] " Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2021-01-27 23:09 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46043-done

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> From 1b1e49f4aad95b766126fadd4166acf5ab6fbd31 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 22 Jan 2021 20:06:55 +0100
> Subject: [PATCH] services: shepherd: allow custom 'shepherd' package
>
> * gnu/services/shepherd.scm
>   (<shepherd-configuration>): New record.
>   (shepherd-boot-gexp, shepherd-root-service-type): Use it.
>   (scm->go, shepherd-configuration-file): Allow passing custom
>   shepherd package.
> * doc/guix.texi (Shepherd Services). Document it.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-27 13:24     ` Maxime Devos
  2021-01-27 23:09       ` bug#46043: " Ludovic Courtès
@ 2021-01-27 23:15       ` Ludovic Courtès
  2021-01-28  8:20         ` Maxime Devos
  1 sibling, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2021-01-27 23:15 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46043

Maxime Devos <maximedevos@telenet.be> skribis:

> From 1b1e49f4aad95b766126fadd4166acf5ab6fbd31 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 22 Jan 2021 20:06:55 +0100
> Subject: [PATCH] services: shepherd: allow custom 'shepherd' package
>
> * gnu/services/shepherd.scm
>   (<shepherd-configuration>): New record.
>   (shepherd-boot-gexp, shepherd-root-service-type): Use it.
>   (scm->go, shepherd-configuration-file): Allow passing custom
>   shepherd package.
> * doc/guix.texi (Shepherd Services). Document it.

Oops, I spoke too fast: “make check-system TESTS=basic” shows one
problem, which stems from this:

--8<---------------cut here---------------start------------->8---
(define (operating-system-shepherd-service-names os)
  "Return the list of Shepherd service names for OS."
  (append-map shepherd-service-provision
              (service-value
               (fold-services (operating-system-services os)
                              #:target-type
                              shepherd-root-service-type))))
--8<---------------cut here---------------end--------------->8---

This procedure needs to be adjusted because the value of
‘shepherd-root-service-type’ instances is no longer a list of
<shepherd-service>.

I suspect ‘guix system search’ and ‘guix system shepherd-graph’ are
affected as well, though I didn’t check (“make check” should catch it, I
think.)

Could you take a look?

TIA,
Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-27 23:15       ` [bug#46043] " Ludovic Courtès
@ 2021-01-28  8:20         ` Maxime Devos
  2021-01-28 13:18           ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2021-01-28  8:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46043


[-- Attachment #1.1: Type: text/plain, Size: 152 bytes --]

> Could you take a look?
Revised patch is attached.
'make check-system TESTS=basic' now succeeds, I'm now
running 'make check-system' just in case.

[-- Attachment #1.2: 0001-services-shepherd-allow-custom-shepherd-package.patch --]
[-- Type: text/x-patch, Size: 6477 bytes --]

From 1b1e49f4aad95b766126fadd4166acf5ab6fbd31 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 22 Jan 2021 20:06:55 +0100
Subject: [PATCH] services: shepherd: allow custom 'shepherd' package

* gnu/services/shepherd.scm
  (<shepherd-configuration>): New record.
  (shepherd-boot-gexp, shepherd-root-service-type): Use it.
  (scm->go, shepherd-configuration-file): Allow passing custom
  shepherd package.
* doc/guix.texi (Shepherd Services). Document it.
---
 doc/guix.texi             | 17 ++++++++++++-
 gnu/services/shepherd.scm | 53 +++++++++++++++++++++++++++++----------
 2 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2249583e46..9d9e60aefb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32735,9 +32735,24 @@ The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
 
 This is the service type that extensions target when they want to create
 shepherd services (@pxref{Service Types and Services}, for an example).
-Each extension must pass a list of @code{<shepherd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}.  Its
+value must be a @code{shepherd-configuration}, as described below.
 @end defvr
 
+@deftp {Data Type} shepherd-configuration
+This data type represents the Shepherd's configuration.
+
+@table @code
+@item shepherd (default: @code{shepherd})
+The Shepherd package to use.
+
+@item services (default: @code{'()})
+A list of @code{<shepherd-service>} to start.
+You should probably use the service extension
+mechanism instead (@pxref{Shepherd Services}).
+@end table
+@end deftp
+
 @defvr {Scheme Variable} %shepherd-root-service
 This service represents PID@tie{}1.
 @end defvr
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d2f9776288..e2ec59f5aa 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,12 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:export (shepherd-root-service-type
+  #:export (shepherd-configuration
+            shepherd-configuration?
+            shepherd-configuration-shepherd
+            shepherd-configuration-services
+
+            shepherd-root-service-type
             %shepherd-root-service
             shepherd-service-type
 
@@ -76,7 +82,18 @@
 ;;; Code:
 
 
-(define (shepherd-boot-gexp services)
+(define-record-type* <shepherd-configuration>
+  shepherd-configuration make-shepherd-configuration
+  shepherd-configuration?
+  (shepherd shepherd-configuration-shepherd
+            (default shepherd)) ; package
+  (services shepherd-configuration-services
+            (default '()))) ; list of <shepherd-service>
+
+(define (shepherd-boot-gexp config)
+  "Return a gexp starting the shepherd service."
+  (let ((shepherd (shepherd-configuration-shepherd config))
+        (services (shepherd-configuration-services config)))
   #~(begin
       ;; Keep track of the booted system.
       (false-if-exception (delete-file "/run/booted-system"))
@@ -95,7 +112,10 @@
       ;; Start shepherd.
       (execl #$(file-append shepherd "/bin/shepherd")
              "shepherd" "--config"
-             #$(shepherd-configuration-file services))))
+             #$(shepherd-configuration-file services shepherd)))))
+
+(define shepherd-packages
+  (compose list shepherd-configuration-shepherd))
 
 (define shepherd-root-service-type
   (service-type
@@ -103,20 +123,25 @@
    ;; Extending the root shepherd service (aka. PID 1) happens by
    ;; concatenating the list of services provided by the extensions.
    (compose concatenate)
-   (extend append)
+   (extend (lambda (config extra-services)
+             (shepherd-configuration
+               (inherit config)
+               (services (append (shepherd-configuration-services config)
+                                 extra-services)))))
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
-                                        (const (list shepherd)))))
+                                        shepherd-packages)))
+   (default-value (shepherd-configuration))
    (description
     "Run the GNU Shepherd as PID 1---i.e., the operating system's first
 process.  The Shepherd takes care of managing services such as daemons by
 ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
-  ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
-  ;; <shepherd-service> objects.
-  (service shepherd-root-service-type '()))
+  ;; The root shepherd service, aka. PID 1.  Its parameter is a
+  ;; <shepherd-configuration>.
+  (service shepherd-root-service-type))
 
 (define-syntax shepherd-service-type
   (syntax-rules (description)
@@ -270,9 +295,9 @@ stored."
                                    #~(#$name #$doc #$proc)))
                                 (shepherd-service-actions service))))))))
 
-(define (scm->go file)
+(define (scm->go file shepherd)
   "Compile FILE, which contains code to be loaded by shepherd's config file,
-and return the resulting '.go' file."
+and return the resulting '.go' file. SHEPHERD is used as shepherd package."
   (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
@@ -294,11 +319,13 @@ and return the resulting '.go' file."
                      #:options '(#:local-build? #t
                                  #:substitutable? #f)))))
 
-(define (shepherd-configuration-file services)
-  "Return the shepherd configuration file for SERVICES."
+(define (shepherd-configuration-file services shepherd)
+  "Return the shepherd configuration file for SERVICES.  SHEPHERD is used
+as shepherd package."
   (assert-valid-graph services)
 
-  (let ((files (map shepherd-service-file services)))
+  (let ((files (map shepherd-service-file services))
+        (scm->go (cute scm->go <> shepherd)))
     (define config
       #~(begin
           (use-modules (srfi srfi-34)
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-28  8:20         ` Maxime Devos
@ 2021-01-28 13:18           ` Ludovic Courtès
  2021-01-28 16:32             ` Maxime Devos
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2021-01-28 13:18 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46043

Maxime Devos <maximedevos@telenet.be> skribis:

> Revised patch is attached.

I think that’s the same as before (there are no changes to
gnu/system.scm).  :-)

Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-28 13:18           ` Ludovic Courtès
@ 2021-01-28 16:32             ` Maxime Devos
  2021-01-30 14:36               ` bug#46043: " Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Devos @ 2021-01-28 16:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 46043


[-- Attachment #1.1: Type: text/plain, Size: 113 bytes --]

> I think that’s the same as before (there are no changes to
> gnu/system.scm).  :-)
This time for real :-)

[-- Attachment #1.2: 0001-services-shepherd-allow-custom-shepherd-package.patch --]
[-- Type: text/x-patch, Size: 7792 bytes --]

From 085708344c4a9d7f819a399e666e2bab2ae7a54d Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 22 Jan 2021 20:06:55 +0100
Subject: [PATCH] services: shepherd: allow custom 'shepherd' package

* gnu/services/shepherd.scm
  (<shepherd-configuration>): New record.
  (shepherd-boot-gexp, shepherd-root-service-type): Use it.
  (scm->go, shepherd-configuration-file): Allow passing custom
  shepherd package.
* gnu/system.scm
  (operating-system-shepherd-service-names): Use the new record.
* doc/guix.texi (Shepherd Services). Document it.
---
 doc/guix.texi             | 17 ++++++++++++-
 gnu/services/shepherd.scm | 53 +++++++++++++++++++++++++++++----------
 gnu/system.scm            | 10 +++++---
 3 files changed, 62 insertions(+), 18 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2249583e46..9d9e60aefb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32735,9 +32735,24 @@ The service type for the Shepherd ``root service''---i.e., PID@tie{}1.
 
 This is the service type that extensions target when they want to create
 shepherd services (@pxref{Service Types and Services}, for an example).
-Each extension must pass a list of @code{<shepherd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}.  Its
+value must be a @code{shepherd-configuration}, as described below.
 @end defvr
 
+@deftp {Data Type} shepherd-configuration
+This data type represents the Shepherd's configuration.
+
+@table @code
+@item shepherd (default: @code{shepherd})
+The Shepherd package to use.
+
+@item services (default: @code{'()})
+A list of @code{<shepherd-service>} to start.
+You should probably use the service extension
+mechanism instead (@pxref{Shepherd Services}).
+@end table
+@end deftp
+
 @defvr {Scheme Variable} %shepherd-root-service
 This service represents PID@tie{}1.
 @end defvr
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index d2f9776288..e2ec59f5aa 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +37,12 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:export (shepherd-root-service-type
+  #:export (shepherd-configuration
+            shepherd-configuration?
+            shepherd-configuration-shepherd
+            shepherd-configuration-services
+
+            shepherd-root-service-type
             %shepherd-root-service
             shepherd-service-type
 
@@ -76,7 +82,18 @@
 ;;; Code:
 
 
-(define (shepherd-boot-gexp services)
+(define-record-type* <shepherd-configuration>
+  shepherd-configuration make-shepherd-configuration
+  shepherd-configuration?
+  (shepherd shepherd-configuration-shepherd
+            (default shepherd)) ; package
+  (services shepherd-configuration-services
+            (default '()))) ; list of <shepherd-service>
+
+(define (shepherd-boot-gexp config)
+  "Return a gexp starting the shepherd service."
+  (let ((shepherd (shepherd-configuration-shepherd config))
+        (services (shepherd-configuration-services config)))
   #~(begin
       ;; Keep track of the booted system.
       (false-if-exception (delete-file "/run/booted-system"))
@@ -95,7 +112,10 @@
       ;; Start shepherd.
       (execl #$(file-append shepherd "/bin/shepherd")
              "shepherd" "--config"
-             #$(shepherd-configuration-file services))))
+             #$(shepherd-configuration-file services shepherd)))))
+
+(define shepherd-packages
+  (compose list shepherd-configuration-shepherd))
 
 (define shepherd-root-service-type
   (service-type
@@ -103,20 +123,25 @@
    ;; Extending the root shepherd service (aka. PID 1) happens by
    ;; concatenating the list of services provided by the extensions.
    (compose concatenate)
-   (extend append)
+   (extend (lambda (config extra-services)
+             (shepherd-configuration
+               (inherit config)
+               (services (append (shepherd-configuration-services config)
+                                 extra-services)))))
    (extensions (list (service-extension boot-service-type
                                         shepherd-boot-gexp)
                      (service-extension profile-service-type
-                                        (const (list shepherd)))))
+                                        shepherd-packages)))
+   (default-value (shepherd-configuration))
    (description
     "Run the GNU Shepherd as PID 1---i.e., the operating system's first
 process.  The Shepherd takes care of managing services such as daemons by
 ensuring they are started and stopped in the right order.")))
 
 (define %shepherd-root-service
-  ;; The root shepherd service, aka. PID 1.  Its parameter is a list of
-  ;; <shepherd-service> objects.
-  (service shepherd-root-service-type '()))
+  ;; The root shepherd service, aka. PID 1.  Its parameter is a
+  ;; <shepherd-configuration>.
+  (service shepherd-root-service-type))
 
 (define-syntax shepherd-service-type
   (syntax-rules (description)
@@ -270,9 +295,9 @@ stored."
                                    #~(#$name #$doc #$proc)))
                                 (shepherd-service-actions service))))))))
 
-(define (scm->go file)
+(define (scm->go file shepherd)
   "Compile FILE, which contains code to be loaded by shepherd's config file,
-and return the resulting '.go' file."
+and return the resulting '.go' file. SHEPHERD is used as shepherd package."
   (let-system (system target)
     (with-extensions (list shepherd)
       (computed-file (string-append (basename (scheme-file-name file) ".scm")
@@ -294,11 +319,13 @@ and return the resulting '.go' file."
                      #:options '(#:local-build? #t
                                  #:substitutable? #f)))))
 
-(define (shepherd-configuration-file services)
-  "Return the shepherd configuration file for SERVICES."
+(define (shepherd-configuration-file services shepherd)
+  "Return the shepherd configuration file for SERVICES.  SHEPHERD is used
+as shepherd package."
   (assert-valid-graph services)
 
-  (let ((files (map shepherd-service-file services)))
+  (let ((files (map shepherd-service-file services))
+        (scm->go (cute scm->go <> shepherd)))
     (define config
       #~(begin
           (use-modules (srfi srfi-34)
diff --git a/gnu/system.scm b/gnu/system.scm
index 90ad368664..5bf2a85272 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jannek@gnu.org>
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1134,10 +1135,11 @@ we're running in the final root."
 (define (operating-system-shepherd-service-names os)
   "Return the list of Shepherd service names for OS."
   (append-map shepherd-service-provision
-              (service-value
-               (fold-services (operating-system-services os)
-                              #:target-type
-                              shepherd-root-service-type))))
+              (shepherd-configuration-services
+               (service-value
+                (fold-services (operating-system-services os)
+                               #:target-type
+                               shepherd-root-service-type)))))
 
 (define* (operating-system-derivation os)
   "Return a derivation that builds OS."
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* bug#46043: [PATCH] Allow booting with custom shepherd package (fixed)
  2021-01-28 16:32             ` Maxime Devos
@ 2021-01-30 14:36               ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2021-01-30 14:36 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46043-done

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> From 085708344c4a9d7f819a399e666e2bab2ae7a54d Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Fri, 22 Jan 2021 20:06:55 +0100
> Subject: [PATCH] services: shepherd: allow custom 'shepherd' package
>
> * gnu/services/shepherd.scm
>   (<shepherd-configuration>): New record.
>   (shepherd-boot-gexp, shepherd-root-service-type): Use it.
>   (scm->go, shepherd-configuration-file): Allow passing custom
>   shepherd package.
> * gnu/system.scm
>   (operating-system-shepherd-service-names): Use the new record.
> * doc/guix.texi (Shepherd Services). Document it.

Applied!  I had to fix ‘guix system shepherd-graph’, as explained
before, but apart from that it all looks good.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-30 14:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 19:57 [bug#46043] [PATCH] Allow booting with custom shepherd package (fixed) Maxime Devos
2021-01-23  8:25 ` Leo Prikler
2021-01-23 15:11   ` Maxime Devos
2021-01-23 15:25     ` Leo Prikler
2021-01-25  8:48 ` Maxime Devos
2021-01-26 20:49   ` Ludovic Courtès
2021-01-27 13:24     ` Maxime Devos
2021-01-27 23:09       ` bug#46043: " Ludovic Courtès
2021-01-27 23:15       ` [bug#46043] " Ludovic Courtès
2021-01-28  8:20         ` Maxime Devos
2021-01-28 13:18           ` Ludovic Courtès
2021-01-28 16:32             ` Maxime Devos
2021-01-30 14:36               ` bug#46043: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.