• [gentoo-user] 66; A better alternative to systemd and openrc

    From Pramod V U@21:1/5 to All on Tue Apr 1 17:50:02 2025
    66 is an excellent service management suite which uses s6 under the hood, provides a simple declarative INI format for services, manages dependency without races, handles logging with s6-log such that logs from different services stay separate, and makes
    sure that no line of logs is lost in the event of an error [text format, fd-holding etc... to achieve that].

    The main `sys-apps/66`, a set of auxillary tools `sys-apps/66-tools` and the underlying convenience library `sys-libs/oblibs` has been PR'd for the gentoo repo, and will soon be temporarily available via a separate overlay.
    The PR: https://github.com/gentoo/gentoo/pull/41402

    The required bootscripts etc... aren't yet packaged, and will be available soon.

    The person packaging and doing the PR is myself, and I have ZERO experience beforehand, and sorry, it's causing some minor issues.
    [Should I depend on dbus-broker[-launcher] when the 66-tools provides an alternative launcher by USE=dbus? OR should I let the users do it via `elog`? OR should I use some other useflag other than "dbus"?]
    [I've decided to go with the elog approach; might also choose to disable the dbus part completely... if even that fails]

    [What's the proxy-maint thing that the QAreport complains? Plz, IDK what it is.]

    Why can't I use "${PV}" "${PN}" in the HOMEPAGE= ? Without those variables in there I'd have to update them on *every* version upgrade.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli Schwartz@21:1/5 to Pramod V U on Tue Apr 1 18:10:01 2025
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------p0EI0TV2r0RFl9Tb0wpAwB8I
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    On 4/1/25 11:45 AM, Pramod V U wrote:
    [What's the proxy-maint thing that the QAreport complains? Plz, IDK
    what it is.]


    The bot(s) also link to

    https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide

    If you are not a Gentoo Developer, you need a Gentoo Developer to merge
    changes for you. This is called proxying -- you author the change and
    someone else helps you by merging it.

    The Proxy Maintainers project is a team of Gentoo Developers that devote
    their time to helping proxy most people who ask, depending on
    availability. There are some guidelines around when Proxy-Maintainers is willing to take on new packages.

    You can also arrange privately with a specific Gentoo Developer to have
    them proxy you, without the involvement of the Proxy-Maintainers team
    effort.


    Why can't I use "${PV}" "${PN}" in the HOMEPAGE= ? Without those
    variables in there I'd have to update them on *every* version
    upgrade.


    The purpose of HOMEPAGE is, in part, that it is easy to copy/paste from
    the file without executing it in a bash shell.

    Please report a critical upstream bug if there is no generic homepage
    for the project that can be used without a constantly changing version
    number. Even if the only project information is a generated
    documentation page, it is standard operating procedure for software to
    have a documentation site where {site}/latest/ is the docs for the
    current version, and {site}/1.0.0/ is the docs for a specific version.


    --
    Eli Schwartz

    --------------p0EI0TV2r0RFl9Tb0wpAwB8I--

    -----BEGIN PGP SIGNATURE-----

    wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCZ+wOIQUDAAAAAAAKCRCEp9ErcA0vV2a4 AQCQN4oApx+ywgxSTyCQQ8NJX22kITpuK/RZc3tk3SED5gD6ApPUGKIYug0hH/xFr8sr+mRQx4re m8d9iQG718/eDws=
    =B7EG
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to All on Tue Apr 1 20:30:02 2025
    The bot(s) also link to

    https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide

    If you are not a Gentoo Developer, you need a Gentoo Developer to merge changes for you. This is called proxying -- you author the change and
    someone else helps you by merging it.

    The Proxy Maintainers project is a team of Gentoo Developers that devote their time to helping proxy most people who ask, depending on
    availability. There are some guidelines around when Proxy-Maintainers is willing to take on new packages.

    Thanks, I'll have to do that.

    You can also arrange privately with a specific Gentoo Developer to have
    them proxy you, without the involvement of the Proxy-Maintainers team
    effort.

    But I don't know anyone. I'll just go through the official proxy-maint procedure.

    Why can't I use "${PV}" "${PN}" in the HOMEPAGE= ? Without those
    variables in there I'd have to update them on every version
    upgrade.



    The purpose of HOMEPAGE is, in part, that it is easy to copy/paste from
    the file without executing it in a bash shell.

    Oh! Fine;

    Please report a critical upstream bug if there is no generic homepage
    for the project that can be used without a constantly changing version number. Even if the only project information is a generated
    documentation page, it is standard operating procedure for software to
    have a documentation site where {site}/latest/ is the docs for the
    current version, and {site}/1.0.0/ is the docs for a specific version.

    {site}/latest isn't available upstream.
    It's for a previous bug: older packages referred to newer documents, causing confusion.
    And the website recently changed, as well as the software. Many links are changed.

    I'll just manually keep updating the versions. I'm fine with that

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to All on Wed Apr 2 05:30:01 2025
    dbus-broker depends on systemd, and you probably don't want 66 to
    pull in systemd. :-)

    Only with the USE=launcher
    `66-dbus-launch` in `sys-apps/66-tools` provides an alternative "launcher" which doesn't depend on systemd. It instead uses 66.

    i don't understand why you're talking about elog in the context of
    D-Bus. Could you please elaborate?

    I am asking whether to inform users via `elog "blah blah"` in the ebuild. I have decided to do so.

    (My experience is that people regularly fail to distinguish
    between a D-Bus system bus - provided by the `dbus` service -
    and a D-Bus session bus; each has its own purpose.)

    This isn't the case here.
    `66-dbus-launch` supports both. I am just talking about the binary.
    I will see the packaging of initscripts for the 2 buses once 66 is into the repos.

    https://archives.gentoo.org/gentoo-user/87cyeb2gxs.fsf@gmail.com/

    although i see that Eli has written an overview of the topic in
    his reply to you.

    Thanks

    Pramod

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to All on Wed Apr 2 12:40:01 2025
    dbus-broker depends on systemd, and you probably don't want 66
    to
    pull in systemd. :-)

    Only with the USE=launcher
    `66-dbus-launch` in `sys-apps/66-tools` provides an alternative
    "launcher" which doesn't depend on systemd. It instead uses 66.


    This page says that 66-dbus-launch actually starts dbus-broker,
    which, as i said, depends on systemd:

    https://web.obarun.org/software/66-tools/0.1.1.0/66-dbus-launch/

    although i acknowledge that page might be out-of-date.

    If it's not, what you'll need in this context is something that
    calls dbus-daemon(1), which doesn't depend on
    systemd. dbus-run-session(1), dbus-launch(1), and the `dbus`
    OpenRC service all use dbus-daemon(1).

    dbus-daemon is the reference dbus daemon.
    dbus-broker is an efficient daemon which does things more performant, and more reliable in certain scenarios.
    It is just a bus, and the rest of the tasks [configuration, systemd-activation, logging, opening sockets etc...] are done by dbus-broker-launcher, enabled with USE=launcher.
    The latter "launcher" which babysits the broker, is the one responsible for depending on systemd.
    `66-dbus-launch` replaces that part; to use `66` instead.

    I am asking whether to inform users via `elog "blah blah"` in
    the
    ebuild. I have decided to do so.


    Inform users of what?

    That the `66-dbus-launch` binary is meant for starting exclusively dbus-broker, and `sys-apps/dbus-broker[-launcher]` is systemd-independant, the launcher is the one which uses systemd, does activation, etc...
    `66-dbus-launch` uses 66 instead, but is otherwise very much same.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to great. Would you like to on Wed Apr 2 15:40:01 2025
    Firstly, as some context, i'm the author of a guide "D-Bus: The
    essentials":

    https://github.com/flexibeast/guides/blob/master/dbus.md

    and a guide "D-Bus and X sessions":

    https://github.com/flexibeast/guides/blob/master/dbus-and-x-sessions.md

    as well as having made various edits related to D-Bus on the
    Gentoo wiki.

    Great, so you know a lot.
    But *do* know that dbus-broker doesn't depend on systemd. Study the logs carefully. It's the "launcher" useflag!

    i'm also the person who ported the documentation for various
    skaware packages to man pages:

    https://wiki.gentoo.org/wiki/User:Flexibeast#The_s6_ecosystem

    and have written a guide on using s6 and s6-rc for user services
    under OpenRC:

    https://wiki.gentoo.org/wiki/User:Flexibeast/guides/OpenRC_user_services_via_s6_and_s6-rc

    Again, great. Would you like to write a guide on using s6 and s6-rc as the system *and* user init system?


    My point is that, regardless of dbus-broker's advantages over
    dbus-daemon, it depends on systemd: anything that needs to
    install the `dbus-broker` package will result in the `systemd`
    package being installed as well, even if systemd isn't being
    directly used for init / service supervision / service management
    (which are distinct things). i'm using OpenRC with
    sys-apps/systemd masked:

    ```
    # emerge dbus-broker

    Local copy of remote index is up-to-date and will be used.

    Local copy of remote index is up-to-date and will be used.
    Calculating dependencies... done!
    Dependency resolution took 21.84 s (backtrack: 4/20).


    !!! All ebuilds that could satisfy ">=sys-apps/systemd-230:0="

    have been masked.
    !!! One of the following masked packages is required to complete
    your request:
    - sys-apps/systemd-9999::gentoo (masked by: package.mask, missing
    keyword)
    - sys-apps/systemd-257.3::gentoo (masked by: package.mask, ~amd64
    keyword)
    - sys-apps/systemd-256.12::gentoo (masked by: package.mask, ~amd64
    keyword)
    - sys-apps/systemd-256.10::gentoo (masked by: package.mask)
    - sys-apps/systemd-254.24::gentoo (masked by: package.mask, ~amd64
    keyword)
    - sys-apps/systemd-254.22::gentoo (masked by: package.mask)

    (dependency required by
    "sys-apps/dbus-broker-36::gentoo[launcher]" [ebuild])
    (dependency required by "dbus-broker" [argument])
    ```

    PLEASE READ THE OUTPUT CAREFULLY; It's the "launcher" useflag.
    TRY `USE=-launcher emerge sys-apps/dbus-broker`.
    THE "launcher" USEFLAG; dbus-broker OTHERWISE DOESN'T depend on systemd. Please see the wiki page "Hard dependencies on systemd" too...
    I have plans to add to RDEPEND "dbus? ( sys-apps/dbus-broker[-launcher] )" to force this, and reduce confusion.

    Having systemd installed will be the opposite of what many - if
    not most! - people wanting to use 66 will want. "So in order to
    use this alternative to systemd .... I'll need systemd
    installed???" And if you need an idea of how strongly people not
    wanting to use systemd can feel around this stuff, search the
    Gentoo forums for people complaining about the systemd-utils
    package getting installed on their non-systemd systems;
    cf. e.g. https://forums.gentoo.org/viewtopic-t-1169990-start-0.html.

    My advice and suggestions are based on my knowledge and
    experiences in this area, with the intention of helping you create
    a package that people will want to use. But also, i don't want
    people to get the impression that 66 depends on systemd - which it
    doesn't - simply because you insist on using dbus-broker rather
    than dbus-daemon, even though the latter is perfectly adequate for
    most people's needs (including my own).

    But this SUPPORTS broker without systemd. THE "launcher" USEFLAG...
    Yes, dbus-daemon is sufficient, but I'd like to give the choice for those who want it.
    I repat once again, USE=-launcher will kill off systemd on that package. Read the output carefully. "sys-apps/dbus-broker-36::gentoo[launcher]" (Notice "[launcher]"; disable it)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli Schwartz@21:1/5 to Alexis on Thu Apr 3 03:10:01 2025
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------zvseYjF5kCfHecf47pJXEZOU
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    On 4/2/25 8:27 PM, Alexis wrote:

    Pramod V U <pramodvu1502@proton.me> writes:

    But this SUPPORTS broker without systemd. THE "launcher" USEFLAG...
    Yes, dbus-daemon is sufficient, but I'd like to give the choice for
    those who want it.
    I repat once again, USE=-launcher will kill off systemd on that
    package. Read the output
    carefully. "sys-apps/dbus-broker-36::gentoo[launcher]" (Notice
    "[launcher]"; disable it)

    You are right, i was wrong - sorry. i was confused by what you had
    written previously, as in your previous messages, you didn't simply write:

     By setting USE=-launcher for dbus-broker, systemd doesn't get  pulled in.

    i'm finding it difficult to understand the points you're making, as this
    and my previous question about your mention of `elog` shows, so i'll bow
    out of this thread. However, regarding:


    I am not sure I understand the proposal either, tbh.

    Although in general, the job of an ebuild tends to be to ensure that
    mandatory requirements are satisfied somehow, so if 66 needs a launcher
    and provides its own (?) then adding a dependency on an external one
    seems an odd choice.

    So too, depending on the absence of a USE flag, e.g.

    RDEPEND="
    sys-apps/dbus-broker[-launcher]
    "

    would unnecessarily constrain people from attempting to build it by
    default without flag fiddling, whether they want systemd installed at
    the same time or not. But simply having


    RDEPEND="
    sys-apps/dbus-broker
    "

    would leave it to the user to decide whether to add -launcher to
    package.use, and admittedly also confuse them terribly and maybe make
    them upset to see systemd being pulled in by default.

    I don't know that there's a good choice here short of having a s6-66
    option in `eselect profile` that adds a profile package.use which
    defaults "launcher" to off.

    So, avoiding dbus-broker altogether seems like the best option.


    Alexis, you said before:

    My advice and suggestions are based on my knowledge and experiences in
    this area, with the intention of helping you create a package that
    people will want to use. But also, i don't want people to get the
    impression that 66 depends on systemd - which it doesn't - simply
    because you insist on using dbus-broker rather than dbus-daemon, even
    though the latter is perfectly adequate for most people's needs
    (including my own).

    and I think I very much agree with you here. If people really want to
    use dbus-broker, let them, but don't try to make portage install it for
    them as it will simply cause no end of trouble.



    --
    Eli Schwartz

    --------------zvseYjF5kCfHecf47pJXEZOU--

    -----BEGIN PGP SIGNATURE-----

    wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCZ+3dtwUDAAAAAAAKCRCEp9ErcA0vV5ik AQC4OgoGPnmetGNUo2FBCRRZirOho/pGltFRYD7pY8vxIQEAg/kRFr3KVSDC5KYfOEOKnPnohx2w vgjDl3OES8RFFQg=
    =Ehhm
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to All on Thu Apr 3 08:40:01 2025
    You are right, i was wrong - sorry. i was confused by what you had
    written previously, as in your previous messages, you didn't
    simply write:

    By setting USE=-launcher for dbus-broker, systemd doesn't get
    pulled in.

    Exactly; However, some evaluation needed on how to handle this for users...

    i'm finding it difficult to understand the points you're making,
    as this and my previous question about your mention of `elog`
    shows, so i'll bow out of this thread. However, regarding:

    Would you like to write a guide on using s6 and s6-rc as the
    system and user init system?


    Probably not, because i'm already snowed under with volunteer ICT
    commitments and providing support to disabled loved ones, in
    addition to having chronic health issues myself - all of which
    probably contributes to me not parsing what i'm reading properly,
    indicating to me that i need to step away more generally. ICT
    volunteer burnout is a real thing.

    I agree. Just asked.
    I may write it once 66 is on par with openrc
    Hopefully your personal condition may get better.

    That said, even though you quite correctly noted that i wasn't
    paying sufficiently close attention to what you wrote, i note your
    (sometimes combative) interactions with Gentoo devs elsewhere (who
    are also sometimes having difficulty understanding you), and that
    you yourself are not necessarily taking on board what myself and
    others are saying (e.g. about proxy maint, and GURU). So just as
    this interaction has made me pause and reflect on what i'm doing,
    i'd like to suggest that you might want to consider doing the
    same.

    Thanks, I'll see into it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pramod V U@21:1/5 to All on Thu Apr 3 15:40:01 2025
    I am not sure I understand the proposal either, tbh.

    Read below to understand

    Although in general, the job of an ebuild tends to be to ensure that mandatory requirements are satisfied somehow, so if 66 needs a launcher
    and provides its own (?) then adding a dependency on an external one
    seems an odd choice.

    It *doesn't* want an external launcher. It *provides* a launcher for a daemon, replacing the daemon's own launcher.
    It is useless without the daemon.

    So too, depending on the absence of a USE flag, e.g.

    RDEPEND="
    sys-apps/dbus-broker[-launcher]
    "

    would unnecessarily constrain people from attempting to build it by
    default without flag fiddling, whether they want systemd installed at
    the same time or not. But simply having


    RDEPEND="
    sys-apps/dbus-broker
    "

    would leave it to the user to decide whether to add -launcher to
    package.use, and admittedly also confuse them terribly and maybe make
    them upset to see systemd being pulled in by default.

    I just omitted the dependency for good, and added `elog` messages to inform the user that they can install it themselves if they want it.
    I plan to later PR for dbus-broker depending on this instead, with a separate useflag.

    I don't know that there's a good choice here short of having a s6-66
    option in `eselect profile` that adds a profile package.use which
    defaults "launcher" to off.

    Another profile? Please, things needn't be complicated.
    KDE, GNOME, "desktop" etc... profiles need to be created for 66.
    OR 66 can only support a generic system by default.
    I'd like 66 to be available in the non-systemd profiles themselves.

    [Really, I don't want this to be written off as another novelty software; I want to drive it's adoption. A major step to ensure this is to reduce the required setup.
    I'd do a specific profile later, but now my main aim is to make it easier to switch from openrc]

    So, avoiding dbus-broker altogether seems like the best option.

    I agree, I myself plan to do that, but I'd like to allow users know that there is the option in the software.

    Alexis, you said before

    My advice and suggestions are based on my knowledge and experiences in
    this area, with the intention of helping you create a package that
    people will want to use. But also, i don't want people to get the impression that 66 depends on systemd - which it doesn't - simply
    because you insist on using dbus-broker rather than dbus-daemon, even though the latter is perfectly adequate for most people's needs
    (including my own).


    and I think I very much agree with you here. If people really want to
    use dbus-broker, let them, but don't try to make portage install it for
    them as it will simply cause no end of trouble.

    I have thus decided to remove the dependency altogether and have printed it to users via `elog`, that they can use it if they want.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)