Age | Commit message (Expand) | Author |
2024-12-09 | services: shepherd: Remove ‘call-with-{input,output}-file’ replacements....Shepherd 1.0.0 provides similar replacements.
* gnu/services/shepherd.scm (shepherd-configuration-file): Remove
‘call-with-input-file’ and ‘call-with-output-file’ O_CLOEXEC
replacements.
Change-Id: Id8a4d5cfcb9b9213f3a017cafead21cc86fdb51e
| Ludovic Courtès |
2024-12-09 | services: shepherd: Default to 1.0....* gnu/services/shepherd.scm (<shepherd-configuration>)[shepherd]:
Default to SHEPHERD-1.0.
* gnu/system/hurd.scm (%base-packages/hurd): Change to SHEPHERD-1.0.
Change-Id: I7b0c3041d61a6f5d89c9d6d3caf7a8eedf5d8ca5
| Ludovic Courtès |
2024-06-26 | services: shepherd: Support “free-form” services....* gnu/services/shepherd.scm (<shepherd-service>)[free-form]: New field.
[start]: Add default value.
(shepherd-service-file): Rename to…
(shepherd-service-file/regular): … this.
(shepherd-service-file/free-form): New procedure.
(shepherd-service-file): Dispatch to one of the two procedures above.
* doc/guix.texi (Shepherd Services): Document the ‘free-form’ field.
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I206374e950ef6d1e4a996c0f507fb5fcd9cadde3
| Ludovic Courtès |
2024-05-25 | services: shepherd: Failure to load a service does not prevent booting....Fixes <https://issues.guix.gnu.org/71144>.
Fixes a bug whereby, when loading a service file would fail, for
instance due to an unbound variable, a REPL would be opened on the
console, preventing the system from booting.
This fixes that by isolating service load errors and making them
non-fatal.
* gnu/services/shepherd.scm (shepherd-configuration-file)[config]:
Remove call to ‘call-with-error-handling’. Use ‘filter-map’ instead of
‘map’ to iterate over service files, and catch exceptions raised by
‘load-compiled’.
Change-Id: Ie6e76ea514837f85386232f797bc77b2882b5c22
| Ludovic Courtès |
2024-03-21 | services: shepherd: Load each service file in a fresh module....Fixes <https://issues.guix.gnu.org/67649>.
* gnu/home/services/shepherd.scm (home-shepherd-configuration-file)[config]:
Define ‘make-user-module’. Call ‘load’ in ‘save-module-excursion’.
* gnu/services/shepherd.scm (shepherd-configuration-file): Likewise.
Reported-by: Attila Lendvai <attila@lendvai.name>
Change-Id: I7df11c81b5bbbf2b24a8daa02502a000e0826fe0
| Ludovic Courtès |
2024-01-28 | services: shepherd: Add respawn-limit and respawn-delay....* gnu/services/shepherd.scm (<shepherd-service>): Add respawn-limit and
respawn-delay.
(shepherd-service-file): Emit the two values into the shepherd service
constructor form.
Change-Id: I54408e8fb4bcc0956d9610771bf5c566fdc2914c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Attila Lendvai |
2024-01-08 | services: shepherd: Use the 0.10.x GOOPS-less interface....* gnu/services/shepherd.scm (%default-modules): Remove (oop goops).
(shepherd-service-file): Use (service …) instead of (make <service> …).
Use ‘actions’ instead of ‘make-actions’.
(scm->go): Remove use of (oop goops).
(shepherd-configuration-file): Pass ‘register-services’ a list.
Use ‘start-in-the-background’ unconditionally.
Change-Id: I0ad1ba32e339c56ee31e59f160b53d3581277d97
| Ludovic Courtès |
2024-01-05 | services: shepherd: Remove ‘dynamic-wind’ in ‘call-with-*-file’....Fixes <https://issues.guix.gnu.org/64653>.
The ‘dynamic-wind’ was causing files to be closed prematurely when
leaving the dynamic extent of PROC for instance via a delimited
continuation, using Fibers (that ‘dynamic-wind’ call was also
semantically incorrect in the first place).
* gnu/services/shepherd.scm (shepherd-configuration-file)
[config](call-with-file): Remove.
(call-with-input-file, call-with-output-file): Rewrite in terms of
‘call-with-port’.
Change-Id: Ica8af71a04f525a15be99985552063cb98cd6ee8
| Ludovic Courtès |
2023-06-25 | services: Validate 'provision' field of <shepherd-service>....Fixes <https://issues.guix.gnu.org/63979>.
* gnu/services/shepherd.scm (validate-provision): New procedure.
(<shepherd-service>)[provision]: Use it.
Co-authored-by: Bruno Victal <mirai@makinata.eu>
| Ludovic Courtès |
2023-05-13 | services: shepherd: Default to 0.10....* gnu/services/shepherd.scm (<shepherd-configuration>)[shepherd]:
Default to SHEPHERD-0.10.
* gnu/home/services/shepherd.scm (<home-shepherd-configuration>)[shepherd]:
Likewise.
| Ludovic Courtès |
2022-11-18 | services: shepherd: Define 'shepherd-configuration-action' helper....* gnu/services/shepherd.scm (shepherd-configuration-action): New
* doc/guix.texi (Shepherd Services): Document it.
| Ludovic Courtès |
2022-09-29 | services: shepherd: Leave the finalization thread in peace....This gets rid of that (in)famous at boot time:
error in finalization thread: Success
This was caused by the file-descriptor closing loop, which would clause
the finalization pipe, leading the finalization thread to (erroneously)
error out.
Thanks to Josselin Poiret for locating the problem!
* gnu/services/shepherd.scm (shepherd-boot-gexp): In 'loop', replace
'close-fdes' with a pair of 'fcntl' calls to add FD_CLOEXEC.
| Ludovic Courtès |
2022-09-13 | services: shepherd: Install O_CLOEXEC variant of 'call-with-input-file' & co....Fixes a bug introduced with the Shepherd 0.9.2 upgrade in commit
1ba0e38267c9ff8bb476285091be6e297bbf136e whereby files opened by, say,
the 'start' method of 'urandom-seed', could leak into the execution
environment of some other service--e.g., 'term-tty4'.
* gnu/services/shepherd.scm (shepherd-configuration-file)[config]:
Override 'call-with-input-file' and 'call-with-output-file'.
| Ludovic Courtès |
2022-09-11 | services: shepherd: Open /dev/null as O_CLOEXEC....Failing to do that, that file descriptor could be inherited by child
processes as of Shepherd 0.9.2.
* gnu/services/shepherd.scm (shepherd-configuration-file): Open
/dev/null as O_CLOEXEC.
| Ludovic Courtès |