Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892653 - virtual/daemontools should be provided by sys-process/runit and sys-apps/s6
Summary: virtual/daemontools should be provided by sys-process/runit and sys-apps/s6
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Keywords: PATCH
Depends on:
Reported: 2023-01-30 18:19 UTC by hoelbezier
Modified: 2024-05-14 22:21 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---

Add sys-process/runit and sys-apps/s6 dependencies (0001-virtual-daemontools-Add-sys-process-runit-and-sys-ap.patch,1.06 KB, patch)
2023-01-30 18:19 UTC, hoelbezier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hoelbezier 2023-01-30 18:19:03 UTC
Created attachment 849533 [details, diff]
Add sys-process/runit and sys-apps/s6 dependencies

sys-process/runit and sys-apps/s6 are supervision suites just like daemontools and as such can be used for the same purpose. Hence they should provide virtual/daemontools, ie. virtual/daemontools should depend on them.

The attached patch should fix this, feel free to edit it as needed.
Comment 1 Petr Vaněk gentoo-dev 2023-01-31 12:59:50 UTC
This patch is incorrect in my opinion, because sys-process/runit and sys-apps/s6 are not providing utilities expected by some reverse dependencies of virtual/deamontools. For example mail-mta/netqmail requires multilog utility. Well sys-apps/s6 provides s6-log and sys-process/runit provides svlogd with similar functionality but the name is different which is important.

Btw, it seems that runit does not overlap with daemontools as much as s6.
Comment 2 hoelbezier 2023-01-31 16:19:46 UTC
I’m glad you mention mail-mta/netqmail because this is the reason I’ve proposed this patch: I want to install netqmail and have it supervised using s6. Hence I don’t need daemontools at all. But mail-mta/netqmail depends on virtual/daemontools, which is not provided by sys-apps/s6.

Strictly speaking netqmail (the software) doesn’t require multilog at all. I guess by that you mean that the service files provided by gentoo (or even maybe upstream, as qmail developer is also daemontools developer) for netqmail use multilog, but that’s no requirement. We could as well use s6-log (from s6) or svlogd (from runit) which as you point out provide similar functionality.

Another patch I could propose is getting rid of mail-mta/netqmail dependency on virtual/daemontools, and let users decide which supervision suite they wish to use to supervise netqmail, but that would hide the fact that mail-mta/netqmail requires a supervision suite to be usable so I’m not in favor of this.

I don’t know about runit not overlapping with daemontools as much as s6, as I’m a s6 user. I know these three software are supervision suites, and figured virtual/daemontools was meant to ensure such a suite was installed.
Comment 3 Petr Vaněk gentoo-dev 2023-02-01 16:56:53 UTC
Yes, I meant run scripts provided by Gentoo. They are part of the mail-mta/netqmail package and they should work out of the box for users, which will not be true with missing utilities.

I am not sure about getting rid of virtual/daemontools from mail-mta/netqmail either because it will make installation and configuration more complicated (CCing maintainer).

Well, I am also s6 user, I never used runit, the not-overlapping was just my impression from the list of installed programs and man pages.

Anyway, there are 8 reverse dependencies of virtual/daemontools [1] which will be affected in similar fashion. I expect this virtual was created because sys-process/daemontools-encore provides same utilities as sys-process/daemontools with only few enhancements but they are backward compatible, which is not true for sys-apps/s6.

Comment 4 Carlos 2024-05-14 22:21:49 UTC
I think this would be better if virtual/daemontools became an app-alternatives/daemontools.

Runit chpst, for instance, can be symlinked to the corresponding daemontools utilities  to mimic their behavior (it's a footnote in the manpage, but it's supported). s6 utilities are similarly command-line compatible if we symlink them to drop the s6- prefix.

The two hairy parts I'm aware of are:
- (as mentioned) loggers aren't compatible - multilog and s6-log have a lot of overlap, but svlogd has an entirely different manner of configuration. I don't know if the Gentoo policy around app-alternatives would allow us to provide a 'gentoo-dt-logger' script that just execs '$logger_program $distro_defaults'.
- s6 setuidgid and envuidgid also handle supplementary groups (though this shouldn't matter much, and if this turns out to be important, trivial wrappers using execline 'unexport' are easy to make).