Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I use systemd + elogind?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 299

PostPosted: Tue Jun 30, 2020 1:34 am    Post subject: How can I use systemd + elogind? Reply with quote

sys-auth/elogind and sys-apps/systemd is mutually exclusive currently.

I'd like to modify logind implementation and do some experiments.
Comparing to read the huge codebase of systemd, I'd rather start with elogind.

what I can do:
1. disable systemd-logind.service
2. enable "elogind" USE flag.
3. modify elogind ebuild file, remove "!sys-apps/systemd"

Is there any other step needed?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24369
Location: here

PostPosted: Tue Jun 30, 2020 5:19 am    Post subject: Reply with quote

I think if you remove !sys-apps/systemd" in ebuild at the end you you'll have file collisions.
Another problem, probably, is that systemd stable version is 244.3 while elogind is 243.7 I'm not sure if can works.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2789
Location: Canada

PostPosted: Tue Jun 30, 2020 5:47 am    Post subject: Reply with quote

I think you are better off finding logind code in systemd sources. Given that they were able to pull elogind out of it, it should be fairly localized.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2264
Location: Frankfurt, Germany

PostPosted: Tue Jun 30, 2020 12:29 pm    Post subject: Reply with quote

It should be pretty easy to replace systemd-logind with elogind. Just don't ask me how to do it... :wink:

Lennart Poettering insists that Systemd is modular:
Quote:
6. Myth: systemd is not modular.

Not true at all. At compile time you have a number of configure switches to select what you want to build, and what not. And we document how you can select in even more detail what you need, going beyond our configure switches.

This modularity is not totally unlike the one of the Linux kernel, where you can select many features individually at compile time. If the kernel is modular enough for you then systemd should be pretty close, too.

After all, that's what modularity means: you can easily replace or modify components like systemd-logind.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1772

PostPosted: Tue Jun 30, 2020 5:56 pm    Post subject: Reply with quote

Quote:
After all, that's what modularity means: you can easily replace or modify components like systemd-logind.


Except, per the quote above, it said kernel modularity... That does not mean you can replace parts of it, only that you could "possibly" disable parts of it; and watch the system crash and burn as it still hard linked to those parts...
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4717
Location: Dallas area

PostPosted: Tue Jun 30, 2020 6:01 pm    Post subject: Re: How can I use systemd + elogind? Reply with quote

fpemud wrote:
sys-auth/elogind and sys-apps/systemd is mutually exclusive currently.


Because when you try and use them together, it's like 2 people trying to drive the same car at the same time.

There functions overlap.

And when you try and emerge both, you'll have file conflicts which will likely to cause *logind to not work properly.
_________________
PRIME x570-pro, 3700x, RX 550 & 560 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 434
Location: South America

PostPosted: Tue Jun 30, 2020 6:19 pm    Post subject: Reply with quote

fedeliallalinea wrote:
I think if you remove !sys-apps/systemd" in ebuild at the end you you'll have file collisions.
Yeah, likely. Both packages provide a loginctl program. And a busctl program too, I believe.

It should be possible to build systemd without systemd-logind and loginctl by passing the -Dlogind=false option to meson, but I haven't tested it. It does not seem possible to build systemd without busctl and without patching the build system.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24369
Location: here

PostPosted: Tue Jun 30, 2020 6:38 pm    Post subject: Reply with quote

GDH-gentoo wrote:
fedeliallalinea wrote:
I think if you remove !sys-apps/systemd" in ebuild at the end you you'll have file collisions.
Yeah, likely. Both packages provide a loginctl program. And a busctl program too, I believe.

As dmpogo say it's easier patching directly to systemd
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5839
Location: Removed by Neddy

PostPosted: Tue Jun 30, 2020 6:48 pm    Post subject: Reply with quote

fedeliallalinea wrote:
GDH-gentoo wrote:
fedeliallalinea wrote:
I think if you remove !sys-apps/systemd" in ebuild at the end you you'll have file collisions.
Yeah, likely. Both packages provide a loginctl program. And a busctl program too, I believe.

As dmpogo say it's easier patching directly to systemd
but as Mike pointed out, systemd is modular so this should be effortless. If not it isn't modular
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 434
Location: South America

PostPosted: Tue Jun 30, 2020 8:15 pm    Post subject: Reply with quote

The logind stuff is in src/login/. But that uses stuff in src/shared/ and src/libsystemd/ (for the pam_systemd module), and stuff in src/shared/ might in turn use stuff (mostly) in src/basic/.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum