mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-13 06:34:42 -05:00
systemd: directly notify systemd instead of using sd_notify
The sd_notify method is used to tell systemd when libvirtd has finished starting up. All it does is send a datagram containing the string parameter to systemd on a UNIX socket named in the NOTIFY_SOCKET environment variable. Rather than pulling in the systemd libraries for this, just code the notification directly in libvirt as this is a stable ABI from systemd's POV which explicitly allows independant implementations: See "Reimplementable Independently" column in the "$NOTIFY_SOCKET Daemon Notifications" row: https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1314881 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -79,7 +79,6 @@
|
||||
%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_pm_utils 1
|
||||
|
||||
# Finally set the OS / architecture specific special cases
|
||||
@@ -133,7 +132,6 @@
|
||||
# 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_pm_utils 0
|
||||
%endif
|
||||
|
||||
@@ -268,9 +266,6 @@ BuildRequires: python
|
||||
%if %{with_systemd}
|
||||
BuildRequires: systemd-units
|
||||
%endif
|
||||
%if %{with_systemd_daemon}
|
||||
BuildRequires: systemd-devel
|
||||
%endif
|
||||
%if %{with_xen} || %{with_libxl}
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
@@ -1061,12 +1056,6 @@ rm -rf .git
|
||||
%define arg_wireshark --without-wireshark-dissector
|
||||
%endif
|
||||
|
||||
%if %{with_systemd_daemon}
|
||||
%define arg_systemd_daemon --with-systemd-daemon
|
||||
%else
|
||||
%define arg_systemd_daemon --without-systemd-daemon
|
||||
%endif
|
||||
|
||||
%if %{with_pm_utils}
|
||||
%define arg_pm_utils --with-pm-utils
|
||||
%else
|
||||
@@ -1157,7 +1146,6 @@ rm -f po/stamp-po
|
||||
--with-driver-modules \
|
||||
%{?arg_firewalld} \
|
||||
%{?arg_wireshark} \
|
||||
%{?arg_systemd_daemon} \
|
||||
%{?arg_pm_utils} \
|
||||
--with-nss-plugin \
|
||||
%{arg_packager} \
|
||||
|
||||
Reference in New Issue
Block a user