Skip to main content
Topic: [TRACKER] Runit support (Read 922 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[TRACKER] Runit support

This thread will be used as a tracker for a fully-working Runit support. This thread is constantly improved as time goes.

Installation

See https://wiki.artixlinux.org/Runit/Runit

Note for anyone with encrypted partitions: unlike OpenRC, which reads encrypted partition from /etc/conf.d/dmcrypt, Runit reads it from /etc/crypttab. Make sure you do changes as needed.

Differences between Runit in Artix and Runit in other system
Unlike Void's Runit and Gentoo's Runit, Artix's Runit reads /run/runit/service by default. So, while you can use their wikis as reference, keep in mind that when you symlink a runscript, make sure to do it to /run/runit/service to make it work with runit.

Differences between OpenRC and Runit
TBA

Known Issues
TBA

References

Any help would be appreciated. Thanks.
the runit guy on artix

Re: [TRACKER] Runit support

Reply #1
there is a separate package I believe called artix-runit-scripts https://github.com/artix-linux/runit-artix/
The readme reads:
Quote
Runit init scripts for Artix Linux

This repository contains the runit init scripts for the Artix Linux distribution.

This work is based on Void Linux's runit-void. Patches to Void Linux's repo will also be applied here.
Dependencies

    A POSIX shell
    A POSIX awk
    procps-ng (needs pkill -s0,1)
    runit

How to use it

To see enabled services for "current" runlevel:

$ ls -l /var/service

To see available runlevels (default and single, which just runs sulogin):

$ ls -l /etc/runit/runsvdir

To enable and start a service into the "current" runlevel:

# ln -s /etc/runit/sv/<service> /var/service

To disable and remove a service:

# rm -f /var/service/<service>

To view status of all services for "current" runlevel:

# sv status /var/service/*

Feel free to send patches and contribute with improvements!

Re: [TRACKER] Runit support

Reply #2
I believe that runit can run ontop of openrc, redundant as a second init, or as supervisor of the existing init system.
I am not sure what happens if you remove openrc leaving runit behind.  As you say if elogind fails till there is a substitute that would be a  problem.  Do you know what void has in place of it, or have they forked their own version?

Re: [TRACKER] Runit support

Reply #3
there is a separate package I believe called artix-runit-scripts https://github.com/artix-linux/runit-artix/
The readme reads:

runit-artix is the initscript needed for runit (since runit package only provides the binaries), runit depends on runit-artix.

I believe that runit can run ontop of openrc, redundant as a second init, or as supervisor of the existing init system.

Sure, the Gentoo Wiki has some guides so runit can be used as the service supervisor for OpenRC. In fact, Runit can replace OpenRC as an init, while retaining OpenRC's feature as service supervisor. See these files for more information.

I am not sure what happens if you remove openrc leaving runit behind.  As you say if elogind fails till there is a substitute that would be a  problem.  Do you know what void has in place of it, or have they forked their own version?

I'm running Artix with Runit right now. I need to mount a cgroup with the name OpenRC so elogind can run. (The source of the problem seems to be the --with-cgroup-controller=openrc build flag in Artix's elogind PKGBUILD)

Void still uses ConsoleKit2 by default, but they have vanilla elogind package in their repos.
the runit guy on artix

Re: [TRACKER] Runit support

Reply #4
A little bit of update since 3 months ago.

Most of OpenRC's scripts in system should have its runit equivalent. However keep in mind that most of these are untested, especially wpa_supplicant. Any help in testing would be appreciated. I'm also still working for [world] and [galaxy] equivalent runscripts from OpenRC to runit.

WARNING: Before PR #4 is merged and rolled out to packages, Remove OpenRC from your system (that is, if you want to use runit instead) or alternatively, remove getty instances from OpenRC if you still want to use OpenRC to prevent collision between getty instances spawned by runit and OpenRC.
the runit guy on artix

Re: [TRACKER] Runit support

Reply #5
This is a good candidate for a wiki article on runit. @konimex PM me a password and I'll open you an account (once I fix the breakage php-7.2 caused in the wiki auth mechanism).

Re: [TRACKER] Runit support

Reply #6
This is a good candidate for a wiki article on runit. @konimex PM me a password and I'll open you an account (once I fix the breakage php-7.2 caused in the wiki auth mechanism).

Sure, PM sent.



Alright, after looking at some documentations for runit and s6, it is possible for daemontools-style scripts to have similar runscripts (hence, runscripts-{system,world,galaxy} as opposed to runit-{system,world,galaxy} or s6-{system,world,galaxy}), however this behavior is untested. Also, in some runscripts, the commands for dependencies are strictly runit (starting a service with dependency uses sv which is exclusive to runit) and s6 uses s6-svc with a very different command, I'm not sure what to do here so any help would be appreciated, thanks.
the runit guy on artix

Re: [TRACKER] Runit support

Reply #7
ATM the wiki is open to edit. Just use your username if you want credit for your edits.

Re: [TRACKER] Runit support

Reply #8
ATM the wiki is open to edit. Just use your username if you want credit for your edits.

It seems I cannot add (or edit) any articles at the moment, everytime I tried to create an article it just redirects to a blank page.



As of now most runscripts in [world] and [galaxy] should be available in the testing repositories. I'll work on documentations once the wiki problem is resolved.

If your runit-artix package is at version 20180108 or newer, all runit binaries has moved to /usr/lib/runit-artix/bin. Please symlink all binaries there to your standard /usr/bin directory. However, if you still have OpenRC installed, make sure to make the symlinks for halt, shutdown, poweroff and reboot in /usr/local/bin instead for easier deletion..
the runit guy on artix

 

Re: [TRACKER] Runit support

Reply #9
Will look into it as soon as I finish with the mail server.

Re: [TRACKER] Runit support

Reply #10
Huge thank you for making this happen! I've been using runit-only Artix for a day now and so far everything is working flawlessly (I migrated from arch's systemd straight to runit).