Re: new systemd in rawhide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 10, 2021 at 10:40:33AM +0100, Vitaly Zaitsev via devel wrote:
> On 10/12/2021 08:34, Zbigniew Jędrzejewski-Szmek wrote:
> >We also changed various libraries to be dlopened when actually used,
> >instead of being dynamically linked. The goal is to reduce the
> >required dependencies.
> 
> What happens if these libraries are not installed an cannot be dl-opened?

The functionality that requires those libraries will not be available.
An easy example is libqrencode: some systemd tools (journalctl,
homectl, cryptenroll) will print recovery keys and such as qrcode
on the terminal for easy transfer to a cellphone, in addition to the usual
text output. If the library is not present, the qrcode is not printed.

Another example is systemd-coredump: it uses libdw and libelf to analyze
a core file and generate a traceback. If those libs cannot be loaded,
the crash is reported without it.

Other examples: libpwquality is used to warn about too-easy passwords,
without it the warning does not happen, libpcre2 is used for 'journalctl --grep',
and without it the --grep option just returns an error, etc.

Systemd allows almost such dependencies to be turned on/off at compile time.
In Fedora we compile with everything on, which means that systemd would
pull in a lot of dependencies. In particular, most systemd binaries are
link to libsystemd-shared.so, which in turn is linked to most of those
libraries. This means that pulling in even a single binary pulls in
many many library dependencies, and even if we were to split systemd
into multiple subpackages, we wouldn't avoid pulling in the dependencies.

Using dlopen allows us to make the requirements more flexible: for example,
in the initrd you certainly don't need qrcodes or pwquality checks.
Thus for the initrd we just don't install those libraries.

We have been doing this for a while. I think the first was libxkbcommon
(which is used by localed to check keyboard mapping configurations),
back in 2016 (https://github.com/systemd/systemd/commit/5de344704d).
When this done correctly, people mostly don't notice.

Some other replies in this thread assumed that the programs will crash.
I have no idea why you would assume that. We're not complete idiots.

Zbyszek
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux