[...] 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.

* https://jdebp.uk/Softwares/nosh/guide/commands/tcp-socket-listen.xml

* https://skarnet.org/software/s6-networking/s6-tcpserver4-socketbinder.html

That flag is used by convert-systemd-units to handle the conversion of socket units.

* https://jdebp.uk/Softwares/nosh/guide/commands/convert-systemd-units.xml

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.

* https://jdebp.uk/Softwares/nosh/guide/commands/set-control-group-knob.xml

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.

* https://jdebp.uk/Softwares/nosh/guide/commands/time-pause-until.xml

* https://jdebp.uk/Softwares/nosh/guide/commands/time-env-add.xml

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.

Reply via email to