Friday, 2 December
2022
Fri, 2 Dec
'22
6:17 p.m.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
libvirt.spec.in | 57 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index f4cd0710b8..f6d644a3ae 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -442,6 +442,7 @@ Summary: Server side daemon and supporting files for libvirt library
Requires: libvirt-libs = %{version}-%{release}
Requires: libvirt-daemon-lock = %{version}-%{release}
Requires: libvirt-daemon-log = %{version}-%{release}
+Requires: libvirt-daemon-proxy = %{version}-%{release}
# The libvirt-guests.sh script requires virsh from libvirt-client subpackage,
# but not every deployment wants to use libvirt-guests service. Using
@@ -510,6 +511,14 @@ Requires: libvirt-libs = %{version}-%{release}
%description daemon-log
Server side daemon used to manage logs from virtual machine consoles
+%package daemon-proxy
+Summary: Server side daemon providing libvirtd proxy
+Requires: libvirt-libs = %{version}-%{release}
+
+%description daemon-proxy
+Server side daemon providing functionality previously provided by
+the monolithic libvirtd
+
%package daemon-config-network
Summary: Default configuration files for the libvirtd daemon
@@ -1447,7 +1456,7 @@ fi \
%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket
%1.socket
%pre daemon
-%libvirt_sysconfig_pre libvirtd virtproxyd 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.
@@ -1456,9 +1465,7 @@ getent group libvirt >/dev/null || groupadd -r libvirt
exit 0
%post daemon
-%if %{with_modular_daemons}
-%libvirt_daemon_systemd_post_inet virtproxyd
-%else
+%if ! %{with_modular_daemons}
%libvirt_daemon_systemd_post_inet libvirtd
%endif
@@ -1470,14 +1477,13 @@ exit 0
%systemd_preun libvirt-guests.service
%libvirt_daemon_systemd_preun_inet libvirtd
-%libvirt_daemon_systemd_preun_inet virtproxyd
%postun daemon
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%systemd_postun libvirt-guests.service
%posttrans daemon
-%libvirt_sysconfig_posttrans libvirtd virtproxyd 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
@@ -1548,6 +1554,20 @@ fi
%posttrans daemon-log
%libvirt_sysconfig_posttrans virtlogd
+%pre daemon-proxy
+%libvirt_sysconfig_pre virtproxyd
+
+%post daemon-proxy
+%if %{with_modular_daemons}
+%libvirt_daemon_systemd_post_inet virtproxyd
+%endif
+
+%preun daemon-proxy
+%libvirt_daemon_systemd_preun_inet virtproxyd
+
+%posttrans daemon-proxy
+%libvirt_sysconfig_posttrans virtproxyd
+
%pre daemon-driver-network
%libvirt_sysconfig_pre virtnetworkd
@@ -1826,16 +1846,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}/libvirt-guests.service
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
-%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf
@@ -1858,8 +1871,6 @@ exit 0
%{_datadir}/augeas/lenses/libvirtd.aug
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
-%{_datadir}/augeas/lenses/virtproxyd.aug
-%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy
%{_datadir}/polkit-1/actions/org.libvirt.api.policy
@@ -1872,7 +1883,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) %{_libexecdir}/libvirt-guests.sh
%{_mandir}/man1/virt-admin.1*
@@ -1880,7 +1890,6 @@ exit 0
%{_mandir}/man8/virt-ssh-helper.8*
%{_mandir}/man8/libvirt-guests.8*
%{_mandir}/man8/libvirtd.8*
-%{_mandir}/man8/virtproxyd.8*
%{_bindir}/virt-host-validate
%{_bindir}/virt-admin
@@ -1910,6 +1919,20 @@ exit 0
%attr(0755, root, root) %{_sbindir}/virtlogd
%{_mandir}/man8/virtlogd.8*
+%files daemon-proxy
+%{_unitdir}/virtproxyd.service
+%{_unitdir}/virtproxyd.socket
+%{_unitdir}/virtproxyd-ro.socket
+%{_unitdir}/virtproxyd-admin.socket
+%{_unitdir}/virtproxyd-tcp.socket
+%{_unitdir}/virtproxyd-tls.socket
+%config(noreplace) %{_sysconfdir}/libvirt/virtproxyd.conf
+%{_datadir}/augeas/lenses/virtproxyd.aug
+%{_datadir}/augeas/lenses/tests/test_virtproxyd.aug
+%attr(0755, root, root) %{_sbindir}/virtproxyd
+%{_mandir}/man8/virtproxyd.8*
+
+
%files daemon-config-network
%dir %{_datadir}/libvirt/networks/
%{_datadir}/libvirt/networks/default.xml
--
2.38.1