:: [DNG] Devuan cannot exist without t…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Steve Litt
Fecha:  
A: dng
Temas antiguos: Re: [DNG] Dng Digest, Vol 62, Issue 27
Temas nuevos: Re: [DNG] Devuan cannot exist without the help of Debian
Asunto: [DNG] Devuan cannot exist without the help of Debian: NOT Dng Digest, Vol 62, Issue 27
On Mon, 25 Nov 2019 17:41:08 +0000
Alexander Brüning via Dng <dng@???> wrote:

> On Mon, 2019-11-25 at 12:00 +0100, dng-request@??? wrote:
> > I think we could get 90% of the way to a set of legitimate daemon


I know digest mode is handy, but please be careful in your handling
thereof. I have no idea who dng-request@??? is, but *I*
wrote the preceding, and my email is slitt@???. Also,
please take the extra second to copy the correct subject line to your
response. I answer your question later in this email...

> > start scripts by running each unit file through a program to
> > produce a daemon start file for a different init system.
>
> Wouldn't it make more sense to provide a generic wrapper script that
> acts like an init script but parses the unit file every time its
> called? No need to inject anything that way, and it's always
> up-to-date.


It does make a lot of sense. Debian packages could remain completely or
almost untouched. It really is a good idea.

But I see some problems with it...

* There will always be that daemon whose correct use in runit or s6 or
Epoch is not unambiguously defined by the data in the unit file. This
could be worked around by some sort of exception thing, perhaps
contained on a per daemon exceptions.d directory.

* Whatever program the conversion program is written in would need to
be loaded before running the first daemon. Or the conversion program
must be written in a compiled language, which is something I'd
personally not want to do. Most daemons tend to be run late in the
boot, so this might not be a showstopper.

* It's hard to write the conversion program, and one must be written
for every init system.

* Humans make unit files, and humans make mistakes. Bad unit file, bad
runit or s6 or Epoch. Here again, an exceptions.d is required.

* Slightly slower boot because every daemon requires a conversion. Not
a big deal.

* This would make us forever dependent on systemd, at least dependent
on their unit files. When I suggested a unit file to daemon start
file conversion program way back in the thread, I envisioned taking
advantage of them once to produce daemon start files for each init
system for hundreds of daemons. These can be tested by hand and put
in the packages. Speaking for runit and Epoch, these files would tend
to never change except when the daemon itself changes, so they're
little work. In the case of s6, which I understand is undergoing
heavy development, its changes are improvements that do not cause
dysfunction of the old ways of doing it.

* With OpenRC and sysvinit, their init scripts tend to be monsters in
order to accommodate edge and corner conditions. This makes me wonder
if a 99% reliable conversion program can be written for them at all.

In summary, your idea's a good one, but I'd personally recommend
running the conversions one time and then testing and possibly tweaking
the resulting daemon launch files.

SteveT

Steve Litt
November 2019 featured book: Manager's Guide to Technical
Troubleshooting Second edition
http://www.troubleshooters.com/mgr