Re: Debianization

From: Avery Payne <>
Date: Sat, 21 Apr 2018 10:05:12 -0700

On Sat, Apr 21, 2018 at 4:27 AM, SZÉPE Viktor <> wrote:

> Actually my first step of setting up a production Debian-based server is
> reverting back to SysVinit
> master/
> Currently I haven't reached a single boot, so it is a task for me to
> migrate the above listed services to *native* s6-rc.
> Are you looking for run files? There are several stashed away in various
repositories. Are you looking to have run files for every Debian service
possible? That is a large task - on Debian 7 there were ~ 900 packages
that would leave rc scripts in /etc/init.d that were not one-shots, so you
have your work cut out. I'm sure the list has grown since then.

I humbly suggest the following:

1. convert to SysV, and start out using stock rc scripts inside /etc/init.d
2. create Debian packages for s6, and install from the packages.
3. determine where you are locating the directories "service", "svc", and
"svcdef" (or whatever you are calling them) and try to comply with Debian's
rules. For Debian, I suggest you create the directories /etc/svc and
/etc/svcdef, and then make a symlink from /service pointing to /etc/svc,
which I'm sure is not 100% "Debian acceptable" but is probably the right
thing to do.
4. decide on a logging layout. You can do anything you want, but to keep
things similar, I suggest that all services that don't do their own logging
receive a s6-log instance, using the T option instead of t (since Debian
doesn't support TAI64N), and that your s6-log output be directed to a file
inside of a directory named /var/log/{service name}.
5. decide on a strategy to replace syslog. Maybe something that provides
/dev/log. Not 100% needed, but nice to have.
6. decide on a strategy for udev. You will need it to run at startup,
prior to switching run levels; I suggest a one-shot that sets up all of the
device names at startup, and a separate longrun that supervises udevd in
normal use. Not optimal, but it should suffice.
7. decide on a strategy for dbus. You can easily make a service definition
for it, but you'll have the unpleasant discovery of finding consolekit,
policykit, rtkit, and others being unsupervised. (some day I will peer into
the bowels of dbus and see if there is a way to make it play nice...)
8. decide on a strategy for pulseaudio, which is a worse pain than udev and
dbus together. You'll have the fun choices like "it runs system wide but
desktop audio is buggy or fails", or "I don't supervise it but I have
desktop audio", or my favorite, "just suffer without it and install ALSA".
9. start writing run scripts. Look around github for little repos here and
there, and look at what people are doing. You can contact people in
private if you get stuck. Be sure to bundle the scripts into a package
that can be re-installed. Perhaps name it s6-debian-runscripts or
something similar.
10. if you are willing to put up with beta-grade software while you
transition, use rc-shim to replace the scripts in /etc/init.d one by one,
so you can cleanly boot with SysV AND have s6 supervising your services. I
will warn you that it still has some rough edges, but it should be "good
enough" for the time being. If you do decide to use rc-shim, you will want
to make a small modification that copies /etc/svcdef/{servicename} to
/etc/svc/{servicename} when it starts a service for the first time...
11. once you have run scripts for everything, you can make the move to a
pure s6 based system, and you don't need the rc-shim anymore, or SysV. Yay!
12. please share your s6-debian-runscripts package, so that all Debian and
Devuan users can move to s6 as well. :)

That's quite the list to do, and I wish you the best of luck.
Received on Sat Apr 21 2018 - 17:05:12 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC