Created attachment 466108 [details, diff] runit-2.1.2-r1.ebuild.patch I've sent this by email to ebuild maintainer a couple of weeks ago, but didn't get any reply, so I'm sending this here. I'll attach patch to the ebuild which fixes many issues. Date: Fri, 24 Feb 2017 04:38:43 +0200 From: Alex Efros <powerman@powerman.name> To: William Hubbs <williamh@gentoo.org> Subject: question about runit-2.1.2-r1.ebuild Hi! It looks like migration procedure from runit-2.1.1 is broken. Is it was tested at all? The problem is there are two pkg_preinst(), so I suppose second one just overwrite first one, but first one looks important and should not be skipped. Another possible issue is different configurations for first install and for upgrade from runit-2.1.1: in first case /etc/service is a directory, in second case /etc/service is a symlink to /etc/runit/runsvdir/current. Also, in first install case when /etc/service is a directory there is a note in ebuild: einfo "If you need multiple runlevels, please see the documentation" einfo "for how to set them up." but runlevels are managed using /etc/runit/runsvdir/current and this won't work if /etc/service is a directory instead of symlink to /etc/runit/runsvdir/current. Finally, I propose one big change to the ebuild: move files /etc/runit/{1,2,3,ctrlaltdel} and directories for getty-* services into separate ebuild(s), with dependency on that ebuild(s) through virtual/*. This is required to provide alternative implementations for these files and services. For example, on my system I boot using runit instead of openrc, and thus my /etc/runit/1 is a real full-featured boot script. Without such virtual/* packages I've to keep runit ebuild in own overlay just to drop /etc/runit/{1,2,3,ctrlaltdel} files from it and thus avoid conflict with my own ebuild providing alternative for these files. If you like to I can proxy-maintain this ebuild or just create improved version for this ebuild once and send it to you/bugzilla. -- WBR, Alex.
I'm looking at this today. It looks like the best way forward is going to be to separate the boot scripts into their own package, so you will have runit then runit-openrc or something similar.
It looks like /etc/runit/2 and /etc/runit/ctrlaltdel can stay with runit, because they should be the same regardless of how you boot your system, But /etc/runit/1 and /etc/runit/3 will need to be able to be customized easily, along with the contents of /etc/runit/runsvdir and /etc/service.
(In reply to William Hubbs from comment #2) > It looks like /etc/runit/2 and /etc/runit/ctrlaltdel can stay with > runit, because they should be the same regardless of how you boot your > system, But /etc/runit/1 and /etc/runit/3 will need to be able to be > customized easily, along with the contents of /etc/runit/runsvdir and > /etc/service. Yes, but it's unlikely makes sense to split these files into different packages just because of this. Also, sometimes /etc/runit/2 also needs some modifications, for example here is mine: --- #!/bin/bash PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin exec 3<>/var/log/all/.log exec &>/var/log/all/.log exec env - PATH=$PATH \ runsvdir -P /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' --- It looks this way because I'm using chain of log-services: - most services write logs to their own svlogd, as usually - some config files of these svlogd for some services are configured to duplicate some lines to svlogd's STDERR - ./log/run which runs svlogd is configured to redirect svlogd's STDERR to /var/log/all/.log (which is a named PIPE file created with `mkfifo`) - there is /etc/service/log-all/ service which runs svlogd reading from /var/log/all/.log and writing logs into /var/log/all/current This way I've most interesting log lines from all services in one log file, which is usually always open with `tail -F`. (Also this log is used to implement desktop notifications for most critical events with help of another one service.) So, just like I've redirected STDERR of all svlogd of all services I've also redirected there STDERR of runsvdir itself, to see in this log messages which wasn't properly redirected in some service's ./run files.
*** Bug 632174 has been marked as a duplicate of this bug. ***
runit-2.1.2-r1 doesn't start: "start-stop-daemon: /usr/bin/runsvdir does not exist" it's because of wrong path in /etc/init.d/runsvdir: "command=/usr/bin/runsvdir" while actual path is /bin/runsvdir