* [PATCH 00/11]: Rename dmd to shepherd in Guix source.
@ 2016-01-27 21:10 Alex Kost
2016-01-27 21:10 ` [PATCH 01/11] gnu: elogind: Use 'shepherd' input Alex Kost
` (11 more replies)
0 siblings, 12 replies; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
So this is a 'dmd->shepherd' patchset for the Guix side now (thanks, Ludo, for
adding 'shepherd' package!).
If I didn't miss anything (please double check me), the only thing left
"unrenamed" are “po/guix/*.po” files. Should they also be adjusted or
leave them as they are?
[PATCH 01/11] gnu: elogind: Use 'shepherd' input.
[PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system.
[PATCH 03/11] linux-boot: Rename /root/etc/dmd directory.
[PATCH 04/11] services: Rename %do-not-kill-file.
[PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd'.
[PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd).
[PATCH 07/11] services: shepherd: Rename shepherd configuration file.
[PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd'.
[PATCH 09/11] services: Rename 'dmd' services to 'shepherd'.
[PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph'.
[PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings.
This is a final cleanup: a couple of things that don't suit any previous
patch.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH 01/11] gnu: elogind: Use 'shepherd' input.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:22 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system Alex Kost
` (10 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/packages/freedesktop.scm (elogind)[inputs]: Replace 'dmd' with
'shepherd'.
---
gnu/packages/freedesktop.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index b8eb75e..dbddbe6 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -178,7 +178,7 @@ the freedesktop.org XDG Base Directory specification.")
`(("linux-pam" ,linux-pam)
("linux-libre-headers" ,linux-libre-headers)
("libcap" ,libcap)
- ("dmd" ,dmd) ;for 'halt' and 'reboot', invoked
+ ("shepherd" ,shepherd) ;for 'halt' and 'reboot', invoked
;when pressing the power button
("dbus" ,dbus)
("eudev" ,eudev)))
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
2016-01-27 21:10 ` [PATCH 01/11] gnu: elogind: Use 'shepherd' input Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:23 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory Alex Kost
` (9 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/services/dmd.scm (dmd-boot-gexp): Use binary from 'shepherd' package.
(dmd-root-service-type): Use 'shepherd' package.
(%default-modules): Use (shepherd service) module.
* gnu/services/base.scm (%root-file-system-dmd-service): Use
'stop-logging' procedure to close shepherd log.
---
gnu/services/base.scm | 9 +++------
gnu/services/dmd.scm | 10 +++++-----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0399c00..fbb29c1 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;;
@@ -160,12 +160,9 @@
(call-with-blocked-asyncs
(lambda ()
(let ((null (%make-void-port "w")))
- ;; Close 'dmd.log'.
+ ;; Close 'shepherd.log'.
(display "closing log\n")
- ;; XXX: Ideally we'd use 'stop-logging', but that one
- ;; doesn't actually close the port as of dmd 0.1.
- (close-port (@@ (dmd comm) log-output-port))
- (set! (@@ (dmd comm) log-output-port) null)
+ ((@ (shepherd comm) stop-logging))
;; Redirect the default output ports..
(set-current-output-port null)
diff --git a/gnu/services/dmd.scm b/gnu/services/dmd.scm
index fb3d332..828d781 100644
--- a/gnu/services/dmd.scm
+++ b/gnu/services/dmd.scm
@@ -77,9 +77,9 @@
(false-if-exception (close-fdes fd))
(loop (+ 1 fd))))
- ;; Start dmd.
- (execl (string-append #$dmd "/bin/dmd")
- "dmd" "--config" #$dmd-conf)))))
+ ;; Start shepherd.
+ (execl (string-append #$shepherd "/bin/shepherd")
+ "shepherd" "--config" #$dmd-conf)))))
(define dmd-root-service-type
(service-type
@@ -90,7 +90,7 @@
(extend append)
(extensions (list (service-extension boot-service-type dmd-boot-gexp)
(service-extension profile-service-type
- (const (list dmd)))))))
+ (const (list shepherd)))))))
(define %dmd-root-service
;; The root dmd service, aka. PID 1. Its parameter is a list of
@@ -113,7 +113,7 @@ service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
(define %default-modules
;; Default set of modules visible in a service's file.
- `((dmd service)
+ `((shepherd service)
(oop goops)
(guix build utils)
(guix build syscalls)))
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
2016-01-27 21:10 ` [PATCH 01/11] gnu: elogind: Use 'shepherd' input Alex Kost
2016-01-27 21:10 ` [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:24 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 04/11] services: Rename %do-not-kill-file Alex Kost
` (8 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/build/linux-boot.scm (mount-root-file-system): Rename
"/root/etc/dmd" to "/root/etc/shepherd".
---
gnu/build/linux-boot.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 0fc90af..c34a3f7 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -242,10 +242,10 @@ the last argument of `mknod'."
is true, mount ROOT read-only and make it a union with a writable tmpfs using
UNIONFS."
(define (mark-as-not-killable pid)
- ;; Tell the 'user-processes' dmd service that PID must be kept alive when
- ;; shutting down.
- (mkdir-p "/root/etc/dmd")
- (let ((port (open-file "/root/etc/dmd/do-not-kill" "a")))
+ ;; Tell the 'user-processes' shepherd service that PID must be kept alive
+ ;; when shutting down.
+ (mkdir-p "/root/etc/shepherd")
+ (let ((port (open-file "/root/etc/shepherd/do-not-kill" "a")))
(chmod port #o600)
(write pid port)
(newline port)
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 04/11] services: Rename %do-not-kill-file.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (2 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:25 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd' Alex Kost
` (7 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/services/base.scm (%do-not-kill-file): Rename to
"/etc/shepherd/do-not-kill".
---
gnu/services/base.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index fbb29c1..6483a66 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -325,7 +325,7 @@ in KNOWN-MOUNT-POINTS when it is stopped."
(define %do-not-kill-file
;; Name of the file listing PIDs of processes that must survive when halting
;; the system. Typical example is user-space file systems.
- "/etc/dmd/do-not-kill")
+ "/etc/shepherd/do-not-kill")
(define user-processes-service-type
(dmd-service-type
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd'.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (3 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 04/11] services: Rename %do-not-kill-file Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:27 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd) Alex Kost
` (6 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* doc/guix.texi: Use 'shepherd'/'herd' instead of 'dmd'/'deco'. Fix
info references.
---
doc/guix.texi | 98 ++++++++++++++++++++++++++++++-----------------------------
1 file changed, 50 insertions(+), 48 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index a6ba948..55e2c67 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -194,7 +194,7 @@ Defining Services
* Service Composition:: The model for composing services.
* Service Types and Services:: Types and services.
* Service Reference:: API reference.
-* dmd Services:: A particular type of service.
+* Shepherd Services:: A particular type of service.
Packaging Guidelines
@@ -5595,7 +5595,7 @@ ext2/ext3/ext4 file systems.
Once that is done, mount the target root partition under @file{/mnt}.
@item
-Lastly, run @code{deco start cow-store /mnt}.
+Lastly, run @code{herd start cow-store /mnt}.
This will make @file{/gnu/store} copy-on-write, such that packages added
to it during the installation phase will be written to the target disk
@@ -6492,22 +6492,22 @@ Configuration System}). System services are typically daemons launched
when the system boots, or other actions needed at that time---e.g.,
configuring network access.
-Services are managed by GNU@tie{}dmd (@pxref{Introduction,,, dmd, GNU
-dmd Manual}). On a running system, the @command{deco} command allows
-you to list the available services, show their status, start and stop
-them, or do other specific operations (@pxref{Jump Start,,, dmd, GNU dmd
-Manual}). For example:
+Services are managed by GNU@tie{}Shepherd (@pxref{Introduction,,,
+shepherd, GNU Shepherd Manual}). On a running system, the
+@command{herd} command allows you to list the available services, show
+their status, start and stop them, or do other specific operations
+(@pxref{Jump Start,,, shepherd, GNU Shepherd Manual}). For example:
@example
-# deco status dmd
+# herd status
@end example
The above command, run as @code{root}, lists the currently defined
-services. The @command{deco doc} command shows a synopsis of the given
+services. The @command{herd doc} command shows a synopsis of the given
service:
@example
-# deco doc nscd
+# herd doc nscd
Run libc's name service cache daemon (nscd).
@end example
@@ -6516,9 +6516,9 @@ have the effect you would expect. For instance, the commands below stop
the nscd service and restart the Xorg display server:
@example
-# deco stop nscd
+# herd stop nscd
Service nscd has been stopped.
-# deco restart xorg-server
+# herd restart xorg-server
Service xorg-server has been stopped.
Service xorg-server has been started.
@end example
@@ -8947,7 +8947,7 @@ Tell the initial RAM disk to load @var{boot}, a file containing a Scheme
program, once it has mounted the root file system.
GuixSD uses this option to yield control to a boot program that runs the
-service activation programs and then spawns GNU@tie{}dmd, the
+service activation programs and then spawns GNU@tie{}Shepherd, the
initialization system.
@item --root=@var{root}
@@ -9332,8 +9332,9 @@ produces a PDF file showing the extension relations among services.
@anchor{system-dmd-graph}
@item dmd-graph
Emit in Dot/Graphviz format to standard output the @dfn{dependency
-graph} of dmd services of the operating system defined in @var{file}.
-@xref{dmd Services}, for more information and for an example graph.
+graph} of Shepherd services of the operating system defined in
+@var{file}. @xref{Shepherd Services}, for more information and for an
+example graph.
@end table
@@ -9400,7 +9401,7 @@ them in the first place? And what is a service anyway?
* Service Composition:: The model for composing services.
* Service Types and Services:: Types and services.
* Service Reference:: API reference.
-* dmd Services:: A particular type of service.
+* Shepherd Services:: A particular type of service.
@end menu
@node Service Composition
@@ -9423,15 +9424,15 @@ directory.
@cindex service extensions
GuixSD services are connected by @dfn{extensions}. For instance, the
-secure shell service @emph{extends} dmd---GuixSD's initialization system,
-running as PID@tie{}1---by giving it the command lines to start and stop
-the secure shell daemon (@pxref{Networking Services,
+secure shell service @emph{extends} Shepherd---GuixSD's initialization
+system, running as PID@tie{}1---by giving it the command lines to start
+and stop the secure shell daemon (@pxref{Networking Services,
@code{lsh-service}}); the UPower service extends the D-Bus service by
passing it its @file{.service} specification, and extends the udev
service by passing it device management rules (@pxref{Desktop Services,
-@code{upower-service}}); the Guix daemon service extends dmd by passing
-it the command lines to start and stop the daemon, and extends the
-account service by passing it a list of required build user accounts
+@code{upower-service}}); the Guix daemon service extends Shepherd by
+passing it the command lines to start and stop the daemon, and extends
+the account service by passing it a list of required build user accounts
(@pxref{Base Services}).
All in all, services and their ``extends'' relations form a directed
@@ -9496,9 +9497,10 @@ In this example, @var{guix-service-type} extends three services:
@table @var
@item dmd-root-service-type
-The @var{guix-dmd-service} procedure defines how the dmd service is
+The @var{guix-dmd-service} procedure defines how the Shepherd service is
extended. Namely, it returns a @code{<dmd-service>} object that defines
-how @command{guix-daemon} is started and stopped (@pxref{dmd Services}).
+how @command{guix-daemon} is started and stopped (@pxref{Shepherd
+Services}).
@item account-service-type
This extension for this service is computed by @var{guix-accounts},
@@ -9757,20 +9759,20 @@ extend it by passing it lists of packages to add to the system profile.
@end defvr
-@node dmd Services
-@subsubsection dmd Services
+@node Shepherd Services
+@subsubsection Shepherd Services
@cindex PID 1
@cindex init system
The @code{(gnu services dmd)} provides a way to define services managed
-by GNU@tie{}dmd, which is GuixSD initialization system---the first
+by GNU@tie{}Shepherd, which is GuixSD initialization system---the first
process that is started when the system boots, aka. PID@tie{}1
-(@pxref{Introduction,,, dmd, GNU dmd Manual}).
+(@pxref{Introduction,,, shepherd, GNU Shepherd Manual}).
-Services in dmd can depend on each other. For instance, the SSH daemon
-may need to be started after the syslog daemon has been started, which
-in turn can only happen once all the file systems have been mounted.
-The simple operating system defined earlier (@pxref{Using the
+Services in Shepherd can depend on each other. For instance, the SSH
+daemon may need to be started after the syslog daemon has been started,
+which in turn can only happen once all the file systems have been
+mounted. The simple operating system defined earlier (@pxref{Using the
Configuration System}) results in a service graph like this:
@image{images/dmd-graph,,5in,Typical dmd service graph.}
@@ -9784,19 +9786,19 @@ of type @var{dmd-root-service-type}; it can be extended by passing it
lists of @code{<dmd-service>} objects.
@deftp {Data Type} dmd-service
-The data type representing a service managed by dmd.
+The data type representing a service managed by Shepherd.
@table @asis
@item @code{provision}
This is a list of symbols denoting what the service provides.
-These are the names that may be passed to @command{deco start},
-@command{deco status}, and similar commands (@pxref{Invoking deco,,,
-dmd, GNU dmd Manual}). @xref{Slots of services, the @code{provides}
-slot,, dmd, GNU dmd Manual}, for details.
+These are the names that may be passed to @command{herd start},
+@command{herd status}, and similar commands (@pxref{Invoking herd,,,
+shepherd, GNU Shepherd Manual}). @xref{Slots of services, the
+@code{provides} slot,, shepherd, GNU Shepherd Manual}, for details.
@item @code{requirements} (default: @code{'()})
-List of symbols denoting the dmd services this one depends on.
+List of symbols denoting the Shepherd services this one depends on.
@item @code{respawn?} (default: @code{#t})
Whether to restart the service when it stops, for instance when the
@@ -9804,20 +9806,20 @@ underlying process dies.
@item @code{start}
@itemx @code{stop} (default: @code{#~(const #f)})
-The @code{start} and @code{stop} fields refer to dmd's facilities to
-start and stop processes (@pxref{Service De- and Constructors,,, dmd,
-GNU dmd Manual}). They are given as G-expressions that get expanded in
-the dmd configuration file (@pxref{G-Expressions}).
+The @code{start} and @code{stop} fields refer to Shepherd's facilities
+to start and stop processes (@pxref{Service De- and Constructors,,,
+shepherd, GNU Shepherd Manual}). They are given as G-expressions that
+get expanded in the Shepherd configuration file (@pxref{G-Expressions}).
@item @code{documentation}
A documentation string, as shown when running:
@example
-deco doc @var{service-name}
+herd doc @var{service-name}
@end example
where @var{service-name} is one of the symbols in @var{provision}
-(@pxref{Invoking deco,,, dmd, GNU dmd Manual}).
+(@pxref{Invoking herd,,, shepherd, GNU Shepherd Manual}).
@item @code{modules} (default: @var{%default-modules})
This is the list of modules that must be in scope when @code{start} and
@@ -9825,17 +9827,17 @@ This is the list of modules that must be in scope when @code{start} and
@item @code{imported-modules} (default: @var{%default-imported-modules})
This is the list of modules to import in the execution environment of
-dmd.
+Shepherd.
@end table
@end deftp
@defvr {Scheme Variable} dmd-root-service-type
-The service type for the dmd ``root service''---i.e., PID@tie{}1.
+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
-dmd services (@pxref{Service Types and Services}, for an example). Each
-extension must pass a list of @code{<dmd-service>}.
+Shepherd services (@pxref{Service Types and Services}, for an example).
+Each extension must pass a list of @code{<dmd-service>}.
@end defvr
@defvr {Scheme Variable} %dmd-root-service
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd).
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (4 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd' Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 07/11] services: shepherd: Rename shepherd configuration file Alex Kost
` (5 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/services/dmd.scm: Rename to...
* gnu/services/shepherd.scm: ... this.
* gnu/system.scm: Use it.
* gnu/system/install.scm: Likewise.
* gnu/services/xorg.scm: Likewise.
* gnu/services/web.scm: Likewise.
* gnu/services/ssh.scm: Likewise.
* gnu/services/networking.scm: Likewise.
* gnu/services/mail.scm: Likewise.
* gnu/services/lirc.scm: Likewise.
* gnu/services/desktop.scm: Likewise.
* gnu/services/dbus.scm: Likewise.
* gnu/services/databases.scm: Likewise.
* gnu/services/base.scm: Likewise.
* gnu/services/avahi.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/services.scm: Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Shepherd Services): Adjust accordingly.
* gnu-system.am (GNU_SYSTEM_MODULES): Likewise.
* po/guix/POTFILES.in: Likewise.
---
doc/guix.texi | 8 +-
gnu-system.am | 2 +-
gnu/services/avahi.scm | 2 +-
gnu/services/base.scm | 2 +-
gnu/services/databases.scm | 2 +-
gnu/services/dbus.scm | 2 +-
gnu/services/desktop.scm | 2 +-
gnu/services/dmd.scm | 275 --------------------------------------------
gnu/services/lirc.scm | 2 +-
gnu/services/mail.scm | 2 +-
gnu/services/networking.scm | 2 +-
gnu/services/shepherd.scm | 275 ++++++++++++++++++++++++++++++++++++++++++++
gnu/services/ssh.scm | 2 +-
gnu/services/web.scm | 2 +-
gnu/services/xorg.scm | 2 +-
gnu/system.scm | 2 +-
gnu/system/install.scm | 2 +-
guix/scripts/system.scm | 2 +-
po/guix/POTFILES.in | 2 +-
tests/guix-system.sh | 4 +-
tests/services.scm | 2 +-
21 files changed, 298 insertions(+), 298 deletions(-)
delete mode 100644 gnu/services/dmd.scm
create mode 100644 gnu/services/shepherd.scm
diff --git a/doc/guix.texi b/doc/guix.texi
index 55e2c67..6c6d170 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9764,10 +9764,10 @@ extend it by passing it lists of packages to add to the system profile.
@cindex PID 1
@cindex init system
-The @code{(gnu services dmd)} provides a way to define services managed
-by GNU@tie{}Shepherd, which is GuixSD initialization system---the first
-process that is started when the system boots, aka. PID@tie{}1
-(@pxref{Introduction,,, shepherd, GNU Shepherd Manual}).
+The @code{(gnu services shepherd)} provides a way to define services
+managed by GNU@tie{}Shepherd, which is GuixSD initialization
+system---the first process that is started when the system boots,
+aka. PID@tie{}1 (@pxref{Introduction,,, shepherd, GNU Shepherd Manual}).
Services in Shepherd can depend on each other. For instance, the SSH
daemon may need to be started after the syslog daemon has been started,
diff --git a/gnu-system.am b/gnu-system.am
index ad59241..75ab91f 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -361,10 +361,10 @@ GNU_SYSTEM_MODULES = \
gnu/services/databases.scm \
gnu/services/dbus.scm \
gnu/services/desktop.scm \
- gnu/services/dmd.scm \
gnu/services/lirc.scm \
gnu/services/mail.scm \
gnu/services/networking.scm \
+ gnu/services/shepherd.scm \
gnu/services/ssh.scm \
gnu/services/web.scm \
gnu/services/xorg.scm \
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 909abef..d458042 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -19,7 +19,7 @@
(define-module (gnu services avahi)
#:use-module (gnu services)
#:use-module (gnu services base)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu services dbus)
#:use-module (gnu system shadow)
#:use-module (gnu packages avahi)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 6483a66..10df927 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -22,7 +22,7 @@
(define-module (gnu services base)
#:use-module (guix store)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu services networking)
#:use-module (gnu system pam)
#:use-module (gnu system shadow) ; 'user-account', etc.
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 8fdd222..c85606e 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -19,7 +19,7 @@
(define-module (gnu services databases)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module (gnu packages admin)
#:use-module (gnu packages databases)
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 9b0d198..3e5fa14 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -19,7 +19,7 @@
(define-module (gnu services dbus)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module ((gnu packages glib) #:select (dbus/activation))
#:use-module (gnu packages admin)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 694a8ed..e6d3232 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -20,7 +20,7 @@
(define-module (gnu services desktop)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu services base)
#:use-module (gnu services dbus)
#:use-module (gnu services avahi)
diff --git a/gnu/services/dmd.scm b/gnu/services/dmd.scm
deleted file mode 100644
index 828d781..0000000
--- a/gnu/services/dmd.scm
+++ /dev/null
@@ -1,275 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (gnu services dmd)
- #:use-module (guix ui)
- #:use-module (guix sets)
- #:use-module (guix gexp)
- #:use-module (guix store)
- #:use-module (guix monads)
- #:use-module (guix records)
- #:use-module (guix derivations) ;imported-modules, etc.
- #:use-module (gnu services)
- #:use-module (gnu packages admin)
- #:use-module (ice-9 match)
- #:use-module (ice-9 vlist)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-34)
- #:use-module (srfi srfi-35)
- #:export (dmd-root-service-type
- %dmd-root-service
- dmd-service-type
-
- dmd-service
- 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
-
- %default-imported-modules
- %default-modules
-
- dmd-service-back-edges))
-
-;;; Commentary:
-;;;
-;;; Instantiating system services as a dmd configuration file.
-;;;
-;;; Code:
-
-
-(define (dmd-boot-gexp services)
- (mlet %store-monad ((dmd-conf (dmd-configuration-file services)))
- (return #~(begin
- ;; Keep track of the booted system.
- (false-if-exception (delete-file "/run/booted-system"))
- (symlink (readlink "/run/current-system")
- "/run/booted-system")
-
- ;; Close any remaining open file descriptors to be on the safe
- ;; side. This must be the very last thing we do, because
- ;; Guile has internal FDs such as 'sleep_pipe' that need to be
- ;; alive.
- (let loop ((fd 3))
- (when (< fd 1024)
- (false-if-exception (close-fdes fd))
- (loop (+ 1 fd))))
-
- ;; Start shepherd.
- (execl (string-append #$shepherd "/bin/shepherd")
- "shepherd" "--config" #$dmd-conf)))))
-
-(define dmd-root-service-type
- (service-type
- (name 'dmd-root)
- ;; Extending the root dmd service (aka. PID 1) happens by concatenating the
- ;; list of services provided by the extensions.
- (compose concatenate)
- (extend append)
- (extensions (list (service-extension boot-service-type dmd-boot-gexp)
- (service-extension profile-service-type
- (const (list shepherd)))))))
-
-(define %dmd-root-service
- ;; The root dmd service, aka. PID 1. Its parameter is a list of
- ;; <dmd-service> objects.
- (service dmd-root-service-type '()))
-
-(define-syntax-rule (dmd-service-type service-name proc)
- "Return a <service-type> denoting a simple dmd service--i.e., the type for a
-service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
- (service-type
- (name service-name)
- (extensions
- (list (service-extension dmd-root-service-type
- (compose list proc))))))
-
-(define %default-imported-modules
- ;; Default set of modules imported for a service's consumption.
- '((guix build utils)
- (guix build syscalls)))
-
-(define %default-modules
- ;; Default set of modules visible in a service's file.
- `((shepherd service)
- (oop goops)
- (guix build utils)
- (guix build syscalls)))
-
-(define-record-type* <dmd-service>
- dmd-service make-dmd-service
- dmd-service?
- (documentation dmd-service-documentation ;string
- (default "[No documentation.]"))
- (provision dmd-service-provision) ;list of symbols
- (requirement dmd-service-requirement ;list of symbols
- (default '()))
- (respawn? dmd-service-respawn? ;Boolean
- (default #t))
- (start dmd-service-start) ;g-expression (procedure)
- (stop dmd-service-stop ;g-expression (procedure)
- (default #~(const #f)))
- (auto-start? dmd-service-auto-start? ;Boolean
- (default #t))
- (modules dmd-service-modules ;list of module names
- (default %default-modules))
- (imported-modules dmd-service-imported-modules ;list of module names
- (default %default-imported-modules)))
-
-
-(define (assert-valid-graph services)
- "Raise an error if SERVICES does not define a valid dmd service graph, for
-instance if a service requires a nonexistent service, or if more than one
-service uses a given name.
-
-These are constraints that dmd's 'register-service' verifies but we'd better
-verify them here statically than wait until PID 1 halts with an assertion
-failure."
- (define provisions
- ;; The set of provisions (symbols). Bail out if a symbol is given more
- ;; than once.
- (fold (lambda (service set)
- (define (assert-unique symbol)
- (when (set-contains? set symbol)
- (raise (condition
- (&message
- (message
- (format #f (_ "service '~a' provided more than once")
- symbol)))))))
-
- (for-each assert-unique (dmd-service-provision service))
- (fold set-insert set (dmd-service-provision service)))
- (setq 'dmd)
- services))
-
- (define (assert-satisfied-requirements service)
- ;; Bail out if the requirements of SERVICE aren't satisfied.
- (for-each (lambda (requirement)
- (unless (set-contains? provisions requirement)
- (raise (condition
- (&message
- (message
- (format #f (_ "service '~a' requires '~a', \
-which is undefined")
- (match (dmd-service-provision service)
- ((head . _) head)
- (_ service))
- requirement)))))))
- (dmd-service-requirement service)))
-
- (for-each assert-satisfied-requirements services))
-
-(define (dmd-service-file-name service)
- "Return the file name where the initialization code for SERVICE is to be
-stored."
- (let ((provisions (string-join (map symbol->string
- (dmd-service-provision service)))))
- (string-append "dmd-"
- (string-map (match-lambda
- (#\/ #\-)
- (chr chr))
- provisions)
- ".scm")))
-
-(define (dmd-service-file service)
- "Return a file defining SERVICE."
- (gexp->file (dmd-service-file-name service)
- #~(begin
- (use-modules #$@(dmd-service-modules service))
-
- (make <service>
- #:docstring '#$(dmd-service-documentation service)
- #:provides '#$(dmd-service-provision service)
- #:requires '#$(dmd-service-requirement service)
- #:respawn? '#$(dmd-service-respawn? service)
- #:start #$(dmd-service-start service)
- #:stop #$(dmd-service-stop service)))))
-
-(define (dmd-configuration-file services)
- "Return the dmd configuration file for SERVICES."
- (define modules
- (delete-duplicates
- (append-map dmd-service-imported-modules services)))
-
- (assert-valid-graph services)
-
- (mlet %store-monad ((modules (imported-modules modules))
- (compiled (compiled-modules modules))
- (files (mapm %store-monad dmd-service-file services)))
- (define config
- #~(begin
- (eval-when (expand load eval)
- (set! %load-path (cons #$modules %load-path))
- (set! %load-compiled-path
- (cons #$compiled %load-compiled-path)))
-
- (use-modules (system repl error-handling))
-
- ;; Arrange to spawn a REPL if loading one of FILES fails. This is
- ;; better than a kernel panic.
- (call-with-error-handling
- (lambda ()
- (apply register-services (map primitive-load '#$files))))
-
- ;; guix-daemon 0.6 aborts if 'PATH' is undefined, so work around it.
- (setenv "PATH" "/run/current-system/profile/bin")
-
- (format #t "starting services...~%")
- (for-each start
- '#$(append-map dmd-service-provision
- (filter dmd-service-auto-start?
- services)))))
-
- (gexp->file "dmd.conf" config)))
-
-(define (dmd-service-back-edges services)
- "Return a procedure that, when given a <dmd-service> from SERVICES, returns
-the list of <dmd-service> that depend on it."
- (define provision->service
- (let ((services (fold (lambda (service result)
- (fold (cut vhash-consq <> service <>)
- result
- (dmd-service-provision service)))
- vlist-null
- services)))
- (lambda (name)
- (match (vhash-assq name services)
- ((_ . service) service)
- (#f #f)))))
-
- (define edges
- (fold (lambda (service edges)
- (fold (lambda (requirement edges)
- (vhash-consq (provision->service requirement) service
- edges))
- edges
- (dmd-service-requirement service)))
- vlist-null
- services))
-
- (lambda (service)
- (vhash-foldq* cons '() service edges)))
-
-;;; dmd.scm ends here
diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm
index 6ae6225..bfaca9b 100644
--- a/gnu/services/lirc.scm
+++ b/gnu/services/lirc.scm
@@ -19,7 +19,7 @@
(define-module (gnu services lirc)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu packages lirc)
#:use-module (guix gexp)
#:use-module (guix records)
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index f49a4a4..181693a 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -21,7 +21,7 @@
(define-module (gnu services mail)
#:use-module (gnu services)
#:use-module (gnu services base)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system pam)
#:use-module (gnu system shadow)
#:use-module (gnu packages mail)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index ce21b1d..bce1778 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -19,7 +19,7 @@
(define-module (gnu services networking)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu services dbus)
#:use-module (gnu system shadow)
#:use-module (gnu system pam)
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
new file mode 100644
index 0000000..a33985e
--- /dev/null
+++ b/gnu/services/shepherd.scm
@@ -0,0 +1,275 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services shepherd)
+ #:use-module (guix ui)
+ #:use-module (guix sets)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix monads)
+ #:use-module (guix records)
+ #:use-module (guix derivations) ;imported-modules, etc.
+ #:use-module (gnu services)
+ #:use-module (gnu packages admin)
+ #:use-module (ice-9 match)
+ #:use-module (ice-9 vlist)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
+ #:export (dmd-root-service-type
+ %dmd-root-service
+ dmd-service-type
+
+ dmd-service
+ 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
+
+ %default-imported-modules
+ %default-modules
+
+ dmd-service-back-edges))
+
+;;; Commentary:
+;;;
+;;; Instantiating system services as a dmd configuration file.
+;;;
+;;; Code:
+
+
+(define (dmd-boot-gexp services)
+ (mlet %store-monad ((dmd-conf (dmd-configuration-file services)))
+ (return #~(begin
+ ;; Keep track of the booted system.
+ (false-if-exception (delete-file "/run/booted-system"))
+ (symlink (readlink "/run/current-system")
+ "/run/booted-system")
+
+ ;; Close any remaining open file descriptors to be on the safe
+ ;; side. This must be the very last thing we do, because
+ ;; Guile has internal FDs such as 'sleep_pipe' that need to be
+ ;; alive.
+ (let loop ((fd 3))
+ (when (< fd 1024)
+ (false-if-exception (close-fdes fd))
+ (loop (+ 1 fd))))
+
+ ;; Start shepherd.
+ (execl (string-append #$shepherd "/bin/shepherd")
+ "shepherd" "--config" #$dmd-conf)))))
+
+(define dmd-root-service-type
+ (service-type
+ (name 'dmd-root)
+ ;; Extending the root dmd service (aka. PID 1) happens by concatenating the
+ ;; list of services provided by the extensions.
+ (compose concatenate)
+ (extend append)
+ (extensions (list (service-extension boot-service-type dmd-boot-gexp)
+ (service-extension profile-service-type
+ (const (list shepherd)))))))
+
+(define %dmd-root-service
+ ;; The root dmd service, aka. PID 1. Its parameter is a list of
+ ;; <dmd-service> objects.
+ (service dmd-root-service-type '()))
+
+(define-syntax-rule (dmd-service-type service-name proc)
+ "Return a <service-type> denoting a simple dmd service--i.e., the type for a
+service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
+ (service-type
+ (name service-name)
+ (extensions
+ (list (service-extension dmd-root-service-type
+ (compose list proc))))))
+
+(define %default-imported-modules
+ ;; Default set of modules imported for a service's consumption.
+ '((guix build utils)
+ (guix build syscalls)))
+
+(define %default-modules
+ ;; Default set of modules visible in a service's file.
+ `((shepherd service)
+ (oop goops)
+ (guix build utils)
+ (guix build syscalls)))
+
+(define-record-type* <dmd-service>
+ dmd-service make-dmd-service
+ dmd-service?
+ (documentation dmd-service-documentation ;string
+ (default "[No documentation.]"))
+ (provision dmd-service-provision) ;list of symbols
+ (requirement dmd-service-requirement ;list of symbols
+ (default '()))
+ (respawn? dmd-service-respawn? ;Boolean
+ (default #t))
+ (start dmd-service-start) ;g-expression (procedure)
+ (stop dmd-service-stop ;g-expression (procedure)
+ (default #~(const #f)))
+ (auto-start? dmd-service-auto-start? ;Boolean
+ (default #t))
+ (modules dmd-service-modules ;list of module names
+ (default %default-modules))
+ (imported-modules dmd-service-imported-modules ;list of module names
+ (default %default-imported-modules)))
+
+
+(define (assert-valid-graph services)
+ "Raise an error if SERVICES does not define a valid dmd service graph, for
+instance if a service requires a nonexistent service, or if more than one
+service uses a given name.
+
+These are constraints that dmd's 'register-service' verifies but we'd better
+verify them here statically than wait until PID 1 halts with an assertion
+failure."
+ (define provisions
+ ;; The set of provisions (symbols). Bail out if a symbol is given more
+ ;; than once.
+ (fold (lambda (service set)
+ (define (assert-unique symbol)
+ (when (set-contains? set symbol)
+ (raise (condition
+ (&message
+ (message
+ (format #f (_ "service '~a' provided more than once")
+ symbol)))))))
+
+ (for-each assert-unique (dmd-service-provision service))
+ (fold set-insert set (dmd-service-provision service)))
+ (setq 'dmd)
+ services))
+
+ (define (assert-satisfied-requirements service)
+ ;; Bail out if the requirements of SERVICE aren't satisfied.
+ (for-each (lambda (requirement)
+ (unless (set-contains? provisions requirement)
+ (raise (condition
+ (&message
+ (message
+ (format #f (_ "service '~a' requires '~a', \
+which is undefined")
+ (match (dmd-service-provision service)
+ ((head . _) head)
+ (_ service))
+ requirement)))))))
+ (dmd-service-requirement service)))
+
+ (for-each assert-satisfied-requirements services))
+
+(define (dmd-service-file-name service)
+ "Return the file name where the initialization code for SERVICE is to be
+stored."
+ (let ((provisions (string-join (map symbol->string
+ (dmd-service-provision service)))))
+ (string-append "dmd-"
+ (string-map (match-lambda
+ (#\/ #\-)
+ (chr chr))
+ provisions)
+ ".scm")))
+
+(define (dmd-service-file service)
+ "Return a file defining SERVICE."
+ (gexp->file (dmd-service-file-name service)
+ #~(begin
+ (use-modules #$@(dmd-service-modules service))
+
+ (make <service>
+ #:docstring '#$(dmd-service-documentation service)
+ #:provides '#$(dmd-service-provision service)
+ #:requires '#$(dmd-service-requirement service)
+ #:respawn? '#$(dmd-service-respawn? service)
+ #:start #$(dmd-service-start service)
+ #:stop #$(dmd-service-stop service)))))
+
+(define (dmd-configuration-file services)
+ "Return the dmd configuration file for SERVICES."
+ (define modules
+ (delete-duplicates
+ (append-map dmd-service-imported-modules services)))
+
+ (assert-valid-graph services)
+
+ (mlet %store-monad ((modules (imported-modules modules))
+ (compiled (compiled-modules modules))
+ (files (mapm %store-monad dmd-service-file services)))
+ (define config
+ #~(begin
+ (eval-when (expand load eval)
+ (set! %load-path (cons #$modules %load-path))
+ (set! %load-compiled-path
+ (cons #$compiled %load-compiled-path)))
+
+ (use-modules (system repl error-handling))
+
+ ;; Arrange to spawn a REPL if loading one of FILES fails. This is
+ ;; better than a kernel panic.
+ (call-with-error-handling
+ (lambda ()
+ (apply register-services (map primitive-load '#$files))))
+
+ ;; guix-daemon 0.6 aborts if 'PATH' is undefined, so work around it.
+ (setenv "PATH" "/run/current-system/profile/bin")
+
+ (format #t "starting services...~%")
+ (for-each start
+ '#$(append-map dmd-service-provision
+ (filter dmd-service-auto-start?
+ services)))))
+
+ (gexp->file "dmd.conf" config)))
+
+(define (dmd-service-back-edges services)
+ "Return a procedure that, when given a <dmd-service> from SERVICES, returns
+the list of <dmd-service> that depend on it."
+ (define provision->service
+ (let ((services (fold (lambda (service result)
+ (fold (cut vhash-consq <> service <>)
+ result
+ (dmd-service-provision service)))
+ vlist-null
+ services)))
+ (lambda (name)
+ (match (vhash-assq name services)
+ ((_ . service) service)
+ (#f #f)))))
+
+ (define edges
+ (fold (lambda (service edges)
+ (fold (lambda (requirement edges)
+ (vhash-consq (provision->service requirement) service
+ edges))
+ edges
+ (dmd-service-requirement service)))
+ vlist-null
+ services))
+
+ (lambda (service)
+ (vhash-foldq* cons '() service edges)))
+
+;;; shepherd.scm ends here
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 4b0380e..d636502 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -20,7 +20,7 @@
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system pam)
#:use-module (gnu packages lsh)
#:use-module (srfi srfi-26)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 84bb30d..bc0aa62 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -19,7 +19,7 @@
(define-module (gnu services web)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system shadow)
#:use-module (gnu packages admin)
#:use-module (gnu packages web)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 7fea682..4b81bd9 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -20,7 +20,7 @@
(define-module (gnu services xorg)
#:use-module (gnu artwork)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu system pam)
#:use-module ((gnu packages base) #:select (canonical-package))
#:use-module (gnu packages guile)
diff --git a/gnu/system.scm b/gnu/system.scm
index 0245184..97103a9 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -44,7 +44,7 @@
#:use-module (gnu packages firmware)
#:autoload (gnu packages cryptsetup) (cryptsetup)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu services base)
#:use-module (gnu system grub)
#:use-module (gnu system shadow)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 887bceb..fcbb630 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -24,7 +24,7 @@
#:use-module (guix monads)
#:use-module ((guix store) #:select (%store-prefix))
#:use-module (guix profiles)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu packages admin)
#:use-module (gnu packages bash)
#:use-module (gnu packages linux)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 564ed02..3f368ca 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -40,7 +40,7 @@
#:use-module (gnu system vm)
#:use-module (gnu system grub)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (gnu packages grub)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in
index bf65416..27cc649 100644
--- a/po/guix/POTFILES.in
+++ b/po/guix/POTFILES.in
@@ -3,7 +3,7 @@
gnu/packages.scm
gnu/services.scm
gnu/system.scm
-gnu/services/dmd.scm
+gnu/services/shepherd.scm
gnu/system/shadow.scm
guix/scripts.scm
guix/scripts/build.scm
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 02e2524..cd135b9 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -114,10 +114,10 @@ else
grep "service 'networking'.*more than once" "$errorfile"
fi
-# Reporting unmet dmd requirements.
+# Reporting unmet shepherd requirements.
cat > "$tmpfile" <<EOF
-(use-modules (gnu) (gnu services dmd))
+(use-modules (gnu) (gnu services shepherd))
(use-service-modules networking)
(define buggy-service-type
diff --git a/tests/services.scm b/tests/services.scm
index 7d2e31b..ab8f293 100644
--- a/tests/services.scm
+++ b/tests/services.scm
@@ -18,7 +18,7 @@
(define-module (test-services)
#:use-module (gnu services)
- #:use-module (gnu services dmd)
+ #:use-module (gnu services shepherd)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 07/11] services: shepherd: Rename shepherd configuration file.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (5 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd) Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd' Alex Kost
` (4 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/services/shepherd.scm (dmd-configuration-file): Rename to...
(shepherd-configuration-file): ... this. Use "shepherd.conf" name.
(dmd-boot-gexp): Use it.
---
gnu/services/shepherd.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index a33985e..ccb71f3 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -55,13 +55,13 @@
;;; Commentary:
;;;
-;;; Instantiating system services as a dmd configuration file.
+;;; Instantiating system services as a shepherd configuration file.
;;;
;;; Code:
(define (dmd-boot-gexp services)
- (mlet %store-monad ((dmd-conf (dmd-configuration-file services)))
+ (mlet %store-monad ((shepherd-conf (shepherd-configuration-file services)))
(return #~(begin
;; Keep track of the booted system.
(false-if-exception (delete-file "/run/booted-system"))
@@ -79,7 +79,7 @@
;; Start shepherd.
(execl (string-append #$shepherd "/bin/shepherd")
- "shepherd" "--config" #$dmd-conf)))))
+ "shepherd" "--config" #$shepherd-conf)))))
(define dmd-root-service-type
(service-type
@@ -207,8 +207,8 @@ stored."
#:start #$(dmd-service-start service)
#:stop #$(dmd-service-stop service)))))
-(define (dmd-configuration-file services)
- "Return the dmd configuration file for SERVICES."
+(define (shepherd-configuration-file services)
+ "Return the shepherd configuration file for SERVICES."
(define modules
(delete-duplicates
(append-map dmd-service-imported-modules services)))
@@ -242,7 +242,7 @@ stored."
(filter dmd-service-auto-start?
services)))))
- (gexp->file "dmd.conf" config)))
+ (gexp->file "shepherd.conf" config)))
(define (dmd-service-back-edges services)
"Return a procedure that, when given a <dmd-service> from SERVICES, returns
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd'.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (6 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 07/11] services: shepherd: Rename shepherd configuration file Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 09/11] services: Rename 'dmd' services to 'shepherd' Alex Kost
` (3 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* gnu/services/xorg.scm (slim-configuration-dmd): Rename to...
(slim-configuration-shepherd): ... this.
(slim-shepherd-service): Adjust accordingly.
(slim-service): Take 'shepherd' keyword argument.
---
gnu/services/xorg.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 4b81bd9..fbe6fad 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -236,8 +236,8 @@ which should be passed to this script as the first argument. If not, the
(theme-name slim-configuration-theme-name)
(xauth slim-configuration-xauth
(default xauth))
- (dmd slim-configuration-dmd
- (default dmd))
+ (shepherd slim-configuration-shepherd
+ (default shepherd))
(bash slim-configuration-bash
(default bash))
(auto-login-session slim-configuration-auto-login-session)
@@ -257,7 +257,7 @@ which should be passed to this script as the first argument. If not, the
(slim (slim-configuration-slim config))
(xauth (slim-configuration-xauth config))
(startx (slim-configuration-startx config))
- (dmd (slim-configuration-dmd config))
+ (shepherd (slim-configuration-shepherd config))
(theme-name (slim-configuration-theme-name config)))
(mixed-text-file "slim.cfg" "
default_path /run/current-system/profile/bin
@@ -272,8 +272,8 @@ login_cmd exec " xinitrc " %session
sessiondir /run/current-system/profile/share/xsessions
session_msg session (F1 to change):
-halt_cmd " dmd "/sbin/halt
-reboot_cmd " dmd "/sbin/reboot\n"
+halt_cmd " shepherd "/sbin/halt
+reboot_cmd " shepherd "/sbin/reboot\n"
(if (slim-configuration-auto-login? config)
(string-append "auto_login yes\ndefault_user "
(slim-configuration-default-user config) "\n")
@@ -323,7 +323,7 @@ reboot_cmd " dmd "/sbin/reboot\n"
(default-user "")
(theme %default-slim-theme)
(theme-name %default-slim-theme-name)
- (xauth xauth) (dmd dmd) (bash bash)
+ (xauth xauth) (shepherd shepherd) (bash bash)
(auto-login-session #~(string-append #$windowmaker
"/bin/wmaker"))
(startx (xorg-start-command)))
@@ -358,7 +358,7 @@ theme."
(allow-empty-passwords? allow-empty-passwords?)
(auto-login? auto-login?) (default-user default-user)
(theme theme) (theme-name theme-name)
- (xauth xauth) (dmd dmd) (bash bash)
+ (xauth xauth) (shepherd shepherd) (bash bash)
(auto-login-session auto-login-session)
(startx startx))))
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 09/11] services: Rename 'dmd' services to 'shepherd'.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (7 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd' Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:29 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph' Alex Kost
` (2 subsequent siblings)
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* 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.
---
doc/guix.texi | 32 +++++-----
doc/images/service-graph.dot | 14 ++--
gnu/services.scm | 6 +-
gnu/services/avahi.scm | 10 +--
gnu/services/base.scm | 126 ++++++++++++++++++------------------
gnu/services/databases.scm | 8 +--
gnu/services/dbus.scm | 8 +--
gnu/services/desktop.scm | 20 +++---
gnu/services/lirc.scm | 8 +--
gnu/services/mail.scm | 10 +--
gnu/services/networking.scm | 54 ++++++++--------
gnu/services/shepherd.scm | 149 ++++++++++++++++++++++---------------------
gnu/services/ssh.scm | 10 +--
gnu/services/web.scm | 8 +--
gnu/services/xorg.scm | 8 +--
gnu/system.scm | 10 +--
gnu/system/install.scm | 4 +-
guix/scripts/system.scm | 24 +++----
tests/guix-system.sh | 4 +-
tests/services.scm | 14 ++--
20 files changed, 267 insertions(+), 260 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 6c6d170..9882264 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9472,7 +9472,7 @@ with a simple example, the service type for the Guix build daemon
(service-type
(name 'guix)
(extensions
- (list (service-extension dmd-root-service-type guix-dmd-service)
+ (list (service-extension shepherd-root-service-type guix-shepherd-service)
(service-extension account-service-type guix-accounts)
(service-extension activation-service-type guix-activation)))))
@end example
@@ -9496,11 +9496,11 @@ exception is the @dfn{boot service type}, which is the ultimate service.
In this example, @var{guix-service-type} extends three services:
@table @var
-@item dmd-root-service-type
-The @var{guix-dmd-service} procedure defines how the Shepherd service is
-extended. Namely, it returns a @code{<dmd-service>} object that defines
-how @command{guix-daemon} is started and stopped (@pxref{Shepherd
-Services}).
+@item shepherd-root-service-type
+The @var{guix-shepherd-service} procedure defines how the Shepherd
+service is extended. Namely, it returns a @code{<shepherd-service>}
+object that defines how @command{guix-daemon} is started and stopped
+(@pxref{Shepherd Services}).
@item account-service-type
This extension for this service is computed by @var{guix-accounts},
@@ -9539,8 +9539,8 @@ The service type for an @emph{extensible} service looks like this:
(define udev-service-type
(service-type (name 'udev)
(extensions
- (list (service-extension dmd-root-service-type
- udev-dmd-service)))
+ (list (service-extension shepherd-root-service-type
+ udev-shepherd-service)))
(compose concatenate) ;concatenate the list of rules
(extend (lambda (config rules)
@@ -9554,7 +9554,7 @@ The service type for an @emph{extensible} service looks like this:
This is the service type for the
@uref{https://wiki.gentoo.org/wiki/Project:Eudev, eudev device
management daemon}. Compared to the previous example, in addition to an
-extension of @var{dmd-root-service-type}, we see two new fields:
+extension of @var{shepherd-root-service-type}, we see two new fields:
@table @code
@item compose
@@ -9781,11 +9781,11 @@ You can actually generate such a graph for any operating system
definition using the @command{guix system dmd-graph} command
(@pxref{system-dmd-graph, @command{guix system dmd-graph}}).
-The @var{%dmd-root-service} is a service object representing PID@tie{}1,
-of type @var{dmd-root-service-type}; it can be extended by passing it
-lists of @code{<dmd-service>} objects.
+The @var{%shepherd-root-service} is a service object representing
+PID@tie{}1, of type @var{shepherd-root-service-type}; it can be extended
+by passing it lists of @code{<shepherd-service>} objects.
-@deftp {Data Type} dmd-service
+@deftp {Data Type} shepherd-service
The data type representing a service managed by Shepherd.
@table @asis
@@ -9832,15 +9832,15 @@ Shepherd.
@end table
@end deftp
-@defvr {Scheme Variable} dmd-root-service-type
+@defvr {Scheme Variable} shepherd-root-service-type
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{<dmd-service>}.
+Each extension must pass a list of @code{<shepherd-service>}.
@end defvr
-@defvr {Scheme Variable} %dmd-root-service
+@defvr {Scheme Variable} %shepherd-root-service
This service represents PID@tie{}1.
@end defvr
diff --git a/doc/images/service-graph.dot b/doc/images/service-graph.dot
index b084005..b7b617a 100644
--- a/doc/images/service-graph.dot
+++ b/doc/images/service-graph.dot
@@ -1,5 +1,5 @@
digraph "Service Type Dependencies" {
- dmd [shape = box, fontname = Helvetica];
+ shepherd [shape = box, fontname = Helvetica];
pam [shape = box, fontname = Helvetica];
etc [shape = box, fontname = Helvetica];
profile [shape = box, fontname = Helvetica];
@@ -7,14 +7,14 @@ digraph "Service Type Dependencies" {
activation [shape = box, fontname = Helvetica];
boot [shape = box, fontname = Helvetica];
system [shape = house, fontname = Helvetica];
- lshd -> dmd;
+ lshd -> shepherd;
lshd -> pam;
- udev -> dmd;
- nscd -> dmd [label = "extends"];
+ udev -> shepherd;
+ nscd -> shepherd [label = "extends"];
"nss-mdns" -> nscd;
"kvm-rules" -> udev;
colord -> udev;
- dbus -> dmd;
+ dbus -> shepherd;
colord -> dbus;
upower -> udev;
upower -> dbus;
@@ -23,7 +23,7 @@ digraph "Service Type Dependencies" {
elogind -> dbus;
elogind -> udev;
elogind -> polkit [label = "extends"];
- dmd -> boot;
+ shepherd -> boot;
colord -> accounts;
accounts -> activation;
accounts -> etc;
@@ -31,7 +31,7 @@ digraph "Service Type Dependencies" {
activation -> boot;
pam -> etc;
elogind -> pam;
- guix -> dmd;
+ guix -> shepherd;
guix -> activation;
guix -> accounts;
boot -> system;
diff --git a/gnu/services.scm b/gnu/services.scm
index f302816..056bb2a 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -86,8 +86,8 @@
;;; A service type describe how its instances extend instances of other
;;; service types. For instance, some services extend the instance of
;;; ACCOUNT-SERVICE-TYPE by providing it with accounts and groups to create;
-;;; others extend DMD-ROOT-SERVICE-TYPE by passing it instances of
-;;; <dmd-service>.
+;;; others extend SHEPHERD-ROOT-SERVICE-TYPE by passing it instances of
+;;; <shepherd-service>.
;;;
;;; When applicable, the service type defines how it can itself be extended,
;;; by providing one procedure to compose extensions, and one procedure to
@@ -209,7 +209,7 @@ containing the given entries."
(define (compute-boot-script _ mexps)
(mlet %store-monad ((gexps (sequence %store-monad mexps)))
(gexp->file "boot"
- ;; Clean up and activate the system, then spawn dmd.
+ ;; Clean up and activate the system, then spawn shepherd.
#~(begin #$@gexps))))
(define (boot-script-entry mboot)
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index d458042..8005b06 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -93,11 +93,11 @@
(use-modules (guix build utils))
(mkdir-p "/var/run/avahi-daemon")))
-(define (avahi-dmd-service config)
- "Return a list of <dmd-service> for CONFIG."
+(define (avahi-shepherd-service config)
+ "Return a list of <shepherd-service> for CONFIG."
(let ((config (configuration-file config))
(avahi (avahi-configuration-avahi config)))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the Avahi mDNS/DNS-SD responder.")
(provision '(avahi-daemon))
(requirement '(dbus-system networking))
@@ -111,8 +111,8 @@
(let ((avahi-package (compose list avahi-configuration-avahi)))
(service-type (name 'avahi)
(extensions
- (list (service-extension dmd-root-service-type
- avahi-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ avahi-shepherd-service)
(service-extension dbus-root-service-type
avahi-package)
(service-extension account-service-type
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 10df927..dcd9956 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -148,8 +148,8 @@
(compose identity)
(extend append)))
-(define %root-file-system-dmd-service
- (dmd-service
+(define %root-file-system-shepherd-service
+ (shepherd-service
(documentation "Take care of the root file system.")
(provision '(root-file-system))
(start #~(const #t))
@@ -181,37 +181,37 @@
(respawn? #f)))
(define root-file-system-service-type
- (dmd-service-type 'root-file-system
- (const %root-file-system-dmd-service)))
+ (shepherd-service-type 'root-file-system
+ (const %root-file-system-shepherd-service)))
(define (root-file-system-service)
"Return a service whose sole purpose is to re-mount read-only the root file
system upon shutdown (aka. cleanly \"umounting\" root.)
This service must be the root of the service dependency graph so that its
-'stop' action is invoked when dmd is the only process left."
+'stop' action is invoked when shepherd is the only process left."
(service root-file-system-service-type #f))
-(define (file-system->dmd-service-name file-system)
+(define (file-system->shepherd-service-name file-system)
"Return the symbol that denotes the service mounting and unmounting
FILE-SYSTEM."
(symbol-append 'file-system-
(string->symbol (file-system-mount-point file-system))))
-(define (mapped-device->dmd-service-name md)
- "Return the symbol that denotes the dmd service of MD, a <mapped-device>."
+(define (mapped-device->shepherd-service-name md)
+ "Return the symbol that denotes the shepherd service of MD, a <mapped-device>."
(symbol-append 'device-mapping-
(string->symbol (mapped-device-target md))))
-(define dependency->dmd-service-name
+(define dependency->shepherd-service-name
(match-lambda
((? mapped-device? md)
- (mapped-device->dmd-service-name md))
+ (mapped-device->shepherd-service-name md))
((? file-system? fs)
- (file-system->dmd-service-name fs))))
+ (file-system->shepherd-service-name fs))))
-(define (file-system-dmd-service file-system)
- "Return a list containing the dmd service for @var{file-system}."
+(define (file-system-shepherd-service file-system)
+ "Return a list containing the shepherd service for @var{file-system}."
(let ((target (file-system-mount-point file-system))
(device (file-system-device file-system))
(type (file-system-type file-system))
@@ -221,10 +221,10 @@ FILE-SYSTEM."
(dependencies (file-system-dependencies file-system)))
(if (file-system-mount? file-system)
(list
- (dmd-service
- (provision (list (file-system->dmd-service-name file-system)))
+ (shepherd-service
+ (provision (list (file-system->shepherd-service-name file-system)))
(requirement `(root-file-system
- ,@(map dependency->dmd-service-name dependencies)))
+ ,@(map dependency->shepherd-service-name dependencies)))
(documentation "Check, mount, and unmount the given file system.")
(start #~(lambda args
;; FIXME: Use or factorize with 'mount-file-system'.
@@ -276,11 +276,11 @@ FILE-SYSTEM."
(define file-system-service-type
;; TODO(?): Make this an extensible service that takes <file-system> objects
- ;; and returns a list of <dmd-service>.
+ ;; and returns a list of <shepherd-service>.
(service-type (name 'file-system)
(extensions
- (list (service-extension dmd-root-service-type
- file-system-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ file-system-shepherd-service)
(service-extension fstab-service-type
identity)))))
@@ -290,10 +290,10 @@ object."
(service file-system-service-type file-system))
(define user-unmount-service-type
- (dmd-service-type
+ (shepherd-service-type
'user-file-systems
(lambda (known-mount-points)
- (dmd-service
+ (shepherd-service
(documentation "Unmount manually-mounted file systems.")
(provision '(user-file-systems))
(start #~(const #t))
@@ -328,15 +328,15 @@ in KNOWN-MOUNT-POINTS when it is stopped."
"/etc/shepherd/do-not-kill")
(define user-processes-service-type
- (dmd-service-type
+ (shepherd-service-type
'user-processes
(match-lambda
((requirements grace-delay)
- (dmd-service
+ (shepherd-service
(documentation "When stopped, terminate all user processes.")
(provision '(user-processes))
(requirement (cons* 'root-file-system 'user-file-systems
- (map file-system->dmd-service-name
+ (map file-system->shepherd-service-name
requirements)))
(start #~(const #t))
(stop #~(lambda _
@@ -410,7 +410,7 @@ that the root file system can be re-mounted read-only, just before
rebooting/halting. Processes still running GRACE-DELAY seconds after SIGTERM
has been sent are terminated with SIGKILL.
-The returned service will depend on 'root-file-system' and on all the dmd
+The returned service will depend on 'root-file-system' and on all the shepherd
services corresponding to FILE-SYSTEMS.
All the services that spawn processes must depend on this one so that they are
@@ -457,10 +457,10 @@ strings or string-valued gexps."
;;;
(define host-name-service-type
- (dmd-service-type
+ (shepherd-service-type
'host-name
(lambda (name)
- (dmd-service
+ (shepherd-service
(documentation "Initialize the machine's host name.")
(provision '(host-name))
(start #~(lambda _
@@ -490,10 +490,10 @@ strings or string-valued gexps."
(zero? (cdr (waitpid pid))))))))
(define console-keymap-service-type
- (dmd-service-type
+ (shepherd-service-type
'console-keymap
(lambda (file)
- (dmd-service
+ (shepherd-service
(documentation (string-append "Load console keymap (loadkeys)."))
(provision '(console-keymap))
(start #~(lambda _
@@ -506,12 +506,12 @@ strings or string-valued gexps."
(service console-keymap-service-type file))
(define console-font-service-type
- (dmd-service-type
+ (shepherd-service-type
'console-font
(match-lambda
((tty font)
(let ((device (string-append "/dev/" tty)))
- (dmd-service
+ (shepherd-service
(documentation "Load a Unicode console font.")
(provision (list (symbol-append 'console-font-
(string->symbol tty))))
@@ -568,12 +568,12 @@ strings or string-valued gexps."
#:motd
(mingetty-configuration-motd conf))))
-(define mingetty-dmd-service
+(define mingetty-shepherd-service
(match-lambda
(($ <mingetty-configuration> mingetty tty motd auto-login login-program
login-pause? allow-empty-passwords?)
(list
- (dmd-service
+ (shepherd-service
(documentation "Run mingetty on an tty.")
(provision (list (symbol-append 'term- (string->symbol tty))))
@@ -598,8 +598,8 @@ strings or string-valued gexps."
(define mingetty-service-type
(service-type (name 'mingetty)
- (extensions (list (service-extension dmd-root-service-type
- mingetty-dmd-service)
+ (extensions (list (service-extension shepherd-root-service-type
+ mingetty-shepherd-service)
(service-extension pam-root-service-type
mingetty-pam-service)))))
@@ -711,11 +711,11 @@ the tty to run, among other things."
(string-concatenate
(map cache->config caches)))))))
-(define (nscd-dmd-service config)
- "Return a dmd service for CONFIG, an <nscd-configuration> object."
+(define (nscd-shepherd-service config)
+ "Return a shepherd service for CONFIG, an <nscd-configuration> object."
(let ((nscd.conf (nscd.conf-file config))
(name-services (nscd-configuration-name-services config)))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run libc's name service cache daemon (nscd).")
(provision '(nscd))
(requirement '(user-processes))
@@ -747,8 +747,8 @@ the tty to run, among other things."
(extensions
(list (service-extension activation-service-type
(const nscd-activation))
- (service-extension dmd-root-service-type
- nscd-dmd-service)))
+ (service-extension shepherd-root-service-type
+ nscd-shepherd-service)))
;; This can be extended by providing additional name services
;; such as nss-mdns.
@@ -767,10 +767,10 @@ Service Switch}, for an example."
(service nscd-service-type config))
(define syslog-service-type
- (dmd-service-type
+ (shepherd-service-type
'syslog
(lambda (config-file)
- (dmd-service
+ (shepherd-service
(documentation "Run the syslog daemon (syslogd).")
(provision '(syslogd))
(requirement '(user-processes))
@@ -885,13 +885,13 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(define %default-guix-configuration
(guix-configuration))
-(define (guix-dmd-service config)
- "Return a <dmd-service> for the Guix daemon service with CONFIG."
+(define (guix-shepherd-service config)
+ "Return a <shepherd-service> for the Guix daemon service with CONFIG."
(match config
(($ <guix-configuration> guix build-group build-accounts authorize-key?
use-substitutes? substitute-urls extra-options
lsof lsh)
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the Guix daemon.")
(provision '(guix-daemon))
(requirement '(user-processes))
@@ -941,7 +941,7 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(service-type
(name 'guix)
(extensions
- (list (service-extension dmd-root-service-type guix-dmd-service)
+ (list (service-extension shepherd-root-service-type guix-shepherd-service)
(service-extension account-service-type guix-accounts)
(service-extension activation-service-type guix-activation)
(service-extension profile-service-type
@@ -963,10 +963,10 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(host guix-publish-configuration-host ;string
(default "localhost")))
-(define guix-publish-dmd-service
+(define guix-publish-shepherd-service
(match-lambda
(($ <guix-publish-configuration> guix port host)
- (list (dmd-service
+ (list (shepherd-service
(provision '(guix-publish))
(requirement '(guix-daemon))
(start #~(make-forkexec-constructor
@@ -989,8 +989,8 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(define guix-publish-service-type
(service-type (name 'guix-publish)
(extensions
- (list (service-extension dmd-root-service-type
- guix-publish-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ guix-publish-shepherd-service)
(service-extension account-service-type
(const %guix-publish-accounts))))))
@@ -1070,8 +1070,8 @@ item of @var{packages}."
(udev-rule "90-kvm.rules"
"KERNEL==\"kvm\", GROUP=\"kvm\", MODE=\"0660\"\n"))
-(define udev-dmd-service
- ;; Return a <dmd-service> for UDEV with RULES.
+(define udev-shepherd-service
+ ;; Return a <shepherd-service> for UDEV with RULES.
(match-lambda
(($ <udev-configuration> udev rules)
(let* ((rules (udev-rules-union (cons* udev kvm-udev-rule rules)))
@@ -1082,7 +1082,7 @@ item of @var{packages}."
"udev_rules=\"~a/lib/udev/rules.d\"\n"
#$rules))))))
(list
- (dmd-service
+ (shepherd-service
(provision '(udev))
;; Udev needs /dev to be a 'devtmpfs' mount so that new device nodes can
@@ -1154,8 +1154,8 @@ item of @var{packages}."
(define udev-service-type
(service-type (name 'udev)
(extensions
- (list (service-extension dmd-root-service-type
- udev-dmd-service)))
+ (list (service-extension shepherd-root-service-type
+ udev-shepherd-service)))
(compose concatenate) ;concatenate the list of rules
(extend (lambda (config rules)
@@ -1172,11 +1172,11 @@ extra rules from the packages listed in @var{rules}."
(udev-configuration (udev udev) (rules rules))))
(define device-mapping-service-type
- (dmd-service-type
+ (shepherd-service-type
'device-mapping
(match-lambda
((target open close)
- (dmd-service
+ (shepherd-service
(provision (list (symbol-append 'device-mapping- (string->symbol target))))
(requirement '(udev))
(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."
(list target open close)))
(define swap-service-type
- (dmd-service-type
+ (shepherd-service-type
'swap
(lambda (device)
(define requirement
@@ -1201,7 +1201,7 @@ gexp, to open it, and evaluate @var{close} to close it."
(string->symbol (basename device))))
'()))
- (dmd-service
+ (shepherd-service
(provision (list (symbol-append 'swap- (string->symbol device))))
(requirement `(udev ,@requirement))
(documentation "Enable the given swap device.")
@@ -1223,10 +1223,10 @@ gexp, to open it, and evaluate @var{close} to close it."
(gpm gpm-configuration-gpm) ;package
(options gpm-configuration-options)) ;list of strings
-(define gpm-dmd-service
+(define gpm-shepherd-service
(match-lambda
(($ <gpm-configuration> gpm options)
- (list (dmd-service
+ (list (shepherd-service
(requirement '(udev))
(provision '(gpm))
(start #~(lambda ()
@@ -1254,8 +1254,8 @@ gexp, to open it, and evaluate @var{close} to close it."
(define gpm-service-type
(service-type (name 'gpm)
(extensions
- (list (service-extension dmd-root-service-type
- gpm-dmd-service)))))
+ (list (service-extension shepherd-root-service-type
+ gpm-shepherd-service)))))
(define* (gpm-service #:key (gpm gpm)
(options '("-m" "/dev/input/mice" "-t" "ps2")))
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index c85606e..8b14201 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -96,7 +96,7 @@ host all all ::1/128 trust"))
(primitive-exit 1))))
(pid (waitpid pid))))))))
-(define postgresql-dmd-service
+(define postgresql-shepherd-service
(match-lambda
(($ <postgresql-configuration> postgresql config-file data-directory)
(let ((start-script
@@ -112,7 +112,7 @@ host all all ::1/128 trust"))
(string-append "--config-file="
#$config-file)
"-D" #$data-directory)))))
- (list (dmd-service
+ (list (shepherd-service
(provision '(postgres))
(documentation "Run the PostgreSQL daemon.")
(requirement '(user-processes loopback))
@@ -122,8 +122,8 @@ host all all ::1/128 trust"))
(define postgresql-service-type
(service-type (name 'postgresql)
(extensions
- (list (service-extension dmd-root-service-type
- postgresql-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ postgresql-shepherd-service)
(service-extension activation-service-type
postgresql-activation)
(service-extension account-service-type
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 3e5fa14..88a840a 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
(execl prog)))
(waitpid pid)))))))
-(define dbus-dmd-service
+(define dbus-shepherd-service
(match-lambda
(($ <dbus-configuration> dbus)
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the D-Bus system daemon.")
(provision '(dbus-system))
(requirement '(user-processes))
@@ -174,8 +174,8 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in
(define dbus-root-service-type
(service-type (name 'dbus)
(extensions
- (list (service-extension dmd-root-service-type
- dbus-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ dbus-shepherd-service)
(service-extension activation-service-type
dbus-activation)
(service-extension etc-service-type
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index e6d3232..9d6abc3 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."
"UPOWER_CONF_FILE_NAME"
(upower-configuration-file config))))
-(define (upower-dmd-service config)
- "Return a dmd service for UPower with CONFIG."
+(define (upower-shepherd-service config)
+ "Return a shepherd service for UPower with CONFIG."
(let ((upower (upower-configuration-upower config))
(config (upower-configuration-file config)))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the UPower power and battery monitor.")
(provision '(upower-daemon))
(requirement '(dbus-system udev))
@@ -186,8 +186,8 @@ is set to @var{value} when the bus daemon launches it."
(extensions
(list (service-extension dbus-root-service-type
upower-dbus-service)
- (service-extension dmd-root-service-type
- upower-dmd-service)
+ (service-extension shepherd-root-service-type
+ upower-shepherd-service)
(service-extension activation-service-type
(const %upower-activation))
(service-extension udev-service-type
@@ -644,13 +644,13 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
("HybridSleepState" (sleep-list elogind-hybrid-sleep-state))
("HybridSleepMode" (sleep-list elogind-hybrid-sleep-mode))))
-(define (elogind-dmd-service config)
- "Return a dmd service for elogind, using @var{config}."
+(define (elogind-shepherd-service config)
+ "Return a shepherd service for elogind, using @var{config}."
;; TODO: We could probably rely on service activation but the '.service'
;; file currently contains an erroneous 'Exec' line.
(let ((config-file (elogind-configuration-file config))
(elogind (elogind-package config)))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the elogind login and seat management service.")
(provision '(elogind))
(requirement '(dbus-system))
@@ -664,8 +664,8 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
(define elogind-service-type
(service-type (name 'elogind)
(extensions
- (list (service-extension dmd-root-service-type
- elogind-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ elogind-shepherd-service)
(service-extension dbus-root-service-type
(compose list elogind-package))
(service-extension udev-service-type
diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm
index bfaca9b..069084a 100644
--- a/gnu/services/lirc.scm
+++ b/gnu/services/lirc.scm
@@ -48,10 +48,10 @@
(use-modules (guix build utils))
(mkdir-p "/var/run/lirc")))
-(define lirc-dmd-service
+(define lirc-shepherd-service
(match-lambda
(($ <lirc-configuration> lirc device driver config-file options)
- (list (dmd-service
+ (list (shepherd-service
(provision '(lircd))
(documentation "Run the LIRC daemon.")
(requirement '(user-processes))
@@ -73,8 +73,8 @@
(define lirc-service-type
(service-type (name 'lirc)
(extensions
- (list (service-extension dmd-root-service-type
- lirc-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ lirc-shepherd-service)
(service-extension activation-service-type
(const %lirc-activation))))))
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 181693a..4bd1b96 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.
#:owner (getpwnam "root")
#:common-name (format #f "Dovecot service on ~a" (gethostname))))))
-(define (dovecot-dmd-service config)
- "Return a list of <dmd-service> for CONFIG."
+(define (dovecot-shepherd-service config)
+ "Return a list of <shepherd-service> for CONFIG."
(let* ((config-str
(cond
((opaque-dovecot-configuration? config)
@@ -1589,7 +1589,7 @@ greyed out, instead of only later giving \"not selectable\" popup error.
(dovecot (if (opaque-dovecot-configuration? config)
(opaque-dovecot-configuration-dovecot config)
(dovecot-configuration-dovecot config))))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Run the Dovecot POP3/IMAP mail server.")
(provision '(dovecot))
(requirement '(networking))
@@ -1606,8 +1606,8 @@ greyed out, instead of only later giving \"not selectable\" popup error.
(define dovecot-service-type
(service-type (name 'dovecot)
(extensions
- (list (service-extension dmd-root-service-type
- dovecot-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ dovecot-shepherd-service)
(service-extension account-service-type
(const %dovecot-accounts))
(service-extension pam-root-service-type
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index bce1778..5a0a211 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -98,7 +98,7 @@ fe80::1%lo0 apps.facebook.com\n")
(net-tools static-networking-net-tools))
(define static-networking-service-type
- (dmd-service-type
+ (shepherd-service-type
'static-networking
(match-lambda
(($ <static-networking> interface ip gateway provision
@@ -107,7 +107,7 @@ fe80::1%lo0 apps.facebook.com\n")
;; TODO: Eventually replace 'route' with bindings for the appropriate
;; ioctls.
- (dmd-service
+ (shepherd-service
;; Unless we're providing the loopback interface, wait for udev to be up
;; and running so that INTERFACE is actually usable.
@@ -171,7 +171,7 @@ gateway."
(net-tools net-tools))))
(define dhcp-client-service-type
- (dmd-service-type
+ (shepherd-service-type
'dhcp-client
(lambda (dhcp)
(define dhclient
@@ -180,7 +180,7 @@ gateway."
(define pid-file
"/var/run/dhclient.pid")
- (dmd-service
+ (shepherd-service
(documentation "Set up networking via DHCP.")
(requirement '(user-processes udev))
@@ -248,7 +248,7 @@ Protocol (DHCP) client, on all the non-loopback network interfaces."
(default ntp))
(servers ntp-configuration-servers))
-(define ntp-dmd-service
+(define ntp-shepherd-service
(match-lambda
(($ <ntp-configuration> ntp servers)
(let ()
@@ -271,7 +271,7 @@ restrict -6 ::1\n"))
(define ntpd.conf
(plain-file "ntpd.conf" config))
- (list (dmd-service
+ (list (shepherd-service
(provision '(ntpd))
(documentation "Run the Network Time Protocol (NTP) daemon.")
(requirement '(user-processes networking))
@@ -292,8 +292,8 @@ restrict -6 ::1\n"))
(define ntp-service-type
(service-type (name 'ntp)
(extensions
- (list (service-extension dmd-root-service-type
- ntp-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ ntp-shepherd-service)
(service-extension account-service-type
(const %ntp-accounts))))))
@@ -376,12 +376,12 @@ HiddenServicePort ~a ~a~%"
#t)))
#:modules '((guix build utils))))))
-(define (tor-dmd-service config)
- "Return a <dmd-service> running TOR."
+(define (tor-shepherd-service config)
+ "Return a <shepherd-service> running TOR."
(match config
(($ <tor-configuration> tor)
(let ((torrc (tor-configuration->torrc config)))
- (list (dmd-service
+ (list (shepherd-service
(provision '(tor))
;; Tor needs at least one network interface to be up, hence the
@@ -421,8 +421,8 @@ HiddenServicePort ~a ~a~%"
(define tor-service-type
(service-type (name 'tor)
(extensions
- (list (service-extension dmd-root-service-type
- tor-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ tor-shepherd-service)
(service-extension account-service-type
(const %tor-accounts))
(service-extension activation-service-type
@@ -492,7 +492,7 @@ project's documentation} for more information."
(port bitlbee-configuration-port)
(extra-settings bitlbee-configuration-extra-settings))
-(define bitlbee-dmd-service
+(define bitlbee-shepherd-service
(match-lambda
(($ <bitlbee-configuration> bitlbee interface port extra-settings)
(let ((conf (plain-file "bitlbee.conf"
@@ -504,7 +504,7 @@ project's documentation} for more information."
DaemonPort = " (number->string port) "
" extra-settings))))
- (list (dmd-service
+ (list (shepherd-service
(provision '(bitlbee))
(requirement '(user-processes loopback))
(start #~(make-forkexec-constructor
@@ -537,8 +537,8 @@ project's documentation} for more information."
(define bitlbee-service-type
(service-type (name 'bitlbee)
(extensions
- (list (service-extension dmd-root-service-type
- bitlbee-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ bitlbee-shepherd-service)
(service-extension account-service-type
(const %bitlbee-accounts))
(service-extension activation-service-type
@@ -579,9 +579,9 @@ configuration file."
(copy-file (string-append #$wicd file-name)
file-name)))))
-(define (wicd-dmd-service wicd)
- "Return a dmd service for WICD."
- (list (dmd-service
+(define (wicd-shepherd-service wicd)
+ "Return a shepherd service for WICD."
+ (list (shepherd-service
(documentation "Run the Wicd network manager.")
(provision '(networking))
(requirement '(user-processes dbus-system loopback))
@@ -593,8 +593,8 @@ configuration file."
(define wicd-service-type
(service-type (name 'wicd)
(extensions
- (list (service-extension dmd-root-service-type
- wicd-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ wicd-shepherd-service)
(service-extension dbus-root-service-type
list)
(service-extension activation-service-type
@@ -624,9 +624,9 @@ and @command{wicd-curses} user interfaces."
(use-modules (guix build utils))
(mkdir-p "/etc/NetworkManager/system-connections")))
-(define (network-manager-dmd-service network-manager)
- "Return a dmd service for NETWORK-MANAGER."
- (list (dmd-service
+(define (network-manager-shepherd-service network-manager)
+ "Return a shepherd service for NETWORK-MANAGER."
+ (list (shepherd-service
(documentation "Run the NetworkManager.")
(provision '(networking))
(requirement '(user-processes dbus-system loopback))
@@ -639,8 +639,8 @@ and @command{wicd-curses} user interfaces."
(define network-manager-service-type
(service-type (name 'network-manager)
(extensions
- (list (service-extension dmd-root-service-type
- network-manager-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ network-manager-shepherd-service)
(service-extension dbus-root-service-type list)
(service-extension activation-service-type
(const %network-manager-activation))
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index ccb71f3..36ed9eb 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -32,26 +32,26 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
- #:export (dmd-root-service-type
- %dmd-root-service
- dmd-service-type
-
- dmd-service
- 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
+ #:export (shepherd-root-service-type
+ %shepherd-root-service
+ shepherd-service-type
+
+ shepherd-service
+ 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
%default-imported-modules
%default-modules
- dmd-service-back-edges))
+ shepherd-service-back-edges))
;;; Commentary:
;;;
@@ -60,7 +60,7 @@
;;; Code:
-(define (dmd-boot-gexp services)
+(define (shepherd-boot-gexp services)
(mlet %store-monad ((shepherd-conf (shepherd-configuration-file services)))
(return #~(begin
;; Keep track of the booted system.
@@ -81,29 +81,30 @@
(execl (string-append #$shepherd "/bin/shepherd")
"shepherd" "--config" #$shepherd-conf)))))
-(define dmd-root-service-type
+(define shepherd-root-service-type
(service-type
- (name 'dmd-root)
- ;; Extending the root dmd service (aka. PID 1) happens by concatenating the
- ;; list of services provided by the extensions.
+ (name 'shepherd-root)
+ ;; Extending the root shepherd service (aka. PID 1) happens by
+ ;; concatenating the list of services provided by the extensions.
(compose concatenate)
(extend append)
- (extensions (list (service-extension boot-service-type dmd-boot-gexp)
+ (extensions (list (service-extension boot-service-type
+ shepherd-boot-gexp)
(service-extension profile-service-type
(const (list shepherd)))))))
-(define %dmd-root-service
- ;; The root dmd service, aka. PID 1. Its parameter is a list of
- ;; <dmd-service> objects.
- (service dmd-root-service-type '()))
+(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 '()))
-(define-syntax-rule (dmd-service-type service-name proc)
- "Return a <service-type> denoting a simple dmd service--i.e., the type for a
-service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
+(define-syntax-rule (shepherd-service-type service-name proc)
+ "Return a <service-type> denoting a simple shepherd service--i.e., the type
+for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else."
(service-type
(name service-name)
(extensions
- (list (service-extension dmd-root-service-type
+ (list (service-extension shepherd-root-service-type
(compose list proc))))))
(define %default-imported-modules
@@ -118,35 +119,35 @@ service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
(guix build utils)
(guix build syscalls)))
-(define-record-type* <dmd-service>
- dmd-service make-dmd-service
- dmd-service?
- (documentation dmd-service-documentation ;string
+(define-record-type* <shepherd-service>
+ shepherd-service make-shepherd-service
+ shepherd-service?
+ (documentation shepherd-service-documentation ;string
(default "[No documentation.]"))
- (provision dmd-service-provision) ;list of symbols
- (requirement dmd-service-requirement ;list of symbols
+ (provision shepherd-service-provision) ;list of symbols
+ (requirement shepherd-service-requirement ;list of symbols
(default '()))
- (respawn? dmd-service-respawn? ;Boolean
+ (respawn? shepherd-service-respawn? ;Boolean
(default #t))
- (start dmd-service-start) ;g-expression (procedure)
- (stop dmd-service-stop ;g-expression (procedure)
+ (start shepherd-service-start) ;g-expression (procedure)
+ (stop shepherd-service-stop ;g-expression (procedure)
(default #~(const #f)))
- (auto-start? dmd-service-auto-start? ;Boolean
+ (auto-start? shepherd-service-auto-start? ;Boolean
(default #t))
- (modules dmd-service-modules ;list of module names
+ (modules shepherd-service-modules ;list of module names
(default %default-modules))
- (imported-modules dmd-service-imported-modules ;list of module names
+ (imported-modules shepherd-service-imported-modules ;list of module names
(default %default-imported-modules)))
(define (assert-valid-graph services)
- "Raise an error if SERVICES does not define a valid dmd service graph, for
-instance if a service requires a nonexistent service, or if more than one
+ "Raise an error if SERVICES does not define a valid shepherd service graph,
+for instance if a service requires a nonexistent service, or if more than one
service uses a given name.
-These are constraints that dmd's 'register-service' verifies but we'd better
-verify them here statically than wait until PID 1 halts with an assertion
-failure."
+These are constraints that shepherd's 'register-service' verifies but we'd
+better verify them here statically than wait until PID 1 halts with an
+assertion failure."
(define provisions
;; The set of provisions (symbols). Bail out if a symbol is given more
;; than once.
@@ -159,9 +160,9 @@ failure."
(format #f (_ "service '~a' provided more than once")
symbol)))))))
- (for-each assert-unique (dmd-service-provision service))
- (fold set-insert set (dmd-service-provision service)))
- (setq 'dmd)
+ (for-each assert-unique (shepherd-service-provision service))
+ (fold set-insert set (shepherd-service-provision service)))
+ (setq 'shepherd)
services))
(define (assert-satisfied-requirements service)
@@ -173,51 +174,53 @@ failure."
(message
(format #f (_ "service '~a' requires '~a', \
which is undefined")
- (match (dmd-service-provision service)
+ (match (shepherd-service-provision service)
((head . _) head)
(_ service))
requirement)))))))
- (dmd-service-requirement service)))
+ (shepherd-service-requirement service)))
(for-each assert-satisfied-requirements services))
-(define (dmd-service-file-name service)
+(define (shepherd-service-file-name service)
"Return the file name where the initialization code for SERVICE is to be
stored."
(let ((provisions (string-join (map symbol->string
- (dmd-service-provision service)))))
- (string-append "dmd-"
+ (shepherd-service-provision service)))))
+ (string-append "shepherd-"
(string-map (match-lambda
(#\/ #\-)
(chr chr))
provisions)
".scm")))
-(define (dmd-service-file service)
+(define (shepherd-service-file service)
"Return a file defining SERVICE."
- (gexp->file (dmd-service-file-name service)
+ (gexp->file (shepherd-service-file-name service)
#~(begin
- (use-modules #$@(dmd-service-modules service))
+ (use-modules #$@(shepherd-service-modules service))
(make <service>
- #:docstring '#$(dmd-service-documentation service)
- #:provides '#$(dmd-service-provision service)
- #:requires '#$(dmd-service-requirement service)
- #:respawn? '#$(dmd-service-respawn? service)
- #:start #$(dmd-service-start service)
- #:stop #$(dmd-service-stop service)))))
+ #:docstring '#$(shepherd-service-documentation service)
+ #:provides '#$(shepherd-service-provision service)
+ #:requires '#$(shepherd-service-requirement service)
+ #:respawn? '#$(shepherd-service-respawn? service)
+ #:start #$(shepherd-service-start service)
+ #:stop #$(shepherd-service-stop service)))))
(define (shepherd-configuration-file services)
"Return the shepherd configuration file for SERVICES."
(define modules
(delete-duplicates
- (append-map dmd-service-imported-modules services)))
+ (append-map shepherd-service-imported-modules services)))
(assert-valid-graph services)
(mlet %store-monad ((modules (imported-modules modules))
(compiled (compiled-modules modules))
- (files (mapm %store-monad dmd-service-file services)))
+ (files (mapm %store-monad
+ shepherd-service-file
+ services)))
(define config
#~(begin
(eval-when (expand load eval)
@@ -238,20 +241,20 @@ stored."
(format #t "starting services...~%")
(for-each start
- '#$(append-map dmd-service-provision
- (filter dmd-service-auto-start?
+ '#$(append-map shepherd-service-provision
+ (filter shepherd-service-auto-start?
services)))))
(gexp->file "shepherd.conf" config)))
-(define (dmd-service-back-edges services)
- "Return a procedure that, when given a <dmd-service> from SERVICES, returns
-the list of <dmd-service> that depend on it."
+(define (shepherd-service-back-edges services)
+ "Return a procedure that, when given a <shepherd-service> from SERVICES,
+returns the list of <shepherd-service> that depend on it."
(define provision->service
(let ((services (fold (lambda (service result)
(fold (cut vhash-consq <> service <>)
result
- (dmd-service-provision service)))
+ (shepherd-service-provision service)))
vlist-null
services)))
(lambda (name)
@@ -265,7 +268,7 @@ the list of <dmd-service> that depend on it."
(vhash-consq (provision->service requirement) service
edges))
edges
- (dmd-service-requirement service)))
+ (shepherd-service-requirement service)))
vlist-null
services))
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index d636502..33e1951 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -103,8 +103,8 @@
(lsh-configuration-host-key config))
#t)))
-(define (lsh-dmd-service config)
- "Return a <dmd-service> for lsh with CONFIG."
+(define (lsh-shepherd-service config)
+ "Return a <shepherd-service> for lsh with CONFIG."
(define lsh (lsh-configuration-lsh config))
(define pid-file (lsh-configuration-pid-file config))
(define pid-file? (lsh-configuration-pid-file? config))
@@ -151,7 +151,7 @@
'(networking syslogd)
'(networking)))
- (list (dmd-service
+ (list (shepherd-service
(documentation "GNU lsh SSH server")
(provision '(ssh-daemon))
(requirement requires)
@@ -168,8 +168,8 @@
(define lsh-service-type
(service-type (name 'lsh)
(extensions
- (list (service-extension dmd-root-service-type
- lsh-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ lsh-shepherd-service)
(service-extension pam-root-service-type
lsh-pam-services)
(service-extension activation-service-type
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index bc0aa62..0e17f6e 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -79,7 +79,7 @@
(system* (string-append #$nginx "/bin/nginx")
"-c" #$config-file "-t")))))
-(define nginx-dmd-service
+(define nginx-shepherd-service
(match-lambda
(($ <nginx-configuration> nginx log-directory run-directory config-file)
(let* ((nginx-binary #~(string-append #$nginx "/sbin/nginx"))
@@ -90,7 +90,7 @@
(system* #$nginx-binary "-c" #$config-file #$@args))))))
;; TODO: Add 'reload' action.
- (list (dmd-service
+ (list (shepherd-service
(provision '(nginx))
(documentation "Run the nginx daemon.")
(requirement '(user-processes loopback))
@@ -100,8 +100,8 @@
(define nginx-service-type
(service-type (name 'nginx)
(extensions
- (list (service-extension dmd-root-service-type
- nginx-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ nginx-shepherd-service)
(service-extension activation-service-type
nginx-activation)
(service-extension account-service-type
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index fbe6fad..a93dbfe 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
#:allow-empty-passwords?
(slim-configuration-allow-empty-passwords? config))))
-(define (slim-dmd-service config)
+(define (slim-shepherd-service config)
(define slim.cfg
(let ((xinitrc (xinitrc #:fallback-session
(slim-configuration-auto-login-session config)))
@@ -285,7 +285,7 @@ reboot_cmd " shepherd "/sbin/reboot\n"
(define theme
(slim-configuration-theme config))
- (list (dmd-service
+ (list (shepherd-service
(documentation "Xorg display server")
(provision '(xorg-server))
(requirement '(user-processes host-name udev))
@@ -308,8 +308,8 @@ reboot_cmd " shepherd "/sbin/reboot\n"
(define slim-service-type
(service-type (name 'slim)
(extensions
- (list (service-extension dmd-root-service-type
- slim-dmd-service)
+ (list (service-extension shepherd-root-service-type
+ slim-shepherd-service)
(service-extension pam-root-service-type
slim-pam-service)
diff --git a/gnu/system.scm b/gnu/system.scm
index 97103a9..b4264fe 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -303,11 +303,11 @@ a container or that of a \"bare metal\" system."
(cons* (service system-service-type entries)
%boot-service
- ;; %DMD-ROOT-SERVICE must come first so that the gexp that execs
- ;; dmd comes last in the boot script (XXX). Likewise, the cleanup
- ;; service must come last so that its gexp runs before activation
- ;; code.
- %dmd-root-service
+ ;; %SHEPHERD-ROOT-SERVICE must come first so that the gexp that
+ ;; execs shepherd comes last in the boot script (XXX). Likewise,
+ ;; the cleanup service must come last so that its gexp runs before
+ ;; activation code.
+ %shepherd-root-service
%activation-service
(service cleanup-service-type #f)
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index fcbb630..bd501c7 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -164,10 +164,10 @@ current store is on a RAM disk."
(rmdir "/.rw-store"))))))
(define cow-store-service-type
- (dmd-service-type
+ (shepherd-service-type
'cow-store
(lambda _
- (dmd-service
+ (shepherd-service
(requirement '(root-file-system user-processes))
(provision '(cow-store))
(documentation
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 3f368ca..b0f8be7 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -313,17 +313,17 @@ list of services."
(edges (lift1 (service-back-edges services) %store-monad))))
(define (dmd-service-node-label service)
- "Return a label for a node representing a <dmd-service>."
- (string-join (map symbol->string (dmd-service-provision service))))
+ "Return a label for a node representing a <shepherd-service>."
+ (string-join (map symbol->string (shepherd-service-provision service))))
(define (dmd-service-node-type services)
- "Return a node type for SERVICES, a list of <dmd-service>."
+ "Return a node type for SERVICES, a list of <shepherd-service>."
(node-type
(name "dmd-service")
(description "the dependency graph of dmd services")
(identifier (lift1 dmd-service-node-label %store-monad))
(label dmd-service-node-label)
- (edges (lift1 (dmd-service-back-edges services) %store-monad))))
+ (edges (lift1 (shepherd-service-back-edges services) %store-monad))))
\f
;;;
@@ -475,14 +475,14 @@ building anything."
#:reverse-edges? #t)))
(define (export-dmd-graph os port)
- "Export the graph of dmd services of OS to PORT."
- (let* ((services (operating-system-services os))
- (pid1 (fold-services services
- #:target-type dmd-root-service-type))
- (dmds (service-parameters pid1)) ;the list of <dmd-service>
- (sinks (filter (lambda (service)
- (null? (dmd-service-requirement service)))
- dmds)))
+ "Export the graph of shepherd services of OS to PORT."
+ (let* ((services (operating-system-services os))
+ (pid1 (fold-services services
+ #:target-type shepherd-root-service-type))
+ (shepherds (service-parameters pid1)) ;list of <shepherd-service>
+ (sinks (filter (lambda (service)
+ (null? (shepherd-service-requirement service)))
+ shepherds)))
(export-graph sinks (current-output-port)
#:node-type (dmd-service-node-type dmds)
#:reverse-edges? #t)))
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index cd135b9..d9e1679 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -121,10 +121,10 @@ cat > "$tmpfile" <<EOF
(use-service-modules networking)
(define buggy-service-type
- (dmd-service-type
+ (shepherd-service-type
'buggy
(lambda _
- (dmd-service
+ (shepherd-service
(provision '(buggy!))
(requirement '(does-not-exist))
(start #t)))))
diff --git a/tests/services.scm b/tests/services.scm
index ab8f293..3635549 100644
--- a/tests/services.scm
+++ b/tests/services.scm
@@ -105,11 +105,15 @@
(fold-services (list s) #:target-type t1)
#f)))
-(test-assert "dmd-service-back-edges"
- (let* ((s1 (dmd-service (provision '(s1)) (start #f)))
- (s2 (dmd-service (provision '(s2)) (requirement '(s1)) (start #f)))
- (s3 (dmd-service (provision '(s3)) (requirement '(s1 s2)) (start #f)))
- (e (dmd-service-back-edges (list s1 s2 s3))))
+(test-assert "shepherd-service-back-edges"
+ (let* ((s1 (shepherd-service (provision '(s1)) (start #f)))
+ (s2 (shepherd-service (provision '(s2))
+ (requirement '(s1))
+ (start #f)))
+ (s3 (shepherd-service (provision '(s3))
+ (requirement '(s1 s2))
+ (start #f)))
+ (e (shepherd-service-back-edges (list s1 s2 s3))))
(and (lset= eq? (e s1) (list s2 s3))
(lset= eq? (e s2) (list s3))
(null? (e s3)))))
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph'.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (8 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 09/11] services: Rename 'dmd' services to 'shepherd' Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:29 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings Alex Kost
2016-01-28 10:22 ` [PATCH 00/11]: Rename dmd to shepherd in Guix source Ludovic Courtès
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* doc/images/dmd-graph.dot: Rename to...
* doc/images/shepherd-graph.dot: ... this.
* doc.am (DOT_FILES): Adjust accordingly.
* .gitignore: Likewise.
* guix/scripts/system.scm (dmd-service-node-label)
(dmd-service-node-type, export-dmd-graph): Rename to...
(shepherd-service-node-label, shepherd-service-node-type)
(export-shepherd-graph): ... this.
(show-help, process-action, process-command): Rename 'dmd-graph' to
'shepherd-graph'.
* emacs/guix-command.el (guix-command-additional-execute-arguments)
(guix-command-special-executors): Likewise.
* doc/guix.texi: Likewise.
* doc/emacs.texi (Emacs Popup Interface): Likewise.
---
.gitignore | 2 +-
doc.am | 2 +-
doc/emacs.texi | 2 +-
doc/guix.texi | 10 +++---
doc/images/dmd-graph.dot | 75 -------------------------------------------
doc/images/shepherd-graph.dot | 75 +++++++++++++++++++++++++++++++++++++++++++
emacs/guix-command.el | 4 +--
guix/scripts/system.scm | 24 +++++++-------
8 files changed, 97 insertions(+), 97 deletions(-)
delete mode 100644 doc/images/dmd-graph.dot
create mode 100644 doc/images/shepherd-graph.dot
diff --git a/.gitignore b/.gitignore
index 098c9bb..63ade12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -133,7 +133,7 @@ GTAGS
/doc/images/service-graph.png
/doc/images/service-graph.eps
/doc/images/service-graph.pdf
-/doc/images/dmd-graph.png
+/doc/images/shepherd-graph.png
/doc/images/bootstrap-packages.png
/doc/images/bootstrap-packages.eps
/doc/images/bootstrap-packages.pdf
diff --git a/doc.am b/doc.am
index f15efcc..446ce5b 100644
--- a/doc.am
+++ b/doc.am
@@ -26,7 +26,7 @@ DOT_FILES = \
doc/images/coreutils-graph.dot \
doc/images/coreutils-bag-graph.dot \
doc/images/service-graph.dot \
- doc/images/dmd-graph.dot
+ doc/images/shepherd-graph.dot
DOT_VECTOR_GRAPHICS = \
$(DOT_FILES:%.dot=%.eps) \
diff --git a/doc/emacs.texi b/doc/emacs.texi
index 8020e0a..92a9107 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -578,7 +578,7 @@ GNU Emacs Manual}).
@end itemize
-Several commands (@command{guix graph}, @command{guix system dmd-graph}
+Several commands (@command{guix graph}, @command{guix system shepherd-graph}
and @command{guix system extension-graph}) also have a ``View graph''
action, which allows you to view a generated graph using @command{dot}
command (specified by @code{guix-dot-program} variable). By default a
diff --git a/doc/guix.texi b/doc/guix.texi
index 9882264..74a493a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9329,8 +9329,8 @@ $ guix system extension-graph @var{file} | dot -Tpdf > services.pdf
produces a PDF file showing the extension relations among services.
-@anchor{system-dmd-graph}
-@item dmd-graph
+@anchor{system-shepherd-graph}
+@item shepherd-graph
Emit in Dot/Graphviz format to standard output the @dfn{dependency
graph} of Shepherd services of the operating system defined in
@var{file}. @xref{Shepherd Services}, for more information and for an
@@ -9775,11 +9775,11 @@ which in turn can only happen once all the file systems have been
mounted. The simple operating system defined earlier (@pxref{Using the
Configuration System}) results in a service graph like this:
-@image{images/dmd-graph,,5in,Typical dmd service graph.}
+@image{images/shepherd-graph,,5in,Typical shepherd service graph.}
You can actually generate such a graph for any operating system
-definition using the @command{guix system dmd-graph} command
-(@pxref{system-dmd-graph, @command{guix system dmd-graph}}).
+definition using the @command{guix system shepherd-graph} command
+(@pxref{system-shepherd-graph, @command{guix system shepherd-graph}}).
The @var{%shepherd-root-service} is a service object representing
PID@tie{}1, of type @var{shepherd-root-service-type}; it can be extended
diff --git a/doc/images/dmd-graph.dot b/doc/images/dmd-graph.dot
deleted file mode 100644
index 220a2af..0000000
--- a/doc/images/dmd-graph.dot
+++ /dev/null
@@ -1,75 +0,0 @@
-digraph "Guix dmd-service" {
- "user-file-systems" [label = "user-file-systems", shape = box, fontname = Helvetica];
- "user-processes" -> "user-file-systems" [color = red];
- "user-processes" [label = "user-processes", shape = box, fontname = Helvetica];
- "nscd" -> "user-processes" [color = red];
- "guix-daemon" -> "user-processes" [color = red];
- "syslogd" -> "user-processes" [color = red];
- "term-tty6" -> "user-processes" [color = red];
- "term-tty5" -> "user-processes" [color = red];
- "term-tty4" -> "user-processes" [color = red];
- "term-tty3" -> "user-processes" [color = red];
- "term-tty2" -> "user-processes" [color = red];
- "term-tty1" -> "user-processes" [color = red];
- "networking" -> "user-processes" [color = red];
- "nscd" [label = "nscd", shape = box, fontname = Helvetica];
- "guix-daemon" [label = "guix-daemon", shape = box, fontname = Helvetica];
- "syslogd" [label = "syslogd", shape = box, fontname = Helvetica];
- "ssh-daemon" -> "syslogd" [color = red];
- "ssh-daemon" [label = "ssh-daemon", shape = box, fontname = Helvetica];
- "term-tty6" [label = "term-tty6", shape = box, fontname = Helvetica];
- "console-font-tty6" -> "term-tty6" [color = red];
- "console-font-tty6" [label = "console-font-tty6", shape = box, fontname = Helvetica];
- "term-tty5" [label = "term-tty5", shape = box, fontname = Helvetica];
- "console-font-tty5" -> "term-tty5" [color = red];
- "console-font-tty5" [label = "console-font-tty5", shape = box, fontname = Helvetica];
- "term-tty4" [label = "term-tty4", shape = box, fontname = Helvetica];
- "console-font-tty4" -> "term-tty4" [color = red];
- "console-font-tty4" [label = "console-font-tty4", shape = box, fontname = Helvetica];
- "term-tty3" [label = "term-tty3", shape = box, fontname = Helvetica];
- "console-font-tty3" -> "term-tty3" [color = red];
- "console-font-tty3" [label = "console-font-tty3", shape = box, fontname = Helvetica];
- "term-tty2" [label = "term-tty2", shape = box, fontname = Helvetica];
- "console-font-tty2" -> "term-tty2" [color = red];
- "console-font-tty2" [label = "console-font-tty2", shape = box, fontname = Helvetica];
- "term-tty1" [label = "term-tty1", shape = box, fontname = Helvetica];
- "console-font-tty1" -> "term-tty1" [color = red];
- "console-font-tty1" [label = "console-font-tty1", shape = box, fontname = Helvetica];
- "networking" [label = "networking", shape = box, fontname = Helvetica];
- "ssh-daemon" -> "networking" [color = red];
- "root-file-system" [label = "root-file-system", shape = box, fontname = Helvetica];
- "file-system-/run/user" -> "root-file-system" [color = red];
- "file-system-/run/systemd" -> "root-file-system" [color = red];
- "file-system-/gnu/store" -> "root-file-system" [color = red];
- "file-system-/dev/shm" -> "root-file-system" [color = red];
- "file-system-/dev/pts" -> "root-file-system" [color = red];
- "user-processes" -> "root-file-system" [color = red];
- "udev" -> "root-file-system" [color = red];
- "file-system-/run/user" [label = "file-system-/run/user", shape = box, fontname = Helvetica];
- "user-processes" -> "file-system-/run/user" [color = red];
- "file-system-/run/systemd" [label = "file-system-/run/systemd", shape = box, fontname = Helvetica];
- "user-processes" -> "file-system-/run/systemd" [color = red];
- "file-system-/gnu/store" [label = "file-system-/gnu/store", shape = box, fontname = Helvetica];
- "user-processes" -> "file-system-/gnu/store" [color = red];
- "file-system-/dev/shm" [label = "file-system-/dev/shm", shape = box, fontname = Helvetica];
- "user-processes" -> "file-system-/dev/shm" [color = red];
- "file-system-/dev/pts" [label = "file-system-/dev/pts", shape = box, fontname = Helvetica];
- "user-processes" -> "file-system-/dev/pts" [color = red];
- "udev" [label = "udev", shape = box, fontname = Helvetica];
- "term-tty6" -> "udev" [color = red];
- "term-tty5" -> "udev" [color = red];
- "term-tty4" -> "udev" [color = red];
- "term-tty3" -> "udev" [color = red];
- "term-tty2" -> "udev" [color = red];
- "term-tty1" -> "udev" [color = red];
- "networking" -> "udev" [color = red];
- "host-name" [label = "host-name", shape = box, fontname = Helvetica];
- "term-tty6" -> "host-name" [color = red];
- "term-tty5" -> "host-name" [color = red];
- "term-tty4" -> "host-name" [color = red];
- "term-tty3" -> "host-name" [color = red];
- "term-tty2" -> "host-name" [color = red];
- "term-tty1" -> "host-name" [color = red];
- "loopback" [label = "loopback", shape = box, fontname = Helvetica];
-
-}
diff --git a/doc/images/shepherd-graph.dot b/doc/images/shepherd-graph.dot
new file mode 100644
index 0000000..cc9aa44
--- /dev/null
+++ b/doc/images/shepherd-graph.dot
@@ -0,0 +1,75 @@
+digraph "Guix shepherd-service" {
+ "user-file-systems" [label = "user-file-systems", shape = box, fontname = Helvetica];
+ "user-processes" -> "user-file-systems" [color = red];
+ "user-processes" [label = "user-processes", shape = box, fontname = Helvetica];
+ "nscd" -> "user-processes" [color = red];
+ "guix-daemon" -> "user-processes" [color = red];
+ "syslogd" -> "user-processes" [color = red];
+ "term-tty6" -> "user-processes" [color = red];
+ "term-tty5" -> "user-processes" [color = red];
+ "term-tty4" -> "user-processes" [color = red];
+ "term-tty3" -> "user-processes" [color = red];
+ "term-tty2" -> "user-processes" [color = red];
+ "term-tty1" -> "user-processes" [color = red];
+ "networking" -> "user-processes" [color = red];
+ "nscd" [label = "nscd", shape = box, fontname = Helvetica];
+ "guix-daemon" [label = "guix-daemon", shape = box, fontname = Helvetica];
+ "syslogd" [label = "syslogd", shape = box, fontname = Helvetica];
+ "ssh-daemon" -> "syslogd" [color = red];
+ "ssh-daemon" [label = "ssh-daemon", shape = box, fontname = Helvetica];
+ "term-tty6" [label = "term-tty6", shape = box, fontname = Helvetica];
+ "console-font-tty6" -> "term-tty6" [color = red];
+ "console-font-tty6" [label = "console-font-tty6", shape = box, fontname = Helvetica];
+ "term-tty5" [label = "term-tty5", shape = box, fontname = Helvetica];
+ "console-font-tty5" -> "term-tty5" [color = red];
+ "console-font-tty5" [label = "console-font-tty5", shape = box, fontname = Helvetica];
+ "term-tty4" [label = "term-tty4", shape = box, fontname = Helvetica];
+ "console-font-tty4" -> "term-tty4" [color = red];
+ "console-font-tty4" [label = "console-font-tty4", shape = box, fontname = Helvetica];
+ "term-tty3" [label = "term-tty3", shape = box, fontname = Helvetica];
+ "console-font-tty3" -> "term-tty3" [color = red];
+ "console-font-tty3" [label = "console-font-tty3", shape = box, fontname = Helvetica];
+ "term-tty2" [label = "term-tty2", shape = box, fontname = Helvetica];
+ "console-font-tty2" -> "term-tty2" [color = red];
+ "console-font-tty2" [label = "console-font-tty2", shape = box, fontname = Helvetica];
+ "term-tty1" [label = "term-tty1", shape = box, fontname = Helvetica];
+ "console-font-tty1" -> "term-tty1" [color = red];
+ "console-font-tty1" [label = "console-font-tty1", shape = box, fontname = Helvetica];
+ "networking" [label = "networking", shape = box, fontname = Helvetica];
+ "ssh-daemon" -> "networking" [color = red];
+ "root-file-system" [label = "root-file-system", shape = box, fontname = Helvetica];
+ "file-system-/run/user" -> "root-file-system" [color = red];
+ "file-system-/run/systemd" -> "root-file-system" [color = red];
+ "file-system-/gnu/store" -> "root-file-system" [color = red];
+ "file-system-/dev/shm" -> "root-file-system" [color = red];
+ "file-system-/dev/pts" -> "root-file-system" [color = red];
+ "user-processes" -> "root-file-system" [color = red];
+ "udev" -> "root-file-system" [color = red];
+ "file-system-/run/user" [label = "file-system-/run/user", shape = box, fontname = Helvetica];
+ "user-processes" -> "file-system-/run/user" [color = red];
+ "file-system-/run/systemd" [label = "file-system-/run/systemd", shape = box, fontname = Helvetica];
+ "user-processes" -> "file-system-/run/systemd" [color = red];
+ "file-system-/gnu/store" [label = "file-system-/gnu/store", shape = box, fontname = Helvetica];
+ "user-processes" -> "file-system-/gnu/store" [color = red];
+ "file-system-/dev/shm" [label = "file-system-/dev/shm", shape = box, fontname = Helvetica];
+ "user-processes" -> "file-system-/dev/shm" [color = red];
+ "file-system-/dev/pts" [label = "file-system-/dev/pts", shape = box, fontname = Helvetica];
+ "user-processes" -> "file-system-/dev/pts" [color = red];
+ "udev" [label = "udev", shape = box, fontname = Helvetica];
+ "term-tty6" -> "udev" [color = red];
+ "term-tty5" -> "udev" [color = red];
+ "term-tty4" -> "udev" [color = red];
+ "term-tty3" -> "udev" [color = red];
+ "term-tty2" -> "udev" [color = red];
+ "term-tty1" -> "udev" [color = red];
+ "networking" -> "udev" [color = red];
+ "host-name" [label = "host-name", shape = box, fontname = Helvetica];
+ "term-tty6" -> "host-name" [color = red];
+ "term-tty5" -> "host-name" [color = red];
+ "term-tty4" -> "host-name" [color = red];
+ "term-tty3" -> "host-name" [color = red];
+ "term-tty2" -> "host-name" [color = red];
+ "term-tty1" -> "host-name" [color = red];
+ "loopback" [label = "loopback", shape = box, fontname = Helvetica];
+
+}
diff --git a/emacs/guix-command.el b/emacs/guix-command.el
index cf72b0e..ba6c3d2 100644
--- a/emacs/guix-command.el
+++ b/emacs/guix-command.el
@@ -620,7 +620,7 @@ command."
(("size")
,(guix-command-make-argument
:name "view" :char ?v :doc "View map"))
- (("system" "dmd-graph") ,graph-arg)
+ (("system" "shepherd-graph") ,graph-arg)
(("system" "extension-graph") ,graph-arg)))
"Alist of guix commands and additional 'execute' action arguments.")
@@ -646,7 +646,7 @@ command."
("view" . guix-run-view-graph))
(("size")
("view" . guix-run-view-size-map))
- (("system" "dmd-graph")
+ (("system" "shepherd-graph")
("view" . guix-run-view-graph))
(("system" "extension-graph")
("view" . guix-run-view-graph)))
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index b0f8be7..e31eec6 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -312,17 +312,17 @@ list of services."
(label service-node-label)
(edges (lift1 (service-back-edges services) %store-monad))))
-(define (dmd-service-node-label service)
+(define (shepherd-service-node-label service)
"Return a label for a node representing a <shepherd-service>."
(string-join (map symbol->string (shepherd-service-provision service))))
-(define (dmd-service-node-type services)
+(define (shepherd-service-node-type services)
"Return a node type for SERVICES, a list of <shepherd-service>."
(node-type
- (name "dmd-service")
- (description "the dependency graph of dmd services")
- (identifier (lift1 dmd-service-node-label %store-monad))
- (label dmd-service-node-label)
+ (name "shepherd-service")
+ (description "the dependency graph of shepherd services")
+ (identifier (lift1 shepherd-service-node-label %store-monad))
+ (label shepherd-service-node-label)
(edges (lift1 (shepherd-service-back-edges services) %store-monad))))
\f
@@ -474,7 +474,7 @@ building anything."
#:node-type (service-node-type services)
#:reverse-edges? #t)))
-(define (export-dmd-graph os port)
+(define (export-shepherd-graph os port)
"Export the graph of shepherd services of OS to PORT."
(let* ((services (operating-system-services os))
(pid1 (fold-services services
@@ -484,7 +484,7 @@ building anything."
(null? (shepherd-service-requirement service)))
shepherds)))
(export-graph sinks (current-output-port)
- #:node-type (dmd-service-node-type dmds)
+ #:node-type (shepherd-service-node-type shepherds)
#:reverse-edges? #t)))
\f
@@ -517,7 +517,7 @@ Build the operating system declared in FILE according to ACTION.\n"))
(display (_ "\
extension-graph emit the service extension graph in Dot format\n"))
(display (_ "\
- dmd-graph emit the graph of dmd services in Dot format\n"))
+ shepherd-graph emit the graph of shepherd services in Dot format\n"))
(show-build-options-help)
(display (_ "
@@ -637,8 +637,8 @@ resulting from command-line parsing."
(case action
((extension-graph)
(export-extension-graph os (current-output-port)))
- ((dmd-graph)
- (export-dmd-graph os (current-output-port)))
+ ((shepherd-graph)
+ (export-shepherd-graph os (current-output-port)))
(else
(perform-action action os
#:dry-run? dry?
@@ -678,7 +678,7 @@ argument list and OPTS is the option alist."
(let ((action (string->symbol arg)))
(case action
((build container vm vm-image disk-image reconfigure init
- extension-graph dmd-graph list-generations)
+ extension-graph shepherd-graph list-generations)
(alist-cons 'action action result))
(else (leave (_ "~a: unknown action~%") action))))))
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (9 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph' Alex Kost
@ 2016-01-27 21:10 ` Alex Kost
2016-01-28 10:33 ` Ludovic Courtès
2016-01-28 10:22 ` [PATCH 00/11]: Rename dmd to shepherd in Guix source Ludovic Courtès
11 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-27 21:10 UTC (permalink / raw)
To: guix-devel
* build-aux/hydra/demo-os.scm (operating-system)[issue]: Point to
shepherd instead of dmd.
* ROADMAP: Likewise.
* gnu/build/install.scm (directives): Adjust comment.
---
ROADMAP | 2 +-
build-aux/hydra/demo-os.scm | 2 +-
gnu/build/install.scm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ROADMAP b/ROADMAP
index 45fce45..2475cb6 100644
--- a/ROADMAP
+++ b/ROADMAP
@@ -77,6 +77,6 @@ Freenode!
+ build containers like guix-daemon does
+ provide a Plash-like interface in Bash
- daemon rewritten in Guile
- - more dmd integration
+ - more shepherd integration
+ monitor network interfaces and start/stop events based on that
+ include a DHCP client written in Scheme
diff --git a/build-aux/hydra/demo-os.scm b/build-aux/hydra/demo-os.scm
index c6e05ef..c7becf8 100644
--- a/build-aux/hydra/demo-os.scm
+++ b/build-aux/hydra/demo-os.scm
@@ -57,7 +57,7 @@ This is an alpha preview of the GNU system. Welcome.
This image features the GNU Guix package manager, which was used to
build it (http://www.gnu.org/software/guix/). The init system is
-GNU dmd (http://www.gnu.org/software/dmd/).
+GNU Shepherd (http://www.gnu.org/software/shepherd/).
You can log in as 'guest' or 'root' with no password.
")
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 9085e22..9785b6d 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -103,7 +103,7 @@ STORE."
(directory ,store 0 30000 #o1775)
(directory "/etc")
- (directory "/var/log") ; for dmd
+ (directory "/var/log") ; for shepherd
(directory "/var/guix/gcroots")
(directory "/var/empty") ; for no-login accounts
(directory "/var/db") ; for dhclient, etc.
--
2.6.3
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH 00/11]: Rename dmd to shepherd in Guix source.
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
` (10 preceding siblings ...)
2016-01-27 21:10 ` [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings Alex Kost
@ 2016-01-28 10:22 ` Ludovic Courtès
11 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:22 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> So this is a 'dmd->shepherd' patchset for the Guix side now (thanks, Ludo, for
> adding 'shepherd' package!).
Yay!
The moral of the story is that renaming takes a lot of patches.
> If I didn't miss anything (please double check me), the only thing left
> "unrenamed" are “po/guix/*.po” files. Should they also be adjusted or
> leave them as they are?
Left as is. The Translation Project will take care of updating it.
Ludo’.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 01/11] gnu: elogind: Use 'shepherd' input.
2016-01-27 21:10 ` [PATCH 01/11] gnu: elogind: Use 'shepherd' input Alex Kost
@ 2016-01-28 10:22 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:22 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/packages/freedesktop.scm (elogind)[inputs]: Replace 'dmd' with
> 'shepherd'.
OK.
Ludo'.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system.
2016-01-27 21:10 ` [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system Alex Kost
@ 2016-01-28 10:23 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:23 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/services/dmd.scm (dmd-boot-gexp): Use binary from 'shepherd' package.
> (dmd-root-service-type): Use 'shepherd' package.
> (%default-modules): Use (shepherd service) module.
> * gnu/services/base.scm (%root-file-system-dmd-service): Use
> 'stop-logging' procedure to close shepherd log.
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory.
2016-01-27 21:10 ` [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory Alex Kost
@ 2016-01-28 10:24 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:24 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/build/linux-boot.scm (mount-root-file-system): Rename
> "/root/etc/dmd" to "/root/etc/shepherd".
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 04/11] services: Rename %do-not-kill-file.
2016-01-27 21:10 ` [PATCH 04/11] services: Rename %do-not-kill-file Alex Kost
@ 2016-01-28 10:25 ` Ludovic Courtès
2016-01-28 17:50 ` Alex Kost
0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:25 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/services/base.scm (%do-not-kill-file): Rename to
> "/etc/shepherd/do-not-kill".
Shouldn’t it be merged with patch 03? Otherwise patch 03 alone would
break things AIUI, because it would create a different file than the one
actually used.
Ludo’.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd'.
2016-01-27 21:10 ` [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd' Alex Kost
@ 2016-01-28 10:27 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:27 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * doc/guix.texi: Use 'shepherd'/'herd' instead of 'dmd'/'deco'. Fix
> info references.
[...]
> +Services are managed by GNU@tie{}Shepherd (@pxref{Introduction,,,
^
To complicate things, add “the” here, and in general to all reference to
the software package itself (“the GNU Shepherd”, “the Shepherd”, etc.)
> +shepherd, GNU Shepherd Manual}). On a running system, the
^
Here as well, and the other xrefs.
OK with this change.
Ludo’.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd).
2016-01-27 21:10 ` [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd) Alex Kost
@ 2016-01-28 10:28 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:28 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/services/dmd.scm: Rename to...
> * gnu/services/shepherd.scm: ... this.
> * gnu/system.scm: Use it.
> * gnu/system/install.scm: Likewise.
> * gnu/services/xorg.scm: Likewise.
> * gnu/services/web.scm: Likewise.
> * gnu/services/ssh.scm: Likewise.
> * gnu/services/networking.scm: Likewise.
> * gnu/services/mail.scm: Likewise.
> * gnu/services/lirc.scm: Likewise.
> * gnu/services/desktop.scm: Likewise.
> * gnu/services/dbus.scm: Likewise.
> * gnu/services/databases.scm: Likewise.
> * gnu/services/base.scm: Likewise.
> * gnu/services/avahi.scm: Likewise.
> * guix/scripts/system.scm: Likewise.
> * tests/services.scm: Likewise.
> * tests/guix-system.sh: Likewise.
> * doc/guix.texi (Shepherd Services): Adjust accordingly.
> * gnu-system.am (GNU_SYSTEM_MODULES): Likewise.
> * po/guix/POTFILES.in: Likewise.
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 07/11] services: shepherd: Rename shepherd configuration file.
2016-01-27 21:10 ` [PATCH 07/11] services: shepherd: Rename shepherd configuration file Alex Kost
@ 2016-01-28 10:28 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:28 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/services/shepherd.scm (dmd-configuration-file): Rename to...
> (shepherd-configuration-file): ... this. Use "shepherd.conf" name.
> (dmd-boot-gexp): Use it.
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd'.
2016-01-27 21:10 ` [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd' Alex Kost
@ 2016-01-28 10:28 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:28 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * gnu/services/xorg.scm (slim-configuration-dmd): Rename to...
> (slim-configuration-shepherd): ... this.
> (slim-shepherd-service): Adjust accordingly.
> (slim-service): Take 'shepherd' keyword argument.
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 09/11] services: Rename 'dmd' services to 'shepherd'.
2016-01-27 21:10 ` [PATCH 09/11] services: Rename 'dmd' services to 'shepherd' Alex Kost
@ 2016-01-28 10:29 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:29 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * 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.
Woow. :-) OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph'.
2016-01-27 21:10 ` [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph' Alex Kost
@ 2016-01-28 10:29 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:29 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * doc/images/dmd-graph.dot: Rename to...
> * doc/images/shepherd-graph.dot: ... this.
> * doc.am (DOT_FILES): Adjust accordingly.
> * .gitignore: Likewise.
> * guix/scripts/system.scm (dmd-service-node-label)
> (dmd-service-node-type, export-dmd-graph): Rename to...
> (shepherd-service-node-label, shepherd-service-node-type)
> (export-shepherd-graph): ... this.
> (show-help, process-action, process-command): Rename 'dmd-graph' to
> 'shepherd-graph'.
> * emacs/guix-command.el (guix-command-additional-execute-arguments)
> (guix-command-special-executors): Likewise.
> * doc/guix.texi: Likewise.
> * doc/emacs.texi (Emacs Popup Interface): Likewise.
OK!
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings.
2016-01-27 21:10 ` [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings Alex Kost
@ 2016-01-28 10:33 ` Ludovic Courtès
2016-01-28 21:03 ` Alex Kost
0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-28 10:33 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * build-aux/hydra/demo-os.scm (operating-system)[issue]: Point to
> shepherd instead of dmd.
> * ROADMAP: Likewise.
> * gnu/build/install.scm (directives): Adjust comment.
[...]
> +++ b/build-aux/hydra/demo-os.scm
> @@ -57,7 +57,7 @@ This is an alpha preview of the GNU system. Welcome.
>
> This image features the GNU Guix package manager, which was used to
> build it (http://www.gnu.org/software/guix/). The init system is
> -GNU dmd (http://www.gnu.org/software/dmd/).
> +GNU Shepherd (http://www.gnu.org/software/shepherd/).
^
+ “the”
OK with this change!
A big Thank You for handling this tedious task so quickly and nicely,
and thanks also to you and Mathieu for helping out on the Shepherd side
of things as well! It’s heartening to have people jump in to help on
somewhat boring stuff, and it’s allowed me to sleep more, too. ;-)
Ludo’.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 04/11] services: Rename %do-not-kill-file.
2016-01-28 10:25 ` Ludovic Courtès
@ 2016-01-28 17:50 ` Alex Kost
2016-01-31 9:46 ` Ludovic Courtès
0 siblings, 1 reply; 27+ messages in thread
From: Alex Kost @ 2016-01-28 17:50 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-01-28 13:25 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * gnu/services/base.scm (%do-not-kill-file): Rename to
>> "/etc/shepherd/do-not-kill".
>
> Shouldn’t it be merged with patch 03? Otherwise patch 03 alone would
> break things AIUI, because it would create a different file than the one
> actually used.
OK, you know better (I actually don't understand what these files are
used for).
An interesting thing is that ‘mark-as-not-killable’ from (gnu build
linux-boot) uses "/root/etc/dmd/do-not-kill", while ‘%do-not-kill-file’
is "/etc/dmd/do-not-kill". These files have always been different
(since commit 7d57cfd) and it didn't break things. So IIUC it should be
the same file name in both places, right?
--
Alex
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings.
2016-01-28 10:33 ` Ludovic Courtès
@ 2016-01-28 21:03 ` Alex Kost
0 siblings, 0 replies; 27+ messages in thread
From: Alex Kost @ 2016-01-28 21:03 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-01-28 13:33 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * build-aux/hydra/demo-os.scm (operating-system)[issue]: Point to
>> shepherd instead of dmd.
>> * ROADMAP: Likewise.
>> * gnu/build/install.scm (directives): Adjust comment.
>
> [...]
>
>> +++ b/build-aux/hydra/demo-os.scm
>> @@ -57,7 +57,7 @@ This is an alpha preview of the GNU system. Welcome.
>>
>> This image features the GNU Guix package manager, which was used to
>> build it (http://www.gnu.org/software/guix/). The init system is
>> -GNU dmd (http://www.gnu.org/software/dmd/).
>> +GNU Shepherd (http://www.gnu.org/software/shepherd/).
> ^
> + “the”
>
> OK with this change!
Done (locally). I've also fixed this "the" issue in guix.texi as you
pointed. So since the rest patches are OK, I'm going to commit them
after clarifying the situation with %do-not-kill-file
(/etc/shepherd or /root/etc/shepherd).
> A big Thank You for handling this tedious task so quickly and nicely,
> and thanks also to you and Mathieu for helping out on the Shepherd side
> of things as well! It’s heartening to have people jump in to help on
> somewhat boring stuff, and it’s allowed me to sleep more, too. ;-)
Heh, sleeping enough time is a great value :-) Thank you!
--
Alex
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH 04/11] services: Rename %do-not-kill-file.
2016-01-28 17:50 ` Alex Kost
@ 2016-01-31 9:46 ` Ludovic Courtès
0 siblings, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2016-01-31 9:46 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2016-01-28 13:25 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> * gnu/services/base.scm (%do-not-kill-file): Rename to
>>> "/etc/shepherd/do-not-kill".
>>
>> Shouldn’t it be merged with patch 03? Otherwise patch 03 alone would
>> break things AIUI, because it would create a different file than the one
>> actually used.
>
> OK, you know better (I actually don't understand what these files are
> used for).
>
> An interesting thing is that ‘mark-as-not-killable’ from (gnu build
> linux-boot) uses "/root/etc/dmd/do-not-kill", while ‘%do-not-kill-file’
> is "/etc/dmd/do-not-kill". These files have always been different
> (since commit 7d57cfd) and it didn't break things. So IIUC it should be
> the same file name in both places, right?
I replied on IRC, but for posterity ;-), replacing “/dmd” with
“/shepherd” in both places is fine, and it’s also purely cosmetic since
these are the only two places referring to this file.
This file tells the shepherd not to kill the unionfs process that
provides the root file system.
The unionfs on / is used in images produced by ‘guix system vm’. If you
do:
kill $(cat /etc/shepherd/do-not-kill)
in such a VM, you’ll notice that things start failing. :-)
Ludo’.
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2016-01-31 9:46 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 21:10 [PATCH 00/11]: Rename dmd to shepherd in Guix source Alex Kost
2016-01-27 21:10 ` [PATCH 01/11] gnu: elogind: Use 'shepherd' input Alex Kost
2016-01-28 10:22 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 02/11] Use 'shepherd' instead of 'dmd' as init system Alex Kost
2016-01-28 10:23 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 03/11] linux-boot: Rename /root/etc/dmd directory Alex Kost
2016-01-28 10:24 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 04/11] services: Rename %do-not-kill-file Alex Kost
2016-01-28 10:25 ` Ludovic Courtès
2016-01-28 17:50 ` Alex Kost
2016-01-31 9:46 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 05/11] doc: Replace references to 'dmd' with 'shepherd' Alex Kost
2016-01-28 10:27 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 06/11] Rename (gnu services dmd) to (gnu services shepherd) Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 07/11] services: shepherd: Rename shepherd configuration file Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 08/11] services: xorg: Use 'shepherd' instead of 'dmd' Alex Kost
2016-01-28 10:28 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 09/11] services: Rename 'dmd' services to 'shepherd' Alex Kost
2016-01-28 10:29 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 10/11] guix system: Rename 'dmd-graph' to 'shepherd-graph' Alex Kost
2016-01-28 10:29 ` Ludovic Courtès
2016-01-27 21:10 ` [PATCH 11/11] Rename 'dmd' to 'shepherd' in comments and strings Alex Kost
2016-01-28 10:33 ` Ludovic Courtès
2016-01-28 21:03 ` Alex Kost
2016-01-28 10:22 ` [PATCH 00/11]: Rename dmd to shepherd in Guix source Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).