[...] We've discussed internally if we change that process and try to
write a systemd unit parser, because all units are there in Ubuntu. If
we could catch 90% of all cases, we need, we would be happy. If it
would take 2 weeks of work, that would be fine. Did somebody of you
try to implement something? What are your thoughts?
So it seems that I am, years later, still the only person in the world
to have done this (except not targetting skarnet toolsets). (-:
As the voice of experience:
Yes, you'll not get total coverage. You'll get "good enough for most
cases", though I couldn't put an exact percentage on that.
No, with the s6 tooling as it stands, you'll not be able to do
everything. One of the things that one has to add is support for
systemd's idiosyncratic non-UCSPI TCP/UDP service handling. Contrast the
--systemd-compatibility flag to the tcp-socket-listen program in the
nosh toolset to what s6-tcpserver4-socketbinder in s6-networking does.
That flag is used by convert-systemd-units to handle the conversion of
Most of the issues for s6 will be things like that, minor tweaks for
(sometimes reasonable, sometimes downright absurd) systemd quirks and
the odd missing tool. I wrote a set-control-group-knob command, for
example, used by convert-systemd-units to translate the various unit
file settings that end up twiddling knobs on control groups. I haven't
seen a skarnet tool for doing that, yet; so that will be one necessary
addition, for example.
s6-networking also does not appear to have UDP listening tools, which
socket units for UDP sockets need. Timer units need tools like
time-pause-until and time-env-add, similarly. Notice the
--systemd-compatibility flag for that latter, too, and the notions like
systemd month lengths.
There is, furthermore, a lot of stuff that you'll find that s6/nosh/&c.
service run scripts do a lot better than systemd can. As you'll see
from the convert-systemd-units(1) manual page, I added quite a number of
things to the systemd unit file syntax for things that one can do in the
aforementioned, such as UCSPI access control mechanisms (UCSPI being
entirely alien to systemd) for starters.