Skip to content

Releases: troglobit/finit

Finit v4.10-rc1

23 Feb 04:47
4.10-rc1
ffd01b0
Compare
Choose a tag to compare
Finit v4.10-rc1 Pre-release
Pre-release

Changes

  • Add support for cleanup:[0-3600,]script, runs before service is
    removed, unlike post:script that runs when service is stopped
  • Improved entropy gathering in tertiary fallback of urandom plugin
  • Reclassify sysv from run/task class to service

Fixes

  • Fix #427: using an external getty with custom login program cause
    Finit to use login program as the getty command
  • Fix #428: allow sysctl path to be set at build time
  • Fix possible memory leak when sourcing a service env:file
  • Finit now waits until all post:scripts have run before returning
    OK to initctl <reload|runlevel>. This also applies to the new
    cleanup:scripts introduced in this release

Finit v4.9

15 Feb 06:19
4.9
9245869
Compare
Choose a tag to compare

Caution

This release changes how Finit reacts to the exit status of pre:
scripts. Finit will now no longer start the main process if its
pre: script fails for any reason. So, if you have pre scripts that,
e.g., create directories, make sure they are idempotent.

Changes

  • Add individual timeout (optional) support for pre/post/ready scripts
  • Add support for systems with broken RTC, i.e., those that at power-on
    may reset the RTC to a random date instead of zero, issue #418
  • Add support for detecting "in-container" when in systemd-nspawn
  • Check exit status of pre: scripts, on failure drive service/sysv to
    crashed state. (The exit code of post: scripts remain ignored)
  • All pre/post/ready scripts are now also searched for in $PATH
  • Reset color attributes and clear screen when starting up. This is
    for boot loaders like GRUB, which leave background color artifacts

Fixes

  • Fix #415: only mark reverse-dependencies "dirty" if the main service
    does not support SIGHUP. This helps avoid unnecessary restarts of
    services that depend on a service that supports SIGHUP
  • Fix #417: leaking inotify watchers in the cgroup subsystem
  • Fix #421: add support for nofail mount option in /etc/fstab
  • Fix #425: ordering bug in detecting .conf file changes to services
    and initctl reload, or runlevel changes
  • Fix initctl touch of template services, previously marking a
    service created from a template as "dirty" did not take
  • Fix unintended restart of template "siblings". I.e., initctl touch
    of instantiated template service A affected B from same template
  • Fix buggy --with-rtc-date=DATE configure option
  • Fix kill on timeout of pre/post/ready scripts

Finit v4.9-rc1

14 Feb 10:01
4.9-rc1
0f4a487
Compare
Choose a tag to compare
Finit v4.9-rc1 Pre-release
Pre-release

Caution

This release changes how Finit reacts to the exit status of pre:
scripts. Finit will now no longer start the main process if its
pre: script fails for any reason. So, if you have pre scripts that,
e.g., create directories, make sure they are idempotent.

Changes

  • Add individual timeout (optional) support for pre/post/ready scripts
  • Add support for systems with broken RTC, i.e., those that at power-on
    may reset the RTC to a random date instead of zero, issue #418
  • Add support for detecting "in-container" when in systemd-nspawn
  • Check exit status of pre: scripts, on failure drive service/sysv to
    crashed state. (The exit code of post: scripts remain ignored)
  • All pre/post/ready scripts are now also searched for in $PATH
  • Reset color attributes and clear screen when starting up. This is
    for boot loaders like GRUB, which leave background color artifacts

Fixes

  • Fix #415: only mark reverse-dependencies "dirty" if the main service
    does not support SIGHUP. This helps avoid unnecessary restarts of
    services that depend on a service that supports SIGHUP
  • Fix #417: leaking inotify watchers in the cgroup subsystem
  • Fix #422: honor notfail flag in /etc/fstab
  • Fix #425: ordering bug in detecting .conf file changes to services
    and initctl reload, or runlevel changes
  • Fix initctl touch of template services, previously marking a
    service created from a template as "dirty" did not take
  • Fix unintended restart of template "siblings". I.e., initctl touch
    of instantiated template service A affected B from same template
  • Fix buggy --with-rtc-date=DATE configure option
  • Fix kill on timeout of pre/post/ready scripts

Finit v4.8

13 Oct 17:52
Compare
Choose a tag to compare

