#1006971 runit-init: Add runit-init as Pre-Depends of init metapackage [tracker]

Package:
runit-init
Source:
runit
Description:
system-wide service supervision (as init system)
Submitter:
Lorenzo Puliti
Date:
2025-02-23 12:27:02 UTC
Severity:
important
#1006971#5
Date:
2022-03-09 16:22:38 UTC
From:
To:
Right now it's quite hard to install the runit-init package [1] because it's not
included as pre-depends of the init metapackage (init-system-helpers).
An attempt was made in the past that resulted in a clash with init-system-helpers
maintainers [2].
According to the Debian Technical Committee, this is a feature [3] to protect users from
inits that may not be fully implemented in Debian. Maintainers of bin:init were supposed
to document their requirement for being an alternative pre-dependency of init, but that
didn't happen so far.
There was however a TODO list [3], provided as a personal suggestion by one memeber of the
technical committee: for now I'm keeping that as a reference.
This bug is meant to be a tracker, with a list of things that are already done and others
that are still TODO or WIP, with links/reference and so on.
I'll provide the updated list and the current state in a follow up

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005881
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838480
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923450

Also related
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924132

#1006971#10
Date:
2023-01-07 16:40:04 UTC
From:
To:
Update

* The bug request for requirements for being a pre-dep of init is
  #1028115 [1]

About the list of TODO in #923450;

DONE
The runit-init package depends on getty-run package, that provides six
gettys enabled on /dev/tty[1-6] by default on linux.
disabled by default.

TODO: - document how to enable the getty on a serial console or
      - enable it by default

DONE
even major DE like KDE (and probably also GNOME, but did not tested it)
works; the main problem right now is switching init and installing
elogind without having the DE entirely removed, but this is beyond the
scope of runit-init. Once the user has managed to switch to runit,
things works as expected.

DONE
The openssh-server package provides a runit service; other important
services are included in the runit-services package which is now in
testing

DONE
The runit package ships a /lib/runit/run_sysv_scripts script that
starts sysv scripts (S links in rc2) in the right order at boot and
stops sysv scripts at shutdown. A sysv script is skipped when a
native runit scripts with the same basename exists in the system.
This approach is not free from potential bugs [2] but it works as
expected right now
2.1.2-32 and a rule to manually run the test was added in runit
2.1.2-33.
The test installs runit-init and then reboot into it, so both the
init switch and runit boot are tested.

TODO: update the test to include runit-services package.

DONE
The runit-init package ships compatibility symlinks for halt, poweroff,
reboot, shutdown, runlevel.
The runit package ships its own implementation of shutdown that
provides an interface for halt, poweroff and reboot; it's also
capable of talking with the initctl pipe so that an init switch like
systemd --> runit or sysvinit --> runit does not require an hard reset.
The interface is documented in shutdown(8) shipped with runit package.
The runlevel script only prints `N 2' as this is the runlevel
emulated by runit when it runs sysvinit scripts, and this is needed
by some tools like invoke-rc.d .
runit equivalent of update-rc.d and invoke-rc.d should be kept in
separate bin like deb-systemd-enable and deb-systemd-invoke.
Currently runit-helper and trigger_sv (runit package) both provide
the equivalent functionality of update-rc.d and invoke-rc.d; the main
outstanding problem with these is that they are not guaranteed to be
installed at postrm stage (purge)

TODO: - merge some code fallback for purge into i-s-h, to be called in
        postrm when runit-helper/sv_trigger are not installed.
      - send updated patch for i-s-h's service and service(8) with runit
        support to #924132 [4]

This is done with a /lib/lsb/init-functions.d/40-runit sourced
script, in unstable since runit 2.1.2-50


Also, not on the #923450 list, but relevant

* Detect runit as init with reportbug, done in #913236



[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028115
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%231024969
[3]
https://salsa.debian.org/debian/init-system-helpers/-/merge_requests/10
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924132

#1006971#15
Date:
2025-02-23 11:47:06 UTC
From:
To:
It looks like you've done a great job of fulfilling these requirements.
I hope we can see this resolved quickly now for new users!

I do not think the serial console should be enabled by default. That is
a recipe for disaster on embedded systems or systems with specialist
uses for the serial port, UPS controls, etc. - in this case I am not
convinced that systemd is setting the best example to follow.