Move virtlockd, virtlogd, and virtproxyd to the new subpackage
libvirt-daemon-core.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
libvirt.spec.in | 133 +++++++++++++++++++++++++++++-------------------
1 file changed, 82 insertions(+), 51 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 6b1e351343..86b4922531 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -438,6 +438,8 @@ Summary: Server side daemon and supporting files for libvirt library
# All runtime requirements for the libvirt package (runtime requrements
# for subpackages are listed later in those subpackages)
+# Common daemons and utilities are in the core subpackage
+Requires: %{name}-daemon-core = %{version}-%{release}
# The client side, i.e. shared libs are in a subpackage
Requires: %{name}-libs = %{version}-%{release}
@@ -490,8 +492,15 @@ Obsoletes: %{name}-bash-completion < 7.3.0
%description daemon
Server side daemon required to manage the virtualization capabilities
-of recent versions of Linux. Requires a hypervisor specific sub-RPM
-for specific drivers.
+of recent versions of Linux. Requires the daemon-core sub-RPM and a
+hypervisor specific sub-RPM to provide the necessary drivers.
+
+%package daemon-core
+Summary: Core daemons and utilities
+Requires: %{name}-libs = %{version}-%{release}
+
+%description daemon-core
+Core daemons, utilities, and files used by the primary daemons
%package daemon-config-network
Summary: Default configuration files for the libvirtd daemon
@@ -736,7 +745,7 @@ parted and more.
%if %{with_qemu}
%package daemon-driver-qemu
Summary: QEMU driver plugin for the libvirtd daemon
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: /usr/bin/qemu-img
# For image compression
@@ -757,7 +766,7 @@ QEMU
%if %{with_lxc}
%package daemon-driver-lxc
Summary: LXC driver plugin for the libvirtd daemon
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
# There really is a hard cross-driver dependency here
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -773,7 +782,7 @@ the Linux kernel
%if %{with_vbox}
%package daemon-driver-vbox
Summary: VirtualBox driver plugin for the libvirtd daemon
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
%description daemon-driver-vbox
@@ -786,7 +795,7 @@ VirtualBox
%if %{with_libxl}
%package daemon-driver-libxl
Summary: Libxl driver plugin for the libvirtd daemon
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-daemon-driver-xen < 4.3.0
@@ -802,7 +811,7 @@ Libxl
%package daemon-qemu
Summary: Server side daemon & driver required to run QEMU guests
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-daemon-driver-qemu = %{version}-%{release}
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -822,7 +831,7 @@ capabilities of the QEMU TCG emulators
%package daemon-kvm
Summary: Server side daemon & driver required to run KVM guests
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-daemon-driver-qemu = %{version}-%{release}
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -842,7 +851,7 @@ capabilities of the KVM hypervisor
%package daemon-lxc
Summary: Server side daemon & driver required to run LXC guests
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-daemon-driver-lxc = %{version}-%{release}
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -861,7 +870,7 @@ capabilities of LXC
%package daemon-xen
Summary: Server side daemon & driver required to run XEN guests
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-daemon-driver-libxl = %{version}-%{release}
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -880,7 +889,7 @@ capabilities of XEN
%package daemon-vbox
Summary: Server side daemon & driver required to run VirtualBox guests
-Requires: %{name}-daemon = %{version}-%{release}
+Requires: %{name}-daemon-core = %{version}-%{release}
Requires: %{name}-daemon-driver-vbox = %{version}-%{release}
Requires: %{name}-daemon-driver-interface = %{version}-%{release}
Requires: %{name}-daemon-driver-network = %{version}-%{release}
@@ -1430,7 +1439,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 virtlockd libvirt-guests
+%libvirt_sysconfig_pre libvirtd 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.
@@ -1439,11 +1448,7 @@ getent group libvirt >/dev/null || groupadd -r libvirt
exit 0
%post daemon
-%libvirt_daemon_systemd_post_priv virtlogd
-%libvirt_daemon_systemd_post_priv virtlockd
-%if %{with_modular_daemons}
-%libvirt_daemon_systemd_post_inet virtproxyd
-%else
+%if ! %{with_modular_daemons}
%libvirt_daemon_systemd_post_inet libvirtd
%endif
@@ -1455,19 +1460,13 @@ exit 0
%systemd_preun libvirt-guests.service
%libvirt_daemon_systemd_preun_inet libvirtd
-%libvirt_daemon_systemd_preun_inet virtproxyd
-%libvirt_daemon_systemd_preun_priv virtlogd
-%libvirt_daemon_systemd_preun_priv virtlockd
%postun daemon
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- /bin/systemctl reload-or-try-restart virtlockd.service virtlogd.service >/dev/null
2>&1 || :
-fi
%systemd_postun libvirt-guests.service
%posttrans daemon
-%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests
+%libvirt_sysconfig_posttrans libvirtd libvirt-guests
if test %libvirt_daemon_needs_restart libvirtd
then
# See if user has previously modified their install to
@@ -1502,6 +1501,30 @@ fi
%libvirt_daemon_finish_restart libvirtd
+%pre daemon-core
+%libvirt_sysconfig_pre virtproxyd virtlogd virtlockd
+
+%post daemon-core
+%libvirt_daemon_systemd_post_priv virtlogd
+%libvirt_daemon_systemd_post_priv virtlockd
+%if %{with_modular_daemons}
+%libvirt_daemon_systemd_post_inet virtproxyd
+%endif
+
+%preun daemon-core
+%libvirt_daemon_systemd_preun_inet virtproxyd
+%libvirt_daemon_systemd_preun_priv virtlogd
+%libvirt_daemon_systemd_preun_priv virtlockd
+
+%postun daemon-core
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ /bin/systemctl reload-or-try-restart virtlockd.service virtlogd.service >/dev/null
2>&1 || :
+fi
+
+%posttrans daemon-core
+%libvirt_sysconfig_posttrans virtproxyd virtlogd virtlockd
+
%pre daemon-driver-network
%libvirt_sysconfig_pre virtnetworkd
@@ -1780,24 +1803,9 @@ exit 0
%{_unitdir}/libvirtd-admin.socket
%{_unitdir}/libvirtd-tcp.socket
%{_unitdir}/libvirtd-tls.socket
-%{_unitdir}/virtproxyd.service
-%{_unitdir}/virtproxyd.socket
-%{_unitdir}/virtproxyd-ro.socket
-%{_unitdir}/virtproxyd-admin.socket
-%{_unitdir}/virtproxyd-tcp.socket
-%{_unitdir}/virtproxyd-tls.socket
%{_unitdir}/virt-guest-shutdown.target
-%{_unitdir}/virtlogd.service
-%{_unitdir}/virtlogd.socket
-%{_unitdir}/virtlogd-admin.socket
-%{_unitdir}/virtlockd.service
-%{_unitdir}/virtlockd.socket
-%{_unitdir}/virtlockd-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}/libvirt/virtlockd.conf
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
@@ -1821,12 +1829,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/virtlockd.aug
-%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
-%{_datadir}/augeas/lenses/virtproxyd.aug
-%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
%{_datadir}/augeas/lenses/libvirt_lockd.aug
%if %{with_qemu}
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
@@ -1843,9 +1845,6 @@ exit 0
%attr(0755, root, root) %{_bindir}/virt-ssh-helper
%attr(0755, root, root) %{_sbindir}/libvirtd
-%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*
@@ -1853,14 +1852,46 @@ exit 0
%{_mandir}/man8/virt-ssh-helper.8*
%{_mandir}/man8/libvirt-guests.8*
%{_mandir}/man8/libvirtd.8*
-%{_mandir}/man8/virtlogd.8*
-%{_mandir}/man8/virtlockd.8*
-%{_mandir}/man8/virtproxyd.8*
%{_bindir}/virt-host-validate
%{_bindir}/virt-admin
%{_datadir}/bash-completion/completions/virt-admin
+%files daemon-core
+%{_unitdir}/virtproxyd.service
+%{_unitdir}/virtproxyd.socket
+%{_unitdir}/virtproxyd-ro.socket
+%{_unitdir}/virtproxyd-admin.socket
+%{_unitdir}/virtproxyd-tcp.socket
+%{_unitdir}/virtproxyd-tls.socket
+%{_unitdir}/virtlogd.service
+%{_unitdir}/virtlogd.socket
+%{_unitdir}/virtlogd-admin.socket
+%{_unitdir}/virtlockd.service
+%{_unitdir}/virtlockd.socket
+%{_unitdir}/virtlockd-admin.socket
+%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
+%config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf
+%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
+
+%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
+%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so
+
+%{_datadir}/augeas/lenses/virtlogd.aug
+%{_datadir}/augeas/lenses/tests/test_virtlogd.aug
+%{_datadir}/augeas/lenses/virtlockd.aug
+%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
+%{_datadir}/augeas/lenses/virtproxyd.aug
+%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
+
+%attr(0755, root, root) %{_sbindir}/virtproxyd
+%attr(0755, root, root) %{_sbindir}/virtlogd
+%attr(0755, root, root) %{_sbindir}/virtlockd
+
+%{_mandir}/man8/virtlogd.8*
+%{_mandir}/man8/virtlockd.8*
+%{_mandir}/man8/virtproxyd.8*
+
%files daemon-config-network
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
--
2.37.3