Skip to content

Add support for elogind. - #786

Merged
ximion merged 1 commit into
ximion:mainfrom
apteryks:add-support-for-elogind
Sep 2, 2026
Merged

Add support for elogind.#786
ximion merged 1 commit into
ximion:mainfrom
apteryks:add-support-for-elogind

Conversation

@apteryks

@apteryks apteryks commented Sep 2, 2026

Copy link
Copy Markdown

Elogind provides the systemd/sd-device.h and systemd/sd-hwdb.h
headers, can be used as a drop-in replacement of systemd.

  • meson.build ([systemd]): Add elogind alternative name for dependency check.
  • meson_options.txt [systemd]: Mention elogind in description.

Elogind provides the systemd/sd-device.h and systemd/sd-hwdb.h
headers, can be used as a drop-in replacement of systemd.

* meson.build ([systemd]): Add elogind alternative name for dependency check.
* meson_options.txt [systemd]: Mention elogind in description.
@ximion

ximion commented Sep 2, 2026

Copy link
Copy Markdown
Owner

AppStream does not use any of the login API. It uses libsystemd to interface with udev and read the hwdb to identify devices on the system.

The elogind docs say:

Basically all symbols are included. But any API calls that require to call systemd, or need internal knowledge of systemd, are simple stubs. They are there to provide ABI compatibility, but will not work.

That lets me believe that when building with it, we will just end up with completely broken functionality. Under these circumstances, isn't it better to just build without systemd when it isn't available? At least that will provide an obvious error message, while reading stub data will result in permission warnings or odd failure messages that may be harder to reason about.

@apteryks

apteryks commented Sep 2, 2026

Copy link
Copy Markdown
Author

elogind implements/imports the bits of systemd needed for modern desktops like GNOME, which is a larger subset than just logind; I've reviewed the source of elogind; its hwdb support makes use of udev (which it links to) for example. These are not stubs.

@ximion

ximion commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Okay, that wasn't clear to me. In that case, this patch is fine, thanks!

@ximion
ximion merged commit d4a428f into ximion:main Sep 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants