[PATCH V3 00/11] spec: Decompose the daemon subpackage

This is V3 of https://listman.redhat.com/archives/libvir-list/2022-December/236337.html The end goal is to remove the libvirt-dameon dependency on the various libvirt-daemon-driver-foo subpackages, allowing installation of a modular daemon configuration without the traditional monolithic libvirtd. Changes from V2: * Move more files and dependencies to the libvirt-daemon-common package * Address many more review comments Jim Fehlig (11): spec: Move virtlockd to a new subpackage libvirt-daemon-lock spec: Move virtlogd to a new subpackage libvirt-daemon-log spec: Move virtproxyd to a new subpackage libvirt-daemon-proxy spec: Move lockd plugin to a new subpackage spec: Rename the libvirt-lock-sanlock subpackage spec: Move common files and dependencies to libvirt-daemon-common spec: Add module-init-tools dependency to nodedev and lxc drivers spec: Add numad dependency to qemu and lxc drivers spec: Remove libvirt-daemon dependency from drivers spec: Remove libvirt-daemon dependency from hypervisor subpackages kbase: Update rpm-deployment.rst with new subpackages docs/kbase/rpm-deployment.rst | 50 ++++-- libvirt.spec.in | 329 ++++++++++++++++++++++++---------- 2 files changed, 267 insertions(+), 112 deletions(-) -- 2.38.1

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- libvirt.spec.in | 61 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 6b8acf252e..33398b2877 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -429,6 +429,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} # The libvirt-guests.sh script requires virsh from libvirt-client subpackage, # but not every deployment wants to use libvirt-guests service. Using # Recommends here will install libvirt-client by default (if available), but @@ -477,6 +478,14 @@ Server side daemon required to manage the virtualization capabilities of recent versions of Linux. Requires a hypervisor specific sub-RPM for specific drivers. +%package daemon-lock +Summary: Server side daemon for managing locks +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-lock +Server side daemon used to manage locks held against virtual machine +resources + %package daemon-config-network Summary: Default configuration files for the libvirtd daemon @@ -1392,7 +1401,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 virtproxyd virtlogd 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. @@ -1401,7 +1410,6 @@ 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 @@ -1415,17 +1423,16 @@ exit 0 %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 || : + /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 virtlockd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd libvirt-guests if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1459,6 +1466,24 @@ then fi %libvirt_daemon_finish_restart libvirtd +%pre daemon-lock +%libvirt_sysconfig_pre virtlockd + +%post daemon-lock +%libvirt_daemon_systemd_post_priv virtlockd + +%preun daemon-lock +%libvirt_daemon_systemd_preun_priv virtlockd + +%postun daemon-lock +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || : +fi + +%posttrans daemon-lock +%libvirt_sysconfig_posttrans virtlockd + %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd @@ -1740,14 +1765,10 @@ exit 0 %{_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 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1769,14 +1790,8 @@ exit 0 %{_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 -%endif %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules @@ -1786,7 +1801,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) %{_sbindir}/virtlockd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* @@ -1794,12 +1808,25 @@ exit 0 %{_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-lock +%{_unitdir}/virtlockd.service +%{_unitdir}/virtlockd.socket +%{_unitdir}/virtlockd-admin.socket +%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf +%{_datadir}/augeas/lenses/virtlockd.aug +%{_datadir}/augeas/lenses/tests/test_virtlockd.aug +%{_datadir}/augeas/lenses/libvirt_lockd.aug +%if %{with_qemu} +%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug +%endif +%attr(0755, root, root) %{_sbindir}/virtlockd +%{_mandir}/man8/virtlockd.8* + %files daemon-config-network %dir %{_datadir}/libvirt/networks/ %{_datadir}/libvirt/networks/default.xml -- 2.38.1

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 33398b2877..d303cac9df 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -430,6 +430,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 # Recommends here will install libvirt-client by default (if available), but @@ -486,6 +487,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 @@ -1401,7 +1409,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. @@ -1409,7 +1417,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 @@ -1422,17 +1429,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 %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 @@ -1484,6 +1487,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 @@ -1762,13 +1783,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 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1788,8 +1805,6 @@ exit 0 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_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 %{_datadir}/polkit-1/actions/org.libvirt.unix.policy @@ -1800,14 +1815,12 @@ 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) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* %{_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 %{_bindir}/virt-admin @@ -1827,6 +1840,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

Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> --- libvirt.spec.in | 56 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d303cac9df..ee12720b72 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -431,6 +431,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 # Recommends here will install libvirt-client by default (if available), but @@ -494,6 +495,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 @@ -1409,7 +1418,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. @@ -1417,9 +1426,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 %systemd_post libvirt-guests.service @@ -1428,14 +1435,13 @@ exit 0 %preun daemon %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 @@ -1505,6 +1511,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 @@ -1776,16 +1796,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 %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd @@ -1805,8 +1818,6 @@ exit 0 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_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 %{_datadir}/polkit-1/rules.d/50-libvirt.rules @@ -1814,14 +1825,12 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper %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* %{_mandir}/man1/virt-host-validate.1* %{_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 %{_datadir}/bash-completion/completions/virt-admin @@ -1850,6 +1859,19 @@ 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