Changes

  • Avoid remounting already mounted /run and /tmp directories. This extends the existing support for detecting mounted directories to include complex mount hierarchies are in use, overlayfs and tmpfs mounts. Feature by Mathias Thore, Atlas Copco
  • getty: trigger /etc/issue compat mode for Alpine Linux
  • tmpfiles.d: skip x11.conf unless X11 common plugin is enabled
  • tmpfiles.d: ignore x/X command, nos support for cleanup at runtime
  • Drop debug mode -D from udevd in hotplug.conf.in, allow the user to set this in /etc/default/udevd instead
  • Certain initctl APIs at bootstrap are not supported, update warning log to include command (number) for troubleshooting, issue #398
  • Add support for hwrng to urandom plugin and check for empty seed
  • Add runparts -b (batch mode) support, disables escape sequences
  • New configure --without-rc-local, disables /etc/rc.local support
  • New configure --disable-cgroup option, disables cgroup v2 detection
  • initctl show template@foo.conf now shows how an enabled template service has been evaluated by Finit, issue #411
  • Extend initctl timeout connecting and waiting for Finit reply. The previous 2 + 2 second poll timeout has proved to be too short on more complex systems. Now a 15 + 15 second timeout is applied which should be more resistant to temporary overload scenarios, issue #407

Fixes

  • Fix #397: system shutdown/reboot can block on console input if action is started remotely (ssh). Caused by legact TTY screen size probing, removed from both bootstrap and shutdown/reboot
  • Fix #400: both HOOK_MOUNT_ERROR and sulogin() fail to trigger on either mount or fsck errors. Problem caused by unresolved status from pipe, calling pclose() without extracting exit status
  • Fix #402: initctl touch does not respect -n (no error) flag
  • Fix #403: initctl touch does not support template services
  • Fix #404: possible undefined behavior when --with-fstab=no is set
  • Fix #405: @console getty does not work with tty0 ttyS0
  • Fix #409: prevent tmpfiles from following symlinks for L+ and R, otherwise symlink targets would also be removed. Found and fixed by Mathias Thore and Ming Liu, Atlas Copco
  • Fix #414: Frr Zebra immediately restarts on initctl stop zebra. The fix likely works for all Frr/Quagga services due to the way they create and delete their pid file
  • Cosmetic issue with [ OK ] messages being printed out of order at shutdown/reboot. Caused by nested calls to service_stop()
  • Cosmetic issue with duplicate "Restoring RTC" message at bootstrap

Finit v4.7

07 Jan 18:51
Compare
Choose a tag to compare

Changes

  • Silence "not available" messages for run/task/service with nowarn
  • Update docs, cgroup.root workaround for SCHED_RR tasks
  • Drop runlevels 0 and 6 from keventd, not needed at reboot/poweroff
  • Mount /dev/shm with mode 1777 (sticky bit)
  • Mount /dev/mqueue if available, inspiration from Alpine Linux
  • Update Alpine Linux installer and configuration files, tested on
    Alpine v3.19, some assembly still required

Fixes

  • Fix confusing warning message when tmpfiles.d fails to install symlink
  • Fix tmpfiles.d legacy /run/lock/subsys, ordering
  • Add missing /var/tmp and /var/lock -> /run/lock (tmpfiles.d)
  • Fix #388: log redirection broken unless Finit runs in debug mode.
    Found and fixed by Ryan Rorison
  • Fix #389: must libc requires libgen.h for basename() function.
    Reported and worked around with new basenm() function by Stargirl
  • Fix #392: service/foo/ready condition reasserted on pidfile removal

Finit v4.6

13 Nov 06:06
Compare
Choose a tag to compare

Changes

  • Add support for service notify:pid and readiness none global
    option to change how Finit expects readiness notification, issue #386

Fixes

  • Fix #383: dbus and runparts regression in Finit v4.5. The configure
    script must expand FINIT_RUNPATH_ before defining it in config.h
  • Fix #384: service environment variables drop everything but the first
    argument, e.g., VAR="foo bar qux" drops everything but foo
  • Fix #385: internal conditions, e.g., <int/bootstrap> turn into flux
    when leaving bootstrap, causing depending services to stop
  • Fix #387: global environment variables declared with set VAR=NAME do
    not drop leading set , causing 'set VAR'='NAME' in env.
  • Sanity check environment variables, for services and globally. Ensure
    the variable name (key) does not contain spaces, or a leading set

Finit v4.5

30 Oct 22:06
Compare
Choose a tag to compare

