[lfs-dev] dbus, systemd, polkit, and consolekit

Fernando de Oliveira famobr at yahoo.com.br
Sat May 10 06:14:14 PDT 2014

Em 09-05-2014 23:37, Bruce Dubbs escreveu:
> I have spent the last several days trying to understand the internals of
> dbus, polkit, and consolekit in an attempt to integrate System V and
> systemd.


Problem started when I discovered that polkit configure switch used
would be *the* essential choice:

using --disable-libsystemd-login:

        Session tracking:           ConsoleKit

using --enable-libsystemd-login:

        Session tracking:           libsystemd-login

LXDE, as most DE, depends on it, many through some ?polkit?.
Particularly LXPolkit, for LXDE. LXPolkit is not loaded for the session,
if polkit is configured for systemd, and what is running is System V.

>From here on, Bruce took the task to investigate what could be possibly

If we do not go for eudev and no other solution is found, then rebooting
to other system would need a rebuild/reinstall of polkit, at least.

> I have not been successful.  The linkages are not transparent at all.
> For example lxsession-logout tries to get permissions for poweroff or
> reboot in a very complex way.
> It calls dbus to get permissions for systemd-logind.  While running
> System V, this fails and that is quite understandable.
> It then tries consolekit.  I tried to trace it through dbus to
> console-kit-daemon and from there to polkit-1/polkitd.  I was not able
> to figure out how the decision to accept or deny a simple function like
> CanRestart is made.  The interfaces through dbus and really complex glib
> functions was beyond what I can understand without a *lot* more study.


> One advantage of systemd is to speed up the boot process by running
> multiple boot processes in parallel.  On LFS it is faster.  On my
> hardware systemd boots in 8 seconds and System V boots in 10 seconds.
> that's hardly a substantial reason for a massive complication of the
> boot process and many programs within the overall system.
> I've said it before: it appears that systemd is a solution in search of
> a problem.  For 99% of users, especially LFS users, systemd provides no
> discernible benefits and a lot of problems.  You are either all in or
> not.  There does not seem to be a halfway.


> Unless I get some feedback in the next couple of days with solid reasons
> that systemd, polkit, and consolekit are important, I am going to
> replace systemd with eudev in LFS and minimize recommendations for
> polkit and consolekit in BLFS.

For me it is the preferred solution. As akh and others have replied, two
different books for both {,B}LFS are the ideal. What Armin is doing is
great. We need more people so the BLFS-systemd can be started. BLFS does
not leave me time for that, unfortunately.

Also, I think it is good for the Linux community to add one more
"distro" supporting eudev.

I think original Bruce's experiment is very good, though, it could be
thought, as akh wrote as a third version of LFS. It is not broken for
servers (non-desktop) systems. But then, it would be more useful from an
educational point of view, because I believe who is going to build a
server prefers to chose the init system from the beginning and will not
be wanting to reboot in different inits. Neither will care about
boot/shutdown times, I suspect.

> I'm a little undecided whether dbus should remain in LFS or not.  It
> doesn't hurt much, but it also isn't much use in an non-xorg environment
> unless you are using systemd.  To use it in an xorg environment, it (at
> least dbus-launch) needs to be built after xorg-libs.

My preference would be to remove what was included for systemd.

I would like to ask you, please, to temporarily use a development
version of gcc, because it is more "stable" or "reliable" (from the
point of view of building packages), at the moment, than the released
version. It would be breaking a rule we all agreed, but it seems the
right occasion to do it, as we will have to have the PITA of building
new systems for development.

> Many users come to LFS because they don't want the "bloat" of the
> commercial distros.  I am now willing to return to those roots.

I agree.

> Feedback is welcome.
>   -- Bruce

I would like to thank you for all your effort with this experiment and
with many other things, such as how many times you help others and,
particularly, me.

And let us hope people willing to crate/maintain BLFS-systemd join us.


More information about the lfs-dev mailing list