Introduce the libvirt-daemon-plugin-lockd subpackage to provide the client-side lockd plugin for virtlockd. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index ee12720b72..cb4a6e8736 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -430,6 +430,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-plugin-lockd = %{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, @@ -488,6 +489,15 @@ Requires: libvirt-libs = %{version}-%{release} Server side daemon used to manage locks held against virtual machine resources +%package daemon-plugin-lockd +Summary: lockd client plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} + +%description daemon-plugin-lockd +A client-side plugin that implements disk locking using POSIX fcntl advisory +locks via communication with the virtlockd daemon + %package daemon-log Summary: Server side daemon for managing logs Requires: libvirt-libs = %{version}-%{release} @@ -1815,7 +1825,6 @@ exit 0 %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-backend/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-file/ -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_datadir}/augeas/lenses/libvirtd.aug %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy @@ -1849,6 +1858,10 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtlockd %{_mandir}/man8/virtlockd.8* +%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/ +%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so + %files daemon-log %{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.socket -- 2.38.1

The new name "libvirt-daemon-plugin-sanlock" provides consistency with the newly introduced "libvirt-daemon-plugin-lockd" subpackage. It's also a good opportunity to taking ownership of %{_libdir}/libvirt/lock-driver/, removing the need for a dependency on the libvirt-daemon package. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 12 ++++++------ libvirt.spec.in | 11 +++++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index 31805c2280..7685ee1291 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -289,6 +289,12 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead. +* libvirt-daemon-plugin-sanlock + + This package provides the sanlock.so module, a daemon plugin that implements + disk locking via communication with the sanlock daemon. It is optional and + only relevant to hosts with the QEMU driver and oVirt management application. + * libvirt-daemon-qemu This is an empty package that exists only as a convenient way to request @@ -352,12 +358,6 @@ RPM packages take to the libvirt daemons to utilize stateful drivers (QEMU, Xen, BHyve, LXC, VZ, etc). This is needed on all libvirt hosts, both client and server. -* libvirt-lock-sanlock - - A plugin for locking disks that communicates with the sanlock daemon. It is - optional and only relevant to hosts with the QEMU driver and oVirt management - application. - * libvirt-login-shell A simple login shell that automatically spawns an LXC container for the user diff --git a/libvirt.spec.in b/libvirt.spec.in index cb4a6e8736..cc445df83b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -956,15 +956,18 @@ Requires: pkgconfig Include header files & development libraries for the libvirt C library. %if %{with_sanlock} -%package lock-sanlock +%package daemon-plugin-sanlock Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Obsoletes: libvirt-lock-sanlock < 9.0.0 +Provides: libvirt-lock-sanlock = %{version}-%{release} -%description lock-sanlock +%description daemon-plugin-sanlock Includes the Sanlock lock manager plugin for the QEMU driver %endif @@ -1822,7 +1825,6 @@ exit 0 %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ -%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-backend/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-file/ %{_datadir}/augeas/lenses/libvirtd.aug @@ -2162,13 +2164,14 @@ exit 0 %endif %if %{with_sanlock} -%files lock-sanlock +%files daemon-plugin-sanlock %if %{with_qemu} %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf %endif %if %{with_libxl} %config(noreplace) %{_sysconfdir}/libvirt/libxl-sanlock.conf %endif +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/ %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so %{_datadir}/augeas/lenses/libvirt_sanlock.aug %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -- 2.38.1

On Tue, Dec 20, 2022 at 02:26:21PM -0700, Jim Fehlig wrote:
The new name "libvirt-daemon-plugin-sanlock" provides consistency with the newly introduced "libvirt-daemon-plugin-lockd" subpackage.
It's also a good opportunity to taking ownership of %{_libdir}/libvirt/lock-driver/, removing the need for a dependency on the libvirt-daemon package.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 12 ++++++------ libvirt.spec.in | 11 +++++++---- 2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index 31805c2280..7685ee1291 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -289,6 +289,12 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead.
+* libvirt-daemon-plugin-sanlock + + This package provides the sanlock.so module, a daemon plugin that implements + disk locking via communication with the sanlock daemon. It is optional and + only relevant to hosts with the QEMU driver and oVirt management application. + * libvirt-daemon-qemu
This is an empty package that exists only as a convenient way to request @@ -352,12 +358,6 @@ RPM packages take to the libvirt daemons to utilize stateful drivers (QEMU, Xen, BHyve, LXC, VZ, etc). This is needed on all libvirt hosts, both client and server.
-* libvirt-lock-sanlock - - A plugin for locking disks that communicates with the sanlock daemon. It is - optional and only relevant to hosts with the QEMU driver and oVirt management - application. - * libvirt-login-shell
A simple login shell that automatically spawns an LXC container for the user diff --git a/libvirt.spec.in b/libvirt.spec.in index cb4a6e8736..cc445df83b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -956,15 +956,18 @@ Requires: pkgconfig Include header files & development libraries for the libvirt C library.
%if %{with_sanlock} -%package lock-sanlock +%package daemon-plugin-sanlock Summary: Sanlock lock manager plugin for QEMU driver Requires: sanlock >= 2.4 #for virt-sanlock-cleanup require augeas Requires: augeas Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release}
Sanlock shold not depend on virtlockd
+Obsoletes: libvirt-lock-sanlock < 9.0.0 +Provides: libvirt-lock-sanlock = %{version}-%{release}
With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Introduce a new subpackage libvirt-daemon-common and move virt-admin, virt-host-validate, virt-ssh-helper, libvirt-guests and miscellaneous files/directories to it. Also move common dependencies to the new subpackage. These files, utilities, and dependecies are used by other core libvirt daemons Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 93 +++++++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 37 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index cc445df83b..9e70518566 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -429,15 +429,11 @@ 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-common = %{version}-%{release} Requires: libvirt-daemon-lock = %{version}-%{release} Requires: libvirt-daemon-plugin-lockd = %{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 -# Recommends here will install libvirt-client by default (if available), but -# RPM won't complain if the package is unavailable, masked, or removed later. -Recommends: libvirt-client = %{version}-%{release} # netcat is needed on the server side so that clients that have # libvirt < 6.9.0 can connect, but newer versions will prefer # virt-ssh-helper. Making this a Recommends means that it gets @@ -446,40 +442,52 @@ Recommends: libvirt-client = %{version}-%{release} Recommends: /usr/bin/nc # for modprobe of pci devices Requires: module-init-tools +%if %{with_numad} +Requires: numad +%endif + +%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. + +%package daemon-common +Summary: Files and utilities used by daemons +Requires: libvirt-libs = %{version}-%{release} +# The libvirt-guests.sh script requires virsh from libvirt-client subpackage, +# but not every deployment wants to use libvirt-guests service. Using +# Recommends here will install libvirt-client by default (if available), but +# RPM won't complain if the package is unavailable, masked, or removed later. +Recommends: libvirt-client = %{version}-%{release} # for /sbin/ip Requires: iproute # for /sbin/tc Requires: iproute-tc -Requires: polkit >= 0.112 %if %{with_dmidecode} # For virConnectGetSysinfo Requires: dmidecode %endif # For service management Requires(post): /usr/bin/systemctl -%if %{with_numad} -Requires: numad -%endif -# libvirtd depends on 'messagebus' service -Requires: dbus -# For uid creation during pre -Requires(pre): shadow-utils +Requires: polkit >= 0.112 # Needed by /usr/libexec/libvirt-guests.sh script. %if 0%{?fedora} >= 37 Requires: gettext-runtime %else Requires: gettext %endif +# libvirtd depends on 'messagebus' service +Requires: dbus +# For uid creation during pre +Requires(pre): shadow-utils # Ensure smooth upgrades Obsoletes: libvirt-admin < 7.3.0 Provides: libvirt-admin = %{version}-%{release} Obsoletes: libvirt-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. +%description daemon-common +Miscellaneous files and utilities used by other libvirt daemons %package daemon-lock Summary: Server side daemon for managing locks @@ -1431,30 +1439,19 @@ fi \ %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-admin.socket %1.socket %pre daemon -%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. -getent group libvirt >/dev/null || groupadd -r libvirt -exit 0 +%libvirt_sysconfig_pre libvirtd %post daemon %if ! %{with_modular_daemons} %libvirt_daemon_systemd_post_inet libvirtd %endif -%systemd_post libvirt-guests.service %libvirt_daemon_schedule_restart libvirtd %preun daemon -%systemd_preun libvirt-guests.service %libvirt_daemon_systemd_preun_inet libvirtd -%postun daemon -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -%systemd_postun libvirt-guests.service - %posttrans daemon -%libvirt_sysconfig_posttrans libvirtd libvirt-guests +%libvirt_sysconfig_posttrans libvirtd if test %libvirt_daemon_needs_restart libvirtd then # See if user has previously modified their install to @@ -1488,6 +1485,26 @@ then fi %libvirt_daemon_finish_restart libvirtd +%pre daemon-common +%libvirt_sysconfig_pre libvirt-guests +# 'libvirt' group is just to allow password-less polkit access to libvirt +# daemons. The uid number is irrelevant, so we use dynamic allocation. +getent group libvirt >/dev/null || groupadd -r libvirt +exit 0 + +%post daemon-common +%systemd_post libvirt-guests.service + +%preun daemon-common +%systemd_preun libvirt-guests.service + +%postun daemon-common +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%systemd_postun libvirt-guests.service + +%posttrans daemon-common +%libvirt_sysconfig_posttrans libvirt-guests + %pre daemon-lock %libvirt_sysconfig_pre virtlockd @@ -1809,12 +1826,18 @@ exit 0 %{_unitdir}/libvirtd-admin.socket %{_unitdir}/libvirtd-tcp.socket %{_unitdir}/libvirtd-tls.socket -%{_unitdir}/virt-guest-shutdown.target -%{_unitdir}/libvirt-guests.service %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf -%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%{_datadir}/augeas/lenses/libvirtd.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd.aug +%attr(0755, root, root) %{_sbindir}/libvirtd +%{_mandir}/man8/libvirtd.8* + +%files daemon-common +%{_unitdir}/virt-guest-shutdown.target +%{_unitdir}/libvirt-guests.service +%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %dir %{_datadir}/libvirt/ %ghost %dir %{_rundir}/libvirt/ %ghost %dir %{_rundir}/libvirt/common/ @@ -1827,21 +1850,17 @@ exit 0 %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-backend/ %dir %attr(0755, root, root) %{_libdir}/libvirt/storage-file/ -%{_datadir}/augeas/lenses/libvirtd.aug -%{_datadir}/augeas/lenses/tests/test_libvirtd.aug %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ %attr(0755, root, root) %{_libexecdir}/libvirt_iohelper %attr(0755, root, root) %{_bindir}/virt-ssh-helper -%attr(0755, root, root) %{_sbindir}/libvirtd %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* %{_mandir}/man1/virt-host-validate.1* %{_mandir}/man8/virt-ssh-helper.8* %{_mandir}/man8/libvirt-guests.8* -%{_mandir}/man8/libvirtd.8* %{_bindir}/virt-host-validate %{_bindir}/virt-admin %{_datadir}/bash-completion/completions/virt-admin -- 2.38.1

Both the nodedev and lxc drivers can load kernel modules. Add a module-init-tools dependency to the drivers. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 9e70518566..4a57a948cc 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -571,6 +571,8 @@ Requires: libvirt-libs = %{version}-%{release} Requires: systemd >= 185 # For managing persistent mediated devices Requires: mdevctl +# for modprobe of pci devices +Requires: module-init-tools %description daemon-driver-nodedev The nodedev driver plugin for the libvirtd daemon, providing @@ -776,6 +778,8 @@ Requires: libvirt-libs = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: systemd-container +# for modprobe of nbd driver +Requires: module-init-tools %description daemon-driver-lxc The LXC driver plugin for the libvirtd daemon, providing -- 2.38.1

On Tue, Dec 20, 2022 at 02:26:23PM -0700, Jim Fehlig wrote:
Both the nodedev and lxc drivers can load kernel modules. Add a module-init-tools dependency to the drivers.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 4 ++++ 1 file changed, 4 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Both drivers use numad via virNumaGetAutoPlacementAdvice. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 4a57a948cc..503549dc04 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -763,6 +763,9 @@ Requires: lzop Requires: xz Requires: systemd-container Requires: swtpm-tools + %if %{with_numad} +Requires: numad + %endif %description daemon-driver-qemu The qemu driver plugin for the libvirtd daemon, providing @@ -780,6 +783,9 @@ Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: systemd-container # for modprobe of nbd driver Requires: module-init-tools + %if %{with_numad} +Requires: numad + %endif %description daemon-driver-lxc The LXC driver plugin for the libvirtd daemon, providing -- 2.38.1

On Tue, Dec 20, 2022 at 02:26:24PM -0700, Jim Fehlig wrote:
Both drivers use numad via virNumaGetAutoPlacementAdvice.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 6 ++++++ 1 file changed, 6 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

To avoid needlessly installing the monolithic daemon, replace the libvirt-daemon dependency with libvirt-daemon-common. The common subpackage contains all the utilities (e.g. virt-admin) and files used by other daemons. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> --- libvirt.spec.in | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 503549dc04..d6b6bc2ebf 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -524,7 +524,6 @@ the monolithic libvirtd %package daemon-config-network Summary: Default configuration files for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} %description daemon-config-network @@ -533,7 +532,6 @@ Default configuration files for setting up NAT based networking %package daemon-config-nwfilter Summary: Network filter configuration files for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} %description daemon-config-nwfilter @@ -541,7 +539,7 @@ Network filter configuration files for cleaning guest traffic %package daemon-driver-network Summary: Network driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables @@ -553,7 +551,7 @@ bridge capabilities. %package daemon-driver-nwfilter Summary: Nwfilter driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: iptables Requires: ebtables @@ -565,7 +563,7 @@ iptables and ip6tables capabilities %package daemon-driver-nodedev Summary: Nodedev driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 @@ -581,7 +579,7 @@ capabilities. %package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %if %{with_netcf} Requires: netcf-libs >= 0.2.2 @@ -593,7 +591,7 @@ an implementation of the host network interface APIs. %package daemon-driver-secret Summary: Secret driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %description daemon-driver-secret @@ -602,7 +600,7 @@ an implementation of the secret key APIs. %package daemon-driver-storage-core Summary: Storage driver plugin including base backends for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: nfs-utils # For mkfs @@ -753,7 +751,7 @@ parted and more. %if %{with_qemu} %package daemon-driver-qemu Summary: QEMU driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: /usr/bin/qemu-img # For image compression @@ -776,7 +774,7 @@ QEMU %if %{with_lxc} %package daemon-driver-lxc Summary: LXC driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -796,7 +794,7 @@ the Linux kernel %if %{with_vbox} %package daemon-driver-vbox Summary: VirtualBox driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %description daemon-driver-vbox @@ -808,7 +806,7 @@ VirtualBox %if %{with_libxl} %package daemon-driver-libxl Summary: Libxl driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Obsoletes: libvirt-daemon-driver-xen < 4.3.0 -- 2.38.1

