Created attachment 451975 [details, diff] Fixes the ebuild and lets it accept elogind to substitute consolekit if !systemd is set. I am currently trying to substitute ConsoleKit with elogind. As a first step I tried to merge sys-auth/polkit-0.113-r200 with USE Flags: elogind jit kde nls pam -examples -gtk -introspection -selinux -systemd -test The merge fails, as the ebuild is invalid according to portage-2.3.2. Unfortunately, although elogind is pulled in, the original ebuild insist on pulling in consolekit if USE="-systemd" is set.
There is already a elogind use flag. Maybe this should be optimized.
Well, I have succeeded in making "emerge --depclean" to remove sys-auth/consolekit from my system. Further elogind now fully handles session tracking for my plasma desktop. I had to update the following packages, all ebuilds available from my overlay "seden" for testing, but I am puzzling over what to do next. Maybe a tracking bug would be a good idea? And where to put it all? [kde overlay] seems the logic place, as Plasma is what does make use of a singular logind substitute... But then there are packages, that depend on sys-auth/consolekit if !systemd is set. (Like lxqt-base/lxqt-meta) What to do with those? As long as sys-auth/elogind is not in the tree, this seems difficult to decide... Here is the list of packages I had to update so far: -------- ~ $ eix --nocolor -c -U elogind [I] kde-plasma/powerdevil (5.8.3-r1(5)[3]@02.11.2016): Power management for KDE Plasma Shell [I] sys-apps/accountsservice (0.6.42-r2[3]@01.11.2016): D-Bus interfaces for querying and manipulating user account information [I] sys-auth/pambase (20150213-r1[3]@01.11.2016): PAM base configuration files [I] sys-auth/polkit (0.113-r202[3]@01.11.2016): Policy framework for controlling privileges for system-wide services [I] x11-base/xorg-server (1.18.4-r1(0/1.18.4)[3]@02.11.2016): X.Org X servers [I] x11-misc/sddm (0.14.0-r2[3]@02.11.2016): Simple Desktop Display Manager [1] "kde" /var/lib/layman/kde [2] "qt" /var/lib/layman/qt [3] "seden" /var/lib/layman/seden -------- Note on xorg-server: If USE="systemd" is set, systemd-logind is used for (some?) session and fd handling. But the communication is done using dbus via org.freedesktop.login1, which is provided by elogind. One warning though: Although my laptop is up and running fine, I have not yet tested everything.
Thanks for testing, it's really appreciated. There's a few main reasons why I haven't pushed this further in the main tree yet: 1. I haven't been able to yet get working the other main feature I packaged elogind for - loginct unlock-session (needed for when the locker crashes) 2. I hit a nasty suspend loop with elogind installed 3. I don't really have an implementation plan. For this sort of package, I feel better about planning how we will integrate it with other packages before moving it to the main tree and everyone does their own thing
(In reply to Michael Palimaka (kensington) from comment #3) > 1. I haven't been able to yet get working the other main feature I packaged > elogind for - loginct unlock-session (needed for when the locker crashes) I'll test it when locker crashes. If I lock Plasma normally it does not allow to get unlocked by loginctl. (Which is fine for me, as that would be an extreme security hole.) > > 2. I hit a nasty suspend loop with elogind installed I had that, too, and the fix for me was to add this to /etc/elogind/logind.conf: -------- # Those are handled by PowerDevil HandlePowerKey=ignore HandleSuspendKey=ignore HandleHibernateKey=ignore HandleLidSwitch=ignore -------- However, now that my PowerDevil no longer communicates with ConsoleKit, but with elogind I had to comment them out. Suspension works fine, with the only issue that Plasma does not lock itself on wakeup. (Another one for the list. ;-) ) > > 3. I don't really have an implementation plan. For this sort of package, I > feel better about planning how we will integrate it with other packages > before moving it to the main tree and everyone does their own thing So maybe my idea with a tracking bug and testing in kde overlay is not as far fetched as I thought...
Created attachment 452306 [details] Fixed ebuild patching in elogind support This ebuild changes the following issues: - The USE flags "elogind" and "systemd" are now mutually exclusive - sys-auth/consolekit is only pulled in, if neither is set. - Instead of sed'ing elogind into configure, a patch (follows) is applied - The patch changes configure.ac and two Makefile.am files, so eautoreconf is called when USE="elogind" is set. - Fixed "use_enable elogind" call. - Replaced "systemd_with_unitdir" (deprecated) with --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
Created attachment 452308 [details, diff] Enable elogind package wide This is the mentioned patch to the latest ebuild. Down the line the patch does not result in anything different than the former sed'ing. However, really patching in elogind support might lead to a point, once a complete patch is confirmed, where we could propose this upstream.
I have proposed the patch upstream: https://bugs.freedesktop.org/show_bug.cgi?id=98688
@Freedesktop bugs : If you are fine with the ebuild as it, it might be ready for take over by the KDE Team. This variant is needed for elogind to be able to work at all (See Bug 599474) and both ebuilds are needed for the other ebuilds (see tracker at Bug 599470) to be added. @KDE Team: If the Freedesktop Team is fine with this, you might want to take over for inclusion into the KDE overlay, substituting the current ebuild.
Thanks for your work! This is now in kde overlay.
Moved to tree as sys-auth/polkit-0.113-r2.