After two years since the formation of the last major version, the release of the new version of the GNU Shepherd service manager 0.9 (formerly known as dmd) was announced to the public . It is being developed by the developers of the GNU Guix distribution as an alternative to the system dependency-aware SysV-init initialization.
Shepherd provides user-space functionality asynchronously as services , which in Shepherd are generic functions and object data types exported for Shepherd to use in extending the base operating system in a defined way. Unlike systemd, a user-space monitoring process runs as that user.
About Shepherd
The core of Shepherd's user-space initialization model is the concept of extension, a form of composability in which services are designed to overlap with other services, augmenting them with more elaborate or specialized behaviors as desired. This expresses the instantiation-based dependency relationships found in many modern init systems, making the system modular, but also allowing services to interact variably with other services in arbitrary ways.
Shepherd also provides so-called virtual services that enable dynamic delivery over a class of related service objects, such as all those that create instances of a mail transfer agent (MTA) for the system.
A system governed by the Shepherd daemon can represent its user space as a directed acyclic graph, with the "system service" (responsible for the early boot and startup phases) as root and all subsequent initialized services as extensions of the functionality of the system service, either directly or transitively over other services.
Because it is written and configured in Guile Scheme, GNU Shepherd is designed to be highly programmable by the system administrator, but it can also be used to manage per-user profiles of unprivileged daemons and services.
Its services and configuration are stored uniformly as object-oriented Scheme code, and although a core set of services is provided with the basic Guix system, arbitrary new services can be flexibly declared, and through Guile's object system, GOOPS, existing services can be redefined at the user's discretion by asking Shepherd to dynamically rewrite services in specific ways on instantiation.
GNU Shepherd was originally designed to work with the GNU Hurd and was later adopted by the Guix System.
Main new features of GNU Shepherd 0.9
This new version highlights the implementation of the concept of temporary (transient) services, which are automatically disconnected after termination due to process termination or a call to the "stop" method, which may be required for synthesized services that cannot be restarted after termination.
Another notable change is that for services without the "#:log-file" parameter , output is provided to syslog , and for services with the "#:log-file" parameter, the log is written to a separate file indicating the time of the logs in the unprivileged Shepherd process, which is stored in the $XDG_DATA_DIR directory.
In addition, it is noteworthy that the "make-inetd-constructor" procedure was added to create services similar to inetd and that the "make-systemd-constructor" procedure was added to create services that are activated in network activity (style systemd socket activation).
Other notable changes in this new version include:
- Added a procedure to start the background service:
- Added “:supplementary-groups”, “#:create-session” and “#:resource-limits” parameters to the “make-forkexec-constructor” procedure.
- Guaranteed lock-free operation while waiting for PID files.
- Removed support for compiling with Guile 2.0. Fixed issues when using Guile versions 3.0.5-3.0.7.
- Fibers library 1.1.0 or later is now required to work.
- Improved documentation and examples
- Shepherd can no longer be built with Guile 2.0
- Fix in Guile 3.0 compiler bug.[5-7]
- Updated translations
Finally, if you are interested in learning more or want to obtain this new version, you can consult the details, documentation and download from the following link.
Table of Contents