Bug 94209 - Session-info source: incompatibility with recent systemd
Summary: Session-info source: incompatibility with recent systemd
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: unix agent (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium major
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-19 10:48 UTC by Peter Mattern
Modified: 2016-03-04 09:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Mattern 2016-02-19 10:48:54 UTC
A number of so-called compat libs was removed from systemd recently, see https://github.com/systemd/systemd/commit/4de282c, among other libsystemd-login.
Even before those libraries had to be enabled by configure option --enable-compat-libs which was e. g. removed on Arch Linux as of systemd 229.

Spice vdagent on the other hand seems to need libsystemd-login to use systemd as "session-info source" as running configure on systems lacking the library fails
> $configure --with-session-info=systemd
> [...]
> checking for LIBSYSTEMD_LOGIN... no
> configure: error: libsystemd-login support explicitly requested, but some \
  required packages are not available

Using ConsoleKit which has been banned from many distributions by now or no session-info source at all isn't really an option so it seems that spice-vdagent has to get adjusted.

Tests performed on up to date Arch Linux with fff3058 or 0.16.0 (same findings).
Comment 1 Christophe Fergeau 2016-02-29 17:42:40 UTC
It seems the libraries have been removed, but the headers we need are still there. So a patch like
diff --git a/configure.ac b/configure.ac
index ca9a15b..04917fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,7 @@ PKG_CHECK_MODULES(ALSA, [alsa >= 1.0.22])

 if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then
     PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN],
-                      [libsystemd-login >= 42],
+                      [libsystemd >= 122],
                       [have_libsystemd_login="yes"],
                       [have_libsystemd_login="no"])
     if test x"$have_libsystemd_login" = "xno" && test "$with_session_info" = "systemd"; then


will probably be enough.I don't know when exactly libsystemd-login was considered deprecated and sd-login.h 'associated' with libsystemd.so rather than libsystemd-login.so , so the 122 version in the check is entirely arbitrary.
Comment 2 Peter Mattern 2016-02-29 18:10:48 UTC
(In reply to Christophe Fergeau from comment #1)
> It seems the libraries have been removed, but the headers we need are still
> there.

Yes. The change was introduce in 209 which hence should be the minimum version. More information can be found in https://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html (introduction and section "The APIs "sd-journal.h", [...]").
Comment 3 Peter Mattern 2016-03-03 21:15:59 UTC
eb01d32 works as expected on Arch Linux.
IMO issue can be closed as fixed.
Comment 4 Christophe Fergeau 2016-03-04 09:10:30 UTC
Thanks for the detailed report and the testing, closing now.


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.