Hi,
this is a patch to
https://fedorahosted.org/sssd/ticket/2733
This issue is caused by the change of packaging in libsystemd
They said:
"We merged libsystemd-journal.so, libsystemd-id128.so, libsystemd-login
and libsystemd-daemon into a a single libsystemd.so to reduce code
duplication and avoid cyclic dependencies (see below). The new library
exports the same symbols as the old libraries, however with a different
symbol version."
More is available here:
http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
So, the solution is checking the version of systemd and deciding which
library we can use. More details in patch.
Thanks.
Petr
PS: Thanks to lslebodn :-)
PPS: There are CI tests too
http://sssd-ci.duckdns.org/logs/commit/bf/8f8703d47abf01d5f1a5f683c2fc1ee572350c/1965/summary.html
>From fcf895ad8df932403dfc554a34ff0d8ceac72785 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Mon, 27 Jul 2015 12:52:49 -0400
Subject: [PATCH] BUILD: Repair dependecies on deprecated libraries
>From systemd version 209 up, there are no modules -login
and -journal. M4 macro can switch the libraries due to
systemd version.
Resolves:
https://fedorahosted.org/sssd/ticket/2733
---
contrib/ci/deps.sh | 2 +-
src/external/systemd.m4 | 24 +++++++++++++++++-------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/contrib/ci/deps.sh b/contrib/ci/deps.sh
index 74401f8328cdcc6f80afa9f7408ef9e9ce890df7..22b7276ebdb8e3ba5e1e34334adbe310cbff8bad 100644
--- a/contrib/ci/deps.sh
+++ b/contrib/ci/deps.sh
@@ -92,7 +92,7 @@ if [[ "$DISTRO_BRANCH" == -debian-* ]]; then
libselinux1-dev
libsemanage1-dev
libsmbclient-dev
- libsystemd-journal-dev
+ libsystemd-dev
libtalloc-dev
libtdb-dev
libtevent-dev
diff --git a/src/external/systemd.m4 b/src/external/systemd.m4
index dbced0d66aa19e064f998648675a5a9c080eaab8..ddc79e465fd53618c5f90341a96461b92c8528b1 100644
--- a/src/external/systemd.m4
+++ b/src/external/systemd.m4
@@ -1,23 +1,33 @@
+dnl There are no module libsystemd-journal and libsystem-login
+dnl up systemd version 209
+PKG_CHECK_EXISTS(systemd >= 209, [HAVE_SYSTEMD_NEW=yes], [HAVE_SYSTEMD_NEW=no])
+
dnl A macro to check presence of systemd on the system
AC_DEFUN([AM_CHECK_SYSTEMD],
[
PKG_CHECK_EXISTS(systemd,
[ HAVE_SYSTEMD=1, AC_SUBST(HAVE_SYSTEMD) ],
- [AC_MSG_ERROR([Could not detect systemd presence])]
- )
+ [AC_MSG_ERROR([Could not detect systemd presence])])
])
+AS_IF(test x$HAVE_SYSTEMD_NEW = xyes, login_lib_name=libsystemd,
+ login_lib_name=libsystemd-login)
+
AM_COND_IF([HAVE_SYSTEMD],
- [PKG_CHECK_MODULES([SYSTEMD_LOGIN], [libsystemd-login],
- [AC_DEFINE_UNQUOTED(HAVE_SYSTEMD_LOGIN, 1, [Build with libsystemdlogin support])],
+ [PKG_CHECK_MODULES([SYSTEMD_LOGIN],
+ [$login_lib_name],
+ [AC_DEFINE_UNQUOTED(HAVE_SYSTEMD_LOGIN, 1,
+ [Build with libsystemdlogin support])],
[AC_MSG_NOTICE([Build without libsystemd-login support])])])
dnl A macro to check presence of journald on the system
AC_DEFUN([AM_CHECK_JOURNALD],
[
- PKG_CHECK_MODULES(JOURNALD,
- libsystemd-journal,
- [AC_DEFINE_UNQUOTED([WITH_JOURNALD], 1, [journald is available])])
+ AS_IF(test x$HAVE_SYSTEMD_NEW = xyes, journal_lib_name=libsystemd,
+ journal_lib_name=libsystemd-journal)
+ PKG_CHECK_MODULES(JOURNALD, [$journal_lib_name],
+ [AC_DEFINE_UNQUOTED([WITH_JOURNALD], 1,
+ [journald is available])])
dnl Some older versions of pkg-config might not set these automatically
dnl while setting CFLAGS and LIBS manually twice doesn't hurt.
AC_SUBST([JOURNALD_CFLAGS])
--
2.4.3
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel