The -client package's purpose is enabling remote machines to connect to a virtualization host, but the virt-host-validate and libvirt-guests tools are designed to be run directly on the virtualization host and as such are a better fit for the -daemon package. With this change, installing and removing the -client package no longer needs to touch the systemd configuration. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- libvirt.spec.in | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index db88b1bf3d..35e7219006 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -463,6 +463,8 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils +# Needed by /usr/libexec/libvirt-guests.sh script. +Requires: gettext # Ensure smooth upgrades Obsoletes: libvirt-admin < 7.3.0 @@ -904,8 +906,6 @@ capabilities of VirtualBox %package client Summary: Client side utilities of the libvirt library Requires: %{name}-libs = %{version}-%{release} -# Needed by /usr/libexec/libvirt-guests.sh script. -Requires: gettext # Needed by virt-pki-validate script. Requires: gnutls-utils Requires: %{name}-bash-completion = %{version}-%{release} @@ -1326,6 +1326,7 @@ exit 0 %systemd_post libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket %systemd_post libvirtd-tcp.socket libvirtd-tls.socket %systemd_post libvirtd.service +%systemd_post libvirt-guests.service # request daemon restart in posttrans mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : @@ -1337,6 +1338,7 @@ touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : %systemd_preun libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket %systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service %systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service +%systemd_preun libvirt-guests.service %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -1344,6 +1346,7 @@ if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || : fi +%systemd_postun libvirt-guests.service # In upgrade scenario we must explicitly enable virtlockd/virtlogd # sockets, if libvirtd is already enabled and start them if @@ -1488,16 +1491,6 @@ fi exit 0 %endif -%preun client - -%systemd_preun libvirt-guests.service - -%post client -%systemd_post libvirt-guests.service - -%postun client -%systemd_postun libvirt-guests.service - %if %{with_lxc} %pre login-shell getent group virtlogin >/dev/null || groupadd -r virtlogin @@ -1533,6 +1526,7 @@ exit 0 %{_unitdir}/virtlockd.service %{_unitdir}/virtlockd.socket %{_unitdir}/virtlockd-admin.socket +%{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd %config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd @@ -1542,6 +1536,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf +%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1587,14 +1582,17 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtproxyd %attr(0755, root, root) %{_sbindir}/virtlogd %attr(0755, root, root) %{_sbindir}/virtlockd +%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* +%{_mandir}/man1/virt-host-validate.1* %{_mandir}/man8/libvirtd.8* %{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtlockd.8* %{_mandir}/man8/virtproxyd.8* %{_mandir}/man7/virkey*.7* +%{_bindir}/virt-host-validate %{_bindir}/virt-admin %{_datadir}/bash-completion/completions/virt-admin @@ -1877,11 +1875,9 @@ exit 0 %{_mandir}/man1/virsh.1* %{_mandir}/man1/virt-xml-validate.1* %{_mandir}/man1/virt-pki-validate.1* -%{_mandir}/man1/virt-host-validate.1* %{_bindir}/virsh %{_bindir}/virt-xml-validate %{_bindir}/virt-pki-validate -%{_bindir}/virt-host-validate %{_datadir}/systemtap/tapset/libvirt_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp @@ -1891,11 +1887,6 @@ exit 0 %{_datadir}/bash-completion/completions/virsh - -%{_unitdir}/libvirt-guests.service -%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests -%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh - %files libs -f %{name}.lang %license COPYING COPYING.LESSER %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf -- 2.26.3