Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633336 - mate-base/mate-session-manager and mate-extra/mate-power-manager should support elogind
Summary: mate-base/mate-session-manager and mate-extra/mate-power-manager should suppo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo MATE Desktop
URL: https://github.com/mate-desktop/mate-...
Whiteboard:
Keywords:
: 633338 (view as bug list)
Depends on:
Blocks: elogind-support
  Show dependency tree
 
Reported: 2017-10-03 07:35 UTC by Joakim Tjernlund
Modified: 2019-03-31 10:56 UTC (History)
3 users (show)

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


Attachments
mate-screensaver patch for elogind (0001-Add-ELOGIND-support.patch,2.79 KB, patch)
2019-03-26 21:38 UTC, Joakim Tjernlund
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2017-10-03 07:35:16 UTC
Currently only support full systemd and consolekit
Comment 2 jorgicio 2019-03-18 03:51:35 UTC
Hi! I created a overlay called "mate-elogind" which solves this problem. Just upgraded to the 1.22.x branch. Check it in https://github.com/jorgicio/mate-elogind.

Tested here and working. Give it a try.

Also, yes, I'm waiting for an official elogind-related support for the Portage tree.

The packages with elogind support are:
* mate-base/mate-session-manager
* mate-extra/mate-power-manager

I hope it helps.
Comment 3 Joakim Tjernlund 2019-03-19 11:50:24 UTC
Now even gnome-session got support for elogind
Mikle, could you add the missing bits to MATE as well?
The needed bits are in https://github.com/jorgicio/mate-elogind
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-03-19 18:14:15 UTC
(In reply to Joakim Tjernlund from comment #3)
> Now even gnome-session got support for elogind
> Mikle, could you add the missing bits to MATE as well?
> The needed bits are in https://github.com/jorgicio/mate-elogind

the link you provided actually shows 404 :)
Comment 5 Joakim Tjernlund 2019-03-19 18:16:13 UTC
(In reply to Mikle Kolyada from comment #4)
> (In reply to Joakim Tjernlund from comment #3)
> > Now even gnome-session got support for elogind
> > Mikle, could you add the missing bits to MATE as well?
> > The needed bits are in https://github.com/jorgicio/mate-elogind
> 
> the link you provided actually shows 404 :)

OOPS, should be 
https://github.com/jorgicio/mate-elogind-gentoo
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-03-19 18:28:02 UTC
ok, I will test your patch against the package itself, the only thing is that I am not running elogind with mate (my relitives do run mate but with systemd, and they are fond of systemd), so I would not be able to give a patch wide testing myself.
Comment 7 Joakim Tjernlund 2019-03-19 18:35:14 UTC
(In reply to Mikle Kolyada from comment #6)
> ok, I will test your patch against the package itself, the only thing is
> that I am not running elogind with mate (my relitives do run mate but with
> systemd, and they are fond of systemd), so I would not be able to give a
> patch wide testing myself.

great, that patch has been tested by several already so it should be good.
Comment 8 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-03-19 18:36:41 UTC
Yes, I saw you tried to upstream this one
Comment 9 Joakim Tjernlund 2019-03-19 18:39:47 UTC
(In reply to Mikle Kolyada from comment #8)
> Yes, I saw you tried to upstream this one

right, it is queued. 

While in mate-session you could fix
https://bugs.gentoo.org/633334 ?
Comment 10 jorgicio 2019-03-19 19:50:53 UTC
(In reply to Mikle Kolyada from comment #6)
> ok, I will test your patch against the package itself, the only thing is
> that I am not running elogind with mate (my relitives do run mate but with
> systemd, and they are fond of systemd), so I would not be able to give a
> patch wide testing myself.

I had the same issue at first. You may enable the elogind support by adding this line:

session optional pam_elogind.so

in the /etc/pam.d/system-auth.

I hope it helps.
Comment 11 Mart Raudsepp gentoo-dev 2019-03-19 20:24:05 UTC
(In reply to jorgicio from comment #10)
> session optional pam_elogind.so
> 
> in the /etc/pam.d/system-auth.
> 
> I hope it helps.

This gets done by pambase[elogind]. Potentially need to take care of your etc-update/dispatch-conf/whatnot, though.
Comment 12 Mart Raudsepp gentoo-dev 2019-03-19 20:28:32 UTC
Where is the patch queued upstream? I'd have some constructive criticism.
In the lack of another quickly known place to me, some quick comments here.
I don't see why the patch is so invasive in adding the support, as elogind is a drop-in replacement for logind stuff. If it would set the same HAVE_SYSTEMD AC_DEFINE (with whatever autotools magic is necessary to make it work; probably just calling it once if either of them is enabled), one wouldn't need to add more complications to the source files. Though for clarification a separate commit could change HAVE_SYSTEMD to HAVE_LOGIND (to mean any logind interface provider) in all the places instead.
Comment 13 Joakim Tjernlund 2019-03-19 21:42:33 UTC
(In reply to Mart Raudsepp from comment #12)
> Where is the patch queued upstream? I'd have some constructive criticism.
> In the lack of another quickly known place to me, some quick comments here.
> I don't see why the patch is so invasive in adding the support, as elogind
> is a drop-in replacement for logind stuff. If it would set the same
> HAVE_SYSTEMD AC_DEFINE (with whatever autotools magic is necessary to make
> it work; probably just calling it once if either of them is enabled), one
> wouldn't need to add more complications to the source files. Though for
> clarification a separate commit could change HAVE_SYSTEMD to HAVE_LOGIND (to
> mean any logind interface provider) in all the places instead.

It starts here:
https://github.com/mate-desktop/mate-session-manager/issues/146#issuecomment-471130324

a bit messy to follow,  but the final patch is a bit different. It does
not have the version testing of elogind.

Ends here:
https://github.com/mate-desktop/mate-session-manager/pull/199
Comment 14 Joakim Tjernlund 2019-03-19 21:44:29 UTC
(In reply to Mart Raudsepp from comment #12)
> Where is the patch queued upstream? I'd have some constructive criticism.
> In the lack of another quickly known place to me, some quick comments here.
> I don't see why the patch is so invasive in adding the support, as elogind
> is a drop-in replacement for logind stuff. If it would set the same
> HAVE_SYSTEMD AC_DEFINE (with whatever autotools magic is necessary to make
> it work; probably just calling it once if either of them is enabled), one
> wouldn't need to add more complications to the source files. Though for
> clarification a separate commit could change HAVE_SYSTEMD to HAVE_LOGIND (to
> mean any logind interface provider) in all the places instead.

oh, I think you are looking an an early version. My patch just touches the
build system(configure.ac/Makefile.am)
Comment 15 Mart Raudsepp gentoo-dev 2019-03-19 21:51:36 UTC
Yeah, I was looking at comment #1 link.

Btw, to support elogind in ebuild without an imposed eautoreconf, one could also probably do something like this until the patches hit a release:

local myconf=(
    --enable-other-opts
)

if use elogind; then
    myconf+=(
        SYSTEMD_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
        SYSTEMD_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
   )
fi

mate_src_configure "${myconf[@]}"
Comment 16 Joakim Tjernlund 2019-03-20 18:30:17 UTC
(In reply to Mart Raudsepp from comment #15)
> Yeah, I was looking at comment #1 link.
> 
> Btw, to support elogind in ebuild without an imposed eautoreconf, one could
> also probably do something like this until the patches hit a release:
> 
> local myconf=(
>     --enable-other-opts
> )
> 
> if use elogind; then
>     myconf+=(
>         SYSTEMD_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
>         SYSTEMD_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
>    )
> fi
> 
> mate_src_configure "${myconf[@]}"

Yes, that would work too.
Comment 17 Joakim Tjernlund 2019-03-21 12:57:25 UTC
elogind was just added upstream, will be in next 1.22.x release
Comment 18 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-03-21 13:02:10 UTC
(In reply to Joakim Tjernlund from comment #17)
> elogind was just added upstream, will be in next 1.22.x release

ok, probably the best course here is to pick up the upstream patch then
Comment 19 Joakim Tjernlund 2019-03-26 17:24:17 UTC
I just noted mate-screensaver has configure flags for consolekit/systemd.
Should there not be one for elogind too?

jorgicio ?
Comment 20 Joakim Tjernlund 2019-03-26 21:38:17 UTC
Created attachment 570898 [details, diff]
mate-screensaver patch for elogind
Comment 21 Joakim Tjernlund 2019-03-26 21:39:01 UTC
Upstream patch here:
https://github.com/mate-desktop/mate-screensaver/issues/187
Comment 22 Andreas Sturmlechner gentoo-dev 2019-03-27 21:09:40 UTC
(In reply to Joakim Tjernlund from comment #19)
> I just noted mate-screensaver has configure flags for consolekit/systemd.
> Should there not be one for elogind too?

Different bug: bug 681334
Comment 23 jorgicio 2019-03-27 22:33:36 UTC
(In reply to Joakim Tjernlund from comment #19)
> I just noted mate-screensaver has configure flags for consolekit/systemd.
> Should there not be one for elogind too?
> 
> jorgicio ?

I just checked this, so this is a work in progress.
Comment 24 jorgicio 2019-03-27 22:53:35 UTC
https://github.com/jorgicio/mate-elogind-gentoo

For a while, the mate-extra/mate-screensaver package was added too. Also, I had to dropped 1.20.x support because "calculate" overlay did it first.
Comment 25 Joakim Tjernlund 2019-03-28 09:36:56 UTC
(In reply to jorgicio from comment #24)
> https://github.com/jorgicio/mate-elogind-gentoo
> 
> For a while, the mate-extra/mate-screensaver package was added too. Also, I
> had to dropped 1.20.x support because "calculate" overlay did it first.

Don't you need to run eautoreconf now that elogind patch touches configure.ac ?
Comment 26 jorgicio 2019-03-28 16:09:52 UTC
(In reply to Joakim Tjernlund from comment #25)
> (In reply to jorgicio from comment #24)
> > https://github.com/jorgicio/mate-elogind-gentoo
> > 
> > For a while, the mate-extra/mate-screensaver package was added too. Also, I
> > had to dropped 1.20.x support because "calculate" overlay did it first.
> 
> Don't you need to run eautoreconf now that elogind patch touches
> configure.ac ?

That's not necessary because the ebuild already does that. Just specify the PATCHES variable and you're ready.
Comment 27 Joakim Tjernlund 2019-03-28 16:23:21 UTC
(In reply to jorgicio from comment #26)
> (In reply to Joakim Tjernlund from comment #25)
> > (In reply to jorgicio from comment #24)
> > > https://github.com/jorgicio/mate-elogind-gentoo
> > > 
> > > For a while, the mate-extra/mate-screensaver package was added too. Also, I
> > > had to dropped 1.20.x support because "calculate" overlay did it first.
> > 
> > Don't you need to run eautoreconf now that elogind patch touches
> > configure.ac ?
> 
> That's not necessary because the ebuild already does that. Just specify the
> PATCHES variable and you're ready.

OK, good.

Mikle, can we have MATE and elogind in Gentoo repo soon?
Comment 28 Larry the Git Cow gentoo-dev 2019-03-31 10:47:45 UTC
The bug has been closed via the following commit(s):

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

commit e833a3cb5ddd06db4819af66b8c2a513438aa2b7
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-03-30 22:50:17 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-03-31 10:47:30 +0000

    mate-extra/mate-power-manager: Add USE elogind
    
    logind is detected at runtime, so move the session manager trifecta to RDEPEND.
    
    Closes: https://bugs.gentoo.org/633336
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../mate-power-manager/mate-power-manager-1.22.0.ebuild   | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit 5bd270f4a595255b62e34e17375c50d5ef82f15f
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-03-30 22:32:54 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-03-31 10:39:36 +0000

    mate-base/mate-session-manager: Add USE elogind
    
    Bug: https://bugs.gentoo.org/633336
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../mate-session-manager-1.22.0-elogind.patch      | 84 ++++++++++++++++++++++
 .../mate-session-manager-1.22.0.ebuild             | 16 +++--
 2 files changed, 96 insertions(+), 4 deletions(-)
Comment 29 Andreas Sturmlechner gentoo-dev 2019-03-31 10:56:42 UTC
*** Bug 633338 has been marked as a duplicate of this bug. ***