Skip to content

Releases: davmac314/dinit

v0.20.0: Beta release #9

12 Nov 05:55

Choose a tag to compare

Pre-release

This release fully incorporates the incoming feature contributions that were made during the preceding (0.19.x) beta period. It is anticipated that the next release will be a release candidate for the 1.0 release. New features will not be added until after the final version 1.0 release has been made.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm), M. Herdiansyah (konimex), Coleman McFarland (dontlaugh), q66, saolof, and private sponsors. Thanks also to one-time sponsors Matthew Simmonz (Simmonz), hlclemson, and fictitiousexistence.

Note that some of the new features below were included in the 0.19.x releases by mistake. They are officially supported as of this release. In some cases, some changes have been made to the features as they were found in 0.19.x; these changes are also documented below.

Important changes:

  • The 'dinitcheck' utility has been renamed to 'dinit-check'.
  • "Soft" reboot ('reboot -s') now invokes shutdown as with other reboot/shutdown types. This means that any shutdown hook will be executed, and filesystems may be unmounted.
  • The Meson-based build has been removed.
  • The default installation location for binaries, other than "shutdown" and its aliases, is now "/usr/bin". For shutdown etc it is now "/usr/sbin". Previously, the default for all binaries was "/sbin". The BINDIR build variable has been added to specify the location of binaries other than "shutdown" (the SBINDIR variable remains and controls the location of "shutdown"). For those using configure" to generate build configuration, "--bindir=..." can be used to specify the BINDIR directory.

New features:

  • Add support for service arguments, allowing any number of services to be created from a single "template" service description file (initial functionality implemented by q66).
  • A new @meta command is available in service descriptions to specify meta-information, i.e. information about a service which does not affect how the service runs. This may be useful for use with external tooling. A @meta enable-via subcommand can be used to specify which other service the described service should be added as a dependency of when enabled via "dinitctl enable" (assuming "--from" is not specified); if not specified, the default remains "boot".
  • A new "pre-load" variable expansion is used for certain service settings. This takes place before the service-specific environment (if any) has been loaded, but allows substituting global environment variable values and service arguments. (Implemented for different settings by various contributors, including q66 and Mark Karlinsky).
  • Support for specifying the "nice" level of service processes. This affects scheduling priority. Implemented by q66.
  • Support for setting the ioprio (I/O priority) value on Linux (q66).
  • Support for setting the oom-score-adj (OOM killer "score") value on Linux (q66).
  • Support for Linux capabilities. This allows services to be granted extra capabilities compared to unprivileged processes, even when they do not run as root. Implemented by q66.
  • Support for non-interactive recovery, which after a boot failure runs the recovery service without any interactive prompt ("--auto-recovery") (Jami Kettunen).
  • The shutdown type (halt, reboot etc) is now passed as an argument to the shutdown hook script (Mara).
  • Support for reboot via kexec on Linux (executing a new kernel without going through firmware initialisation) (el-remph), via "shutdown -k". A kernel must be loaded first (via the "kexec" command, which is part of a separate package).
  • Sending the SIGUSR1 signal to dinit now causes it to open the control socket if it has not yet been opened, or if it has been opened previously but is no longer visible in the filesystem. This may be useful for system recovery scenarios.

