Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599498 - sys-auth/pambase: Add elogind support
Summary: sys-auth/pambase: Add elogind support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PAM Gentoo Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: elogind-support
  Show dependency tree
 
Reported: 2016-11-11 16:19 UTC by Sven Eden
Modified: 2017-06-03 12:06 UTC (History)
2 users (show)

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


Attachments
pambase-20150213-r2.ebuild (pambase-20150213-r2.ebuild,3.18 KB, text/plain)
2016-11-11 16:19 UTC, Sven Eden
Details
Patch to enable elogind support in the Makefile (pambase-20150213-elogind.patch,298 bytes, patch)
2016-11-11 16:20 UTC, Sven Eden
Details | Diff
Patch to enable pam_elogind.so in system-auth (pambase-20150213-elogind-auth.patch,282 bytes, patch)
2016-11-11 16:21 UTC, Sven Eden
Details | Diff
pambase-20150213-r1.ebuild.diff (pambase-20150213-r1.ebuild.diff,3.26 KB, patch)
2017-05-27 09:46 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2016-11-11 16:19:04 UTC
sys-auth/pambase needs a new USE flag "elogind".
Additionally it is needed that pkg_postinst() counts elogind as a session tracker to warn users if more than one session tracker was enabled.

For elogind to be supported, pam_elogind.so must be patched into system-auth.in as an additional optional session module.
Comment 1 Sven Eden 2016-11-11 16:19:55 UTC
Created attachment 453022 [details]
pambase-20150213-r2.ebuild

Updated ebuild that accepts USE="elogind" and patches in elogind support. Patches will follow.
Comment 2 Sven Eden 2016-11-11 16:20:48 UTC
Created attachment 453024 [details, diff]
Patch to enable elogind support in the Makefile

This patch add support for HAVE_ELOGIND in the main Makefile.
Comment 3 Sven Eden 2016-11-11 16:21:46 UTC
Created attachment 453026 [details, diff]
Patch to enable pam_elogind.so in system-auth

This patch adds pam_elogind.so as an additional optional session module in system-auth.
Comment 4 Sven Eden 2016-12-29 10:54:24 UTC
@Michael : I have not yet found any problems with adding elogind to pambase. I guess you can add it to the KDE Overlay.
@KDE
Comment 5 Sven Eden 2016-12-29 10:55:08 UTC
(In reply to Sven Eden from comment #4)
> @Michael : I have not yet found any problems with adding elogind to pambase.
> I guess you can add it to the KDE Overlay.

dammit, wrong key. sorry.

@PAM Gentoo Team: Are you okay with the patches, or have I missed something?
Comment 6 Andreas Sturmlechner gentoo-dev 2017-01-14 22:11:48 UTC
The REQUIRED_USE you've set makes the pkg_postinst partially irrelevant - $stcnt will never be > 2. Is there a technical reason for the REQUIRED_USE? Otherwise just remove it.

I don't know why it is handled like that in the first place, otherwise we could remove the entire pkg_postinst with REQUIRED_USE="?? ( consolekit elogind systemd )", but there may be some reason for allowing more than 1 session tracker at the same time (if only to avoid support hours because of REQUIRED_USE...).
Comment 7 Andreas Sturmlechner gentoo-dev 2017-01-14 22:16:48 UTC
Also, repoman's got something to say:

>  KEYWORDS.invalid [fatal]      2
>   sys-auth/pambase/pambase-20150213-r1.ebuild: ~-sparc-fbsd
>   sys-auth/pambase/pambase-20150213-r1.ebuild: ~-x86-fbsd
Comment 8 Andreas Sturmlechner gentoo-dev 2017-05-27 09:46:49 UTC
Created attachment 474506 [details, diff]
pambase-20150213-r1.ebuild.diff

- bump to EAPI 6
- cleanup obsolete blockers and version reqs
- Sven's elogind changes with minor improvements
- pkg_postinst -> pkg_setup (warn users beforehand)
Comment 9 Sven Eden 2017-05-31 12:17:32 UTC
*sigh* I forgot to answer to your comments in january due to a rather ... erm ... stormy private life at that time. I am very sorry!

I really like the new diff, it looks very good. pambase was one of the first packages I patched, and the patch wasn't exactly beautiful. Yours is much better!

However, it makes no sense to install more than one session trackers at the same time. And installing elogind where systemd runs the show gains nothing but a big headache. :-)
That's the reason why I put in the REQUIRED_USE lines everywhere.
Well, this, and because of the tiny fact that I didn't know of the ?? operator.

So thank you very much for reworking the ebuild!
Comment 10 Michael Palimaka (kensington) gentoo-dev 2017-06-03 12:06:57 UTC
Thanks, fixed in git.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb917030ea1e32b9e920cfa4b8d1003a5c90f183