Re: s6/s6-rc policy for Gentoo: config files for service scripts

From: Jan Braun <janbraun_at_gmx.de>
Date: Thu, 19 Sep 2024 19:51:50 +0200

Paul Sopka schrob:
> I am not sure if I understand correctly, the files under
> /usr/share/s6-rc/{user,system}
> are to be there only as a reference, not to be edited.
> Are you trying to say that the non-edited files should be symlinked rather
> than copied?

I was indeed trying to say that.
But on second thought: you should do whatever Gentoo usually does with
such configuration files. Consistency trumps any minor advantages any
particular approach might have.

> Although it has to be done a bit differently when using execline
> [...]
> Would turn into:
>
> | #!/bin/execlineb -P
> | fdmove -c 2 1
> | importas -SD /etc/s6-rc S6CONFIGDIR
> | tryexec ${S6CONFIGDIR}/system/config/seatd
> | seatd -n3 -u root -g seatd

That's a more reasonable size than your first example. Although this ...

> Allowing the sysadmin to completely override the service.
> Unfortunately this also forces the sysadmin to override the service for
> every so little change,

... then begs the question: what's the advantage of having the
${S6CONFIGDIR}/system/config/seatd entry point at all? How much effort
does this save the admin over creating their own my_seatd service and
disabling the one you provide?
(Honest question, I don't fully grok s6.)

Being able to easily add custom services is a necessity anyway.

So maybe don't allow any customization (besides disabling) at all, ship

| #!/bin/execlineb -P
| fdmove -c 2 1
| seatd -n3 -u root -g seatd

and teach users to create new services with the 3rd line changed to
whatever they need.

HTH,
    Jan

Received on Thu Sep 19 2024 - 19:51:50 CEST

This archive was generated by hypermail 2.4.0 : Thu Sep 19 2024 - 19:52:21 CEST