NEWS 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. == Version 0.17.1pre (?)
  2. * TBA...
  3. == Version 0.17.0
  4. Thank you to several new sponsors, as well as existing sponsors, for supporting this release.
  5. Current sponsors include github users: brentfrow, brazeon, and q66 (Daniel Kolesa, author of
  6. Chimera Linux). Development of Dinit has also received financial support from Artix Linux.
  7. I am grateful for all the support, both financial and otherwise, that has been received.
  8. Special thanks to Mobin Aydinfar, who has taken on secondary maintainer duties in the lead-up to
  9. this release, including many valuable contributions to getting CI infrastructure up-and-running.
  10. New features:
  11. * A "log-type" service setting allows for control over how a service output is processed. A new
  12. "buffer" type allows capturing service output to an in-memory buffer; this may be useful for
  13. service started early, before any logging daemon is available. The buffer contents can be
  14. inspected via a new dinitctl subcommand, "catlog". See dinit-service(5) and dinitctl(8). Other
  15. log-type settings are "none", "file" (log to file as in previous versions) and "pipe" which
  16. allows piping output to another (process) service - read on for details.
  17. * Output from a service process can now be chained to another process (in another service).
  18. This allows one service to act as a logging agent for another, for example. The consumer
  19. service need not be started at the same time as the producer process; the pipe between them can
  20. be created early if needed, and will persist if either end dies (so restarting a logging agent
  21. without losing log messages should be possible in theory). The "consumer-of" service setting,
  22. specified in the consumer, creates the connection between the services; the producer must have
  23. log-type of "pipe".
  24. * New "triggered" service type, similar to "internal" except that it requires an external
  25. trigger before it will start (start of a triggered service is delayed until the external
  26. trigger is received). One potential use is to start services after hardware device nodes become
  27. available (eg, start dhcp client on a network interface once it is available).
  28. * New "dinictl" subcommand, "signal", to send a signal to a service process. See dinitctl(8).
  29. Implemented by James Knippes and Mobin Aydinfar.
  30. * New "kill-all-on-stop" service option will cause dinit to kill all (other) processes just
  31. before stopping the service. This can be used to ensure a cleaner system state and that
  32. filesystems can be unmounted (for example). Use with care; see dinit-service(5) for details.
  33. * The "shutdown" utility now runs (if present) user-provided shutdown hooks; see shutdown(8) for
  34. details.
  35. * New service settings to control service logfile ownership and permissions: logfile-permissions,
  36. logfile-uid, and logfile-gid. Note that these have default values, which results in a change in
  37. behaviour from previous versions even if they are not specified in a service description (i.e.
  38. the logfile ownership and permissions are now always set).
  39. * A new "--offline" option for dinitctl enables using "enable" and "disable" subcommands to
  40. enable/disable services when dinit is not running.
  41. * "before" and "after" ordering requirements in service descriptions no longer force the named
  42. service to be loaded. This means that a service can be "before" another service even if the
  43. other service might not be installed, for example.
  44. * New "dinitctl" subcommands "is-started" and "is-failed", to test for specific service statuses
  45. (intended to be useful in scripts, for example). Contributed by Daniel Kolesa.
  46. * The "dinitctl" utility now supports the "--use-passed-cfd" argument (as for shutdown).
  47. * A "configure" script to generate suitable build configuration is included. It is used by
  48. default when building on not-recognised systems. Contributed by Mobin Aydinfar.
  49. * Meson build system added (as an alternative to the existing makefile-based build) by Mobin
  50. Aydinfar.
  51. Changes:
  52. * The default is now to restart services automatically (previously required "restart = yes").
  53. * The permissions/ownership for logfiles has been reworked, see details in "New features" above.
  54. * Services which specify "run-as" to run as a different user now run with the supplementary
  55. groups of that user (this can be disabled at build time by setting USE_INITGROUPS=0).
  56. Thanks to Daniel Kolesa.
  57. * Environment variables from the service-specific environment ("env-file" setting) can now be
  58. substituted in many service settings. Variable expansion now supports a limited subset of shell
  59. expansions (such as "$(NAME:-word}" and "${NAME:+word}). Behaviour is not identical to shell;
  60. see documentation. Implemented by Daniel Kolesa.
  61. * Environment variable expansion in service descriptions is no longer optional. The "sub-vars"
  62. load option no in a service description no longer has any effect, and "no-sub-vars" is no
  63. longer recognised at all.
  64. * "/run/dinit.d" is now included in the default set of directories search for service description
  65. files (in system mode).
  66. * Some service defaults, including automatic restart, can now be configured at build time
  67. (contributed by Mobin Aydinfar).
  68. Fixes:
  69. * A bug in Dasynq which caused out-of-bounds vector access in dinit on shutdown has been fixed.
  70. * Fixed a dinit bug that could cause communication on a control socket to block indefinitely,
  71. which could theoretically cause dinitctl to hang (no cases of dinitctl hanging have been
  72. reported by users!).
  73. == Version 0.16.1
  74. (Bugfix release for 0.16.0)
  75. This release contains bug fixes for the previous release.
  76. Changes:
  77. * Fix issue where dependencies could stop before there dependents had stopped.
  78. * Fix issue where startup could fail if control socket location was not writable when
  79. dinit started.
  80. * Fix for dinitctl crashing due to an exception when a service description contained
  81. certain syntactical errors.
  82. * Fix nonsensical (but harmless) error message when loading services (when the service
  83. description is found in a directory that is not the first directory searched)
  84. (Daniel Kolesa).
  85. * Fix issue with example rootfscheck.sh script (Mobin Aydinfar).
  86. * Minor build system improvements (Daniel Kolesa).
  87. * Minor documentation updates.
  88. == Version 0.16.0
  89. (Alpha release #8)
  90. This release contains some new features and bug fixes.
  91. Changes:
  92. * "before" and "after" relationships can now be specified for services. These can be used to
  93. control startup order without creating explicit dependencies between services.
  94. * The "restart" command of dinitctl will now also restart hard dependents if the "--force"
  95. option is used (previously the "--force" option was ignored, and the command would fail if
  96. a dependent blocked the restart). Changes contributed by Duncan Overbruck.
  97. * The "-t" (or "--service") command-line option has been implemented to allow unambiguously
  98. specifying that the next argument is a service name. This can be used when booting Linux to
  99. select a target service or services (dinit otherwise ignores potential service names in this
  100. scenario, since the Linux kernel sometimes passes through kernel options to init).
  101. Implemented by Mobin Aydinfar.
  102. * The dinit daemon itself supports S6-compatible readiness notification (for when run under
  103. another supervision system or controlling process). The "-r <fd>" command line argument
  104. specifies the file descriptor to write the notification to. Contributed by Daniel Kolesa.
  105. * Environment files (including per-service file as specified by env-file service setting):
  106. support for commands !clear, !unset and !import. These give more flexibility in how much of the
  107. original environment to expose to service processes. See the dinit(8) man page for more
  108. information.
  109. * The dinitctl utility provides more information if a service fails to start (avoiding the need
  110. to query the status separately or check logs to get the same information).
  111. * Fix bug with cgroup root path extraction where the path was longer than 64 characters (found
  112. by Github continuous integration builds as implemented by Mobin Aydinfar).
  113. * Fix bad pointer bug manifesting with very short command strings (reported by Duncan Overbruck).
  114. * Reloading a service now checks for (and disallows) cyclic dependencies.
  115. * Minor fix to service examples, contributed by Firas Khalil Khana.
  116. * Various minor build/install fixes.
  117. Other:
  118. * Github continuous integration was set up by Mobin Aydinfar
  119. == Version 0.15.1
  120. (Alpha release #7)
  121. This contains minor fixes for the previous release.
  122. Changes:
  123. * Remove extra newline which was printed after service description error log messages.
  124. * Install dinit-monitor as part of "make install".
  125. == Version 0.15.0
  126. (Alpha release #6)
  127. This release contains bug fixes and new features.
  128. Changes:
  129. * New "dinit-monitor" command can be used to perform notifications (via an external command, such
  130. as notify-send) when a service changes state. This is primarily intended for users running dinit
  131. in "user mode" rather than for system instances of dinit, although it works in either case. See
  132. the dinit-monitor(8) manual page for details.
  133. * Support on Linux for running service processes in a cgroup, via the "runs-in-cgroup" service
  134. setting. Cgroups must be mounted/created outside of dinit (eg via an early service), there is no
  135. support for this in dinit itself. See the dinit-service(5) manual page for details.
  136. * "dinitctl enable", "dinitctl disable" and "dinitctl rmdep" now give better feedback in various
  137. situations. For example, "dinitctl disable" will warn if a disabled service has other
  138. dependents (which may cause it to start anyway).
  139. * When parse errors occur in service description files, the relevant line number should now be
  140. reported (by dinitcheck, or in the dinit log).
  141. * Environment variable substitution in command lines is now performed for the "stop-command"
  142. setting in exactly the same way as for the "command" setting. Previously, by oversight,
  143. substitution was not performed for the "stop-command" setting.
  144. * Fix: start timeout was not being honoured for service restarts.
  145. == Version 0.14.0
  146. (Alpha release #5)
  147. This release contains bug fixes and a new feature.
  148. Changes:
  149. * "stop-command" service parameter can now be applied to process and bgprocess services. If
  150. specified for these service types, the specified command is used to stop the service.
  151. * "dinitctl status" now reports launch stage and error for services which failed to execute.
  152. Example output:
  153. $ src/dinitctl status mpd
  154. Service: mpd
  155. State: STOPPED (could not be launched)
  156. Stage: executing command
  157. Error: No such file or directory
  158. * Fixes bug where "dinitctl status" command would sometimes report an error.
  159. * Fixes a (situational, unlikely) bug where a bgprocess state could get stuck.
  160. * Fixes a potential memory corruption / crash bug occurring in out-of-memory situations when
  161. adding a dependency to a service (via "dinitctl reload" or "dinitctl add-dep").
  162. == Version 0.13.0
  163. NOTE: This release has some minor backwards-incompatible changes. Please read
  164. these notes carefully.
  165. This release includes changes contributed by Daniel Kolesa.
  166. Changes:
  167. * A new dinitctl subcommand, "status", can be used to query extended status
  168. information for an individual service.
  169. * The default directory for user services has moved to ~/.config/dinit.d
  170. (rather than ~/dinit.d).
  171. * Some service settings now expand environment variables (given in the form
  172. $VARNAME, in any location that it appears within the setting value). The
  173. affected settings are: socket_path, logfile, env_file, working_dir and
  174. pid_file.
  175. * The variable substitution in command lines (which remains dependent on the
  176. 'sub-vars' load option, for now) uses the same substitution rules and logic
  177. as for other settings. In particular, this means that a variable expansion
  178. can occur as part of a command line argument (previously it always replaced
  179. whole arguments).
  180. * The dinitctl program now uses the value of the DINIT_SOCKET_PATH
  181. environment variable, if set, as the default control socket path. (If not
  182. set, behaviour is the same as for previous versions).
  183. * A "poweroff" symlink for shutdown will be installed alongside other symlinks
  184. ("reboot", "halt" etc). This allows integration in environments that expect
  185. such a command to be available.
  186. == Version 0.12.0
  187. This is the third Alpha release, issued as a follow-up to the previous Alpha
  188. releases. It contains a number of minor improvements.
  189. Changes:
  190. * A new "--ignore-unstarted" option to dinitctl, causing it to return success
  191. when attempting to restart a service which is not started (including when
  192. no service description for it exists).
  193. * Add an "always-chain" service option, so that chaining to another service
  194. (as specified via the "chain-to" setting) becomes unconditional.
  195. Feature contributed by Alexander Sherikov.
  196. * Add support for multiple service directories to be specified (via multiple
  197. --services-dir options).
  198. Feature contributed by Alexander Sherikov.
  199. * Improve control socket creation / stale socket removal. Previously, a
  200. system instance would unconditionally unlink a pre-existing socket file,
  201. and non-system instances would fail if a pre-existing socket file existed
  202. (even if it was not active, i.e. no dinit instance was accepting
  203. connections on it). Now, if there is an existing socket file, dinit will
  204. attempt to connect to it, and will refuse to start if this succeeds, or
  205. unlink it otherwise. Unfortunately this cannot be done atomically, so it
  206. should not be relied on as a general means to prevent more than one
  207. instance of dinit from starting.
  208. == Version 0.11.0
  209. This is a second Alpha release, issued as a follow-up to the previous Alpha
  210. release. It contains some minor bugfixes and a number of other improvements
  211. (all detailed below).
  212. Important: the default system socket location has changed. If version 0.11 of
  213. shutdown, halt etc are installed, they may not be able to communicate with the
  214. already-running (v0.10.0 or prior) dinit daemon. In this case, to shut the
  215. system down, use:
  216. dinitctl -p /dev/dinitctl shutdown
  217. Important: the "no-sigterm" option has been removed. To specify that no
  218. SIGTERM signal should be sent to a process to stop it, specify a different
  219. signal (or "none") via the "term-signal" setting. It is no longer possible to
  220. have both SIGTERM and an additional signal sent, but the settings should be
  221. less confusing.
  222. Changes:
  223. * dinit and dinitctl now support --version command line argument.
  224. * Improved diagnostic message if a service description file exists but
  225. can't be opened.
  226. * Default system socket location has changed from /dev/dinitctl to
  227. /run/dinitctl (see note above).
  228. * Active status is indicated in "dinitctl list" output. Square brackets
  229. indicate a service is marked active (i.e. it has been explicitly started)
  230. and curly brackets indicate a service that has started due to being the
  231. dependent of an active service.
  232. * The "dinitcheck" utility now performs a number of additional checks.
  233. * Better feedback is provided for various "dinitctl" commands. The affected
  234. service name is reported for any status update.
  235. * Fixed bug processing rlimit settings.
  236. * Fixed issue with interpreting unwanted command line parameters passed from
  237. linux kernel as service names.
  238. == Version 0.10.0
  239. This release is a major step towards a version 1.0 release. It should be
  240. considered an Alpha release; core functionality is complete but some
  241. ancillary functionality is still unimplemented. It is believed to be of
  242. good quality but bugs may be present.
  243. * When not running as system init, dinit will now fail to start if the control
  244. socket cannot be opened. In particular this should prevent accidentally
  245. starting multiple instances of dinit (and all services).
  246. * Services of type bgproc will no longer load if the pid-file setting is not
  247. supplied. Previously such services could be started, but stopping them would
  248. leave the process running.
  249. * Re-worked manual service stop (via command). Previously, manually stopping
  250. a service would inhibit automatic restart of the service, but not of its
  251. dependents; this meant that the service might still restart due to a
  252. dependent. In this version, manually stopping a service inhibits restart
  253. of the service and all dependents (note that the --force option is required,
  254. as previously, in order to stop a service which has active dependents).
  255. * Re-worked soft dependency handling slightly. A dependency now (re-)attaches
  256. to its dependent if it starts (or starts again) while the dependent is
  257. started. This leads to overall more consistent behaviour (and is simpler
  258. to implement properly).
  259. * Re-worked pinning. A service that is pinned stopped can now prevent dependents
  260. from starting (the behaviour is the same as if the service failed to start).
  261. * Support start-timeout setting for process services. Previously this setting
  262. was ignored for such services. It is mostly useful for services which also
  263. have readiness notification configured (since otherwise, a process service is
  264. considered started as soon as it begins execution).
  265. * If a process-based service fails to restart, restart of dependent services
  266. will be inhibited. This should prevent repeated attempts to launch a failing
  267. process caused by a restarting dependent service.
  268. * Fixed some cases where service target state would not be set correctly. This
  269. could cause output of "dinitctl list" to incorrectly show that a service would
  270. restart after stopping, when in fact it would remain stopped.
  271. * Fixed various corner-case bugs in service management.
  272. == Version 0.9.1
  273. This is a bug-fix release.
  274. * Fix a service getting stuck in the "stopping" state, if a dependent is
  275. set to auto-restart ("restart = true").
  276. == Version 0.9.0
  277. This release includes some new functionality and a rework of the chain-load
  278. mechanism.
  279. * The service specified via the "chain-to" setting will now only be started
  280. if the initiating service completes successfully, i.e. if it terminates
  281. normally (with an exit code of 0) and only if it is not manually stopped.
  282. * New option "--container" (-o) inhibits system management functions (such
  283. as machine shutdown/restart) that are normally enabled when dinit runs as
  284. process ID 1. A complementary "--system-mgr" (-m) option enables system
  285. management (even when not running as PID 1).
  286. * Fixed pinned-started services stopping when released by a dependent
  287. service, instead of remaining in the started state, and some other bugs
  288. related to pinning. Some issues may remain to be fixed in a later release.
  289. == Version 0.8.2
  290. This is a bug-fix release.
  291. * Fixed group not being set correctly when "run-as" or "socket-uid" were used.
  292. * Fixed "dinitctl rm-dep" command
  293. * Fixed bug preventing shutdown when auto-restart services were configured
  294. * Fixed smooth recovery of bgprocess services
  295. == Version 0.8.1
  296. This is a bug-fix release.
  297. * Fixed crash on service load error.
  298. * Fixed an unchecked allocation leading to possible unexpected termination.
  299. * Fixed a slow memory leak (in the bundled Dasynq library).
  300. * Fixed --help option for "dinitcheck" not working.
  301. * Fixed badly formatted error message from process launch failure.
  302. * Fixed issue where log file would not always be flushed on exit.
  303. * Fixed "dinitcheck" crashing if service description could not be found.
  304. == Version 0.8.0
  305. This release includes major usability features.
  306. * New command "dinitcheck" checks service descriptions for errors (without attempting to load
  307. or start the service). Checks the named service(s) and any dependencies.
  308. * Service descriptions can now be reloaded, using "dinitctl reload <service-name>". This works
  309. for services which are started, with some restrictions, and for services which are stopped,
  310. and allows dependencies to be altered.
  311. * dinitctl now defaults to the system process socket location when run as root. This means that
  312. using '-s' is no longer necessary (it is still supported for backwards compatibility). A new
  313. '-u' option can be used to communicate with the user daemon, if there is one.
  314. == Version 0.7.0
  315. This release adds a minor feature, and includes a re-work of some base functionality
  316. (which should not affect most use cases).
  317. * dinitctl "restart" command added. Re-starts an already-running service without affecting
  318. activation or dependency links.
  319. * dinitctl "stop" command now requires a `--force` option if dependents of the specified
  320. service would also need to stop.
  321. * dinitctl "wake" command now reconnects dependency links from dependents of the specified
  322. service, and can only be used if at least one such dependent is started.
  323. == Version 0.6.1:
  324. This is a bug-fix release with several minor fixes:
  325. * Resource limits were not properly being set.
  326. * Prevent early termination when standard input is closed or set to a device which cannot
  327. be watched for input.
  328. * Control protocol fix, possibly not affecting any real usage.
  329. == Version 0.6.0:
  330. This release adds a number of minor features:
  331. * Better behaviour when boot fails. User can choose an action from reboot, resume boot process,
  332. start the "recovery" service, or power-off.
  333. * New service settings for limiting resources at the process level: "rlimit-nofile",
  334. "rlimit-core", "rlimit-data", "rlimit-addrspace". Both hard and soft limits can be set.
  335. See dinit-service(5) for details.
  336. * New "env-file" setting allows per-setting environment to be specified via a file. The file
  337. is re-read each time the service process is started.
  338. * Added a "--quiet" option to suppress console output from Dinit.
  339. * Dinit when run as a user daemon no longer logs via syslog. Logging to file can still be
  340. enabled via the "-l"/"--log-file" option.
  341. * Added a "--socket-path"/"-p" option to dinitctl, to specify the socket path for communication
  342. with the dinit daemon.
  343. A number of minor bugfixes and other improvements are also implemented. An integration test
  344. framework has been added with a small number of tests, to complement the existing unit tests.
  345. == Version 0.5.2:
  346. This is a bug-fix release for several minor issues which have been found in the preceding
  347. release (0.5.1).
  348. * Fix logging failure after log buffer becomes full.
  349. * Fix readiness-fd notification not immediately updating service states.
  350. * Fix use of old settings in sample configuration for Linux.
  351. * Re-create control socket file node if it "disappears". Should solve issues if root filesystem
  352. is mounted read-write on boot.
  353. * Fix potential issue with service launch failure for services using a fixed notification fd.
  354. == Version 0.5.1:
  355. This is a bug-fix release for several issues of varying severity which have been found in the
  356. preceding release.
  357. * Improved logging behaviour when a service runs "on console" for a very short time.
  358. * Fix for crash due to SIGALRM on OpenBSD.
  359. * Fixes for compiling with Musl C library.
  360. * Fix dinitctl "enable" and "disable" commands when path to service directory is absolute.
  361. * "termsignal" setting renamed "term-signal" and now supports "KILL" signal. "termsignal"
  362. is still supported for compatibility with existing service descriptions.
  363. * Other minor fixes.
  364. == Version 0.5.0:
  365. This version adds S6-compatible readiness notification support, and adds support for updating
  366. the "utmp" database when services start/stop (this functionality should be avoided if possible
  367. since the "utmp" database is mostly an historical artifact, and system support is often prone
  368. to issues which allow unprivileged users to prevent updates and deny or delay logins; however,
  369. utilities such as "who" may depend on the database being updated appropriately).
  370. Other changes:
  371. * Add "-u" command line option to force running dinit as a user instance.
  372. * Add a "chain-to" service property to better support recovery services.
  373. * Add a "shares-console" service option to allow running services "on the console" without having
  374. them own it exclusively.
  375. * Add "inittab-id" and "inittab-line" service settings for utmp support.
  376. * Minor bugfixes.
  377. == Version 0.4.0:
  378. This version focuses on being more "distribution friendly". It adds mechanisms to add and remove
  379. dependencies, either temporarily or persistently, between services without manual editing of
  380. service description files.
  381. Changes:
  382. * A new service description directive, "waits-for.d", allows specifying a directory for which the
  383. contents (filenames) are read as dependencies. This provides a convenient way to add and remove
  384. dependencies to service descriptions without editing the textual service description file.
  385. * dinitctl has new commands, "add-dep" and "rm-dep", to add or remove a dependency between
  386. services. The dependency is not persisted and won't survive a restart. Check the man page for
  387. details.
  388. * dinitctl has new commands, "enable" and "disable". These permanently enable/disable
  389. a service for some target ("boot" by default) by creating/destroying a symbolic link
  390. in the waits-for.d directory specified in the service description (and create/remove
  391. waits-for dependency dynamically). Check the man page for details.
  392. * A code style guide has been added (in the "doc" directory).
  393. * More tests, minor bugfixes.