Remove the libvirt-daemon dependency from the various libvirt-daemon-<hypervisor> subpackages, replacing it with a set of the new sub subpackages providing the same functionality. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d6b6bc2ebf..edb736d21a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -820,7 +820,14 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests + %if %{with_modular_daemons} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} + %else Requires: libvirt-daemon = %{version}-%{release} + %endif Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -839,7 +846,14 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests + %if %{with_modular_daemons} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} + %else Requires: libvirt-daemon = %{version}-%{release} + %endif Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -858,7 +872,7 @@ capabilities of the KVM hypervisor %package daemon-lxc Summary: Server side daemon & driver required to run LXC guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -876,7 +890,9 @@ capabilities of LXC %package daemon-xen Summary: Server side daemon & driver required to run XEN guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -895,7 +911,7 @@ capabilities of XEN %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} -- 2.38.1

On Tue, Dec 20, 2022 at 02:26:26PM -0700, Jim Fehlig wrote:
Remove the libvirt-daemon dependency from the various libvirt-daemon-<hypervisor> subpackages, replacing it with a set of the new sub subpackages providing the same functionality.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index d6b6bc2ebf..edb736d21a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -820,7 +820,14 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
+ %if %{with_modular_daemons} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} + %else Requires: libvirt-daemon = %{version}-%{release} + %endif Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -839,7 +846,14 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests
+ %if %{with_modular_daemons} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} + %else Requires: libvirt-daemon = %{version}-%{release} + %endif
For these two you've made the deps conditional on with_modular_daemons which makes sense.
Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -858,7 +872,7 @@ capabilities of the KVM hypervisor %package daemon-lxc Summary: Server side daemon & driver required to run LXC guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -876,7 +890,9 @@ capabilities of LXC %package daemon-xen Summary: Server side daemon & driver required to run XEN guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -895,7 +911,7 @@ capabilities of XEN %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release}
THese three have been unconditionally changed and ignore with_modular_daemons which looks wrong by comparison. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index 7685ee1291..7f38052ceb 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -109,14 +109,20 @@ RPM packages stateful drivers. This package does not contain any drivers, so further packages need to be installed to provide the desired drivers. - In addition to the libvirtd daemon this package also contains the virtlogd, - virtlockd and virtproxyd daemons, plus a number of helpers, configuration - files and other bits necessary to create and admin a virtualization host. + This package depends on libvirt-daemon-common, libvirt-daemon-lock, + libvirt-daemon-plugin-lockd, libvirt-daemon-log, and libvirt-daemon-proxy. - The virt-admin tool, also included in this package, is used for - administrative operations on any libvirt daemons. Most usefully it allows - for logging filters and outputs to be reconfigured on a running daemon - without a restart. + New installations should not use this package, instead opting for one of + the modular daemon deployment options. + +* libvirt-daemon-common + This package contains libvirt-guests, virt-host-validate, virt-ssh-helper + and other utilities and configuration files necessary to create and + administer a virtualization host. + + The virt-admin tool, used for administrative operations on any of the libvirt + daemons, is also included in this package. It is most useful for reconfiguring + logging filters and outputs on a running daemon without the need for a restart. * libvirt-daemon-config-network @@ -276,6 +282,14 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead. +* libvirt-daemon-lock + This package provides virtlockd, a server side daemon used to manage locks + held against virtual machine resources. + +* libvirt-daemon-log + This package provides virtlogd, a server side daemon used to manage logs + from virtual machine consoles. + * libvirt-daemon-lxc This is an empty package that exists only as a convenient way to request @@ -289,12 +303,22 @@ RPM packages features, the subset of libvirt-daemon-driver-XXX packages should be used instead. +* libvirt-daemon-plugin-lockd + This package provides the lockd.so module, a daemon plugin that implements + disk locking using POSIX fcntl advisory locks via communication with the + virtlockd daemon. + * libvirt-daemon-plugin-sanlock This package provides the sanlock.so module, a daemon plugin that implements disk locking via communication with the sanlock daemon. It is optional and only relevant to hosts with the QEMU driver and oVirt management application. +* libvirt-daemon-proxy + This package provides virtproxyd, a server side daemon providing backwards + compatibility for clients expecting to communicate with the traditional, + monolithic libvirtd. + * libvirt-daemon-qemu This is an empty package that exists only as a convenient way to request -- 2.38.1

On Tue, Dec 20, 2022 at 02:26:27PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/kbase/rpm-deployment.rst | 38 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index 7685ee1291..7f38052ceb 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst
+* libvirt-daemon-proxy + This package provides virtproxyd, a server side daemon providing backwards + compatibility for clients expecting to communicate with the traditional, + monolithic libvirtd.
This package provides virtproxyd, a server side daemon providing remote network access to libvirt daemons, as well as backwards compatibility for older libvirt clients expecting to communicate with the traditional, monolithic libvirtd. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Daniel P. Berrangé
-
Jim Fehlig