The libsystemd-daemon library had been deprecated upstream
just a few days before we started using it. Talk about bad
timing :)
With systemd 230, now in Debian sid and Fedora rawhide, it
has finally been dropped. We should use libsystemd, its
replacement, instead.
---
configure.ac | 4 ++--
libvirt.spec.in | 14 +++++++-------
m4/{virt-systemd-daemon.m4 => virt-libsystemd.m4} | 14 +++++++-------
src/Makefile.am | 4 ++--
src/util/virsystemd.c | 4 ++--
5 files changed, 20 insertions(+), 20 deletions(-)
rename m4/{virt-systemd-daemon.m4 => virt-libsystemd.m4} (73%)
diff --git a/configure.ac b/configure.ac
index 74c33b3..e0e155b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,7 @@ LIBVIRT_CHECK_DBUS
LIBVIRT_CHECK_FUSE
LIBVIRT_CHECK_GLUSTER
LIBVIRT_CHECK_HAL
+LIBVIRT_CHECK_LIBSYSTEMD
LIBVIRT_CHECK_NETCF
LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_OPENWSMAN
@@ -256,7 +257,6 @@ LIBVIRT_CHECK_SANLOCK
LIBVIRT_CHECK_SASL
LIBVIRT_CHECK_SELINUX
LIBVIRT_CHECK_SSH2
-LIBVIRT_CHECK_SYSTEMD_DAEMON
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_WIRESHARK
LIBVIRT_CHECK_NSS
@@ -2778,6 +2778,7 @@ LIBVIRT_RESULT_DBUS
LIBVIRT_RESULT_FUSE
LIBVIRT_RESULT_GLUSTER
LIBVIRT_RESULT_HAL
+LIBVIRT_RESULT_LIBSYSTEMD
LIBVIRT_RESULT_NETCF
LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_OPENWSMAN
@@ -2787,7 +2788,6 @@ LIBVIRT_RESULT_SANLOCK
LIBVIRT_RESULT_SASL
LIBVIRT_RESULT_SELINUX
LIBVIRT_RESULT_SSH2
-LIBVIRT_RESULT_SYSTEMD_DAEMON
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_WIRESHARK
LIBVIRT_RESULT_NSS
diff --git a/libvirt.spec.in b/libvirt.spec.in
index c7fcf85..9cae0b2 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -79,7 +79,7 @@
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_libssh2 0%{!?_without_libssh2:0}
%define with_wireshark 0%{!?_without_wireshark:0}
-%define with_systemd_daemon 0%{!?_without_systemd_daemon:0}
+%define with_libsystemd 0%{!?_without_libsystemd:0}
%define with_pm_utils 1
# Finally set the OS / architecture specific special cases
@@ -133,7 +133,7 @@
# Fedora has systemd, libvirt still used sysvinit there.
%if 0%{?fedora} || 0%{?rhel} >= 7
%define with_systemd 1
- %define with_systemd_daemon 1
+ %define with_libsystemd 1
%define with_pm_utils 0
%endif
@@ -274,7 +274,7 @@ BuildRequires: python
%if %{with_systemd}
BuildRequires: systemd-units
%endif
-%if %{with_systemd_daemon}
+%if %{with_libsystemd}
BuildRequires: systemd-devel
%endif
%if %{with_xen} || %{with_libxl}
@@ -1067,10 +1067,10 @@ rm -rf .git
%define arg_wireshark --without-wireshark-dissector
%endif
-%if %{with_systemd_daemon}
- %define arg_systemd_daemon --with-systemd-daemon
+%if %{with_libsystemd}
+ %define arg_libsystemd --with-libsystemd
%else
- %define arg_systemd_daemon --without-systemd-daemon
+ %define arg_libsystemd --without-libsystemd
%endif
%if %{with_pm_utils}
@@ -1151,7 +1151,7 @@ rm -f po/stamp-po
--with-driver-modules \
%{?arg_firewalld} \
%{?arg_wireshark} \
- %{?arg_systemd_daemon} \
+ %{?arg_libsystemd} \
%{?arg_pm_utils} \
--with-nss-plugin \
%{arg_packager} \
diff --git a/m4/virt-systemd-daemon.m4 b/m4/virt-libsystemd.m4
similarity index 73%
rename from m4/virt-systemd-daemon.m4
rename to m4/virt-libsystemd.m4
index 8516e41..5773af3 100644
--- a/m4/virt-systemd-daemon.m4
+++ b/m4/virt-libsystemd.m4
@@ -1,4 +1,4 @@
-dnl The libsystemd-daemon.so library
+dnl The libsystemd.so library
dnl
dnl Copyright (C) 2012-2013 Red Hat, Inc.
dnl
@@ -17,18 +17,18 @@ dnl License along with this library. If not, see
dnl <
http://www.gnu.org/licenses/>.
dnl
-AC_DEFUN([LIBVIRT_CHECK_SYSTEMD_DAEMON],[
- LIBVIRT_CHECK_PKG([SYSTEMD_DAEMON], [libsystemd-daemon], [0.27.1])
+AC_DEFUN([LIBVIRT_CHECK_LIBSYSTEMD],[
+ LIBVIRT_CHECK_PKG([LIBSYSTEMD], [libsystemd], [0.27.1])
old_CFLAGS="$CFLAGS"
old_LIBS="$LIBS"
- CFLAGS="$CFLAGS $SYSTEMD_DAEMON_CFLAGS"
- LIBS="$LIBS $SYSTEMD_DAEMON_LIBS"
+ CFLAGS="$CFLAGS $LIBSYSTEMD_CFLAGS"
+ LIBS="$LIBS $LIBSYSTEMD_LIBS"
AC_CHECK_FUNCS([sd_notify])
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
])
-AC_DEFUN([LIBVIRT_RESULT_SYSTEMD_DAEMON],[
- LIBVIRT_RESULT_LIB([SYSTEMD_DAEMON])
+AC_DEFUN([LIBVIRT_RESULT_LIBSYSTEMD],[
+ LIBVIRT_RESULT_LIB([LIBSYSTEMD])
])
diff --git a/src/Makefile.am b/src/Makefile.am
index 12b66c2..f401ed6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1106,12 +1106,12 @@ libvirt_util_la_SOURCES = \
libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
- $(SYSTEMD_DAEMON_CFLAGS) $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS) $(POLKIT_CFLAGS) $(GNUTLS_CFLAGS) \
-I$(srcdir)/conf
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
- $(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(SYSTEMD_DAEMON_LIBS) \
+ $(SECDRIVER_LIBS) $(NUMACTL_LIBS) $(LIBSYSTEMD_LIBS) \
$(POLKIT_LIBS)
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 4883f94..b29418f 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -21,7 +21,7 @@
#include <config.h>
-#ifdef WITH_SYSTEMD_DAEMON
+#ifdef WITH_LIBSYSTEMD
# include <systemd/sd-daemon.h>
#endif
@@ -480,7 +480,7 @@ int virSystemdTerminateMachine(const char *name)
void
virSystemdNotifyStartup(void)
{
-#ifdef WITH_SYSTEMD_DAEMON
+#ifdef WITH_LIBSYSTEMD
sd_notify(0, "READY=1");
#endif
}
--
2.5.5