Changes:

  • Pre-load variable expansion is performed on service description file include paths, service dependency settings ('depends-on' etc), the 'env-file' setting path, and various other settings, including directory-based dependency groups ('depends-on.d' etc) (the latter implemented by Mark Karlinksky).
  • File paths specified in a service description file or fragment (that is @include'd from another file) are now in general resolved against the location of that service description file or fragment. This means paths can be relative to the location of the service configuration.
  • The "secure-bits" setting (which was classified as an in-development feature in previous releases) has been renamed to "securebits", to match relevant Linux documentation (see capabilities(7)).
  • Building support for ioprio now requires the <linux/ioprio.h> header to be present on the system (note that ioprio support was considered in-development prior to this release).
  • The "configure" script allows specifying build variables containing spaces and shell metacharacters by quoting them using shell quoting rules. Note that such a value supplied on the configure command line must typically be doubly-quoted: once for the invoking shell, and then for processing by configure.
  • Default build options for FreeBSD have changed, to avoid a bug in exception handling in clang/libcxxruntime.

Fixes:

  • Fix error message from "dinitctl enable" when the "from" service description file cannot be read, to include the correct location of the problematic file.

As usual, a number of minor fixes and improvements (in addition to those already mentioned) were contributed by Mobin Aydinfar.

v0.19.4: Beta release #8

08 May 12:45

Choose a tag to compare

Pre-release

This release contains minor bug fixes compared to the previous release. It also adds explicit support for NetBSD as a platform.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm), M. Herdiansyah (konimex), Coleman McFarland (dontlaugh), q66, saolof, and private sponsors.

New features:

  • Added explicit support for NetBSD as a platform at build time, and support shutdown on NetBSD (Emile 'iMil' Heitor). (Note that shutdown is still not built by default except on Linux).

Fixes:

  • fix for a glitch where dinitctl status would incorrectly show "no error" as the reason for service start failure.
  • fix for corrupted error message for bad values for certain service settings.
  • fix building Cgroups support even when SUPPORT_CGROUPS is set to 0 (MahnoKropotkinvich).

As usual, a number of minor fixes and improvements (in addition to those already mentioned) were contributed by Mobin Aydinfar.

v0.19.3: Beta release #7

07 Jan 21:28

Choose a tag to compare

Pre-release

Release 0.19.1 mistakenly included in-development features (mainly, service arguments) that were not intended to be included in a bug-fix release. Release 0.19.2 did not include those features. Since distributions may be relying on the features, this release adds them back. There are a small number of documentation fixes and improvements also.

Note that service arguments support is limited, for example, they are not supported by dinitcheck at this stage. If not using those features, the recommendation is to remain on 0.19.2 for now. This release contains no bugfixes compared to 0.19.2.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm), M. Herdiansyah (konimex), Coleman McFarland (dontlaugh), q66, saolof, and private sponsors.

v0.19.2: Beta release #6

16 Dec 09:07

Choose a tag to compare

Pre-release

Attention: the previous release, 0.19.1, was intended as a bug-fix-only release but was cut from the wrong branch and as a result included functionality not intended for that release (eg service arguments). That functionality is not included in this release. If relying on that functionality, do not upgrade to 0.19.2 and please wait for either 0.19.3 or the 0.20 release.

This beta release contains minor bugfixes compared to the prior release. It does not contain various feature changes that be released in version 0.20.0 in due course.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm),
M. Herdiansyah (konimex), Coleman McFarland (dontlaugh), q66, saolof, and private sponsors.

Fixes:

  • Fix bad formatting of line number in error message when a service fails to load (Jami Kettunen).
  • Fix endianness issue leading to errors from dinitctl for some commands on big-endian systems (q66).
  • Fix dinitcheck not being able to find dependency directories ("waits-for.d" etc) if specified via relative path.
  • Dependency directories (as specified by "waits-for.d" and similar) are, if relative, now resolved against the file containing the setting, rather than the base service description file. It is recommended to use absolute paths for all other applicable settings.

v0.19.1: Beta release #5

14 Oct 09:11

Choose a tag to compare

Pre-release

This is a fifth beta release, containing important bugfixes compared to the prior release.

Thanks again to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm), M. Herdiansyah (konimex), q66, saolof, and private sponsors.

With an influx of new features being contributed, a follow-up release is planned. Dinit 0.19.0 was not the final beta after all, and neither will be 0.19.1.

Fixes:

  • Resolve issue causing service restarts to hang (affected "bgprocess" and "internal" services).
  • Fix handling of "depends-ms.d" service setting (q66).
  • Bump protocol version reported by dinit so that full exit status of processes is actually reported (on OSes that support it) (q66).
  • dinitcheck warns about non-absolute executable paths in service descriptions (Yao Zi).

