Re: s6/s6-rc policy for Gentoo: XDG Base Directory Specification

From: Carlos Eduardo <carana2099_at_gmail.com>
Date: Sat, 6 Jul 2024 18:58:14 -0300

I don't think avoiding Turnstile (and similar projects) in favor of s6
services is reasonable, given the concerns you've raised in the first
block of https://skarnet.org/lists/supervision/3122.html (especially
"I'd like for the user supervision tree to only start on-demand").

Turnstile's interface is reasonably simple and easy to implement in an
alternative: backends are effectively supervised 'run' (in the
s6/runit sense) scripts for the service manager with extra arguments,
and I believe it to be pretty much the minimum viable program for
adding XDG_RUNTIME_DIR compliance to any given service manager.

Saying "this will make it easier to implement an alternative"
overlooks the fact that the complexity will be shifted into the
service set and the service manager. Is it really worth it to go
through dynamic services and events (at least, one `install -d`
oneshot per user, and a first login/last logout event source), and
probably other things required to make this more reliable, pretty much
just to make a folder?

I believe point 3 to be moot because XDG policies are very thorough
and doing something even mildly different usually requires redoing
everything from scratch.




Em sex., 5 de jul. de 2024 às 20:35, Paul Sopka <psopka_at_sopka.ch> escreveu:
>
> To keep all the stuff a bit organized, I will open another "thread" for
> this.
>
> I have read through
> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
> and to me the standards seem sensible. Most of it is the default of most
> if not all modern desktop programs anyway.
>
> Therefore I would like to completely comply with them in this policy.
> This involves, but is not limited to, putting the live dir in
> XDG_RUNTIME_DIR. Bercot warned me in
> https://skarnet.org/lists/supervision/3114.html that this might be
> dangerous since it could be removed to quickly upon logout.
>
> From the start on, I planned to have all the XDG_* env's managed by the
> s6-rc system service which sets up the user supervision tree. This means
> setting the env's and, in the case of XDG_RUNTIME_DIR, creating and
> removing the directory on demand. By implementing this directly in the
> service with correct dependencies, this becomes completely safe and
> reliable.
>
> Another suggestion was to delegate the creation and removal of
> XDG_RUNTIME_DIR to the login monitoring program (which will most likely
> be Turnstile), see https://skarnet.org/lists/supervision/3117.html. I do
> not think this is the best idea. Instead, I want to push as much basic
> functionality as possible to the s6/s6-rc services, for the following
> reasons:
>
> 1) s6/s6-rc is simple, fast and reliable
>
> 2) this allows for an easier future substitution of external programs
> used (e.g. substituting Turnstile for an alternative)
>
> 3) This allows for more fine grained control by the
> sysadmins/distribution contributors.
>
> 4) The service setting up and supervising the user tree is perfectly
> suited for this, my current, working implementation of creating and
> deleting XDG_RUNTIME_DIR containing the live dir consists of two lines
> of execline
>
>
> Do you all have any objections/see any issues with the XDG Base
> Directory Specification and adhering to them?
>
> Do you see any issues with my idea of how to handle the XDG_RUNTIME_DIR?
>
> Any input is welcome!
>
>
> Paul
>
Received on Sat Jul 06 2024 - 23:58:14 CEST

This archive was generated by hypermail 2.4.0 : Sat Jul 06 2024 - 23:58:52 CEST