GNU bug report logs -
#39752
[PATCH 0/4 shepherd] Update the doc and an example.
Previous Next
Reported by: Brice Waegeneire <brice <at> waegenei.re>
Date: Sun, 23 Feb 2020 09:20:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39752 in the body.
You can then email your comments to 39752 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 09:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Brice Waegeneire <brice <at> waegenei.re>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 23 Feb 2020 09:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Brice Waegeneire (4):
doc: Fix typos.
service: Fix typos.
doc: Expand the part on special action 'doc'.
doc: Fix wolfgangj example.
doc/examples/wolfgangj.scm | 4 +++-
doc/shepherd.texi | 24 +++++++++++++++++-------
modules/shepherd/service.scm | 4 ++--
3 files changed, 22 insertions(+), 10 deletions(-)
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 09:21:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/shepherd.texi (Jump start): Lower case after a colon. Remove
"the".
---
doc/shepherd.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index da5718b..834d47a 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -208,7 +208,7 @@ service, you use the following, probably not very surprising, command:
herd stop networking
@end example
-There are two more actions you can perform on every service: The
+There are two more actions you can perform on every service: the
actions @code{enable} and @code{disable} are used to prevent and allow
starting of the particular service. If a service is intended to be
restarted whenever it terminates (how this can be done will not be
@@ -248,7 +248,7 @@ be available:
herd reload-modules apache
@end example
-The service-specific actions can only be used when the service is
+Service-specific actions can only be used when the service is
started, i.e. the only thing you can do to a stopped service is
starting it. An exception exists, see below. (If you may at some
point find this too restrictive because you want to use variants of
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 09:21:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* modules/shepherd/service.scm (root-service): Replace "safe" by "save".
---
modules/shepherd/service.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index e0772e8..fc82cc4 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1392,7 +1392,7 @@ we want to receive these signals."
#t)
(primitive-exit 0))))))
(persistency
- "Safe the current state of running and non-running services.
+ "Save the current state of running and non-running services.
This status gets written into a file on termination, so that we can
restore the status on next startup. Optionally, you can pass a file
name as argument that will be used to store the status."
@@ -1401,7 +1401,7 @@ name as argument that will be used to store the status."
(when file
(set! persistency-state-file file))))
(no-persistency
- "Don't safe state in a file on exit."
+ "Don't save state in a file on exit."
(lambda (running)
(set! persistency #f)))
(cd
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 09:21:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/shepherd.texi (Jump start): Rewrite paragraph about special action
'doc'.
---
doc/shepherd.texi | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 834d47a..7c7e5e5 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -11,6 +11,7 @@
@copying
Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@*
Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès
+Copyright @copyright{} @value{2020} Brice Waegeneire
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -273,11 +274,6 @@ about the service, like what it provides, what it depends on and with which
other services it conflicts (because they provide a virtual service that is
also provided by that particular service).
-Another special action is @code{list-actions}, which displays a list
-of the additional actions a service provides; obviously, it can also
-be called when the service is not running. Services cannot provide
-their own implementation of @code{list-actions}.
-
A special service is @code{root}, which is used for controlling the
Shepherd itself. You can also reference to this service as
@code{shepherd}. It implements various actions. For example, the
@@ -293,6 +289,20 @@ to load arbitrary code into the Shepherd at runtime, like this:
herd load shepherd ~/additional-services.scm
@end example
+In the same vein the special action @code{doc} describes it's service
+when called without an argument or describes a service-specific action
+when called with the action as the additional arguments. You can even
+get the list of the service-specific actions a service provides when
+using with the additional argument @code{list-actions}.
+@example
+$ herd doc root
+The root service is used to operate on shepherd itself.
+$ herd doc root list-actions
+root (help status halt power-off load eval unload reload daemonize persistency no-persistency cd restart)
+$ herd doc root action power-off
+power-off: Halt the system and turn it off.
+@end example
+
This is enough now about the @command{herd} and @command{shepherd} programs, we
will now take a look at how to configure the Shepherd. In the configuration
file, we need mainly the definition of services. We can also do
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 09:22:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/examples/wolfgangj.scm: Use module SRFI-1. Replace "dmd" by "shepherd".
---
doc/examples/wolfgangj.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/examples/wolfgangj.scm b/doc/examples/wolfgangj.scm
index 0c16108..5fae7c1 100644
--- a/doc/examples/wolfgangj.scm
+++ b/doc/examples/wolfgangj.scm
@@ -26,6 +26,8 @@
;; Apache running when I am online, I made Apache conflict with the
;; ISDN setup.
+(use-modules (srfi srfi-1))
+
;; Laziness.
(define (number->symbol num)
(string->symbol (number->string num)))
@@ -122,7 +124,7 @@
(loop default-terms))
;; Go into background.
-(action 'dmd 'daemonize)
+(action 'shepherd 'daemonize)
;; Setup internet, a mailer and a few terms.
(for-each start
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 12:50:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 39752 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> +In the same vein the special action @code{doc} describes it's service
Should be "its"
> +when called without an argument or describes a service-specific action
> +when called with the action as the additional arguments. You can even
> +get the list of the service-specific actions a service provides when
> +using with the additional argument @code{list-actions}.
Please use two spaces at the beginning of sentences.
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 39752 <at> debbugs.gnu.org (full text, mbox):
Add commit #5 and fix typos in commit #3.
Brice Waegeneire (5):
doc: Fix typos.
service: Fix typos.
doc: Expand the part on special action 'doc'.
doc: Fix wolfgangj example.
.dir-locals.el: End sentence with a double space.
.dir-locals.el | 1 +
doc/examples/wolfgangj.scm | 4 +++-
doc/shepherd.texi | 24 +++++++++++++++++-------
modules/shepherd/service.scm | 4 ++--
4 files changed, 23 insertions(+), 10 deletions(-)
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/shepherd.texi (Jump start): Lower case after a colon. Remove
"the".
---
doc/shepherd.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index da5718b..834d47a 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -208,7 +208,7 @@ service, you use the following, probably not very surprising, command:
herd stop networking
@end example
-There are two more actions you can perform on every service: The
+There are two more actions you can perform on every service: the
actions @code{enable} and @code{disable} are used to prevent and allow
starting of the particular service. If a service is intended to be
restarted whenever it terminates (how this can be done will not be
@@ -248,7 +248,7 @@ be available:
herd reload-modules apache
@end example
-The service-specific actions can only be used when the service is
+Service-specific actions can only be used when the service is
started, i.e. the only thing you can do to a stopped service is
starting it. An exception exists, see below. (If you may at some
point find this too restrictive because you want to use variants of
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* modules/shepherd/service.scm (root-service): Replace "safe" by "save".
---
modules/shepherd/service.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index e0772e8..fc82cc4 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1392,7 +1392,7 @@ we want to receive these signals."
#t)
(primitive-exit 0))))))
(persistency
- "Safe the current state of running and non-running services.
+ "Save the current state of running and non-running services.
This status gets written into a file on termination, so that we can
restore the status on next startup. Optionally, you can pass a file
name as argument that will be used to store the status."
@@ -1401,7 +1401,7 @@ name as argument that will be used to store the status."
(when file
(set! persistency-state-file file))))
(no-persistency
- "Don't safe state in a file on exit."
+ "Don't save state in a file on exit."
(lambda (running)
(set! persistency #f)))
(cd
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:03 GMT)
Full text and
rfc822 format available.
Message #32 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/shepherd.texi (Jump start): Rewrite paragraph about special action
'doc'.
---
doc/shepherd.texi | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index 834d47a..fbd1a3f 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -11,6 +11,7 @@
@copying
Copyright @copyright{} @value{OLD-YEARS} Wolfgang J@"ahrling@*
Copyright @copyright{} @value{NEW-YEARS} Ludovic Courtès
+Copyright @copyright{} @value{2020} Brice Waegeneire
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -273,11 +274,6 @@ about the service, like what it provides, what it depends on and with which
other services it conflicts (because they provide a virtual service that is
also provided by that particular service).
-Another special action is @code{list-actions}, which displays a list
-of the additional actions a service provides; obviously, it can also
-be called when the service is not running. Services cannot provide
-their own implementation of @code{list-actions}.
-
A special service is @code{root}, which is used for controlling the
Shepherd itself. You can also reference to this service as
@code{shepherd}. It implements various actions. For example, the
@@ -293,6 +289,20 @@ to load arbitrary code into the Shepherd at runtime, like this:
herd load shepherd ~/additional-services.scm
@end example
+In the same vein the special action @code{doc} describes it service when
+called without an argument or describes a service-specific action when
+called with the action as the additional arguments. You can even get
+the list of the service-specific actions a service provides when using
+with the additional argument @code{list-actions}.
+@example
+$ herd doc root
+The root service is used to operate on shepherd itself.
+$ herd doc root list-actions
+root (help status halt power-off load eval unload reload daemonize persistency no-persistency cd restart)
+$ herd doc root action power-off
+power-off: Halt the system and turn it off.
+@end example
+
This is enough now about the @command{herd} and @command{shepherd} programs, we
will now take a look at how to configure the Shepherd. In the configuration
file, we need mainly the definition of services. We can also do
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:03 GMT)
Full text and
rfc822 format available.
Message #35 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* doc/examples/wolfgangj.scm: Use module SRFI-1. Replace "dmd" by "shepherd".
---
doc/examples/wolfgangj.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/examples/wolfgangj.scm b/doc/examples/wolfgangj.scm
index 0c16108..5fae7c1 100644
--- a/doc/examples/wolfgangj.scm
+++ b/doc/examples/wolfgangj.scm
@@ -26,6 +26,8 @@
;; Apache running when I am online, I made Apache conflict with the
;; ISDN setup.
+(use-modules (srfi srfi-1))
+
;; Laziness.
(define (number->symbol num)
(string->symbol (number->string num)))
@@ -122,7 +124,7 @@
(loop default-terms))
;; Go into background.
-(action 'dmd 'daemonize)
+(action 'shepherd 'daemonize)
;; Setup internet, a mailer and a few terms.
(for-each start
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:41:04 GMT)
Full text and
rfc822 format available.
Message #38 received at 39752 <at> debbugs.gnu.org (full text, mbox):
* .dir-locals.el (nil): Add variable 'sentence-end-double-space'.
---
.dir-locals.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/.dir-locals.el b/.dir-locals.el
index ff25997..8361cb6 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -3,6 +3,7 @@
((nil
. ((fill-column . 78)
(tab-width . 8)
+ (sentence-end-double-space . t)
;; For use with 'bug-reference-prog-mode'.
(bug-reference-url-format . "http://bugs.gnu.org/%s")
--
2.25.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39752
; Package
guix-patches
.
(Sun, 23 Feb 2020 15:44:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 39752 <at> debbugs.gnu.org (full text, mbox):
On 2020-02-23 12:49, Danny Milosavljevic wrote:
>> +In the same vein the special action @code{doc} describes it's service
>
> Should be "its"
>
>> +when called without an argument or describes a service-specific
>> action
>> +when called with the action as the additional arguments. You can even
>> +get the list of the service-specific actions a service provides when
>> +using with the additional argument @code{list-actions}.
>
> Please use two spaces at the beginning of sentences.
I have fix these issues in v2.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 06 Mar 2020 13:23:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Brice Waegeneire <brice <at> waegenei.re>
:
bug acknowledged by developer.
(Fri, 06 Mar 2020 13:23:02 GMT)
Full text and
rfc822 format available.
Message #46 received at 39752-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Brice Waegeneire <brice <at> waegenei.re> skribis:
> Add commit #5 and fix typos in commit #3.
>
> Brice Waegeneire (5):
> doc: Fix typos.
> service: Fix typos.
> doc: Expand the part on special action 'doc'.
> doc: Fix wolfgangj example.
> .dir-locals.el: End sentence with a double space.
I’ve pushed these patches.
Thanks for these improvements Brice, and thanks for the initial review,
Danny!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 Apr 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.