v0.19.0: Beta release #4

21 Sep 01:17

Choose a tag to compare

Pre-release

This is a fourth beta release, with bugfixes and some significant feature additions compared to the previous release. In particular, the new features focus on the ability for user customisation of distribution-provided services.

In the absence of major bugs, the next release is expected to be 1.0.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y (pzmarzly), Wesley Moore (wezm), M. Herdiansyah (konimex), q66, saolof

New features:

  • A logo for Dinit was contributed by Yakui420.
  • Service descriptions can now include other files, via the meta-commands @include and @include-opt (useful for user customisation of services).
  • Some settings, including "command" and "stop-command", may now be appended to (useful for user customisation of services).
  • Added ability to restart process-based services only "on-failure" (Mobin Aydinfar).
  • Service settings may span multiple lines, by "escaping" the line ending with a backslash (Carlos Eduardo).
  • Default system-wide locations are used for user services, in addition to the user-specific directory: /etc/dinit.d/user, /usr/local/lib/dinit.d/user, and /usr/lib/dinit.d/user (realroot2185).
  • "dinitctl add-dep" now takes "need" as a dependency type in place of "regular". The latter is still supported as an alias, for the time being (Locria Cyber).
  • New "depends-on.d" and "depends-ms.d" service settings, as per "waits-for.d" but for other dependency types.
  • New "soft-reboot" utility to force restarting system services without full reboot (Yukari Chiba). Note that this requires appropriately configured services. It is most likely to be useful in containers.

Changes:

  • For service restart via "dinitctl restart", display both "stopped" and "started" status instead of only "started".
  • For some service settings, where the current setting is not actually overwritten by "re-assigning" the setting, the documentation now suggests using ":" to separate the setting name and value (rather than "="). This has long been supported, but was not documented previously.

Fixes:

  • shutdown utility correctly changes behaviour according to name (reboot, etc) when built with a name prefix (Mobin Aydinfar).
  • fixes to control connection processing on error conditions (Mobin Aydinfar).
  • fixed rare dinitctl hang after enabling a service (Mobin Aydinfar).
  • fixed bug detecting invalid process id from pid file for "bgprocess" services.
  • full ("int"-sized) exit status of processes now reported, on operating systems that support this (including FreeBSD, and excluding Linux).

Build fixes:

  • Improvements to configure script, fixing some failure cases (Mobin Aydinfar).
  • Fixes to meson build: build "poweroff" binary, install "poweroff", "reboot" and "halt" as symbolic links as per Makefile build (M. Herdiansyah, aka konimex).
  • Fixed FreeBSD makefile-based build.

Various other changes:

  • Reworked integration tests, CI improvements (Mobin Aydinfar), documentation improvements, FreeBSD integration (see contrib/) (Locria Cyber).

v0.18.0: Beta release #3

13 Jan 02:58

Choose a tag to compare

Pre-release

This is a beta release focused on improving user experience, which also introduces some minor new features.

Thanks to current sponsors: PaweΕ‚ ZmarzΕ‚y, Wesley Moore, brazeon, q66

Changes:

  • For user instances, if the XDG_CONFIG_HOME environment is set, dinit now looks for services in $XDG_CONFIG_HOME/dinit.d/ in addition to $HOME/.config/dinit.d (if they are different paths).
    Implemented by Oliver Amann.
    Note that Dinit does not, and most likely never will, fully support the (flawed) XDG Base Directory Specification.

New features:

  • dinitcheck now supports an "online" mode of operation (--online, -n) in which it will query the service directories and service manager environment from a running dinit instance.
  • In dinit-monitor: support reporting initial service status, and using alternative (user-supplied) wording for status texts. Thanks to James Knippes (helican).
  • For service descriptions, a new form of variable expansion is available. When written as $/NAME (or $/{NAME}) the variable value undergoes word splitting and whitespace collapse. This is convenient for allowing optional command line arguments to be specified via the environment, for example.

