mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
spec: Move some files from -client to -daemon
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@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2244ac168d
commit
d800c50349
@ -467,6 +467,8 @@ Requires: numad
|
|||||||
Requires: dbus
|
Requires: dbus
|
||||||
# For uid creation during pre
|
# For uid creation during pre
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
|
# Needed by /usr/libexec/libvirt-guests.sh script.
|
||||||
|
Requires: gettext
|
||||||
|
|
||||||
# Ensure smooth upgrades
|
# Ensure smooth upgrades
|
||||||
Obsoletes: libvirt-admin < 7.3.0
|
Obsoletes: libvirt-admin < 7.3.0
|
||||||
@ -908,8 +910,6 @@ capabilities of VirtualBox
|
|||||||
%package client
|
%package client
|
||||||
Summary: Client side utilities of the libvirt library
|
Summary: Client side utilities of the libvirt library
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
# Needed by /usr/libexec/libvirt-guests.sh script.
|
|
||||||
Requires: gettext
|
|
||||||
# Needed by virt-pki-validate script.
|
# Needed by virt-pki-validate script.
|
||||||
Requires: gnutls-utils
|
Requires: gnutls-utils
|
||||||
Requires: %{name}-bash-completion = %{version}-%{release}
|
Requires: %{name}-bash-completion = %{version}-%{release}
|
||||||
@ -1330,6 +1330,7 @@ exit 0
|
|||||||
%systemd_post libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
|
%systemd_post libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
|
||||||
%systemd_post libvirtd-tcp.socket libvirtd-tls.socket
|
%systemd_post libvirtd-tcp.socket libvirtd-tls.socket
|
||||||
%systemd_post libvirtd.service
|
%systemd_post libvirtd.service
|
||||||
|
%systemd_post libvirt-guests.service
|
||||||
|
|
||||||
# request daemon restart in posttrans
|
# request daemon restart in posttrans
|
||||||
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
|
mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || :
|
||||||
@ -1341,6 +1342,7 @@ touch %{_localstatedir}/lib/rpm-state/libvirt/restart || :
|
|||||||
%systemd_preun libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
|
%systemd_preun libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket
|
||||||
%systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service
|
%systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service
|
||||||
%systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service
|
%systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service
|
||||||
|
%systemd_preun libvirt-guests.service
|
||||||
|
|
||||||
%postun daemon
|
%postun daemon
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
@ -1348,6 +1350,7 @@ if [ $1 -ge 1 ] ; then
|
|||||||
/bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
|
/bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
|
||||||
/bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
|
/bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
%systemd_postun libvirt-guests.service
|
||||||
|
|
||||||
# In upgrade scenario we must explicitly enable virtlockd/virtlogd
|
# In upgrade scenario we must explicitly enable virtlockd/virtlogd
|
||||||
# sockets, if libvirtd is already enabled and start them if
|
# sockets, if libvirtd is already enabled and start them if
|
||||||
@ -1492,16 +1495,6 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
%endif
|
%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}
|
%if %{with_lxc}
|
||||||
%pre login-shell
|
%pre login-shell
|
||||||
getent group virtlogin >/dev/null || groupadd -r virtlogin
|
getent group virtlogin >/dev/null || groupadd -r virtlogin
|
||||||
@ -1537,6 +1530,7 @@ exit 0
|
|||||||
%{_unitdir}/virtlockd.service
|
%{_unitdir}/virtlockd.service
|
||||||
%{_unitdir}/virtlockd.socket
|
%{_unitdir}/virtlockd.socket
|
||||||
%{_unitdir}/virtlockd-admin.socket
|
%{_unitdir}/virtlockd-admin.socket
|
||||||
|
%{_unitdir}/libvirt-guests.service
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd
|
%config(noreplace) %{_sysconfdir}/sysconfig/virtproxyd
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
|
%config(noreplace) %{_sysconfdir}/sysconfig/virtlogd
|
||||||
@ -1546,6 +1540,7 @@ exit 0
|
|||||||
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
|
||||||
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
|
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
|
||||||
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||||
@ -1591,14 +1586,17 @@ exit 0
|
|||||||
%attr(0755, root, root) %{_sbindir}/virtproxyd
|
%attr(0755, root, root) %{_sbindir}/virtproxyd
|
||||||
%attr(0755, root, root) %{_sbindir}/virtlogd
|
%attr(0755, root, root) %{_sbindir}/virtlogd
|
||||||
%attr(0755, root, root) %{_sbindir}/virtlockd
|
%attr(0755, root, root) %{_sbindir}/virtlockd
|
||||||
|
%attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh
|
||||||
|
|
||||||
%{_mandir}/man1/virt-admin.1*
|
%{_mandir}/man1/virt-admin.1*
|
||||||
|
%{_mandir}/man1/virt-host-validate.1*
|
||||||
%{_mandir}/man8/libvirtd.8*
|
%{_mandir}/man8/libvirtd.8*
|
||||||
%{_mandir}/man8/virtlogd.8*
|
%{_mandir}/man8/virtlogd.8*
|
||||||
%{_mandir}/man8/virtlockd.8*
|
%{_mandir}/man8/virtlockd.8*
|
||||||
%{_mandir}/man8/virtproxyd.8*
|
%{_mandir}/man8/virtproxyd.8*
|
||||||
%{_mandir}/man7/virkey*.7*
|
%{_mandir}/man7/virkey*.7*
|
||||||
|
|
||||||
|
%{_bindir}/virt-host-validate
|
||||||
%{_bindir}/virt-admin
|
%{_bindir}/virt-admin
|
||||||
%{_datadir}/bash-completion/completions/virt-admin
|
%{_datadir}/bash-completion/completions/virt-admin
|
||||||
|
|
||||||
@ -1881,11 +1879,9 @@ exit 0
|
|||||||
%{_mandir}/man1/virsh.1*
|
%{_mandir}/man1/virsh.1*
|
||||||
%{_mandir}/man1/virt-xml-validate.1*
|
%{_mandir}/man1/virt-xml-validate.1*
|
||||||
%{_mandir}/man1/virt-pki-validate.1*
|
%{_mandir}/man1/virt-pki-validate.1*
|
||||||
%{_mandir}/man1/virt-host-validate.1*
|
|
||||||
%{_bindir}/virsh
|
%{_bindir}/virsh
|
||||||
%{_bindir}/virt-xml-validate
|
%{_bindir}/virt-xml-validate
|
||||||
%{_bindir}/virt-pki-validate
|
%{_bindir}/virt-pki-validate
|
||||||
%{_bindir}/virt-host-validate
|
|
||||||
|
|
||||||
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
|
%{_datadir}/systemtap/tapset/libvirt_probes*.stp
|
||||||
%{_datadir}/systemtap/tapset/libvirt_functions.stp
|
%{_datadir}/systemtap/tapset/libvirt_functions.stp
|
||||||
@ -1895,11 +1891,6 @@ exit 0
|
|||||||
|
|
||||||
%{_datadir}/bash-completion/completions/virsh
|
%{_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
|
%files libs -f %{name}.lang
|
||||||
%license COPYING COPYING.LESSER
|
%license COPYING COPYING.LESSER
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user