Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [TRACKER] Runit support (Read 15031 times) previous topic - next topic
0 Members and 2 Guests 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.
now only the dinit guy in 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.
now only the dinit guy in 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.
now only the dinit guy in 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.
now only the dinit guy in 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..
now only the dinit guy in artix


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 artix runit).

Re: [TRACKER] Runit support

Reply #11

 I have tried installing the runit, but to no avail. I tried a live iso installation, followed all the steps of the wiki, loaded the grub, but it did not reach the login screen, I tried with slim, lxdm and lightdm and it did not work. I tried the startx and nothing, I also have no internet connection after the installation, even following the steps for ip static.
  Then I tried with an installation with openrc, change to runit and after following the steps of the wiki, and installing artix-runit, I uninstalled openrc and again neither lxdm or slim login screen, again without internet. I'm with internet via ethernet cable, it's failing something, but I have not figured it out yet. I will follow this topic to know of news.  :'(

Re: [TRACKER] Runit support

Reply #12
I have tried installing the runit, but to no avail. I tried a live iso installation, followed all the steps of the wiki, loaded the grub, but it did not reach the login screen, I tried with slim, lxdm and lightdm and it did not work. I tried the startx and nothing, I also have no internet connection after the installation, even following the steps for ip static.
  Then I tried with an installation with openrc, change to runit and after following the steps of the wiki, and installing artix-runit, I uninstalled openrc and again neither lxdm or slim login screen, again without internet. I'm with internet via ethernet cable, it's failing something, but I have not figured it out yet. I will follow this topic to know of news.  :'(

Can you provide your steps on how to activate LXDM/LightDM? SLiM's runit-scripts are not yet provided, but both LXDM and LightDM should work normally.

Also, how do you configure your networking? Have you seen this page?

I'll make a migration guide later.
now only the dinit guy in artix

Re: [TRACKER] Runit support

Reply #13
 Yes I followed the wiki, either for the version of installing runit in an Openrc installation. Wants for the net install version only with runit. And always following the wiki, the errors were similar without internet access cable or wifi and never got to the display manager, lxdm, slim, sddm, xdm. As I said I always followed the steps of the wiki and did not solve. I wanted to test an Artix with runit, but I have to make do with Void.

Re: [TRACKER] Runit support

Reply #14
How about S6, have you ever tried it?
In theory S6 is better than runit, in practice I can't notice any difference in performance.
You can install obarun then keep obarun repositories on top for S6, use artix (instead of arch) below for everything else.  Void is a good system but the variety of pkgs you find here you may never see in void.  If you think void boots up fast wait until you see obarun.

Someone is probably going to scream at me for promoting an other distribution here, but it is a safe way to use S6 in artix, till someone makes the S6-bundle a plug and play item here.  Just make sure you indicate that you have done so, when you are asking for help, so people know who to blame for the problem :)