Fixes:

  • Fix a latent control protocol processing issue (does not affect dinitctl).
  • Various minor improvements to error messages, designed to provide a better end-user experience.
  • Fixes to minor build issues in Meson build (Mobin Aydinfar).

v0.17.1: 2nd beta release

04 Nov 23:07

Choose a tag to compare

Pre-release

This is a 2nd beta release to follow up from 0.17.0. The changes are mostly minor; they include some bug fixes, and some behavioural changes, that are listed below; there are also new options for controlling logging.

New features:

  • The console log level, and primary log facility (syslog or logfile) log level, can now be specified via the new "--console-level" and "--log-level" options. See the documentation in the dinit(8) man page.

Changes:

  • The log file is opened immediately when starting even as a system manager, if possible. This can make it easier to debug boot issues.
  • The working directory for a service is now the directory containing the service description. This can simplify specifying configuration files/script locations etc. Implemented by Daniel Kolesa.
  • The env-file (environment) path for a service is now relative to the service directory containing the service description. Implemented by Daniel Kolesa.
  • Failure to open the env-file (environment) specified for a service is now treated as a hard error (and will prevent a service starting). Implemented by Mobin Aydinfar.

Fixes:

  • A service that restarted too often, too quickly but which was a dependency of another service also set to restart did not trigger the restart limit check; this has been fixed.
  • Process services with the smooth-recovery option and with readiness notification did not check that readiness notification was received after a smooth restart.
  • Don't report ECONNRESET errors in control connections. These indicate that the client closed the connection (possibly by terminating) and do not need to be reported. This prevents a spurious warning on shutdown.
  • Give an error when a service is specified as its own output consumer (avoids crash). Thanks to Mobin Aydinfar.
  • A better effort to make the symlink created during a "dinitctl enable" operation actually point to the enabled service. (This has no effect on operation).
  • Various command line switches which require an additional argument (eg -d, -l) now check that the argument supplied is now empty.
  • configure script improvements/fixes by Mobin Aydinfar, and by Roze061

v0.17.0: First Beta release

20 Aug 04:44

Choose a tag to compare

Pre-release

This is 0.17.0, the first beta release of Dinit! Dinit is now considered feature-complete for the first main release. Development until then will focus on bug fixes, improvements to existing features, and documentation.

Thank you to several new sponsors, as well as existing sponsors, for supporting this release. Current sponsors include github users: brentfrow, brazeon, and q66 (Daniel Kolesa, author of Chimera Linux). Development of Dinit has also received financial support from Artix Linux. I am grateful for all the support, both financial and otherwise, that has been received.

Special thanks to Mobin Aydinfar, who has taken on secondary maintainer duties in the lead-up to
this release, including many valuable contributions to getting CI infrastructure up-and-running.

This release includes several new features and fixes. There are also some small incompatibilities with the previous release, see "changes" below.

