Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++--------------
1 file changed, 38 insertions(+), 15 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index a586599f6e..f4cd0710b8 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -441,6 +441,7 @@ Summary: Server side daemon and supporting files for libvirt library
# The client side, i.e. shared libs are in a subpackage
Requires: libvirt-libs = %{version}-%{release}
Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-log = %{version}-%{release}
# The libvirt-guests.sh script requires virsh from libvirt-client subpackage,
# but not every deployment wants to use libvirt-guests service. Using
@@ -502,6 +503,13 @@ Requires: libvirt-libs = %{version}-%{release}
Server side daemon used to manage locks held against virtual machine
resources
+%package daemon-log
+Summary: Server side daemon for managing logs
+Requires: libvirt-libs = %{version}-%{release}
+
+%description daemon-log
+Server side daemon used to manage logs from virtual machine consoles
+
%package daemon-config-network
Summary: Default configuration files for the libvirtd daemon
@@ -1439,7 +1447,7 @@ fi \
%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket
%1.socket
%pre daemon
-%libvirt_sysconfig_pre libvirtd virtproxyd virtlogd libvirt-guests
+%libvirt_sysconfig_pre libvirtd virtproxyd libvirt-guests
# 'libvirt' group is just to allow password-less polkit access to
# libvirtd. The uid number is irrelevant, so we use dynamic allocation
# described at the above link.
@@ -1448,7 +1456,6 @@ getent group libvirt >/dev/null || groupadd -r libvirt
exit 0
%post daemon
-%libvirt_daemon_systemd_post_priv virtlogd
%if %{with_modular_daemons}
%libvirt_daemon_systemd_post_inet virtproxyd
%else
@@ -1464,17 +1471,13 @@ exit 0
%libvirt_daemon_systemd_preun_inet libvirtd
%libvirt_daemon_systemd_preun_inet virtproxyd
-%libvirt_daemon_systemd_preun_priv virtlogd
%postun daemon
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
-fi
%systemd_postun libvirt-guests.service
%posttrans daemon
-%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd libvirt-guests
+%libvirt_sysconfig_posttrans libvirtd virtproxyd libvirt-guests
if test %libvirt_daemon_needs_restart libvirtd
then
# See if user has previously modified their install to
@@ -1527,6 +1530,24 @@ fi
%posttrans daemon-lock
%libvirt_sysconfig_posttrans virtlockd
+%pre daemon-log
+%libvirt_sysconfig_pre virtlogd
+
+%post daemon-log
+%libvirt_daemon_systemd_post_priv virtlogd
+
+%preun daemon-log
+%libvirt_daemon_systemd_preun_priv virtlogd
+
+%postun daemon-log
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
+fi
+
+%posttrans daemon-log
+%libvirt_sysconfig_posttrans virtlogd
+
%pre daemon-driver-network
%libvirt_sysconfig_pre virtnetworkd
@@ -1812,13 +1833,9 @@ exit 0
%{_unitdir}/virtproxyd-tcp.socket
%{_unitdir}/virtproxyd-tls.socket
%{_unitdir}/virt-guest-shutdown.target
-%{_unitdir}/virtlogd.service
-%{_unitdir}/virtlogd.socket
-%{_unitdir}/virtlogd-admin.socket
%{_unitdir}/libvirt-guests.service
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
-%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
@@ -1841,8 +1858,6 @@ exit 0
%{_datadir}/augeas/lenses/libvirtd.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
-%{_datadir}/augeas/lenses/virtlogd.aug
-%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
%{_datadir}/augeas/lenses/virtproxyd.aug
%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
@@ -1858,7 +1873,6 @@ exit 0
%attr(0755, root, root) %{_sbindir}/libvirtd
%attr(0755, root, root) %{_sbindir}/virtproxyd
-%attr(0755, root, root) %{_sbindir}/virtlogd
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
%{_mandir}/man1/virt-admin.1*
@@ -1866,7 +1880,6 @@ exit 0
%{_mandir}/man8/virt-ssh-helper.8*
%{_mandir}/man8/libvirt-guests.8*
%{_mandir}/man8/libvirtd.8*
-%{_mandir}/man8/virtlogd.8*
%{_mandir}/man8/virtproxyd.8*
%{_bindir}/virt-host-validate
@@ -1887,6 +1900,16 @@ exit 0
%attr(0755, root, root) %{_sbindir}/virtlockd
%{_mandir}/man8/virtlockd.8*
+%files daemon-log
+%{_unitdir}/virtlogd.service
+%{_unitdir}/virtlogd.socket
+%{_unitdir}/virtlogd-admin.socket
+%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
+%{_datadir}/augeas/lenses/virtlogd.aug
+%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
+%attr(0755, root, root) %{_sbindir}/virtlogd
+%{_mandir}/man8/virtlogd.8*
+
%files daemon-config-network
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
--
2.38.1