After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779167 - Please add elogind support
Please add elogind support
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-02-24 09:33 UTC by Sven Eden
Modified: 2017-02-24 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch in elogind support (7.80 KB, patch)
2017-02-24 09:33 UTC, Sven Eden
none Details | Review

Description Sven Eden 2017-02-24 09:33:21 UTC
Created attachment 346619 [details] [review]
Patch in elogind support

Hello everybody,

to be able to use NetworkManager on a system, where no systemd is installed, there is currently the possibility to use ConsoleKit2 instead.

As systemd-login has some advantages over ConsoleKit2, the elogind project (https://github.com/elogind/elogind) tries to offer a stand-alone systemd-login variant for those, who wish to use a different init system than systemd.

Please find attached a patch that enables networkmanager to use elogind for session tracking.

I am currently using networkmanager-1.4.4, with dhcpcd-6.11.5 and elogind-226 (dev_226 branch) on a Gentoo system run by openrc-0.23.2.
Everything works just fine.

This goes back on Gentoo Bug 607352 (https://bugs.gentoo.org/show_bug.cgi?id=607352) where the wish for elogind support in NetworkManager was issued initially.

Cheers

Sven
Comment 1 Thomas Haller 2017-02-24 12:08:12 UTC
Hi,

looks good.

How about the additional commit:
https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/elogind-bgo779167
Comment 2 Sven Eden 2017-02-24 13:30:38 UTC
(In reply to Thomas Haller from comment #1)
> Hi,
> 
> looks good.
> 
> How about the additional commit:
> https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/elogind-
> bgo779167

Well, I do like the way the _LOG* messages were unified. That's really nicely done.

The "concurrency" checking looks solid, but technically speaking, systemd and elogind make no sense on the same machine. elogind does not, like systemd-logind does, register with systemd, so it makes more sense to use systemd-logind.

However, users *might* come up with the idea to use systemd and substitute systemd-logind with elogind. Even if it is only "because you can". ;-)

Thank you very much!
Comment 3 Thomas Haller 2017-02-24 15:42:21 UTC
one can compile NM with consolekit and *logind support, and at runtime is taken whatever is available.

With the current code, it is not possible to use both systemd and elogind. It could anyway be complicated to implement, because both libraries expose the same symbols. Using symbol versioning it may work, but the patch doesn't support that, so it should be prevented from compiling. 

Merged: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e40d47fe7ccd725ecf6231e0f1193a029ea05e47
Comment 4 Thomas Haller 2017-02-24 15:43:05 UTC
and thanks!