New features:

  • A "log-type" service setting allows for control over how a service output is processed. A new "buffer" type allows capturing service output to an in-memory buffer; this may be useful for service started early, before any logging daemon is available. The buffer contents can be inspected via a new dinitctl subcommand, "catlog". See dinit-service(5) and dinitctl(8). Other log-type settings are "none", "file" (log to file as in previous versions) and "pipe" which allows piping output to another (process) service - read on for details.
  • Output from a service process can now be chained to another process (in another service). This allows one service to act as a logging agent for another, for example. The consumer service need not be started at the same time as the producer process; the pipe between them can be created early if needed, and will persist if either end dies (so restarting a logging agent without losing log messages should be possible in theory). The "consumer-of" service setting, specified in the consumer, creates the connection between the services; the producer must have log-type of "pipe".
  • New "triggered" service type, similar to "internal" except that it requires an external trigger before it will start (start of a triggered service is delayed until the external trigger is received). One potential use is to start services after hardware device nodes become available (eg, start dhcp client on a network interface once it is available).
  • New "dinictl" subcommand, "signal", to send a signal to a service process. See dinitctl(8). Implemented by James Knippes and Mobin Aydinfar.
  • New "kill-all-on-stop" service option will cause dinit to kill all (other) processes just before stopping the service. This can be used to ensure a cleaner system state and that filesystems can be unmounted (for example). Use with care; see dinit-service(5) for details.
  • The "shutdown" utility now runs (if present) user-provided shutdown hooks; see shutdown(8) for details.
  • New service settings to control service logfile ownership and permissions: logfile-permissions, logfile-uid, and logfile-gid. Note that these have default values, which results in a change in behaviour from previous versions even if they are not specified in a service description (i.e. the logfile ownership and permissions are now always set).
  • A new "--offline" option for dinitctl enables using "enable" and "disable" subcommands to enable/disable services when dinit is not running.
  • "before" and "after" ordering requirements in service descriptions no longer force the named service to be loaded. This means that a service can be "before" another service even if the other service might not be installed, for example.
  • New "dinitctl" subcommands "is-started" and "is-failed", to test for specific service statuses (intended to be useful in scripts, for example). Contributed by Daniel Kolesa.
  • The "dinitctl" utility now supports the "--use-passed-cfd" argument (as for shutdown).
  • A "configure" script to generate suitable build configuration is included. It is used by default when building on not-recognised systems. Contributed by Mobin Aydinfar.
  • Meson build system added (as an alternative to the existing makefile-based build) by Mobin Aydinfar.

Changes:

  • The default is now to restart services automatically (previously required "restart = yes").
  • The permissions/ownership for logfiles has been reworked, see details in "New features" above.
  • Services which specify "run-as" to run as a different user now run with the supplementary groups of that user (this can be disabled at build time by setting USE_INITGROUPS=0). Thanks to Daniel Kolesa.
  • Environment variables from the service-specific environment ("env-file" setting) can now be substituted in many service settings. Variable expansion now supports a limited subset of shell expansions (such as "$(NAME:-word}" and "${NAME:+word}). Behaviour is not identical to shell; see documentation. Implemented by Daniel Kolesa.
  • Environment variable expansion in service descriptions is no longer optional. The "sub-vars" load option no in a service description no longer has any effect, and "no-sub-vars" is no longer recognised at all.
  • "/run/dinit.d" is now included in the default set of directories search for service description files (in system mode).
  • Some service defaults, including automatic restart, can now be configured at build time (contributed by Mobin Aydinfar).

Fixes:

  • A bug in Dasynq which caused out-of-bounds vector access in dinit on shutdown has been fixed.
  • Fixed a dinit bug that could cause communication on a control socket to block indefinitely, which could theoretically cause dinitctl to hang (no cases of dinitctl hanging have been reported by users!).

sha256sum:

dinit-0.17.0.tar.xz f3ce6eaaabd571edc16f54907cd6062f22ed5d4b6f9ae6fc1c6533f39469b1f0

v0.16.1: Bugfix for Alpha Release #8

08 Jan 04:53

Choose a tag to compare

Pre-release

This release contains bug fixes for the previous release. Unfortunately a small number of serious bugs have been discovered that require an interim release, before the planned beta release (which is still upcoming).

Changes:

  • Fix issue where dependencies could stop before their dependents had stopped.
  • Fix issue where startup could fail if control socket location was not writable when dinit started.
  • Fix for dinitctl crashing due to an exception when a service description contained certain syntactical errors.
  • Fix nonsensical (but harmless) error message when loading services (when the service description is found in a directory that is not the first directory searched) (Daniel Kolesa).
  • Fix issue with example rootfscheck.sh script (Mobin Aydinfar).
  • Minor build system improvements (Daniel Kolesa).
  • Minor documentation updates.

dinit-0.16.1.tar.xz sha256sum: 020da31210322e01c07d30343671f6ba2b1024fab0699a1df49f390d462e8f69