After 21 years of development, the GNU Shepherd 1.0.0 system manager was released
On December 9, 2024, the GNU Shepherd 1.0.0 system manager (formerly dmd) was released, combining the capabilities of the initialization system and tools for managing system services. This event occurred after 21 years of project development and after the team recognized the readiness of the project and its compliance with the requirements for the functionality of modern initialization systems and service managers.
The GNU Shepherd project is developed by the developers of the GNU Guix System distribution as an alternative to the SysV-init initialization system that supports dependencies. The Shepherd management daemon and utilities are written in the Guile language (one of the implementations of the Scheme language), which is also used to define settings and parameters for starting services. Shepherd’s solution is already used in the GNU Guix System distribution and is also intended for use in GNU/Hurd, but it can work in any POSIX-compatible OS for which the Guile language is available.
The Shepherd project performs the work of starting and stopping services, taking into account the relationship between services, dynamically determining and starting the services on which the selected service depends. The Shepherd solution also supports the detection of conflicts between services and prevents their simultaneous execution. The project can be used both in the role of the main initialization system (init c PID 1) and in a separate form to control the background processes of individual users (for example, to run tor, privoxy, mcron, etc.) with execution with the rights of these users.
According to OpenNET, the main changes and additions in GNU Shepherd 1.0.0:
added support for services that periodically launch commands or code in the Scheme language according to the specified schedule;
the “herd status SERVICE” command displays high-level information about services, such as PID, the command and address at which network requests are received, as well as summaries of recently added messages to the log. In addition, this command now shows user actions applicable to the service and informs about the availability of a replacement service that will be applied after restarting the current service;
the herd status root command is now not synonymous with herd status and displays information about the shepherd root process;
for the Linux platform, it is possible to restart using the kexec mechanism (“reboot –kexec”) to replace the Linux kernel without a physical reboot;
added log-rotation service responsible for periodic rotation of logs and deletion of outdated logs;
added system-log service, which can be used as a replacement for the traditional syslogd system;
a timer service was added to run commands at the specified time, by analogy with the “at” utility. For example, “herd schedule timer at 07:00 — mpg123 alarm.mp3”;
added transient service for running commands in the background, by analogy with the systemd-run utility. For example, “herd spawn transient -d $PWD — make -j4”.
In the Shepherd project, the developers plan to make a number of simple improvements, for example, to add support for dynamically reconfigurable services (the possibility of restarting the service, but with other parameters), integration with control groups (“cgroups”) in Linux, proper integration for suspending software.
In the long term, the project team foresees an exciting journey towards a distributed and functionally oriented Shepherd. For example, using the Spritely Goblins framework for this. According to the developers, this step looks like a natural continuation of the Shepherd design work.
Tags: GNU Shepherd 1.0. GNU Shepherd Shepherd