diff options
| author | Alex Kost <alezost@gmail.com> | 2016-01-27 23:02:31 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2016-01-29 20:21:53 +0300 |
| commit | d4053c710bc2c7a4f624ba2d72438d8f289ad569 (patch) | |
| tree | a07276cb148dbb778082b9986940a5d69ac830b0 | |
| parent | 26b94866ad18666e1e427f3377ad21b8532cc3fb (diff) | |
services: Rename 'dmd' services to 'shepherd'.
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service)
(dmd-service-type, <dmd-service>, dmd-service, dmd-service?)
(make-dmd-service, dmd-service-documentation, dmd-service-provision)
(dmd-service-requirement, dmd-service-respawn, dmd-service-start)
(dmd-service-stop, dmd-service-auto-start?, dmd-service-modules)
(dmd-service-imported-modules, dmd-service-file-name, dmd-service-file)
(dmd-service-back-edges): Rename to...
(shepherd-root-service-type, %shepherd-root-service, shepherd-service-type)
(<shepherd-service>, shepherd-service, shepherd-service?)
(make-shepherd-service, shepherd-service-documentation)
(shepherd-service-provision, shepherd-service-requirement)
(shepherd-service-respawn, shepherd-service-start)
(shepherd-service-stop, shepherd-service-auto-start?)
(shepherd-service-modules, shepherd-service-imported-modules)
(shepherd-service-file-name, shepherd-service-file)
(shepherd-service-back-edges): ...this
* gnu/services.scm: Adjust comments.
* gnu/services/avahi.scm (avahi-dmd-service): Rename to...
(avahi-shepherd-service): ... this.
* gnu/services/base.scm (%root-file-system-dmd-service)
(file-system->dmd-service-name, mapped-device->dmd-service-name)
(dependency->dmd-service-name, file-system-dmd-service)
(mingetty-dmd-service, nscd-dmd-service, guix-dmd-service)
(guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to...
(%root-file-system-shepherd-service)
(file-system->shepherd-service-name, mapped-device->shepherd-service-name)
(dependency->shepherd-service-name, file-system-shepherd-service)
(mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service)
(guix-publish-shepherd-service, udev-shepherd-service)
(gpm-shepherd-service): ... this.
* gnu/services/databases.scm (postgresql-dmd-service): Rename to...
(postgresql-shepherd-service): ... this.
* gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service):
Rename to...
(upower-shepherd-service, elogind-shepherd-service): ... this.
* gnu/services/dbus.scm (dbus-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/lirc.scm (lirc-dmd-service): Rename to...
(lirc-shepherd-service): ... this.
* gnu/services/mail.scm (dovecot-dmd-service): Rename to...
(dovecot-shepherd-service): ... this.
* gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service)
(bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to...
(dbus-shepherd-service): ... this.
* gnu/services/ssh.scm (lsh-dmd-service): Rename to...
(lsh-shepherd-service): ... this.
* gnu/services/web.scm (nginx-dmd-service): Rename to...
(nginx-shepherd-service): ... this.
* gnu/services/xorg.scm (slim-dmd-service): Rename to...
(slim-shepherd-service): ... this.
* gnu/system.scm (essential-services): Use '%shepherd-root-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type)
(export-dmd-graph): Likewise.
* tests/guix-system.sh: Likewise.
* tests/services.scm ("dmd-service-back-edges"): Rename to...
("shepherd-service-back-edges"): Adjust accordingly.
* doc/guix.texi: Likewise.
* doc/images/service-graph.dot: Use 'shepherd' service name.
| -rw-r--r-- | doc/guix.texi | 32 | ||||
| -rw-r--r-- | doc/images/service-graph.dot | 14 | ||||
| -rw-r--r-- | gnu/services.scm | 6 | ||||
| -rw-r--r-- | gnu/services/avahi.scm | 10 | ||||
| -rw-r--r-- | gnu/services/base.scm | 126 | ||||
| -rw-r--r-- | gnu/services/databases.scm | 8 | ||||
| -rw-r--r-- | gnu/services/dbus.scm | 8 | ||||
| -rw-r--r-- | gnu/services/desktop.scm | 20 | ||||
| -rw-r--r-- | gnu/services/lirc.scm | 8 | ||||
| -rw-r--r-- | gnu/services/mail.scm | 10 | ||||
| -rw-r--r-- | gnu/services/networking.scm | 54 | ||||
| -rw-r--r-- | gnu/services/shepherd.scm | 149 | ||||
| -rw-r--r-- | gnu/services/ssh.scm | 10 | ||||
| -rw-r--r-- | gnu/services/web.scm | 8 | ||||
| -rw-r--r-- | gnu/services/xorg.scm | 8 | ||||
| -rw-r--r-- | gnu/system.scm | 10 | ||||
| -rw-r--r-- | gnu/system/install.scm | 4 | ||||
| -rw-r--r-- | guix/scripts/system.scm | 24 | ||||
| -rw-r--r-- | tests/guix-system.sh | 4 | ||||
| -rw-r--r-- | tests/services.scm | 14 |
20 files changed, 267 insertions, 260 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index d126dd3ec3a..dd2f4902330 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -9491,7 +9491,7 @@ with a simple example, the service type for the Guix build daemon | |||
| 9491 | (service-type | 9491 | (service-type |
| 9492 | (name 'guix) | 9492 | (name 'guix) |
| 9493 | (extensions | 9493 | (extensions |
| 9494 | (list (service-extension dmd-root-service-type guix-dmd-service) | 9494 | (list (service-extension shepherd-root-service-type guix-shepherd-service) |
| 9495 | (service-extension account-service-type guix-accounts) | 9495 | (service-extension account-service-type guix-accounts) |
| 9496 | (service-extension activation-service-type guix-activation))))) | 9496 | (service-extension activation-service-type guix-activation))))) |
| 9497 | @end example | 9497 | @end example |
| @@ -9515,11 +9515,11 @@ exception is the @dfn{boot service type}, which is the ultimate service. | |||
| 9515 | In this example, @var{guix-service-type} extends three services: | 9515 | In this example, @var{guix-service-type} extends three services: |
| 9516 | 9516 | ||
| 9517 | @table @var | 9517 | @table @var |
| 9518 | @item dmd-root-service-type | 9518 | @item shepherd-root-service-type |
| 9519 | The @var{guix-dmd-service} procedure defines how the Shepherd service is | 9519 | The @var{guix-shepherd-service} procedure defines how the Shepherd |
| 9520 | extended. Namely, it returns a @code{<dmd-service>} object that defines | 9520 | service is extended. Namely, it returns a @code{<shepherd-service>} |
| 9521 | how @command{guix-daemon} is started and stopped (@pxref{Shepherd | 9521 | object that defines how @command{guix-daemon} is started and stopped |
| 9522 | Services}). | 9522 | (@pxref{Shepherd Services}). |
| 9523 | 9523 | ||
| 9524 | @item account-service-type | 9524 | @item account-service-type |
| 9525 | This extension for this service is computed by @var{guix-accounts}, | 9525 | This extension for this service is computed by @var{guix-accounts}, |
| @@ -9558,8 +9558,8 @@ The service type for an @emph{extensible} service looks like this: | |||
| 9558 | (define udev-service-type | 9558 | (define udev-service-type |
| 9559 | (service-type (name 'udev) | 9559 | (service-type (name 'udev) |
| 9560 | (extensions | 9560 | (extensions |
| 9561 | (list (service-extension dmd-root-service-type | 9561 | (list (service-extension shepherd-root-service-type |
| 9562 | udev-dmd-service))) | 9562 | udev-shepherd-service))) |
| 9563 | 9563 | ||
| 9564 | (compose concatenate) ;concatenate the list of rules | 9564 | (compose concatenate) ;concatenate the list of rules |
| 9565 | (extend (lambda (config rules) | 9565 | (extend (lambda (config rules) |
| @@ -9573,7 +9573,7 @@ The service type for an @emph{extensible} service looks like this: | |||
| 9573 | This is the service type for the | 9573 | This is the service type for the |
| 9574 | @uref{https://wiki.gentoo.org/wiki/Project:Eudev, eudev device | 9574 | @uref{https://wiki.gentoo.org/wiki/Project:Eudev, eudev device |
| 9575 | management daemon}. Compared to the previous example, in addition to an | 9575 | management daemon}. Compared to the previous example, in addition to an |
| 9576 | extension of @var{dmd-root-service-type}, we see two new fields: | 9576 | extension of @var{shepherd-root-service-type}, we see two new fields: |
| 9577 | 9577 | ||
| 9578 | @table @code | 9578 | @table @code |
| 9579 | @item compose | 9579 | @item compose |
| @@ -9801,11 +9801,11 @@ You can actually generate such a graph for any operating system | |||
| 9801 | definition using the @command{guix system dmd-graph} command | 9801 | definition using the @command{guix system dmd-graph} command |
| 9802 | (@pxref{system-dmd-graph, @command{guix system dmd-graph}}). | 9802 | (@pxref{system-dmd-graph, @command{guix system dmd-graph}}). |
| 9803 | 9803 | ||
| 9804 | The @var{%dmd-root-service} is a service object representing PID@tie{}1, | 9804 | The @var{%shepherd-root-service} is a service object representing |
| 9805 | of type @var{dmd-root-service-type}; it can be extended by passing it | 9805 | PID@tie{}1, of type @var{shepherd-root-service-type}; it can be extended |
| 9806 | lists of @code{<dmd-service>} objects. | 9806 | by passing it lists of @code{<shepherd-service>} objects. |
| 9807 | 9807 | ||
| 9808 | @deftp {Data Type} dmd-service | 9808 | @deftp {Data Type} shepherd-service |
| 9809 | The data type representing a service managed by the Shepherd. | 9809 | The data type representing a service managed by the Shepherd. |
| 9810 | 9810 | ||
| 9811 | @table @asis | 9811 | @table @asis |
| @@ -9853,15 +9853,15 @@ the Shepherd. | |||
| 9853 | @end table | 9853 | @end table |
| 9854 | @end deftp | 9854 | @end deftp |
| 9855 | 9855 | ||
| 9856 | @defvr {Scheme Variable} dmd-root-service-type | 9856 | @defvr {Scheme Variable} shepherd-root-service-type |
| 9857 | The service type for the Shepherd ``root service''---i.e., PID@tie{}1. | 9857 | The service type for the Shepherd ``root service''---i.e., PID@tie{}1. |
| 9858 | 9858 | ||
| 9859 | This is the service type that extensions target when they want to create | 9859 | This is the service type that extensions target when they want to create |
| 9860 | shepherd services (@pxref{Service Types and Services}, for an example). | 9860 | shepherd services (@pxref{Service Types and Services}, for an example). |
| 9861 | Each extension must pass a list of @code{<dmd-service>}. | 9861 | Each extension must pass a list of @code{<shepherd-service>}. |
| 9862 | @end defvr | 9862 | @end defvr |
| 9863 | 9863 | ||
| 9864 | @defvr {Scheme Variable} %dmd-root-service | 9864 | @defvr {Scheme Variable} %shepherd-root-service |
| 9865 | This service represents PID@tie{}1. | 9865 | This service represents PID@tie{}1. |
| 9866 | @end defvr | 9866 | @end defvr |
| 9867 | 9867 | ||
diff --git a/doc/images/service-graph.dot b/doc/images/service-graph.dot index b0840059847..b7b617abbc9 100644 --- a/doc/images/service-graph.dot +++ b/doc/images/service-graph.dot | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | digraph "Service Type Dependencies" { | 1 | digraph "Service Type Dependencies" { |
| 2 | dmd [shape = box, fontname = Helvetica]; | 2 | shepherd [shape = box, fontname = Helvetica]; |
| 3 | pam [shape = box, fontname = Helvetica]; | 3 | pam [shape = box, fontname = Helvetica]; |
| 4 | etc [shape = box, fontname = Helvetica]; | 4 | etc [shape = box, fontname = Helvetica]; |
| 5 | profile [shape = box, fontname = Helvetica]; | 5 | profile [shape = box, fontname = Helvetica]; |
| @@ -7,14 +7,14 @@ digraph "Service Type Dependencies" { | |||
| 7 | activation [shape = box, fontname = Helvetica]; | 7 | activation [shape = box, fontname = Helvetica]; |
| 8 | boot [shape = box, fontname = Helvetica]; | 8 | boot [shape = box, fontname = Helvetica]; |
| 9 | system [shape = house, fontname = Helvetica]; | 9 | system [shape = house, fontname = Helvetica]; |
| 10 | lshd -> dmd; | 10 | lshd -> shepherd; |
| 11 | lshd -> pam; | 11 | lshd -> pam; |
| 12 | udev -> dmd; | 12 | udev -> shepherd; |
| 13 | nscd -> dmd [label = "extends"]; | 13 | nscd -> shepherd [label = "extends"]; |
| 14 | "nss-mdns" -> nscd; | 14 | "nss-mdns" -> nscd; |
| 15 | "kvm-rules" -> udev; | 15 | "kvm-rules" -> udev; |
| 16 | colord -> udev; | 16 | colord -> udev; |
| 17 | dbus -> dmd; | 17 | dbus -> shepherd; |
| 18 | colord -> dbus; | 18 | colord -> dbus; |
| 19 | upower -> udev; | 19 | upower -> udev; |
| 20 | upower -> dbus; | 20 | upower -> dbus; |
| @@ -23,7 +23,7 @@ digraph "Service Type Dependencies" { | |||
| 23 | elogind -> dbus; | 23 | elogind -> dbus; |
| 24 | elogind -> udev; | 24 | elogind -> udev; |
| 25 | elogind -> polkit [label = "extends"]; | 25 | elogind -> polkit [label = "extends"]; |
| 26 | dmd -> boot; | 26 | shepherd -> boot; |
| 27 | colord -> accounts; | 27 | colord -> accounts; |
| 28 | accounts -> activation; | 28 | accounts -> activation; |
| 29 | accounts -> etc; | 29 | accounts -> etc; |
| @@ -31,7 +31,7 @@ digraph "Service Type Dependencies" { | |||
| 31 | activation -> boot; | 31 | activation -> boot; |
| 32 | pam -> etc; | 32 | pam -> etc; |
| 33 | elogind -> pam; | 33 | elogind -> pam; |
| 34 | guix -> dmd; | 34 | guix -> shepherd; |
| 35 | guix -> activation; | 35 | guix -> activation; |
| 36 | guix -> accounts; | 36 | guix -> accounts; |
| 37 | boot -> system; | 37 | boot -> system; |
diff --git a/gnu/services.scm b/gnu/services.scm index f302816e9e4..056bb2a1c99 100644 --- a/gnu/services.scm +++ b/gnu/services.scm | |||
| @@ -86,8 +86,8 @@ | |||
| 86 | ;;; A service type describe how its instances extend instances of other | 86 | ;;; A service type describe how its instances extend instances of other |
| 87 | ;;; service types. For instance, some services extend the instance of | 87 | ;;; service types. For instance, some services extend the instance of |
| 88 | ;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create; | 88 | ;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create; |
| 89 | ;;; others extend DMD-ROOT-SERVICE-TYPE by passing it instances of | 89 | ;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of |
| 90 | ;;; <dmd-service>. | 90 | ;;; <shepherd-service>. |
| 91 | ;;; | 91 | ;;; |
| 92 | ;;; When applicable, the service type defines how it can itself be extended, | 92 | ;;; When applicable, the service type defines how it can itself be extended, |
| 93 | ;;; by providing one procedure to compose extensions, and one procedure to | 93 | ;;; by providing one procedure to compose extensions, and one procedure to |
| @@ -209,7 +209,7 @@ containing the given entries." | |||
| 209 | (define (compute-boot-script _ mexps) | 209 | (define (compute-boot-script _ mexps) |
| 210 | (mlet %store-monad ((gexps (sequence %store-monad mexps))) | 210 | (mlet %store-monad ((gexps (sequence %store-monad mexps))) |
| 211 | (gexp->file "boot" | 211 | (gexp->file "boot" |
| 212 | ;; Clean up and activate the system, then spawn dmd. | 212 | ;; Clean up and activate the system, then spawn shepherd. |
| 213 | #~(begin #$@gexps)))) | 213 | #~(begin #$@gexps)))) |
| 214 | 214 | ||
| 215 | (define (boot-script-entry mboot) | 215 | (define (boot-script-entry mboot) |
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm index d458042365f..8005b066ed4 100644 --- a/gnu/services/avahi.scm +++ b/gnu/services/avahi.scm | |||
| @@ -93,11 +93,11 @@ | |||
| 93 | (use-modules (guix build utils)) | 93 | (use-modules (guix build utils)) |
| 94 | (mkdir-p "/var/run/avahi-daemon"))) | 94 | (mkdir-p "/var/run/avahi-daemon"))) |
| 95 | 95 | ||
| 96 | (define (avahi-dmd-service config) | 96 | (define (avahi-shepherd-service config) |
| 97 | "Return a list of <dmd-service> for CONFIG." | 97 | "Return a list of <shepherd-service> for CONFIG." |
| 98 | (let ((config (configuration-file config)) | 98 | (let ((config (configuration-file config)) |
| 99 | (avahi (avahi-configuration-avahi config))) | 99 | (avahi (avahi-configuration-avahi config))) |
| 100 | (list (dmd-service | 100 | (list (shepherd-service |
| 101 | (documentation "Run the Avahi mDNS/DNS-SD responder.") | 101 | (documentation "Run the Avahi mDNS/DNS-SD responder.") |
| 102 | (provision '(avahi-daemon)) | 102 | (provision '(avahi-daemon)) |
| 103 | (requirement '(dbus-system networking)) | 103 | (requirement '(dbus-system networking)) |
| @@ -111,8 +111,8 @@ | |||
| 111 | (let ((avahi-package (compose list avahi-configuration-avahi))) | 111 | (let ((avahi-package (compose list avahi-configuration-avahi))) |
| 112 | (service-type (name 'avahi) | 112 | (service-type (name 'avahi) |
| 113 | (extensions | 113 | (extensions |
| 114 | (list (service-extension dmd-root-service-type | 114 | (list (service-extension shepherd-root-service-type |
| 115 | avahi-dmd-service) | 115 | avahi-shepherd-service) |
| 116 | (service-extension dbus-root-service-type | 116 | (service-extension dbus-root-service-type |
| 117 | avahi-package) | 117 | avahi-package) |
| 118 | (service-extension account-service-type | 118 | (service-extension account-service-type |
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 10df9270d90..dcd9956987a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm | |||
| @@ -148,8 +148,8 @@ | |||
| 148 | (compose identity) | 148 | (compose identity) |
| 149 | (extend append))) | 149 | (extend append))) |
| 150 | 150 | ||
| 151 | (define %root-file-system-dmd-service | 151 | (define %root-file-system-shepherd-service |
| 152 | (dmd-service | 152 | (shepherd-service |
| 153 | (documentation "Take care of the root file system.") | 153 | (documentation "Take care of the root file system.") |
| 154 | (provision '(root-file-system)) | 154 | (provision '(root-file-system)) |
| 155 | (start #~(const #t)) | 155 | (start #~(const #t)) |
| @@ -181,37 +181,37 @@ | |||
| 181 | (respawn? #f))) | 181 | (respawn? #f))) |
| 182 | 182 | ||
| 183 | (define root-file-system-service-type | 183 | (define root-file-system-service-type |
| 184 | (dmd-service-type 'root-file-system | 184 | (shepherd-service-type 'root-file-system |
| 185 | (const %root-file-system-dmd-service))) | 185 | (const %root-file-system-shepherd-service))) |
| 186 | 186 | ||
| 187 | (define (root-file-system-service) | 187 | (define (root-file-system-service) |
| 188 | "Return a service whose sole purpose is to re-mount read-only the root file | 188 | "Return a service whose sole purpose is to re-mount read-only the root file |
| 189 | system upon shutdown (aka. cleanly \"umounting\" root.) | 189 | system upon shutdown (aka. cleanly \"umounting\" root.) |
| 190 | 190 | ||
| 191 | This service must be the root of the service dependency graph so that its | 191 | This service must be the root of the service dependency graph so that its |
| 192 | 'stop' action is invoked when dmd is the only process left." | 192 | 'stop' action is invoked when shepherd is the only process left." |
| 193 | (service root-file-system-service-type #f)) | 193 | (service root-file-system-service-type #f)) |
| 194 | 194 | ||
| 195 | (define (file-system->dmd-service-name file-system) | 195 | (define (file-system->shepherd-service-name file-system) |
| 196 | "Return the symbol that denotes the service mounting and unmounting | 196 | "Return the symbol that denotes the service mounting and unmounting |
| 197 | FILE-SYSTEM." | 197 | FILE-SYSTEM." |
| 198 | (symbol-append 'file-system- | 198 | (symbol-append 'file-system- |
| 199 | (string->symbol (file-system-mount-point file-system)))) | 199 | (string->symbol (file-system-mount-point file-system)))) |
| 200 | 200 | ||
| 201 | (define (mapped-device->dmd-service-name md) | 201 | (define (mapped-device->shepherd-service-name md) |
| 202 | "Return the symbol that denotes the dmd service of MD, a <mapped-device>." | 202 | "Return the symbol that denotes the shepherd service of MD, a <mapped-device>." |
| 203 | (symbol-append 'device-mapping- | 203 | (symbol-append 'device-mapping- |
| 204 | (string->symbol (mapped-device-target md)))) | 204 | (string->symbol (mapped-device-target md)))) |
| 205 | 205 | ||
| 206 | (define dependency->dmd-service-name | 206 | (define dependency->shepherd-service-name |
| 207 | (match-lambda | 207 | (match-lambda |
| 208 | ((? mapped-device? md) | 208 | ((? mapped-device? md) |
| 209 | (mapped-device->dmd-service-name md)) | 209 | (mapped-device->shepherd-service-name md)) |
| 210 | ((? file-system? fs) | 210 | ((? file-system? fs) |
| 211 | (file-system->dmd-service-name fs)))) | 211 | (file-system->shepherd-service-name fs)))) |
| 212 | 212 | ||
| 213 | (define (file-system-dmd-service file-system) | 213 | (define (file-system-shepherd-service file-system) |
| 214 | "Return a list containing the dmd service for @var{file-system}." | 214 | "Return a list containing the shepherd service for @var{file-system}." |
| 215 | (let ((target (file-system-mount-point file-system)) | 215 | (let ((target (file-system-mount-point file-system)) |
| 216 | (device (file-system-device file-system)) | 216 | (device (file-system-device file-system)) |
| 217 | (type (file-system-type file-system)) | 217 | (type (file-system-type file-system)) |
| @@ -221,10 +221,10 @@ FILE-SYSTEM." | |||
| 221 | (dependencies (file-system-dependencies file-system))) | 221 | (dependencies (file-system-dependencies file-system))) |
| 222 | (if (file-system-mount? file-system) | 222 | (if (file-system-mount? file-system) |
| 223 | (list | 223 | (list |
| 224 | (dmd-service | 224 | (shepherd-service |
| 225 | (provision (list (file-system->dmd-service-name file-system))) | 225 | (provision (list (file-system->shepherd-service-name file-system))) |
| 226 | (requirement `(root-file-system | 226 | (requirement `(root-file-system |
| 227 | ,@(map dependency->dmd-service-name dependencies))) | 227 | ,@(map dependency->shepherd-service-name dependencies))) |
| 228 | (documentation "Check, mount, and unmount the given file system.") | 228 | (documentation "Check, mount, and unmount the given file system.") |
| 229 | (start #~(lambda args | 229 | (start #~(lambda args |
| 230 | ;; FIXME: Use or factorize with 'mount-file-system'. | 230 | ;; FIXME: Use or factorize with 'mount-file-system'. |
| @@ -276,11 +276,11 @@ FILE-SYSTEM." | |||
| 276 | 276 | ||
| 277 | (define file-system-service-type | 277 | (define file-system-service-type |
| 278 | ;; TODO(?): Make this an extensible service that takes <file-system> objects | 278 | ;; TODO(?): Make this an extensible service that takes <file-system> objects |
| 279 | ;; and returns a list of <dmd-service>. | 279 | ;; and returns a list of <shepherd-service>. |
| 280 | (service-type (name 'file-system) | 280 | (service-type (name 'file-system) |
| 281 | (extensions | 281 | (extensions |
| 282 | (list (service-extension dmd-root-service-type | 282 | (list (service-extension shepherd-root-service-type |
| 283 | file-system-dmd-service) | 283 | file-system-shepherd-service) |
| 284 | (service-extension fstab-service-type | 284 | (service-extension fstab-service-type |
| 285 | identity))))) | 285 | identity))))) |
| 286 | 286 | ||
| @@ -290,10 +290,10 @@ object." | |||
| 290 | (service file-system-service-type file-system)) | 290 | (service file-system-service-type file-system)) |
| 291 | 291 | ||
| 292 | (define user-unmount-service-type | 292 | (define user-unmount-service-type |
| 293 | (dmd-service-type | 293 | (shepherd-service-type |
| 294 | 'user-file-systems | 294 | 'user-file-systems |
| 295 | (lambda (known-mount-points) | 295 | (lambda (known-mount-points) |
| 296 | (dmd-service | 296 | (shepherd-service |
| 297 | (documentation "Unmount manually-mounted file systems.") | 297 | (documentation "Unmount manually-mounted file systems.") |
| 298 | (provision '(user-file-systems)) | 298 | (provision '(user-file-systems)) |
| 299 | (start #~(const #t)) | 299 | (start #~(const #t)) |
| @@ -328,15 +328,15 @@ in KNOWN-MOUNT-POINTS when it is stopped." | |||
| 328 | "/etc/shepherd/do-not-kill") | 328 | "/etc/shepherd/do-not-kill") |
| 329 | 329 | ||
| 330 | (define user-processes-service-type | 330 | (define user-processes-service-type |
| 331 | (dmd-service-type | 331 | (shepherd-service-type |
| 332 | 'user-processes | 332 | 'user-processes |
| 333 | (match-lambda | 333 | (match-lambda |
| 334 | ((requirements grace-delay) | 334 | ((requirements grace-delay) |
| 335 | (dmd-service | 335 | (shepherd-service |
| 336 | (documentation "When stopped, terminate all user processes.") | 336 | (documentation "When stopped, terminate all user processes.") |
| 337 | (provision '(user-processes)) | 337 | (provision '(user-processes)) |
| 338 | (requirement (cons* 'root-file-system 'user-file-systems | 338 | (requirement (cons* 'root-file-system 'user-file-systems |
| 339 | (map file-system->dmd-service-name | 339 | (map file-system->shepherd-service-name |
| 340 | requirements))) | 340 | requirements))) |
| 341 | (start #~(const #t)) | 341 | (start #~(const #t)) |
| 342 | (stop #~(lambda _ | 342 | (stop #~(lambda _ |
| @@ -410,7 +410,7 @@ that the root file system can be re-mounted read-only, just before | |||
| 410 | rebooting/halting. Processes still running GRACE-DELAY seconds after SIGTERM | 410 | rebooting/halting. Processes still running GRACE-DELAY seconds after SIGTERM |
| 411 | has been sent are terminated with SIGKILL. | 411 | has been sent are terminated with SIGKILL. |
| 412 | 412 | ||
| 413 | The returned service will depend on 'root-file-system' and on all the dmd | 413 | The returned service will depend on 'root-file-system' and on all the shepherd |
| 414 | services corresponding to FILE-SYSTEMS. | 414 | services corresponding to FILE-SYSTEMS. |
| 415 | 415 | ||
| 416 | All the services that spawn processes must depend on this one so that they are | 416 | All the services that spawn processes must depend on this one so that they are |
| @@ -457,10 +457,10 @@ strings or string-valued gexps." | |||
| 457 | ;;; | 457 | ;;; |
| 458 | 458 | ||
| 459 | (define host-name-service-type | 459 | (define host-name-service-type |
| 460 | (dmd-service-type | 460 | (shepherd-service-type |
| 461 | 'host-name | 461 | 'host-name |
| 462 | (lambda (name) | 462 | (lambda (name) |
| 463 | (dmd-service | 463 | (shepherd-service |
| 464 | (documentation "Initialize the machine's host name.") | 464 | (documentation "Initialize the machine's host name.") |
| 465 | (provision '(host-name)) | 465 | (provision '(host-name)) |
| 466 | (start #~(lambda _ | 466 | (start #~(lambda _ |
| @@ -490,10 +490,10 @@ strings or string-valued gexps." | |||
| 490 | (zero? (cdr (waitpid pid)))))))) | 490 | (zero? (cdr (waitpid pid)))))))) |
| 491 | 491 | ||
| 492 | (define console-keymap-service-type | 492 | (define console-keymap-service-type |
| 493 | (dmd-service-type | 493 | (shepherd-service-type |
| 494 | 'console-keymap | 494 | 'console-keymap |
| 495 | (lambda (file) | 495 | (lambda (file) |
| 496 | (dmd-service | 496 | (shepherd-service |
| 497 | (documentation (string-append "Load console keymap (loadkeys).")) | 497 | (documentation (string-append "Load console keymap (loadkeys).")) |
| 498 | (provision '(console-keymap)) | 498 | (provision '(console-keymap)) |
| 499 | (start #~(lambda _ | 499 | (start #~(lambda _ |
| @@ -506,12 +506,12 @@ strings or string-valued gexps." | |||
| 506 | (service console-keymap-service-type file)) | 506 | (service console-keymap-service-type file)) |
| 507 | 507 | ||
| 508 | (define console-font-service-type | 508 | (define console-font-service-type |
| 509 | (dmd-service-type | 509 | (shepherd-service-type |
| 510 | 'console-font | 510 | 'console-font |
| 511 | (match-lambda | 511 | (match-lambda |
| 512 | ((tty font) | 512 | ((tty font) |
| 513 | (let ((device (string-append "/dev/" tty))) | 513 | (let ((device (string-append "/dev/" tty))) |
| 514 | (dmd-service | 514 | (shepherd-service |
| 515 | (documentation "Load a Unicode console font.") | 515 | (documentation "Load a Unicode console font.") |
| 516 | (provision (list (symbol-append 'console-font- | 516 | (provision (list (symbol-append 'console-font- |
| 517 | (string->symbol tty)))) | 517 | (string->symbol tty)))) |
| @@ -568,12 +568,12 @@ strings or string-valued gexps." | |||
| 568 | #:motd | 568 | #:motd |
| 569 | (mingetty-configuration-motd conf)))) | 569 | (mingetty-configuration-motd conf)))) |
| 570 | 570 | ||
| 571 | (define mingetty-dmd-service | 571 | (define mingetty-shepherd-service |
| 572 | (match-lambda | 572 | (match-lambda |
| 573 | (($ <mingetty-configuration> mingetty tty motd auto-login login-program | 573 | (($ <mingetty-configuration> mingetty tty motd auto-login login-program |
| 574 | login-pause? allow-empty-passwords?) | 574 | login-pause? allow-empty-passwords?) |
| 575 | (list | 575 | (list |
| 576 | (dmd-service | 576 | (shepherd-service |
| 577 | (documentation "Run mingetty on an tty.") | 577 | (documentation "Run mingetty on an tty.") |
| 578 | (provision (list (symbol-append 'term- (string->symbol tty)))) | 578 | (provision (list (symbol-append 'term- (string->symbol tty)))) |
| 579 | 579 | ||
| @@ -598,8 +598,8 @@ strings or string-valued gexps." | |||
| 598 | 598 | ||
| 599 | (define mingetty-service-type | 599 | (define mingetty-service-type |
| 600 | (service-type (name 'mingetty) | 600 | (service-type (name 'mingetty) |
| 601 | (extensions (list (service-extension dmd-root-service-type | 601 | (extensions (list (service-extension shepherd-root-service-type |
| 602 | mingetty-dmd-service) | 602 | mingetty-shepherd-service) |
| 603 | (service-extension pam-root-service-type | 603 | (service-extension pam-root-service-type |
| 604 | mingetty-pam-service))))) | 604 | mingetty-pam-service))))) |
| 605 | 605 | ||
| @@ -711,11 +711,11 @@ the tty to run, among other things." | |||
| 711 | (string-concatenate | 711 | (string-concatenate |
| 712 | (map cache->config caches))))))) | 712 | (map cache->config caches))))))) |
| 713 | 713 | ||
| 714 | (define (nscd-dmd-service config) | 714 | (define (nscd-shepherd-service config) |
| 715 | "Return a dmd service for CONFIG, an <nscd-configuration> object." | 715 | "Return a shepherd service for CONFIG, an <nscd-configuration> object." |
| 716 | (let ((nscd.conf (nscd.conf-file config)) | 716 | (let ((nscd.conf (nscd.conf-file config)) |
| 717 | (name-services (nscd-configuration-name-services config))) | 717 | (name-services (nscd-configuration-name-services config))) |
| 718 | (list (dmd-service | 718 | (list (shepherd-service |
| 719 | (documentation "Run libc's name service cache daemon (nscd).") | 719 | (documentation "Run libc's name service cache daemon (nscd).") |
| 720 | (provision '(nscd)) | 720 | (provision '(nscd)) |
| 721 | (requirement '(user-processes)) | 721 | (requirement '(user-processes)) |
| @@ -747,8 +747,8 @@ the tty to run, among other things." | |||
| 747 | (extensions | 747 | (extensions |
| 748 | (list (service-extension activation-service-type | 748 | (list (service-extension activation-service-type |
| 749 | (const nscd-activation)) | 749 | (const nscd-activation)) |
| 750 | (service-extension dmd-root-service-type | 750 | (service-extension shepherd-root-service-type |
| 751 | nscd-dmd-service))) | 751 | nscd-shepherd-service))) |
| 752 | 752 | ||
| 753 | ;; This can be extended by providing additional name services | 753 | ;; This can be extended by providing additional name services |
| 754 | ;; such as nss-mdns. | 754 | ;; such as nss-mdns. |
| @@ -767,10 +767,10 @@ Service Switch}, for an example." | |||
| 767 | (service nscd-service-type config)) | 767 | (service nscd-service-type config)) |
| 768 | 768 | ||
| 769 | (define syslog-service-type | 769 | (define syslog-service-type |
| 770 | (dmd-service-type | 770 | (shepherd-service-type |
| 771 | 'syslog | 771 | 'syslog |
| 772 | (lambda (config-file) | 772 | (lambda (config-file) |
| 773 | (dmd-service | 773 | (shepherd-service |
| 774 | (documentation "Run the syslog daemon (syslogd).") | 774 | (documentation "Run the syslog daemon (syslogd).") |
| 775 | (provision '(syslogd)) | 775 | (provision '(syslogd)) |
| 776 | (requirement '(user-processes)) | 776 | (requirement '(user-processes)) |
| @@ -885,13 +885,13 @@ failed to register hydra.gnu.org public key: ~a~%" status)))))))) | |||
| 885 | (define %default-guix-configuration | 885 | (define %default-guix-configuration |
| 886 | (guix-configuration)) | 886 | (guix-configuration)) |
| 887 | 887 | ||
| 888 | (define (guix-dmd-service config) | 888 | (define (guix-shepherd-service config) |
| 889 | "Return a <dmd-service> for the Guix daemon service with CONFIG." | 889 | "Return a <shepherd-service> for the Guix daemon service with CONFIG." |
| 890 | (match config | 890 | (match config |
| 891 | (($ <guix-configuration> guix build-group build-accounts authorize-key? | 891 | (($ <guix-configuration> guix build-group build-accounts authorize-key? |
| 892 | use-substitutes? substitute-urls extra-options | 892 | use-substitutes? substitute-urls extra-options |
| 893 | lsof lsh) | 893 | lsof lsh) |
| 894 | (list (dmd-service | 894 | (list (shepherd-service |
| 895 | (documentation "Run the Guix daemon.") | 895 | (documentation "Run the Guix daemon.") |
| 896 | (provision '(guix-daemon)) | 896 | (provision '(guix-daemon)) |
| 897 | (requirement '(user-processes)) | 897 | (requirement '(user-processes)) |
| @@ -941,7 +941,7 @@ failed to register hydra.gnu.org public key: ~a~%" status)))))))) | |||
| 941 | (service-type | 941 | (service-type |
| 942 | (name 'guix) | 942 | (name 'guix) |
| 943 | (extensions | 943 | (extensions |
| 944 | (list (service-extension dmd-root-service-type guix-dmd-service) | 944 | (list (service-extension shepherd-root-service-type guix-shepherd-service) |
| 945 | (service-extension account-service-type guix-accounts) | 945 | (service-extension account-service-type guix-accounts) |
| 946 | (service-extension activation-service-type guix-activation) | 946 | (service-extension activation-service-type guix-activation) |
| 947 | (service-extension profile-service-type | 947 | (service-extension profile-service-type |
| @@ -963,10 +963,10 @@ failed to register hydra.gnu.org public key: ~a~%" status)))))))) | |||
| 963 | (host guix-publish-configuration-host ;string | 963 | (host guix-publish-configuration-host ;string |
| 964 | (default "localhost"))) | 964 | (default "localhost"))) |
| 965 | 965 | ||
| 966 | (define guix-publish-dmd-service | 966 | (define guix-publish-shepherd-service |
| 967 | (match-lambda | 967 | (match-lambda |
| 968 | (($ <guix-publish-configuration> guix port host) | 968 | (($ <guix-publish-configuration> guix port host) |
| 969 | (list (dmd-service | 969 | (list (shepherd-service |
| 970 | (provision '(guix-publish)) | 970 | (provision '(guix-publish)) |
| 971 | (requirement '(guix-daemon)) | 971 | (requirement '(guix-daemon)) |
| 972 | (start #~(make-forkexec-constructor | 972 | (start #~(make-forkexec-constructor |
| @@ -989,8 +989,8 @@ failed to register hydra.gnu.org public key: ~a~%" status)))))))) | |||
| 989 | (define guix-publish-service-type | 989 | (define guix-publish-service-type |
| 990 | (service-type (name 'guix-publish) | 990 | (service-type (name 'guix-publish) |
| 991 | (extensions | 991 | (extensions |
| 992 | (list (service-extension dmd-root-service-type | 992 | (list (service-extension shepherd-root-service-type |
| 993 | guix-publish-dmd-service) | 993 | guix-publish-shepherd-service) |
| 994 | (service-extension account-service-type | 994 | (service-extension account-service-type |
| 995 | (const %guix-publish-accounts)))))) | 995 | (const %guix-publish-accounts)))))) |
| 996 | 996 | ||
| @@ -1070,8 +1070,8 @@ item of @var{packages}." | |||
| 1070 | (udev-rule "90-kvm.rules" | 1070 | (udev-rule "90-kvm.rules" |
| 1071 | "KERNEL==\"kvm\", GROUP=\"kvm\", MODE=\"0660\"\n")) | 1071 | "KERNEL==\"kvm\", GROUP=\"kvm\", MODE=\"0660\"\n")) |
| 1072 | 1072 | ||
| 1073 | (define udev-dmd-service | 1073 | (define udev-shepherd-service |
| 1074 | ;; Return a <dmd-service> for UDEV with RULES. | 1074 | ;; Return a <shepherd-service> for UDEV with RULES. |
| 1075 | (match-lambda | 1075 | (match-lambda |
| 1076 | (($ <udev-configuration> udev rules) | 1076 | (($ <udev-configuration> udev rules) |
| 1077 | (let* ((rules (udev-rules-union (cons* udev kvm-udev-rule rules))) | 1077 | (let* ((rules (udev-rules-union (cons* udev kvm-udev-rule rules))) |
| @@ -1082,7 +1082,7 @@ item of @var{packages}." | |||
| 1082 | "udev_rules=\"~a/lib/udev/rules.d\"\n" | 1082 | "udev_rules=\"~a/lib/udev/rules.d\"\n" |
| 1083 | #$rules)))))) | 1083 | #$rules)))))) |
| 1084 | (list | 1084 | (list |
| 1085 | (dmd-service | 1085 | (shepherd-service |
| 1086 | (provision '(udev)) | 1086 | (provision '(udev)) |
| 1087 | 1087 | ||
| 1088 | ;; Udev needs /dev to be a 'devtmpfs' mount so that new device nodes can | 1088 | ;; Udev needs /dev to be a 'devtmpfs' mount so that new device nodes can |
| @@ -1154,8 +1154,8 @@ item of @var{packages}." | |||
| 1154 | (define udev-service-type | 1154 | (define udev-service-type |
| 1155 | (service-type (name 'udev) | 1155 | (service-type (name 'udev) |
| 1156 | (extensions | 1156 | (extensions |
| 1157 | (list (service-extension dmd-root-service-type | 1157 | (list (service-extension shepherd-root-service-type |
| 1158 | udev-dmd-service))) | 1158 | udev-shepherd-service))) |
| 1159 | 1159 | ||
| 1160 | (compose concatenate) ;concatenate the list of rules | 1160 | (compose concatenate) ;concatenate the list of rules |
| 1161 | (extend (lambda (config rules) | 1161 | (extend (lambda (config rules) |
| @@ -1172,11 +1172,11 @@ extra rules from the packages listed in @var{rules}." | |||
| 1172 | (udev-configuration (udev udev) (rules rules)))) | 1172 | (udev-configuration (udev udev) (rules rules)))) |
| 1173 | 1173 | ||
| 1174 | (define device-mapping-service-type | 1174 | (define device-mapping-service-type |
| 1175 | (dmd-service-type | 1175 | (shepherd-service-type |
| 1176 | 'device-mapping | 1176 | 'device-mapping |
| 1177 | (match-lambda | 1177 | (match-lambda |
| 1178 | ((target open close) | 1178 | ((target open close) |
| 1179 | (dmd-service | 1179 | (shepherd-service |
| 1180 | (provision (list (symbol-append 'device-mapping- (string->symbol target)))) | 1180 | (provision (list (symbol-append 'device-mapping- (string->symbol target)))) |
| 1181 | (requirement '(udev)) | 1181 | (requirement '(udev)) |
| 1182 | (documentation "Map a device node using Linux's device mapper.") | 1182 | (documentation "Map a device node using Linux's device mapper.") |
| @@ -1192,7 +1192,7 @@ gexp, to open it, and evaluate @var{close} to close it." | |||
| 1192 | (list target open close))) | 1192 | (list target open close))) |
| 1193 | 1193 | ||
| 1194 | (define swap-service-type | 1194 | (define swap-service-type |
| 1195 | (dmd-service-type | 1195 | (shepherd-service-type |
| 1196 | 'swap | 1196 | 'swap |
| 1197 | (lambda (device) | 1197 | (lambda (device) |
| 1198 | (define requirement | 1198 | (define requirement |
| @@ -1201,7 +1201,7 @@ gexp, to open it, and evaluate @var{close} to close it." | |||
| 1201 | (string->symbol (basename device)))) | 1201 | (string->symbol (basename device)))) |
| 1202 | '())) | 1202 | '())) |
| 1203 | 1203 | ||
| 1204 | (dmd-service | 1204 | (shepherd-service |
| 1205 | (provision (list (symbol-append 'swap- (string->symbol device)))) | 1205 | (provision (list (symbol-append 'swap- (string->symbol device)))) |
| 1206 | (requirement `(udev ,@requirement)) | 1206 | (requirement `(udev ,@requirement)) |
| 1207 | (documentation "Enable the given swap device.") | 1207 | (documentation "Enable the given swap device.") |
| @@ -1223,10 +1223,10 @@ gexp, to open it, and evaluate @var{close} to close it." | |||
| 1223 | (gpm gpm-configuration-gpm) ;package | 1223 | (gpm gpm-configuration-gpm) ;package |
| 1224 | (options gpm-configuration-options)) ;list of strings | 1224 | (options gpm-configuration-options)) ;list of strings |
| 1225 | 1225 | ||
| 1226 | (define gpm-dmd-service | 1226 | (define gpm-shepherd-service |
| 1227 | (match-lambda | 1227 | (match-lambda |
| 1228 | (($ <gpm-configuration> gpm options) | 1228 | (($ <gpm-configuration> gpm options) |
| 1229 | (list (dmd-service | 1229 | (list (shepherd-service |
| 1230 | (requirement '(udev)) | 1230 | (requirement '(udev)) |
| 1231 | (provision '(gpm)) | 1231 | (provision '(gpm)) |
| 1232 | (start #~(lambda () | 1232 | (start #~(lambda () |
| @@ -1254,8 +1254,8 @@ gexp, to open it, and evaluate @var{close} to close it." | |||
| 1254 | (define gpm-service-type | 1254 | (define gpm-service-type |
| 1255 | (service-type (name 'gpm) | 1255 | (service-type (name 'gpm) |
| 1256 | (extensions | 1256 | (extensions |
| 1257 | (list (service-extension dmd-root-service-type | 1257 | (list (service-extension shepherd-root-service-type |
| 1258 | gpm-dmd-service))))) | 1258 | gpm-shepherd-service))))) |
| 1259 | 1259 | ||
| 1260 | (define* (gpm-service #:key (gpm gpm) | 1260 | (define* (gpm-service #:key (gpm gpm) |
| 1261 | (options '("-m" "/dev/input/mice" "-t" "ps2"))) | 1261 | (options '("-m" "/dev/input/mice" "-t" "ps2"))) |
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index c85606e62d8..8b1420116de 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm | |||
| @@ -96,7 +96,7 @@ host all all ::1/128 trust")) | |||
| 96 | (primitive-exit 1)))) | 96 | (primitive-exit 1)))) |
| 97 | (pid (waitpid pid)))))))) | 97 | (pid (waitpid pid)))))))) |
| 98 | 98 | ||
| 99 | (define postgresql-dmd-service | 99 | (define postgresql-shepherd-service |
| 100 | (match-lambda | 100 | (match-lambda |
| 101 | (($ <postgresql-configuration> postgresql config-file data-directory) | 101 | (($ <postgresql-configuration> postgresql config-file data-directory) |
| 102 | (let ((start-script | 102 | (let ((start-script |
| @@ -112,7 +112,7 @@ host all all ::1/128 trust")) | |||
| 112 | (string-append "--config-file=" | 112 | (string-append "--config-file=" |
| 113 | #$config-file) | 113 | #$config-file) |
| 114 | "-D" #$data-directory))))) | 114 | "-D" #$data-directory))))) |
| 115 | (list (dmd-service | 115 | (list (shepherd-service |
| 116 | (provision '(postgres)) | 116 | (provision '(postgres)) |
| 117 | (documentation "Run the PostgreSQL daemon.") | 117 | (documentation "Run the PostgreSQL daemon.") |
| 118 | (requirement '(user-processes loopback)) | 118 | (requirement '(user-processes loopback)) |
| @@ -122,8 +122,8 @@ host all all ::1/128 trust")) | |||
| 122 | (define postgresql-service-type | 122 | (define postgresql-service-type |
| 123 | (service-type (name 'postgresql) | 123 | (service-type (name 'postgresql) |
| 124 | (extensions | 124 | (extensions |
| 125 | (list (service-extension dmd-root-service-type | 125 | (list (service-extension shepherd-root-service-type |
| 126 | postgresql-dmd-service) | 126 | postgresql-shepherd-service) |
| 127 | (service-extension activation-service-type | 127 | (service-extension activation-service-type |
| 128 | postgresql-activation) | 128 | postgresql-activation) |
| 129 | (service-extension account-service-type | 129 | (service-extension account-service-type |
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 3e5fa14a38e..88a840a4b54 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm | |||
| @@ -159,10 +159,10 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in | |||
| 159 | (execl prog))) | 159 | (execl prog))) |
| 160 | (waitpid pid))))))) | 160 | (waitpid pid))))))) |
| 161 | 161 | ||
| 162 | (define dbus-dmd-service | 162 | (define dbus-shepherd-service |
| 163 | (match-lambda | 163 | (match-lambda |
| 164 | (($ <dbus-configuration> dbus) | 164 | (($ <dbus-configuration> dbus) |
| 165 | (list (dmd-service | 165 | (list (shepherd-service |
| 166 | (documentation "Run the D-Bus system daemon.") | 166 | (documentation "Run the D-Bus system daemon.") |
| 167 | (provision '(dbus-system)) | 167 | (provision '(dbus-system)) |
| 168 | (requirement '(user-processes)) | 168 | (requirement '(user-processes)) |
| @@ -174,8 +174,8 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in | |||
| 174 | (define dbus-root-service-type | 174 | (define dbus-root-service-type |
| 175 | (service-type (name 'dbus) | 175 | (service-type (name 'dbus) |
| 176 | (extensions | 176 | (extensions |
| 177 | (list (service-extension dmd-root-service-type | 177 | (list (service-extension shepherd-root-service-type |
| 178 | dbus-dmd-service) | 178 | dbus-shepherd-service) |
| 179 | (service-extension activation-service-type | 179 | (service-extension activation-service-type |
| 180 | dbus-activation) | 180 | dbus-activation) |
| 181 | (service-extension etc-service-type | 181 | (service-extension etc-service-type |
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index e6d323270e7..9d6abc38676 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm | |||
| @@ -165,11 +165,11 @@ is set to @var{value} when the bus daemon launches it." | |||
| 165 | "UPOWER_CONF_FILE_NAME" | 165 | "UPOWER_CONF_FILE_NAME" |
| 166 | (upower-configuration-file config)))) | 166 | (upower-configuration-file config)))) |
| 167 | 167 | ||
| 168 | (define (upower-dmd-service config) | 168 | (define (upower-shepherd-service config) |
| 169 | "Return a dmd service for UPower with CONFIG." | 169 | "Return a shepherd service for UPower with CONFIG." |
| 170 | (let ((upower (upower-configuration-upower config)) | 170 | (let ((upower (upower-configuration-upower config)) |
| 171 | (config (upower-configuration-file config))) | 171 | (config (upower-configuration-file config))) |
| 172 | (list (dmd-service | 172 | (list (shepherd-service |
| 173 | (documentation "Run the UPower power and battery monitor.") | 173 | (documentation "Run the UPower power and battery monitor.") |
| 174 | (provision '(upower-daemon)) | 174 | (provision '(upower-daemon)) |
| 175 | (requirement '(dbus-system udev)) | 175 | (requirement '(dbus-system udev)) |
| @@ -186,8 +186,8 @@ is set to @var{value} when the bus daemon launches it." | |||
| 186 | (extensions | 186 | (extensions |
| 187 | (list (service-extension dbus-root-service-type | 187 | (list (service-extension dbus-root-service-type |
| 188 | upower-dbus-service) | 188 | upower-dbus-service) |
| 189 | (service-extension dmd-root-service-type | 189 | (service-extension shepherd-root-service-type |
| 190 | upower-dmd-service) | 190 | upower-shepherd-service) |
| 191 | (service-extension activation-service-type | 191 | (service-extension activation-service-type |
| 192 | (const %upower-activation)) | 192 | (const %upower-activation)) |
| 193 | (service-extension udev-service-type | 193 | (service-extension udev-service-type |
| @@ -644,13 +644,13 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks." | |||
| 644 | ("HybridSleepState" (sleep-list elogind-hybrid-sleep-state)) | 644 | ("HybridSleepState" (sleep-list elogind-hybrid-sleep-state)) |
| 645 | ("HybridSleepMode" (sleep-list elogind-hybrid-sleep-mode)))) | 645 | ("HybridSleepMode" (sleep-list elogind-hybrid-sleep-mode)))) |
| 646 | 646 | ||
| 647 | (define (elogind-dmd-service config) | 647 | (define (elogind-shepherd-service config) |
| 648 | "Return a dmd service for elogind, using @var{config}." | 648 | "Return a shepherd service for elogind, using @var{config}." |
| 649 | ;; TODO: We could probably rely on service activation but the '.service' | 649 | ;; TODO: We could probably rely on service activation but the '.service' |
| 650 | ;; file currently contains an erroneous 'Exec' line. | 650 | ;; file currently contains an erroneous 'Exec' line. |
| 651 | (let ((config-file (elogind-configuration-file config)) | 651 | (let ((config-file (elogind-configuration-file config)) |
| 652 | (elogind (elogind-package config))) | 652 | (elogind (elogind-package config))) |
| 653 | (list (dmd-service | 653 | (list (shepherd-service |
| 654 | (documentation "Run the elogind login and seat management service.") | 654 | (documentation "Run the elogind login and seat management service.") |
| 655 | (provision '(elogind)) | 655 | (provision '(elogind)) |
| 656 | (requirement '(dbus-system)) | 656 | (requirement '(dbus-system)) |
| @@ -664,8 +664,8 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks." | |||
| 664 | (define elogind-service-type | 664 | (define elogind-service-type |
| 665 | (service-type (name 'elogind) | 665 | (service-type (name 'elogind) |
| 666 | (extensions | 666 | (extensions |
| 667 | (list (service-extension dmd-root-service-type | 667 | (list (service-extension shepherd-root-service-type |
| 668 | elogind-dmd-service) | 668 | elogind-shepherd-service) |
| 669 | (service-extension dbus-root-service-type | 669 | (service-extension dbus-root-service-type |
| 670 | (compose list elogind-package)) | 670 | (compose list elogind-package)) |
| 671 | (service-extension udev-service-type | 671 | (service-extension udev-service-type |
diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm index bfaca9b8531..069084abf66 100644 --- a/gnu/services/lirc.scm +++ b/gnu/services/lirc.scm | |||
| @@ -48,10 +48,10 @@ | |||
| 48 | (use-modules (guix build utils)) | 48 | (use-modules (guix build utils)) |
| 49 | (mkdir-p "/var/run/lirc"))) | 49 | (mkdir-p "/var/run/lirc"))) |
| 50 | 50 | ||
| 51 | (define lirc-dmd-service | 51 | (define lirc-shepherd-service |
| 52 | (match-lambda | 52 | (match-lambda |
| 53 | (($ <lirc-configuration> lirc device driver config-file options) | 53 | (($ <lirc-configuration> lirc device driver config-file options) |
| 54 | (list (dmd-service | 54 | (list (shepherd-service |
| 55 | (provision '(lircd)) | 55 | (provision '(lircd)) |
| 56 | (documentation "Run the LIRC daemon.") | 56 | (documentation "Run the LIRC daemon.") |
| 57 | (requirement '(user-processes)) | 57 | (requirement '(user-processes)) |
| @@ -73,8 +73,8 @@ | |||
| 73 | (define lirc-service-type | 73 | (define lirc-service-type |
| 74 | (service-type (name 'lirc) | 74 | (service-type (name 'lirc) |
| 75 | (extensions | 75 | (extensions |
| 76 | (list (service-extension dmd-root-service-type | 76 | (list (service-extension shepherd-root-service-type |
| 77 | lirc-dmd-service) | 77 | lirc-shepherd-service) |
| 78 | (service-extension activation-service-type | 78 | (service-extension activation-service-type |
| 79 | (const %lirc-activation)))))) | 79 | (const %lirc-activation)))))) |
| 80 | 80 | ||
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 181693aeba3..4bd1b96b565 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm | |||
| @@ -1574,8 +1574,8 @@ greyed out, instead of only later giving \"not selectable\" popup error. | |||
| 1574 | #:owner (getpwnam "root") | 1574 | #:owner (getpwnam "root") |
| 1575 | #:common-name (format #f "Dovecot service on ~a" (gethostname)))))) | 1575 | #:common-name (format #f "Dovecot service on ~a" (gethostname)))))) |
| 1576 | 1576 | ||
| 1577 | (define (dovecot-dmd-service config) | 1577 | (define (dovecot-shepherd-service config) |
| 1578 | "Return a list of <dmd-service> for CONFIG." | 1578 | "Return a list of <shepherd-service> for CONFIG." |
| 1579 | (let* ((config-str | 1579 | (let* ((config-str |
| 1580 | (cond | 1580 | (cond |
| 1581 | ((opaque-dovecot-configuration? config) | 1581 | ((opaque-dovecot-configuration? config) |
| @@ -1589,7 +1589,7 @@ greyed out, instead of only later giving \"not selectable\" popup error. | |||
| 1589 | (dovecot (if (opaque-dovecot-configuration? config) | 1589 | (dovecot (if (opaque-dovecot-configuration? config) |
| 1590 | (opaque-dovecot-configuration-dovecot config) | 1590 | (opaque-dovecot-configuration-dovecot config) |
| 1591 | (dovecot-configuration-dovecot config)))) | 1591 | (dovecot-configuration-dovecot config)))) |
| 1592 | (list (dmd-service | 1592 | (list (shepherd-service |
| 1593 | (documentation "Run the Dovecot POP3/IMAP mail server.") | 1593 | (documentation "Run the Dovecot POP3/IMAP mail server.") |
| 1594 | (provision '(dovecot)) | 1594 | (provision '(dovecot)) |
| 1595 | (requirement '(networking)) | 1595 | (requirement '(networking)) |
| @@ -1606,8 +1606,8 @@ greyed out, instead of only later giving \"not selectable\" popup error. | |||
| 1606 | (define dovecot-service-type | 1606 | (define dovecot-service-type |
| 1607 | (service-type (name 'dovecot) | 1607 | (service-type (name 'dovecot) |
| 1608 | (extensions | 1608 | (extensions |
| 1609 | (list (service-extension dmd-root-service-type | 1609 | (list (service-extension shepherd-root-service-type |
| 1610 | dovecot-dmd-service) | 1610 | dovecot-shepherd-service) |
| 1611 | (service-extension account-service-type | 1611 | (service-extension account-service-type |
| 1612 | (const %dovecot-accounts)) | 1612 | (const %dovecot-accounts)) |
| 1613 | (service-extension pam-root-service-type | 1613 | (service-extension pam-root-service-type |
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bce1778b5bb..5a0a211236c 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm | |||
| @@ -98,7 +98,7 @@ fe80::1%lo0 apps.facebook.com\n") | |||
| 98 | (net-tools static-networking-net-tools)) | 98 | (net-tools static-networking-net-tools)) |
| 99 | 99 | ||
| 100 | (define static-networking-service-type | 100 | (define static-networking-service-type |
| 101 | (dmd-service-type | 101 | (shepherd-service-type |
| 102 | 'static-networking | 102 | 'static-networking |
| 103 | (match-lambda | 103 | (match-lambda |
| 104 | (($ <static-networking> interface ip gateway provision | 104 | (($ <static-networking> interface ip gateway provision |
| @@ -107,7 +107,7 @@ fe80::1%lo0 apps.facebook.com\n") | |||
| 107 | 107 | ||
| 108 | ;; TODO: Eventually replace 'route' with bindings for the appropriate | 108 | ;; TODO: Eventually replace 'route' with bindings for the appropriate |
| 109 | ;; ioctls. | 109 | ;; ioctls. |
| 110 | (dmd-service | 110 | (shepherd-service |
| 111 | 111 | ||
| 112 | ;; Unless we're providing the loopback interface, wait for udev to be up | 112 | ;; Unless we're providing the loopback interface, wait for udev to be up |
| 113 | ;; and running so that INTERFACE is actually usable. | 113 | ;; and running so that INTERFACE is actually usable. |
| @@ -171,7 +171,7 @@ gateway." | |||
| 171 | (net-tools net-tools)))) | 171 | (net-tools net-tools)))) |
| 172 | 172 | ||
| 173 | (define dhcp-client-service-type | 173 | (define dhcp-client-service-type |
| 174 | (dmd-service-type | 174 | (shepherd-service-type |
| 175 | 'dhcp-client | 175 | 'dhcp-client |
| 176 | (lambda (dhcp) | 176 | (lambda (dhcp) |
| 177 | (define dhclient | 177 | (define dhclient |
| @@ -180,7 +180,7 @@ gateway." | |||
| 180 | (define pid-file | 180 | (define pid-file |
| 181 | "/var/run/dhclient.pid") | 181 | "/var/run/dhclient.pid") |
| 182 | 182 | ||
| 183 | (dmd-service | 183 | (shepherd-service |
| 184 | (documentation "Set up networking via DHCP.") | 184 | (documentation "Set up networking via DHCP.") |
| 185 | (requirement '(user-processes udev)) | 185 | (requirement '(user-processes udev)) |
| 186 | 186 | ||
| @@ -248,7 +248,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces." | |||
| 248 | (default ntp)) | 248 | (default ntp)) |
| 249 | (servers ntp-configuration-servers)) | 249 | (servers ntp-configuration-servers)) |
| 250 | 250 | ||
| 251 | (define ntp-dmd-service | 251 | (define ntp-shepherd-service |
| 252 | (match-lambda | 252 | (match-lambda |
| 253 | (($ <ntp-configuration> ntp servers) | 253 | (($ <ntp-configuration> ntp servers) |
| 254 | (let () | 254 | (let () |
| @@ -271,7 +271,7 @@ restrict -6 ::1\n")) | |||
| 271 | (define ntpd.conf | 271 | (define ntpd.conf |
| 272 | (plain-file "ntpd.conf" config)) | 272 | (plain-file "ntpd.conf" config)) |
| 273 | 273 | ||
| 274 | (list (dmd-service | 274 | (list (shepherd-service |
| 275 | (provision '(ntpd)) | 275 | (provision '(ntpd)) |
| 276 | (documentation "Run the Network Time Protocol (NTP) daemon.") | 276 | (documentation "Run the Network Time Protocol (NTP) daemon.") |
| 277 | (requirement '(user-processes networking)) | 277 | (requirement '(user-processes networking)) |
| @@ -292,8 +292,8 @@ restrict -6 ::1\n")) | |||
| 292 | (define ntp-service-type | 292 | (define ntp-service-type |
| 293 | (service-type (name 'ntp) | 293 | (service-type (name 'ntp) |
| 294 | (extensions | 294 | (extensions |
| 295 | (list (service-extension dmd-root-service-type | 295 | (list (service-extension shepherd-root-service-type |
| 296 | ntp-dmd-service) | 296 | ntp-shepherd-service) |
| 297 | (service-extension account-service-type | 297 | (service-extension account-service-type |
| 298 | (const %ntp-accounts)))))) | 298 | (const %ntp-accounts)))))) |
| 299 | 299 | ||
| @@ -376,12 +376,12 @@ HiddenServicePort ~a ~a~%" | |||
| 376 | #t))) | 376 | #t))) |
| 377 | #:modules '((guix build utils)))))) | 377 | #:modules '((guix build utils)))))) |
| 378 | 378 | ||
| 379 | (define (tor-dmd-service config) | 379 | (define (tor-shepherd-service config) |
| 380 | "Return a <dmd-service> running TOR." | 380 | "Return a <shepherd-service> running TOR." |
| 381 | (match config | 381 | (match config |
| 382 | (($ <tor-configuration> tor) | 382 | (($ <tor-configuration> tor) |
| 383 | (let ((torrc (tor-configuration->torrc config))) | 383 | (let ((torrc (tor-configuration->torrc config))) |
| 384 | (list (dmd-service | 384 | (list (shepherd-service |
| 385 | (provision '(tor)) | 385 | (provision '(tor)) |
| 386 | 386 | ||
| 387 | ;; Tor needs at least one network interface to be up, hence the | 387 | ;; Tor needs at least one network interface to be up, hence the |
| @@ -421,8 +421,8 @@ HiddenServicePort ~a ~a~%" | |||
| 421 | (define tor-service-type | 421 | (define tor-service-type |
| 422 | (service-type (name 'tor) | 422 | (service-type (name 'tor) |
| 423 | (extensions | 423 | (extensions |
| 424 | (list (service-extension dmd-root-service-type | 424 | (list (service-extension shepherd-root-service-type |
| 425 | tor-dmd-service) | 425 | tor-shepherd-service) |
| 426 | (service-extension account-service-type | 426 | (service-extension account-service-type |
| 427 | (const %tor-accounts)) | 427 | (const %tor-accounts)) |
| 428 | (service-extension activation-service-type | 428 | (service-extension activation-service-type |
| @@ -492,7 +492,7 @@ project's documentation} for more information." | |||
| 492 | (port bitlbee-configuration-port) | 492 | (port bitlbee-configuration-port) |
| 493 | (extra-settings bitlbee-configuration-extra-settings)) | 493 | (extra-settings bitlbee-configuration-extra-settings)) |
| 494 | 494 | ||
| 495 | (define bitlbee-dmd-service | 495 | (define bitlbee-shepherd-service |
| 496 | (match-lambda | 496 | (match-lambda |
| 497 | (($ <bitlbee-configuration> bitlbee interface port extra-settings) | 497 | (($ <bitlbee-configuration> bitlbee interface port extra-settings) |
| 498 | (let ((conf (plain-file "bitlbee.conf" | 498 | (let ((conf (plain-file "bitlbee.conf" |
| @@ -504,7 +504,7 @@ project's documentation} for more information." | |||
| 504 | DaemonPort = " (number->string port) " | 504 | DaemonPort = " (number->string port) " |
| 505 | " extra-settings)))) | 505 | " extra-settings)))) |
| 506 | 506 | ||
| 507 | (list (dmd-service | 507 | (list (shepherd-service |
| 508 | (provision '(bitlbee)) | 508 | (provision '(bitlbee)) |
| 509 | (requirement '(user-processes loopback)) | 509 | (requirement '(user-processes loopback)) |
| 510 | (start #~(make-forkexec-constructor | 510 | (start #~(make-forkexec-constructor |
| @@ -537,8 +537,8 @@ project's documentation} for more information." | |||
| 537 | (define bitlbee-service-type | 537 | (define bitlbee-service-type |
| 538 | (service-type (name 'bitlbee) | 538 | (service-type (name 'bitlbee) |
| 539 | (extensions | 539 | (extensions |
| 540 | (list (service-extension dmd-root-service-type | 540 | (list (service-extension shepherd-root-service-type |
| 541 | bitlbee-dmd-service) | 541 | bitlbee-shepherd-service) |
| 542 | (service-extension account-service-type | 542 | (service-extension account-service-type |
| 543 | (const %bitlbee-accounts)) | 543 | (const %bitlbee-accounts)) |
| 544 | (service-extension activation-service-type | 544 | (service-extension activation-service-type |
| @@ -579,9 +579,9 @@ configuration file." | |||
| 579 | (copy-file (string-append #$wicd file-name) | 579 | (copy-file (string-append #$wicd file-name) |
| 580 | file-name))))) | 580 | file-name))))) |
| 581 | 581 | ||
| 582 | (define (wicd-dmd-service wicd) | 582 | (define (wicd-shepherd-service wicd) |
| 583 | "Return a dmd service for WICD." | 583 | "Return a shepherd service for WICD." |
| 584 | (list (dmd-service | 584 | (list (shepherd-service |
| 585 | (documentation "Run the Wicd network manager.") | 585 | (documentation "Run the Wicd network manager.") |
| 586 | (provision '(networking)) | 586 | (provision '(networking)) |
| 587 | (requirement '(user-processes dbus-system loopback)) | 587 | (requirement '(user-processes dbus-system loopback)) |
| @@ -593,8 +593,8 @@ configuration file." | |||
| 593 | (define wicd-service-type | 593 | (define wicd-service-type |
| 594 | (service-type (name 'wicd) | 594 | (service-type (name 'wicd) |
| 595 | (extensions | 595 | (extensions |
| 596 | (list (service-extension dmd-root-service-type | 596 | (list (service-extension shepherd-root-service-type |
| 597 | wicd-dmd-service) | 597 | wicd-shepherd-service) |
| 598 | (service-extension dbus-root-service-type | 598 | (service-extension dbus-root-service-type |
| 599 | list) | 599 | list) |
| 600 | (service-extension activation-service-type | 600 | (service-extension activation-service-type |
| @@ -624,9 +624,9 @@ and @command{wicd-curses} user interfaces." | |||
| 624 | (use-modules (guix build utils)) | 624 | (use-modules (guix build utils)) |
| 625 | (mkdir-p "/etc/NetworkManager/system-connections"))) | 625 | (mkdir-p "/etc/NetworkManager/system-connections"))) |
| 626 | 626 | ||
| 627 | (define (network-manager-dmd-service network-manager) | 627 | (define (network-manager-shepherd-service network-manager) |
| 628 | "Return a dmd service for NETWORK-MANAGER." | 628 | "Return a shepherd service for NETWORK-MANAGER." |
| 629 | (list (dmd-service | 629 | (list (shepherd-service |
| 630 | (documentation "Run the NetworkManager.") | 630 | (documentation "Run the NetworkManager.") |
| 631 | (provision '(networking)) | 631 | (provision '(networking)) |
| 632 | (requirement '(user-processes dbus-system loopback)) | 632 | (requirement '(user-processes dbus-system loopback)) |
| @@ -639,8 +639,8 @@ and @command{wicd-curses} user interfaces." | |||
| 639 | (define network-manager-service-type | 639 | (define network-manager-service-type |
| 640 | (service-type (name 'network-manager) | 640 | (service-type (name 'network-manager) |
| 641 | (extensions | 641 | (extensions |
| 642 | (list (service-extension dmd-root-service-type | 642 | (list (service-extension shepherd-root-service-type |
| 643 | network-manager-dmd-service) | 643 | network-manager-shepherd-service) |
| 644 | (service-extension dbus-root-service-type list) | 644 | (service-extension dbus-root-service-type list) |
| 645 | (service-extension activation-service-type | 645 | (service-extension activation-service-type |
| 646 | (const %network-manager-activation)) | 646 | (const %network-manager-activation)) |
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index ccb71f35e10..36ed9eb1c0e 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm | |||
| @@ -32,26 +32,26 @@ | |||
| 32 | #:use-module (srfi srfi-26) | 32 | #:use-module (srfi srfi-26) |
| 33 | #:use-module (srfi srfi-34) | 33 | #:use-module (srfi srfi-34) |
| 34 | #:use-module (srfi srfi-35) | 34 | #:use-module (srfi srfi-35) |
| 35 | #:export (dmd-root-service-type | 35 | #:export (shepherd-root-service-type |
| 36 | %dmd-root-service | 36 | %shepherd-root-service |
| 37 | dmd-service-type | 37 | shepherd-service-type |
| 38 | 38 | ||
| 39 | dmd-service | 39 | shepherd-service |
| 40 | dmd-service? | 40 | shepherd-service? |
| 41 | dmd-service-documentation | 41 | shepherd-service-documentation |
| 42 | dmd-service-provision | 42 | shepherd-service-provision |
| 43 | dmd-service-requirement | 43 | shepherd-service-requirement |
| 44 | dmd-service-respawn? | 44 | shepherd-service-respawn? |
| 45 | dmd-service-start | 45 | shepherd-service-start |
| 46 | dmd-service-stop | 46 | shepherd-service-stop |
| 47 | dmd-service-auto-start? | 47 | shepherd-service-auto-start? |
| 48 | dmd-service-modules | 48 | shepherd-service-modules |
| 49 | dmd-service-imported-modules | 49 | shepherd-service-imported-modules |
| 50 | 50 | ||
| 51 | %default-imported-modules | 51 | %default-imported-modules |
| 52 | %default-modules | 52 | %default-modules |
| 53 | 53 | ||
| 54 | dmd-service-back-edges)) | 54 | shepherd-service-back-edges)) |
| 55 | 55 | ||
| 56 | ;;; Commentary: | 56 | ;;; Commentary: |
| 57 | ;;; | 57 | ;;; |
| @@ -60,7 +60,7 @@ | |||
| 60 | ;;; Code: | 60 | ;;; Code: |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | (define (dmd-boot-gexp services) | 63 | (define (shepherd-boot-gexp services) |
| 64 | (mlet %store-monad ((shepherd-conf (shepherd-configuration-file services))) | 64 | (mlet %store-monad ((shepherd-conf (shepherd-configuration-file services))) |
| 65 | (return #~(begin | 65 | (return #~(begin |
| 66 | ;; Keep track of the booted system. | 66 | ;; Keep track of the booted system. |
| @@ -81,29 +81,30 @@ | |||
| 81 | (execl (string-append #$shepherd "/bin/shepherd") | 81 | (execl (string-append #$shepherd "/bin/shepherd") |
| 82 | "shepherd" "--config" #$shepherd-conf))))) | 82 | "shepherd" "--config" #$shepherd-conf))))) |
| 83 | 83 | ||
| 84 | (define dmd-root-service-type | 84 | (define shepherd-root-service-type |
| 85 | (service-type | 85 | (service-type |
| 86 | (name 'dmd-root) | 86 | (name 'shepherd-root) |
| 87 | ;; Extending the root dmd service (aka. PID 1) happens by concatenating the | 87 | ;; Extending the root shepherd service (aka. PID 1) happens by |
| 88 | ;; list of services provided by the extensions. | 88 | ;; concatenating the list of services provided by the extensions. |
| 89 | (compose concatenate) | 89 | (compose concatenate) |
| 90 | (extend append) | 90 | (extend append) |
| 91 | (extensions (list (service-extension boot-service-type dmd-boot-gexp) | 91 | (extensions (list (service-extension boot-service-type |
| 92 | shepherd-boot-gexp) | ||
| 92 | (service-extension profile-service-type | 93 | (service-extension profile-service-type |
| 93 | (const (list shepherd))))))) | 94 | (const (list shepherd))))))) |
| 94 | 95 | ||
| 95 | (define %dmd-root-service | 96 | (define %shepherd-root-service |
| 96 | ;; The root dmd service, aka. PID 1. Its parameter is a list of | 97 | ;; The root shepherd service, aka. PID 1. Its parameter is a list of |
| 97 | ;; <dmd-service> objects. | 98 | ;; <shepherd-service> objects. |
| 98 | (service dmd-root-service-type '())) | 99 | (service shepherd-root-service-type '())) |
| 99 | 100 | ||
| 100 | (define-syntax-rule (dmd-service-type service-name proc) | 101 | (define-syntax-rule (shepherd-service-type service-name proc) |
| 101 | "Return a <service-type> denoting a simple dmd service--i.e., the type for a | 102 | "Return a <service-type> denoting a simple shepherd service--i.e., the type |
| 102 | service that extends DMD-ROOT-SERVICE-TYPE and nothing else." | 103 | for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else." |
| 103 | (service-type | 104 | (service-type |
| 104 | (name service-name) | 105 | (name service-name) |
| 105 | (extensions | 106 | (extensions |
| 106 | (list (service-extension dmd-root-service-type | 107 | (list (service-extension shepherd-root-service-type |
| 107 | (compose list proc)))))) | 108 | (compose list proc)))))) |
| 108 | 109 | ||
| 109 | (define %default-imported-modules | 110 | (define %default-imported-modules |
| @@ -118,35 +119,35 @@ service that extends DMD-ROOT-SERVICE-TYPE and nothing else." | |||
| 118 | (guix build utils) | 119 | (guix build utils) |
| 119 | (guix build syscalls))) | 120 | (guix build syscalls))) |
| 120 | 121 | ||
| 121 | (define-record-type* <dmd-service> | 122 | (define-record-type* <shepherd-service> |
| 122 | dmd-service make-dmd-service | 123 | shepherd-service make-shepherd-service |
| 123 | dmd-service? | 124 | shepherd-service? |
| 124 | (documentation dmd-service-documentation ;string | 125 | (documentation shepherd-service-documentation ;string |
| 125 | (default "[No documentation.]")) | 126 | (default "[No documentation.]")) |
| 126 | (provision dmd-service-provision) ;list of symbols | 127 | (provision shepherd-service-provision) ;list of symbols |
| 127 | (requirement dmd-service-requirement ;list of symbols | 128 | (requirement shepherd-service-requirement ;list of symbols |
| 128 | (default '())) | 129 | (default '())) |
| 129 | (respawn? dmd-service-respawn? ;Boolean | 130 | (respawn? shepherd-service-respawn? ;Boolean |
| 130 | (default #t)) | 131 | (default #t)) |
| 131 | (start dmd-service-start) ;g-expression (procedure) | 132 | (start shepherd-service-start) ;g-expression (procedure) |
| 132 | (stop dmd-service-stop ;g-expression (procedure) | 133 | (stop shepherd-service-stop ;g-expression (procedure) |
| 133 | (default #~(const #f))) | 134 | (default #~(const #f))) |
| 134 | (auto-start? dmd-service-auto-start? ;Boolean | 135 | (auto-start? shepherd-service-auto-start? ;Boolean |
| 135 | (default #t)) | 136 | (default #t)) |
| 136 | (modules dmd-service-modules ;list of module names | 137 | (modules shepherd-service-modules ;list of module names |
| 137 | (default %default-modules)) | 138 | (default %default-modules)) |
| 138 | (imported-modules dmd-service-imported-modules ;list of module names | 139 | (imported-modules shepherd-service-imported-modules ;list of module names |
| 139 | (default %default-imported-modules))) | 140 | (default %default-imported-modules))) |
| 140 | 141 | ||
| 141 | 142 | ||
| 142 | (define (assert-valid-graph services) | 143 | (define (assert-valid-graph services) |
| 143 | "Raise an error if SERVICES does not define a valid dmd service graph, for | 144 | "Raise an error if SERVICES does not define a valid shepherd service graph, |
| 144 | instance if a service requires a nonexistent service, or if more than one | 145 | for instance if a service requires a nonexistent service, or if more than one |
| 145 | service uses a given name. | 146 | service uses a given name. |
| 146 | 147 | ||
| 147 | These are constraints that dmd's 'register-service' verifies but we'd better | 148 | These are constraints that shepherd's 'register-service' verifies but we'd |
| 148 | verify them here statically than wait until PID 1 halts with an assertion | 149 | better verify them here statically than wait until PID 1 halts with an |
| 149 | failure." | 150 | assertion failure." |
| 150 | (define provisions | 151 | (define provisions |
| 151 | ;; The set of provisions (symbols). Bail out if a symbol is given more | 152 | ;; The set of provisions (symbols). Bail out if a symbol is given more |
| 152 | ;; than once. | 153 | ;; than once. |
| @@ -159,9 +160,9 @@ failure." | |||
| 159 | (format #f (_ "service '~a' provided more than once") | 160 | (format #f (_ "service '~a' provided more than once") |
| 160 | symbol))))))) | 161 | symbol))))))) |
| 161 | 162 | ||
| 162 | (for-each assert-unique (dmd-service-provision service)) | 163 | (for-each assert-unique (shepherd-service-provision service)) |
| 163 | (fold set-insert set (dmd-service-provision service))) | 164 | (fold set-insert set (shepherd-service-provision service))) |
| 164 | (setq 'dmd) | 165 | (setq 'shepherd) |
| 165 | services)) | 166 | services)) |
| 166 | 167 | ||
| 167 | (define (assert-satisfied-requirements service) | 168 | (define (assert-satisfied-requirements service) |
| @@ -173,51 +174,53 @@ failure." | |||
| 173 | (message | 174 | (message |
| 174 | (format #f (_ "service '~a' requires '~a', \ | 175 | (format #f (_ "service '~a' requires '~a', \ |
| 175 | which is undefined") | 176 | which is undefined") |
| 176 | (match (dmd-service-provision service) | 177 | (match (shepherd-service-provision service) |
| 177 | ((head . _) head) | 178 | ((head . _) head) |
| 178 | (_ service)) | 179 | (_ service)) |
| 179 | requirement))))))) | 180 | requirement))))))) |
| 180 | (dmd-service-requirement service))) | 181 | (shepherd-service-requirement service))) |
| 181 | 182 | ||
| 182 | (for-each assert-satisfied-requirements services)) | 183 | (for-each assert-satisfied-requirements services)) |
| 183 | 184 | ||
| 184 | (define (dmd-service-file-name service) | 185 | (define (shepherd-service-file-name service) |
| 185 | "Return the file name where the initialization code for SERVICE is to be | 186 | "Return the file name where the initialization code for SERVICE is to be |
| 186 | stored." | 187 | stored." |
| 187 | (let ((provisions (string-join (map symbol->string | 188 | (let ((provisions (string-join (map symbol->string |
| 188 | (dmd-service-provision service))))) | 189 | (shepherd-service-provision service))))) |
| 189 | (string-append "dmd-" | 190 | (string-append "shepherd-" |
| 190 | (string-map (match-lambda | 191 | (string-map (match-lambda |
| 191 | (#\/ #\-) | 192 | (#\/ #\-) |
| 192 | (chr chr)) | 193 | (chr chr)) |
| 193 | provisions) | 194 | provisions) |
| 194 | ".scm"))) | 195 | ".scm"))) |
| 195 | 196 | ||
| 196 | (define (dmd-service-file service) | 197 | (define (shepherd-service-file service) |
| 197 | "Return a file defining SERVICE." | 198 | "Return a file defining SERVICE." |
| 198 | (gexp->file (dmd-service-file-name service) | 199 | (gexp->file (shepherd-service-file-name service) |
| 199 | #~(begin | 200 | #~(begin |
| 200 | (use-modules #$@(dmd-service-modules service)) | 201 | (use-modules #$@(shepherd-service-modules service)) |
| 201 | 202 | ||
| 202 | (make <service> | 203 | (make <service> |
| 203 | #:docstring '#$(dmd-service-documentation service) | 204 | #:docstring '#$(shepherd-service-documentation service) |
| 204 | #:provides '#$(dmd-service-provision service) | 205 | #:provides '#$(shepherd-service-provision service) |
| 205 | #:requires '#$(dmd-service-requirement service) | 206 | #:requires '#$(shepherd-service-requirement service) |
| 206 | #:respawn? '#$(dmd-service-respawn? service) | 207 | #:respawn? '#$(shepherd-service-respawn? service) |
| 207 | #:start #$(dmd-service-start service) | 208 | #:start #$(shepherd-service-start service) |
| 208 | #:stop #$(dmd-service-stop service))))) | 209 | #:stop #$(shepherd-service-stop service))))) |
| 209 | 210 | ||
| 210 | (define (shepherd-configuration-file services) | 211 | (define (shepherd-configuration-file services) |
| 211 | "Return the shepherd configuration file for SERVICES." | 212 | "Return the shepherd configuration file for SERVICES." |
| 212 | (define modules | 213 | (define modules |
| 213 | (delete-duplicates | 214 | (delete-duplicates |
| 214 | (append-map dmd-service-imported-modules services))) | 215 | (append-map shepherd-service-imported-modules services))) |
| 215 | 216 | ||
| 216 | (assert-valid-graph services) | 217 | (assert-valid-graph services) |
| 217 | 218 | ||
| 218 | (mlet %store-monad ((modules (imported-modules modules)) | 219 | (mlet %store-monad ((modules (imported-modules modules)) |
| 219 | (compiled (compiled-modules modules)) | 220 | (compiled (compiled-modules modules)) |
| 220 | (files (mapm %store-monad dmd-service-file services))) | 221 | (files (mapm %store-monad |
| 222 | shepherd-service-file | ||
| 223 | services))) | ||
| 221 | (define config | 224 | (define config |
| 222 | #~(begin | 225 | #~(begin |
| 223 | (eval-when (expand load eval) | 226 | (eval-when (expand load eval) |
| @@ -238,20 +241,20 @@ stored." | |||
| 238 | 241 | ||
| 239 | (format #t "starting services...~%") | 242 | (format #t "starting services...~%") |
| 240 | (for-each start | 243 | (for-each start |
| 241 | '#$(append-map dmd-service-provision | 244 | '#$(append-map shepherd-service-provision |
| 242 | (filter dmd-service-auto-start? | 245 | (filter shepherd-service-auto-start? |
| 243 | services))))) | 246 | services))))) |
| 244 | 247 | ||
| 245 | (gexp->file "shepherd.conf" config))) | 248 | (gexp->file "shepherd.conf" config))) |
| 246 | 249 | ||
| 247 | (define (dmd-service-back-edges services) | 250 | (define (shepherd-service-back-edges services) |
| 248 | "Return a procedure that, when given a <dmd-service> from SERVICES, returns | 251 | "Return a procedure that, when given a <shepherd-service> from SERVICES, |
| 249 | the list of <dmd-service> that depend on it." | 252 | returns the list of <shepherd-service> that depend on it." |
| 250 | (define provision->service | 253 | (define provision->service |
| 251 | (let ((services (fold (lambda (service result) | 254 | (let ((services (fold (lambda (service result) |
| 252 | (fold (cut vhash-consq <> service <>) | 255 | (fold (cut vhash-consq <> service <>) |
| 253 | result | 256 | result |
| 254 | (dmd-service-provision service))) | 257 | (shepherd-service-provision service))) |
| 255 | vlist-null | 258 | vlist-null |
| 256 | services))) | 259 | services))) |
| 257 | (lambda (name) | 260 | (lambda (name) |
| @@ -265,7 +268,7 @@ the list of <dmd-service> that depend on it." | |||
| 265 | (vhash-consq (provision->service requirement) service | 268 | (vhash-consq (provision->service requirement) service |
| 266 | edges)) | 269 | edges)) |
| 267 | edges | 270 | edges |
| 268 | (dmd-service-requirement service))) | 271 | (shepherd-service-requirement service))) |
| 269 | vlist-null | 272 | vlist-null |
| 270 | services)) | 273 | services)) |
| 271 | 274 | ||
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index d6365023cef..33e1951a6e7 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm | |||
| @@ -103,8 +103,8 @@ | |||
| 103 | (lsh-configuration-host-key config)) | 103 | (lsh-configuration-host-key config)) |
| 104 | #t))) | 104 | #t))) |
| 105 | 105 | ||
| 106 | (define (lsh-dmd-service config) | 106 | (define (lsh-shepherd-service config) |
| 107 | "Return a <dmd-service> for lsh with CONFIG." | 107 | "Return a <shepherd-service> for lsh with CONFIG." |
| 108 | (define lsh (lsh-configuration-lsh config)) | 108 | (define lsh (lsh-configuration-lsh config)) |
| 109 | (define pid-file (lsh-configuration-pid-file config)) | 109 | (define pid-file (lsh-configuration-pid-file config)) |
| 110 | (define pid-file? (lsh-configuration-pid-file? config)) | 110 | (define pid-file? (lsh-configuration-pid-file? config)) |
| @@ -151,7 +151,7 @@ | |||
| 151 | '(networking syslogd) | 151 | '(networking syslogd) |
| 152 | '(networking))) | 152 | '(networking))) |
| 153 | 153 | ||
| 154 | (list (dmd-service | 154 | (list (shepherd-service |
| 155 | (documentation "GNU lsh SSH server") | 155 | (documentation "GNU lsh SSH server") |
| 156 | (provision '(ssh-daemon)) | 156 | (provision '(ssh-daemon)) |
| 157 | (requirement requires) | 157 | (requirement requires) |
| @@ -168,8 +168,8 @@ | |||
| 168 | (define lsh-service-type | 168 | (define lsh-service-type |
| 169 | (service-type (name 'lsh) | 169 | (service-type (name 'lsh) |
| 170 | (extensions | 170 | (extensions |
| 171 | (list (service-extension dmd-root-service-type | 171 | (list (service-extension shepherd-root-service-type |
| 172 | lsh-dmd-service) | 172 | lsh-shepherd-service) |
| 173 | (service-extension pam-root-service-type | 173 | (service-extension pam-root-service-type |
| 174 | lsh-pam-services) | 174 | lsh-pam-services) |
| 175 | (service-extension activation-service-type | 175 | (service-extension activation-service-type |
diff --git a/gnu/services/web.scm b/gnu/services/web.scm index bc0aa62a352..0e17f6e5c61 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | (system* (string-append #$nginx "/bin/nginx") | 79 | (system* (string-append #$nginx "/bin/nginx") |
| 80 | "-c" #$config-file "-t"))))) | 80 | "-c" #$config-file "-t"))))) |
| 81 | 81 | ||
| 82 | (define nginx-dmd-service | 82 | (define nginx-shepherd-service |
| 83 | (match-lambda | 83 | (match-lambda |
| 84 | (($ <nginx-configuration> nginx log-directory run-directory config-file) | 84 | (($ <nginx-configuration> nginx log-directory run-directory config-file) |
| 85 | (let* ((nginx-binary #~(string-append #$nginx "/sbin/nginx")) | 85 | (let* ((nginx-binary #~(string-append #$nginx "/sbin/nginx")) |
| @@ -90,7 +90,7 @@ | |||
| 90 | (system* #$nginx-binary "-c" #$config-file #$@args)))))) | 90 | (system* #$nginx-binary "-c" #$config-file #$@args)))))) |
| 91 | 91 | ||
| 92 | ;; TODO: Add 'reload' action. | 92 | ;; TODO: Add 'reload' action. |
| 93 | (list (dmd-service | 93 | (list (shepherd-service |
| 94 | (provision '(nginx)) | 94 | (provision '(nginx)) |
| 95 | (documentation "Run the nginx daemon.") | 95 | (documentation "Run the nginx daemon.") |
| 96 | (requirement '(user-processes loopback)) | 96 | (requirement '(user-processes loopback)) |
| @@ -100,8 +100,8 @@ | |||
| 100 | (define nginx-service-type | 100 | (define nginx-service-type |
| 101 | (service-type (name 'nginx) | 101 | (service-type (name 'nginx) |
| 102 | (extensions | 102 | (extensions |
| 103 | (list (service-extension dmd-root-service-type | 103 | (list (service-extension shepherd-root-service-type |
| 104 | nginx-dmd-service) | 104 | nginx-shepherd-service) |
| 105 | (service-extension activation-service-type | 105 | (service-extension activation-service-type |
| 106 | nginx-activation) | 106 | nginx-activation) |
| 107 | (service-extension account-service-type | 107 | (service-extension account-service-type |
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index fbe6fad4633..a93dbfe7c42 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm | |||
| @@ -250,7 +250,7 @@ which should be passed to this script as the first argument. If not, the | |||
| 250 | #:allow-empty-passwords? | 250 | #:allow-empty-passwords? |
| 251 | (slim-configuration-allow-empty-passwords? config)))) | 251 | (slim-configuration-allow-empty-passwords? config)))) |
| 252 | 252 | ||
| 253 | (define (slim-dmd-service config) | 253 | (define (slim-shepherd-service config) |
| 254 | (define slim.cfg | 254 | (define slim.cfg |
| 255 | (let ((xinitrc (xinitrc #:fallback-session | 255 | (let ((xinitrc (xinitrc #:fallback-session |
| 256 | (slim-configuration-auto-login-session config))) | 256 | (slim-configuration-auto-login-session config))) |
| @@ -285,7 +285,7 @@ reboot_cmd " shepherd "/sbin/reboot\n" | |||
| 285 | (define theme | 285 | (define theme |
| 286 | (slim-configuration-theme config)) | 286 | (slim-configuration-theme config)) |
| 287 | 287 | ||
| 288 | (list (dmd-service | 288 | (list (shepherd-service |
| 289 | (documentation "Xorg display server") | 289 | (documentation "Xorg display server") |
| 290 | (provision '(xorg-server)) | 290 | (provision '(xorg-server)) |
| 291 | (requirement '(user-processes host-name udev)) | 291 | (requirement '(user-processes host-name udev)) |
| @@ -308,8 +308,8 @@ reboot_cmd " shepherd "/sbin/reboot\n" | |||
| 308 | (define slim-service-type | 308 | (define slim-service-type |
| 309 | (service-type (name 'slim) | 309 | (service-type (name 'slim) |
| 310 | (extensions | 310 | (extensions |
| 311 | (list (service-extension dmd-root-service-type | 311 | (list (service-extension shepherd-root-service-type |
| 312 | slim-dmd-service) | 312 | slim-shepherd-service) |
| 313 | (service-extension pam-root-service-type | 313 | (service-extension pam-root-service-type |
| 314 | slim-pam-service) | 314 | slim-pam-service) |
| 315 | 315 | ||
diff --git a/gnu/system.scm b/gnu/system.scm index 97103a99929..b4264fe5f86 100644 --- a/gnu/system.scm +++ b/gnu/system.scm | |||
| @@ -303,11 +303,11 @@ a container or that of a \"bare metal\" system." | |||
| 303 | (cons* (service system-service-type entries) | 303 | (cons* (service system-service-type entries) |
| 304 | %boot-service | 304 | %boot-service |
| 305 | 305 | ||
| 306 | ;; %DMD-ROOT-SERVICE must come first so that the gexp that execs | 306 | ;; %SHEPHERD-ROOT-SERVICE must come first so that the gexp that |
| 307 | ;; dmd comes last in the boot script (XXX). Likewise, the cleanup | 307 | ;; execs shepherd comes last in the boot script (XXX). Likewise, |
| 308 | ;; service must come last so that its gexp runs before activation | 308 | ;; the cleanup service must come last so that its gexp runs before |
| 309 | ;; code. | 309 | ;; activation code. |
| 310 | %dmd-root-service | 310 | %shepherd-root-service |
| 311 | %activation-service | 311 | %activation-service |
| 312 | (service cleanup-service-type #f) | 312 | (service cleanup-service-type #f) |
| 313 | 313 | ||
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index fcbb630517b..bd501c76cc4 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -164,10 +164,10 @@ current store is on a RAM disk." | |||
| 164 | (rmdir "/.rw-store")))))) | 164 | (rmdir "/.rw-store")))))) |
| 165 | 165 | ||
| 166 | (define cow-store-service-type | 166 | (define cow-store-service-type |
| 167 | (dmd-service-type | 167 | (shepherd-service-type |
| 168 | 'cow-store | 168 | 'cow-store |
| 169 | (lambda _ | 169 | (lambda _ |
| 170 | (dmd-service | 170 | (shepherd-service |
| 171 | (requirement '(root-file-system user-processes)) | 171 | (requirement '(root-file-system user-processes)) |
| 172 | (provision '(cow-store)) | 172 | (provision '(cow-store)) |
| 173 | (documentation | 173 | (documentation |
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 3f368ca55f0..b0f8be74b03 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm | |||
| @@ -313,17 +313,17 @@ list of services." | |||
| 313 | (edges (lift1 (service-back-edges services) %store-monad)))) | 313 | (edges (lift1 (service-back-edges services) %store-monad)))) |
| 314 | 314 | ||
| 315 | (define (dmd-service-node-label service) | 315 | (define (dmd-service-node-label service) |
| 316 | "Return a label for a node representing a <dmd-service>." | 316 | "Return a label for a node representing a <shepherd-service>." |
| 317 | (string-join (map symbol->string (dmd-service-provision service)))) | 317 | (string-join (map symbol->string (shepherd-service-provision service)))) |
| 318 | 318 | ||
| 319 | (define (dmd-service-node-type services) | 319 | (define (dmd-service-node-type services) |
| 320 | "Return a node type for SERVICES, a list of <dmd-service>." | 320 | "Return a node type for SERVICES, a list of <shepherd-service>." |
| 321 | (node-type | 321 | (node-type |
| 322 | (name "dmd-service") | 322 | (name "dmd-service") |
| 323 | (description "the dependency graph of dmd services") | 323 | (description "the dependency graph of dmd services") |
| 324 | (identifier (lift1 dmd-service-node-label %store-monad)) | 324 | (identifier (lift1 dmd-service-node-label %store-monad)) |
| 325 | (label dmd-service-node-label) | 325 | (label dmd-service-node-label) |
| 326 | (edges (lift1 (dmd-service-back-edges services) %store-monad)))) | 326 | (edges (lift1 (shepherd-service-back-edges services) %store-monad)))) |
| 327 | 327 | ||
| 328 | 328 | ||
| 329 | ;;; | 329 | ;;; |
| @@ -475,14 +475,14 @@ building anything." | |||
| 475 | #:reverse-edges? #t))) | 475 | #:reverse-edges? #t))) |
| 476 | 476 | ||
| 477 | (define (export-dmd-graph os port) | 477 | (define (export-dmd-graph os port) |
| 478 | "Export the graph of dmd services of OS to PORT." | 478 | "Export the graph of shepherd services of OS to PORT." |
| 479 | (let* ((services (operating-system-services os)) | 479 | (let* ((services (operating-system-services os)) |
| 480 | (pid1 (fold-services services | 480 | (pid1 (fold-services services |
| 481 | #:target-type dmd-root-service-type)) | 481 | #:target-type shepherd-root-service-type)) |
| 482 | (dmds (service-parameters pid1)) ;the list of <dmd-service> | 482 | (shepherds (service-parameters pid1)) ;list of <shepherd-service> |
| 483 | (sinks (filter (lambda (service) | 483 | (sinks (filter (lambda (service) |
| 484 | (null? (dmd-service-requirement service))) | 484 | (null? (shepherd-service-requirement service))) |
| 485 | dmds))) | 485 | shepherds))) |
| 486 | (export-graph sinks (current-output-port) | 486 | (export-graph sinks (current-output-port) |
| 487 | #:node-type (dmd-service-node-type dmds) | 487 | #:node-type (dmd-service-node-type dmds) |
| 488 | #:reverse-edges? #t))) | 488 | #:reverse-edges? #t))) |
diff --git a/tests/guix-system.sh b/tests/guix-system.sh index cd135b9a886..d9e1679ae76 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh | |||
| @@ -121,10 +121,10 @@ cat > "$tmpfile" <<EOF | |||
| 121 | (use-service-modules networking) | 121 | (use-service-modules networking) |
| 122 | 122 | ||
| 123 | (define buggy-service-type | 123 | (define buggy-service-type |
| 124 | (dmd-service-type | 124 | (shepherd-service-type |
| 125 | 'buggy | 125 | 'buggy |
| 126 | (lambda _ | 126 | (lambda _ |
| 127 | (dmd-service | 127 | (shepherd-service |
| 128 | (provision '(buggy!)) | 128 | (provision '(buggy!)) |
| 129 | (requirement '(does-not-exist)) | 129 | (requirement '(does-not-exist)) |
| 130 | (start #t))))) | 130 | (start #t))))) |
diff --git a/tests/services.scm b/tests/services.scm index ab8f293c438..36355490775 100644 --- a/tests/services.scm +++ b/tests/services.scm | |||
| @@ -105,11 +105,15 @@ | |||
| 105 | (fold-services (list s) #:target-type t1) | 105 | (fold-services (list s) #:target-type t1) |
| 106 | #f))) | 106 | #f))) |
| 107 | 107 | ||
| 108 | (test-assert "dmd-service-back-edges" | 108 | (test-assert "shepherd-service-back-edges" |
| 109 | (let* ((s1 (dmd-service (provision '(s1)) (start #f))) | 109 | (let* ((s1 (shepherd-service (provision '(s1)) (start #f))) |
| 110 | (s2 (dmd-service (provision '(s2)) (requirement '(s1)) (start #f))) | 110 | (s2 (shepherd-service (provision '(s2)) |
| 111 | (s3 (dmd-service (provision '(s3)) (requirement '(s1 s2)) (start #f))) | 111 | (requirement '(s1)) |
| 112 | (e (dmd-service-back-edges (list s1 s2 s3)))) | 112 | (start #f))) |
| 113 | (s3 (shepherd-service (provision '(s3)) | ||
| 114 | (requirement '(s1 s2)) | ||
| 115 | (start #f))) | ||
| 116 | (e (shepherd-service-back-edges (list s1 s2 s3)))) | ||
| 113 | (and (lset= eq? (e s1) (list s2 s3)) | 117 | (and (lset= eq? (e s1) (list s2 s3)) |
| 114 | (lset= eq? (e s2) (list s3)) | 118 | (lset= eq? (e s2) (list s3)) |
| 115 | (null? (e s3))))) | 119 | (null? (e s3))))) |