Changes

  • Refactor runparts and /etc/rc.local to no longer block the main loop, allowing initctl calls to interact with Finit. Issue #356
  • Refactor the run stanza to no longer block the main loop, issue #362
  • Allow sulogin with a user different from root, issue #357
  • Allow disabling invocation of rescue mode from kernel command line
  • Add initctl -f to force-skip asking Finit for existing services when creating new services during bootstrap, e.g. /etc/rc.local
  • initctl runlevel now returns N S instead of N 10 in bootstrap
  • initctl runlevel N during bootstrap is now allowed. It changes the next runlevel to go to when bootstrap has completed. Effectively overriding the runlevel N statement in /etc/finit.conf
  • Improved logging on failure to execvp() a run/task/service, now with errno, e.g., "No such file or directory" when the command is missing from $PATH
  • Add Bash completion support for initctl, configurable, issue #360
  • Handle absolute path to initctl [enable|disable], not supported
  • Update finit.conf(5) man page with the recommended directory hierarchy in /etc/finit.d/
  • The runparts code has been split into /libexec/finit/runparts
  • The runparts command now takes two options: sysv and progress. The former ensures only SNNfoo and KNNfoo scripts are run.
  • Add SysV Init Compatibility section to documentation
  • Increased MAX path for commands, and arguments: 64 -> 256
  • The bundled watchdog daemon no longer tries to log at startup, because syslog is not available yet, any startup message leak to console
  • Extend if: option with runtime evaluation of conditions. E.g., start a task only if:<run/foo/failure> (here the run task 'foo' failed)
  • Document new if:, conflict:, nowarn options for run/task/service first introduced in v4.4
  • Failure to open fstab should log to console, not just log to /dev/kmsg
  • Rename /lib/finit/system/*.conf, added numbered prefix to ensure proper execution order, e.g., udevd should always run first
  • Plugins and bundled services: dbus, keventd, watchdogd, and runparts, are now loaded after all services in /lib/finit/system/. A new runtime-only path (for inspection) in /run/finit/system/ is used
  • Redirect log* output to console when finit.debug is enabled
  • Assert <int/container> condition if we detect running in container
  • Add support for mdev's netlink daemon mode, issue #367
  • Add support for mdevd in 10-hotplug.conf, preferred over plain mdev
  • Disable modprobe plugin by default, udevd and mdev/mdevd loads modules
  • Update documentation for run/task shell limitations, issue #376
  • Update documentation regarding automount of /run and /tmp
  • Update plugin documentation, add section about limited tmpfiles.d(5) support
  • Skip registering service when if:!name matches a known service. This allows conditional loading of alternative services, e.g. if udevd is already loaded we do not need mdevd
  • Drop doc/bootstrap.md, inaccurate and confusing to users

Fixes

  • Fix #227: believed to have been fixed in v4.3, the root cause was actually that Finit was waiting for a process that was no longer in the system. The fix is to ask the kernel on process-stop-timeout and replay the lost PID so that Finit can continue with reboot/shutdown

  • Fix #358: fix inotify events for /etc/finit.conf, improved log messages and error handling

  • Fix #361: cgroup move fail if run/task/services start as non-root. Regression in the v4.4 release cycle while adding support for the pre:/post:/ready: scripts. Now the latter scripts also properly run in their correct cgroup

  • Fix #366: document fsck.* kernel command line options and simplify the configure flags --enable-fsckfix and --enable-fastboot to only adjust the default values for the fsck.* options.

  • Fix #371: swap load order of /lib/finit/system/* vs /etc/finit.d/*
    We must run 10-hotplug.conf first to ensure devices and modules are up and loaded before the user's run/task/services are called. The order at bootstrap is now saved in /run/finit/conf.order for inspection, /run/finit/exec.order shows the start order of each process

  • Fix #372: lost udevadm calls due to overloading

  • Adjust final udevadm settle timeout: 5 -> 30 sec

  • Fixed dbus plugin, the function that located <pidfile> ... in the dbus/system.conf caused spurious line breaks which led to the service not being loaded properly

  • The runparts executor now skips backup files (foo~)

  • The runparts stanza now properly appends start to scripts that start with S[0-9]+. This has been broken for a very long time.

  • Fix #377: expand service env:file variables, allow constructs like:

      RUNDIR=/var/run/somesvc
      DAEMON_ARGS=--workdir $RUNDIR --other-args...
    
  • Fix #378: warn on console if run/task times out during bootstrap

  • Fix #378: add run/task support for <!> to allow transition from bootstrap to multi-user runlevel even though task has not run yet.

  • Fix #382: do not clear <service/foo/STATE> conditions on reload.
    Introduced back in v4.3-rc2, 82cc10b, the support for automatic service conditions have had a weird and unintended behavior. Any change in state (see doc/svc-machine.png) caused Finit to clear out all previously acquired service conditions.

    However, when moving between RUNNING and PAUSED states, a service should not have its conditions cleared. The PAUSED state, seen also by all conditions moving to FLUX, is only temporary while an initctl reload is processed. If a service has no changes to be applied it will move back to RUNNING.

    Also, we cannot clear the service conditions because other run/task or services may depend on it and clearing them would cause Finit to SIGTERM these processes (since they are no longer eligible to run).

Finit v4.5-rc5

05 Oct 06:28
Compare
Choose a tag to compare
Finit v4.5-rc5 Pre-release
Pre-release

Changes

  • Refactor runparts and /etc/rc.local to no longer block the main
    loop, allowing initctl calls to interact with Finit. Issue #356
  • Refactor the run stanza to no longer block the main loop, issue #362
  • Allow sulogin with a user different from root, issue #357
  • Allow disabling invocation of rescue mode from kernel command line
  • Add initctl -f to force-skip asking Finit for existing services
    when creating new services during bootstrap, e.g. /etc/rc.local
  • initctl runlevel now returns N S instead of N 10 in bootstrap
  • initctl runlevel N during bootstrap is now allowed. It changes
    the next runlevel to go to when bootstrap has completed. Effectively
    overriding the runlevel N statement in /etc/finit.conf
  • Improved logging on failure to execvp() a run/task/service, now
    with errno, e.g., "No such file or directory" when the command
    is missing from $PATH
  • Add support for Bash completion to initctl, issue #360
  • Handle absolute path to initctl [enable|disable], not supported
  • Update finit.conf(5) man page with the recommended directory
    hierarchy in /etc/finit.d/
  • The runparts code has been split into /libexec/finit/runparts
  • The runparts command now takes two options: sysv and progress.
    The former ensures only SNNfoo and KNNfoo scripts are run.
  • Add SysV Init Compatibility section to documentation
  • Increased MAX path for commands, and arguments: 64 -> 256
  • The bundled watchdog daemon no longer tries to log at startup, because
    syslog is not available yet, any startup message leak to console
  • Extend if: option with runtime evaluation of conditions. E.g., start
    a task only if:<run/foo/failure> (here the run task 'foo' failed)
  • Document new if:, conflict:, nowarn options for run/task/service
    first introduced in v4.4
  • Failure to open fstab should log to console, not just log to /dev/kmsg
  • Rename /lib/finit/system/*.conf, added numbered prefix to ensure
    proper execution order, e.g., udevd should always run first
  • Plugins and bundled services: dbus, keventd, watchdogd, and runparts,
    are now loaded after all services in /lib/finit/system/. A new
    runtime-only path (for inspection) in /run/finit/system/ is used

Fixes

  • Fix #227: believed to have been fixed in v4.3, the root cause was
    actually that Finit was waiting for a process that was no longer in
    the system. The fix is to ask the kernel on process-stop-timeout and
    replay the lost PID so that Finit can continue with reboot/shutdown
  • Fix #358: fix inotify events for /etc/finit.conf, improved log
    messages and error handling
  • Fix #361: cgroup move fail if run/task/services start as non-root.
    Regression in the v4.4 release cycle while adding support for the
    pre:/post:/ready: scripts. Now the latter scripts also properly run
    in their correct cgroup
  • Fix #366: document fsck.* kernel command line options and simplify
    the configure flags --enable-fsckfix and --enable-fastboot to
    only adjust the default values for the fsck.* options.
  • Fix #371: swap load order of /lib/finit/system/* vs /etc/finit.d/*
    We must run 10-hotplug.conf first to ensure devices and modules are
    up and loaded before the user's run/task/services are called. The order
    at bootstrap is now saved in /run/finit/conf.order for inspection,
    /run/finit/exec.order shows the start order of each process
  • Fix #372: lost udevadm calls due to overloading
  • Fixed dbus plugin, the function that located <pidfile> ... in the
    dbus/system.conf caused spurious line breaks which led to the
    service not being loaded properly
  • The runparts executor now skips backup files (foo~)
  • The runparts stanza now properly appends start to scripts that
    start with S[0-9]+. This has been broken for a very long time.

Finit v4.5-rc4

03 Oct 14:57
Compare
Choose a tag to compare
Finit v4.5-rc4 Pre-release
Pre-release

Changes

  • Refactor runparts and /etc/rc.local to no longer block the main
    loop, allowing initctl calls to interact with Finit. Issue #356
  • Refactor the run stanza to no longer block the main loop, issue #362
  • Allow sulogin with a user different from root, issue #357
  • Allow disabling invocation of rescue mode from kernel command line
  • Add initctl -f to force-skip asking Finit for existing services
    when creating new services during bootstrap, e.g. /etc/rc.local
  • initctl runlevel now returns N S instead of N 10 in bootstrap
  • initctl runlevel N during bootstrap is now allowed. It changes
    the next runlevel to go to when bootstrap has completed. Effectively
    overriding the runlevel N statement in /etc/finit.conf
  • Improved logging on failure to execvp() a run/task/service, now
    with errno, e.g., "No such file or directory" when the command
    is missing from $PATH
  • Add support for Bash completion to initctl, issue #360
  • Handle absolute path to initctl [enable|disable], not supported
  • Update finit.conf(5) man page with the recommended directory
    hierarchy in /etc/finit.d/
  • The runparts code has been split into /libexec/finit/runparts
  • The runparts command now takes two options: sysv and progress.
    The former ensures only SNNfoo and KNNfoo scripts are run.
  • Add SysV Init Compatibility section to documentation
  • Increased MAX path for commands, and arguments: 64 -> 256
  • The bundled watchdog daemon no longer tries to log at startup, because
    syslog is not available yet, any startup message leak to console
  • Extend if: option with runtime evaluation of conditions. E.g., start
    a task only if:<run/foo/failure> (here the run task 'foo' failed)
  • Document new if:, conflict:, nowarn options for run/task/service
    first introduced in v4.4

Fixes

  • Fix #227: believed to have been fixed in v4.3, the root cause was
    actually that Finit was waiting for a process that was no longer in
    the system. The fix is to ask the kernel on process-stop-timeout and
    replay the lost PID so that Finit can continue with reboot/shutdown
  • Fix #358: fix inotify events for /etc/finit.conf, improved log
    messages and error handling
  • Fix #361: cgroup move fail if run/task/services start as non-root.
    Regression in the v4.4 release cycle while adding support for the
    pre:/post:/ready: scripts. Now the latter scripts also properly run
    in their correct cgroup
  • Fix #366: document fsck.* kernel command line options and simplify
    the configure flags --enable-fsckfix and --enable-fastboot to
    only adjust the default values for the fsck.* options.
  • The runparts executor now skips backup files (foo~)
  • The runparts stanza now properly appends start to scripts that
    start with S[0-9]+. This has been broken for a very long time.

Finit v4.5-rc3

24 Sep 12:12
Compare
Choose a tag to compare
Finit v4.5-rc3 Pre-release
Pre-release

Changes

  • Refactor runparts and /etc/rc.local to no longer block the main
    loop, allowing initctl calls to interact with Finit. Issue #356
  • Refactor the run stanza to no longer block the main loop, issue #362
  • Allow sulogin with a user different from root, issue #357
  • Allow disabling invocation of rescue mode from kernel command line
  • Add initctl -f to force-skip asking Finit for existing services
    when creating new services during bootstrap, e.g. /etc/rc.local
  • initctl runlevel now returns N S instead of N 10 in bootstrap
  • Improved logging on failure to execvp() a run/task/service, now
    with errno, e.g., "No such file or directory" when the command
    is missing from $PATH
  • Add support for Bash completion to initctl, issue #360
  • Handle absolute path to initctl [enable|disable], not supported
  • Update finit.conf(5) man page with the recommended directory
    hierarchy in /etc/finit.d/
  • The runparts code has been split into /libexec/finit/runparts
  • The runparts command now takes two options: sysv and progress.
    The former ensures only SNNfoo and KNNfoo scripts are run.
  • Add SysV Init Compatibility section to documentation
  • Increased MAX path for commands, and arguments: 64 -> 256
  • The bundled watchdog daemon no longer tries to log at startup, because
    syslog is not available yet, any startup message leak to console

Fixes

  • Fix #227: believed to have been fixed in v4.3, the root cause was
    actually that Finit was waiting for a process that was no longer in
    the system. The fix is to ask the kernel on process-stop-timeout and
    replay the lost PID so that Finit can continue with reboot/shutdown
  • Fix #358: fix inotify events for /etc/finit.conf, improved log
    messages and error handling
  • Fix #361: cgroup move fail if run/task/services start as non-root.
    Regression in the v4.4 release cycle while adding support for the
    pre:/post:/ready: scripts. Now the latter scripts also properly run
    in their correct cgroup
  • Fix #366: document fsck.* kernel command line options and simplify
    the configure flags --enable-fsckfix and --enable-fastboot to
    only adjust the default values for the fsck.* options.
  • The runparts executor now skips backup files (foo~)
  • The runparts stanza now properly appends start to scripts that
    start with S[0-9]+. This has been broken for a very long time.