Bug 107050 - [PATCH] build: support building with elogind
Summary: [PATCH] build: support building with elogind
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: build-system (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 12:00 UTC by Rasmus Thomsen
Modified: 2018-07-30 10:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] build: support building with elogind (3.16 KB, patch)
2018-06-27 12:00 UTC, Rasmus Thomsen
Details | Splinter Review

Description Rasmus Thomsen 2018-06-27 12:00:07 UTC
Created attachment 140361 [details] [review]
[PATCH] build: support building with elogind

elogind is a drop-in replacement for systemd's logind and as such can be used here without big changes.
Comment 1 Tanu Kaskinen 2018-06-28 10:34:37 UTC
I think the patch should fulfil the following requirements:

input: --enable-systemd-login --enable-elogind-login
installed: libsystemd, libelogind
output: error, can't enable both

input: --enable-systemd-login
installed: libsystemd, libelogind
output: use libsystemd

input: --enable-elogind-login
installed: libsystemd, libelogind
output: use libelogind

input: --enable-systemd-login
installed: libelogind
output: error, systemd requested but not installed

input: --enable-elogind-login
installed: libsystemd
output: error, elogind requested but not installed

input: no configure args
installed: libsystemd, libelogind
output: use libsystemd

input: no configure args
installed: libsystemd
output: use libsystemd

input: no configure args
installed: libelogind
output: use libelogind

Currently the patch doesn't handle all cases correctly. For example, if both libsystemd and libelogind are installed, but only --enable-systemd-login is passed to configure, the patch produces an error.

Can you send a revised patch to the mailing list? I find it easier to comment on the details of the code that way. Subscribe here:
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Here are instructions for using git send-email, in case you find that useful:
https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/
Comment 2 Rasmus Thomsen 2018-06-28 17:02:42 UTC
(In reply to Tanu Kaskinen from comment #1)

> Currently the patch doesn't handle all cases correctly. For example, if both
> libsystemd and libelogind are installed, but only --enable-systemd-login is
> passed to configure, the patch produces an error.

What behavior would you suggest if both of them are installed? Tell the user to explicitly choose one?

> Can you send a revised patch to the mailing list? I find it easier to
> comment on the details of the code that way. Subscribe here:
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Hm, ok, I don't like MLs much, but sure

> Here are instructions for using git send-email, in case you find that useful:
> https://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/
Comment 3 Tanu Kaskinen 2018-07-04 09:16:58 UTC
(In reply to Rasmus Thomsen from comment #2)
> What behavior would you suggest if both of them are installed? Tell the user
> to explicitly choose one?

I guess you're talking about the case where no configure args are given? I tried to answer this in my previous message:

input: no configure args
installed: libsystemd, libelogind
output: use libsystemd

I chose libsystemd, because it's the "normal" option. One could argue that if libelogind is installed, that's a pretty strong indication that the user actually wants to use libelogind, so maybe libelogind should be the default choice. Or maybe it's indeed best to force the user to tell his preference by throwing an error. I'm ok with any of these alternatives.
Comment 4 GitLab Migration User 2018-07-30 10:07:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/222.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.