Currently sys-apps/dbus only supports systemd as a provider for filling in seats information in /run/systemd/seats/. A patch is needed telling dbus/dbus-userdb-util.c that elogind uses the systemd file structure, too.
Created attachment 453018 [details] dbus-1.10.12-r1.ebuild Updated ebuild that accepts USE="elogind" and applies the following patch if that USE flag is set.
Created attachment 453020 [details, diff] Patch to enable elogind support This patch does the following a) Add --enable-elogind to configure.ac b) Patch dbus/dbus-userdb-util.c to include <elogind/sd-login.h> if --enable-elogind was sed.
Beware of typos! +#if defined(HAVE_SYSTEMD) || defined(HAVI_ELOGIND)
Created attachment 453040 [details, diff] Patch to enable elogind support -- Fixed a nasty typo -- This patch does the following a) Add --enable-elogind to configure.ac b) Patch dbus/dbus-userdb-util.c to include <elogind/sd-login.h> if --enable-elogind was sed.
(In reply to Brian Evans from comment #3) > Beware of typos! > > +#if defined(HAVE_SYSTEMD) || defined(HAVI_ELOGIND) Thanks alot! You know what? "HAVI" is the name of the company I work for. *hrhr*
Thank you very much again! The typo you found was the reason why I could no longer attach usb drives to my laptop. With the typo fixed, everything works like it should.
Created attachment 454902 [details] dbus-1.10.14-r1.ebuild Version bump with elogind support. As the previous version is based on the current stable version, I'll keep it for now in my overlay.
Thanks, fixed in git. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=640fb067afa16c30817dd2dedd4081341a923ac4
Why has this patch not been submitted upstream? Carrying a distro-specific patch perpetually is the wrong way to go about this.
elogind support is pending upstream for some time, anyway.
(In reply to Andreas Sturmlechner from comment #10) > elogind support is pending upstream for some time, anyway. It seems like the Merge Request hasn't been attended to for about 18 months now. What shall we do?
I guess someone with a gitlab.freedesktop.org account should ping them.
(In reply to Andreas Sturmlechner from comment #12) > I guess someone with a gitlab.freedesktop.org account should ping them. Done: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/53#note_720686
The upstream MR is now closed. This still needs to be sent upstream and pushed through. Sven, are you interested in doing that?
sven, asturm, or slashbeast: can one of you submit a rebased/cleaned up version of the elogind patch to dbus please? Right now, it applies with fuzz, and it doesn't have anything for Meson (which upstream now recommend using as of the latest release).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4218f6a7b27668a76ab5415d524ae2927c5fd226 commit 4218f6a7b27668a76ab5415d524ae2927c5fd226 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-06-07 08:13:56 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-06-07 08:14:06 +0000 sys-apps/dbus: update comment re meson Bug: https://bugs.gentoo.org/599494 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/dbus/dbus-1.15.6.ebuild | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
(In reply to Sam James from comment #15) > sven, asturm, or slashbeast: can one of you submit a rebased/cleaned up > version of the elogind patch to dbus please? > > Right now, it applies with fuzz, and it doesn't have anything for Meson > (which upstream now recommend using as of the latest release). Upstream will be removing the autotools build system: https://gitlab.freedesktop.org/dbus/dbus/-/issues/443.
The best course of action would be to consult and encourage elogind upstream to seek the dbus upstream integration. The linked merge request has been marked work in progress and abandon in such a state, while I could technically pick it up and update to fit the latest dbus, I do not look forward to then be responsible to maintain it upstream or follow up whenever the interfaces change, regardless how unlikely it is. @sven, I would recommend you to create elogind bug and request this effort there for the reasons floppym highlighted.
That's fine, but upstreaming a patch doesn't mean you commit to updating it for future elogind changes at all... I think it's unlikely Sven will do it given they haven't until now. Does nobody really care enough about elogind support to do this?
You know how it works, if you are the last one to touch something, you are expected to poke it until another person jumps in. Also, it's not like nobody cares, I however do not know about any consumer of data in `/run/systemd/seats/` therefore I do not feel like elogind is not supported enough. Arguably, if there are common consumers of that data set in `/run/systemd/seats` then perhaps FreeDesktop spec should be created, this made more generic and then support pushed from all seats providers. I myself do not have understanding of what problem lack of populating the /run/systemd/seats generates, neither I find myself limited by it, and because of it I have hard time finding motivation to take it upstream, because if they would ask me what problem I want to solve with proposed change, I have no answer for it.
From what I can tell, the logind seat support is mainly used by dbus to detect when a user is logged in on a local console. This is exposed in dbus config via the <policy at_console=(true|false)> attribute. Checking my own system, the only dbus config that references at_console is /etc/dbus-1/system.d/com.hp.hplip.conf, as supplied by net-print/hplip. Assuming my system is "typical", we could drop this dbus patch and the only people who would notice are elogind users with HP printers.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4f4edf10c8483631a77948a50f2b9308adf5cef commit c4f4edf10c8483631a77948a50f2b9308adf5cef Author: Sam James <sam@gentoo.org> AuthorDate: 2023-09-02 16:14:01 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-09-02 16:17:12 +0000 sys-apps/dbus: add 1.15.8 Upstream have dropped non-meson support, so here we go! Rebased the elogind patch reluctantly, but I've dropped the REQUIRED_USE for one-of systemd/elogind, given floppym's analysis on the bug. The functionality provided by elogind here is pretty minimal and it doesn't appear required at all, so it doesn't make sense to force it. Bug: https://bugs.gentoo.org/599494 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/dbus/Manifest | 1 + sys-apps/dbus/dbus-1.15.8.ebuild | 232 +++++++++++++++++++++ .../dbus/files/dbus-1.15.8-enable-elogind.patch | 65 ++++++ 3 files changed, 298 insertions(+)
Upstream MR was closed ...