Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599494 - sys-apps/dbus: sys-auth/elogind support upstreaming
Summary: sys-apps/dbus: sys-auth/elogind support upstreaming
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://gitlab.freedesktop.org/dbus/d...
Whiteboard:
Keywords:
Depends on:
Blocks: elogind-support 674830
  Show dependency tree
 
Reported: 2016-11-11 16:04 UTC by Sven Eden
Modified: 2023-09-02 16:21 UTC (History)
7 users (show)

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


Attachments
dbus-1.10.12-r1.ebuild (dbus-1.10.12-r1.ebuild,7.47 KB, text/plain)
2016-11-11 16:05 UTC, Sven Eden
Details
Patch to enable elogind support (dbus-enable-elogind.patch,2.74 KB, patch)
2016-11-11 16:07 UTC, Sven Eden
Details | Diff
Patch to enable elogind support (dbus-enable-elogind.patch,2.74 KB, patch)
2016-11-11 17:25 UTC, Sven Eden
Details | Diff
dbus-1.10.14-r1.ebuild (dbus-1.10.14-r1.ebuild,7.47 KB, text/plain)
2016-12-02 11:12 UTC, Sven Eden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2016-11-11 16:04:50 UTC
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.
Comment 1 Sven Eden 2016-11-11 16:05:44 UTC
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.
Comment 2 Sven Eden 2016-11-11 16:07:32 UTC
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.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2016-11-11 16:10:39 UTC
Beware of typos!

+#if defined(HAVE_SYSTEMD) || defined(HAVI_ELOGIND)
Comment 4 Sven Eden 2016-11-11 17:25:53 UTC
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.
Comment 5 Sven Eden 2016-11-11 17:26:25 UTC
(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*
Comment 6 Sven Eden 2016-11-11 17:54:05 UTC
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.
Comment 7 Sven Eden 2016-12-02 11:12:54 UTC
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.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2017-03-25 03:27:41 UTC
Thanks, fixed in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=640fb067afa16c30817dd2dedd4081341a923ac4
Comment 9 Mike Gilbert gentoo-dev 2019-01-21 04:36:11 UTC
Why has this patch not been submitted upstream? Carrying a distro-specific patch perpetually is the wrong way to go about this.
Comment 10 Andreas Sturmlechner gentoo-dev 2019-02-22 00:21:16 UTC
elogind support is pending upstream for some time, anyway.
Comment 11 Sven Eden 2020-08-23 16:04:48 UTC
(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?
Comment 12 Andreas Sturmlechner gentoo-dev 2020-12-05 10:55:17 UTC
I guess someone with a gitlab.freedesktop.org account should ping them.
Comment 13 Sven Eden 2020-12-07 07:46:19 UTC
(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
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-27 04:00:11 UTC
The upstream MR is now closed. This still needs to be sent upstream and pushed through.

Sven, are you interested in doing that?
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-07 08:03:31 UTC
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).
Comment 16 Larry the Git Cow gentoo-dev 2023-06-07 08:14:19 UTC
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(-)
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 23:46:44 UTC
(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.
Comment 18 Piotr Karbowski (RETIRED) gentoo-dev 2023-06-11 10:04:28 UTC
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.
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-11 20:08:29 UTC
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?
Comment 20 Piotr Karbowski (RETIRED) gentoo-dev 2023-06-11 20:21:09 UTC
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.
Comment 21 Mike Gilbert gentoo-dev 2023-06-11 22:29:51 UTC
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.
Comment 22 Larry the Git Cow gentoo-dev 2023-09-02 16:21:18 UTC
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(+)