Skip to content

Releases: davmac314/dinit

v0.18.0: Beta release #3

13 Jan 02:58
Compare
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
Compare
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
Compare
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
Compare
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

v0.16.0: Alpha release #8

09 Oct 05:30
Compare
Choose a tag to compare
Pre-release

This release contains some new features and bug fixes.

All going well, this will be the last alpha release, and the next release will be marked as beta.

Changes:

  • "before" and "after" relationships can now be specified for services. These can be used to control startup order without creating explicit dependencies between services.
  • The "restart" command of dinitctl will now also restart hard dependents if the "--force" option is used (previously the "--force" option was ignored, and the command would fail if a dependent blocked the restart). Changes contributed by Duncan Overbruck.
  • The "-t" (or "--service") command-line option has been implemented to allow unambiguously specifying that the next argument is a service name. This can be used when booting Linux to select a target service or services (dinit otherwise ignores potential service names in this scenario, since the Linux kernel sometimes passes through kernel options to init). Implemented by Mobin Aydinfar.
  • The dinit daemon itself supports S6-compatible readiness notification (for when run under another supervision system or controlling process). The "-r " command line argument specifies the file descriptor to write the notification to. Contributed by Daniel Kolesa.
  • Environment files (including per-service file as specified by env-file service setting): support for commands !clear, !unset and !import. These give more flexibility in how much of the original environment to expose to service processes. See the dinit(8) man page for more information.
  • The dinitctl utility provides more information if a service fails to start (avoiding the need to query the status separately or check logs to get the same information).
  • Fix bug with cgroup root path extraction where the path was longer than 64 characters (found by Github continuous integration builds as implemented by Mobin Aydinfar).
  • Fix bad pointer bug manifesting with very short command strings (reported by Duncan Overbruck).
  • Reloading a service now checks for (and disallows) cyclic dependencies.
  • Minor fix to service examples, contributed by Firas Khalil Khana.
  • Various minor build/install fixes.

Other:

  • Github continuous integration was set up by Mobin Aydinfar

v0.15.1: Alpha release #7

15 Jun 12:25
Compare
Choose a tag to compare
Pre-release

This contains minor fixes for the 0.15.0 release.

Changes:

  • Remove extra newline which was printed after service description error log messages.
  • Install dinit-monitor as part of "make install".

v0.15.0: Alpha release #6

13 Jun 12:12
Compare
Choose a tag to compare
Pre-release

This release contains bug fixes and new features.

Changes:

  • New dinit-monitor utility can be used to perform notifications (via an external command, such as notify-send) when a service changes state. This is primarily intended for users running dinit in "user mode" rather than for system instances of dinit, although it works in either case. See the dinit-monitor(8) manual page for details.
  • Support on Linux for running service processes in a cgroup, via the runs-in-cgroup service setting. Cgroups must be mounted/created outside of dinit (eg via an early service), there is no support for this in dinit itself. See the dinit-service(5) manual page for details.
  • dinitctl's enable, disable and rmdep subcommands now give better feedback in various situations. For example, dinitctl disable will warn if a disabled service has other dependents (which may cause it to start anyway).
  • When parse errors occur in service description files, the relevant line number should now be reported (by dinitcheck, or in the dinit log).
  • Environment variable substitution in command lines is now performed for the stop-command setting in exactly the same way as for the command setting. Previously, by oversight, substitution was not performed for the stop-command setting.
  • Fix: start timeout was not being honoured for service restarts.

v0.14.0: Alpha release #5

23 Apr 04:06
Compare
Choose a tag to compare
Pre-release

This release contains bug fixes and a new feature.

Changes:

  • "stop-command" service parameter can now be applied to process and bgprocess services. If
    specified for these service types, the specified command is used to stop the service.

  • "dinitctl status" now reports launch stage and error for services which failed to execute.
    Example output:

    $ src/dinitctl status mpd
    Service: mpd
        State: STOPPED (could not be launched)
            Stage: executing command
            Error: No such file or directory
    
  • Fixes bug where "dinitctl status" command would sometimes report an error.

  • Fixes a (situational, unlikely) bug where a bgprocess state could get stuck.

  • Fixes a potential memory corruption / crash bug occurring in out-of-memory situations when
    adding a dependency to a service (via "dinitctl reload" or "dinitctl add-dep").

v0.13.0: Alpha release #4

25 Mar 09:39
Compare
Choose a tag to compare
Pre-release

Dinit is very close to being feature-complete.

This is the fourth Alpha release. It contains a number of improvements and new features over the previous release.

NOTE: This release has some minor backwards-incompatible changes. Please read these notes carefully.

This release includes changes contributed by Daniel Kolesa.

Changes:

  • A new dinitctl subcommand, "status", can be used to query extended status information for an individual service.
  • The default directory for user services has moved to ~/.config/dinit.d (rather than ~/dinit.d).
  • Some service settings now expand environment variables (given in the form $VARNAME, in any location that it appears within the setting value). The affected settings are: socket_path, logfile, env_file, working_dir and pid_file.
  • The variable substitution in command lines (which remains dependent on the sub-vars load option, for now) uses the same substitution rules and logic as for other settings. In particular, this means that a variable expansion can occur as part of a command line argument (previously it always replaced whole arguments).
  • The dinitctl program now uses the value of the DINIT_SOCKET_PATH environment variable, if set, as the default control socket path. (If not set, behaviour is the same as for previous versions).
  • A poweroff symlink for shutdown will be installed alongside other symlinks (reboot, halt etc). This allows integration in environments that expect such a command to be available.

v0.12.0: Alpha release #3

22 Aug 04:34
Compare
Choose a tag to compare
Pre-release

This is the third Alpha release, issued as a follow-up to the previous Alpha
releases. It contains a number of minor improvements.

Changes:

  • A new "--ignore-unstarted" option to dinitctl, causing it to return success when attempting to restart a service which is not started (including when no service description for it exists).
  • Add an "always-chain" service option, so that chaining to another service (as specified via the "chain-to" setting) becomes unconditional.
    Feature contributed by Alexander Sherikov.
  • Add support for multiple service directories to be specified (via multiple --services-dir options).
    Feature contributed by Alexander Sherikov.
  • Improve control socket creation / stale socket removal. Previously, a system instance would unconditionally unlink a pre-existing socket file, and non-system instances would fail if a pre-existing socket file existed (even if it was not active, i.e. no dinit instance was accepting connections on it). Now, if there is an existing socket file, dinit will attempt to connect to it, and will refuse to start if this succeeds, or unlink it otherwise. Unfortunately this cannot be done atomically, so it should not be relied on as a general means to prevent more than one instance of dinit from starting.