[PATCH 0/7] spec: Decompose the daemon subpackage

This is a V1 of my previous RFC to decompose the libvirt-daemon package https://listman.redhat.com/archives/libvir-list/2022-November/235924.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. Change from V1: - Patches1-3 handled separate from this series since they are unrelated - virtlockd, virtlogd, and virtproxyd are moved to their own subpackages - lockd plugin moved to its own subpackage - virt-admin, virt-host-validate, and others moved to new subpackage TODO: The libvirt-daemon package still contains the following files, which likely need to move somewhere since they are needed by the modular daemons too. %{_unitdir}/virt-guest-shutdown.target I thought of moving this to the libs package, but that would be a change for installations with only libvirt-client. AFAICT, it's used by libvirt-guests and the qemu and lxc drivers. %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf Another file related to remote access. Should it go to libvirt-libs? %ghost %dir %{_rundir}/libvirt/ %ghost %dir %{_rundir}/libvirt/common/ %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ These files and directories are needed by the modular daemons as well, right? Where should they go? libvirt-daemon-<hypervisor> or libvirt-daemon-driver-<hypervisor>? %{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules More files related to access. libvirt-libs? Jim Fehlig (7): 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 libvirt-daemon-plugin-lockd spec: Move common files to a new subpackage libvirt-daemon-client spec: Remove libvirt-daemon dependecy from drivers spec: Remove libvirt-daemon dependency from hypervisor subpackages libvirt.spec.in | 274 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 183 insertions(+), 91 deletions(-) -- 2.38.1

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 62 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d07a43c721..a586599f6e 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -440,6 +440,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 @@ -493,6 +494,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 @@ -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 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. @@ -1440,7 +1449,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 @@ -1457,17 +1465,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 @@ -1502,6 +1509,24 @@ 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 @@ -1790,14 +1815,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 @@ -1813,7 +1834,6 @@ exit 0 %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ %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 @@ -1823,14 +1843,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 @@ -1845,7 +1859,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* @@ -1854,13 +1867,26 @@ 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

On Fri, Dec 02, 2022 at 05:17:32PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 62 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 18 deletions(-)
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 :|

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index a586599f6e..f4cd0710b8 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -441,6 +441,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 @@ -502,6 +503,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 @@ -1439,7 +1447,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. @@ -1448,7 +1456,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 @@ -1464,17 +1471,13 @@ exit 0 %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 @@ -1527,6 +1530,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 @@ -1812,13 +1833,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 @@ -1841,8 +1858,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/virtproxyd.aug %{_datadir}/augeas/lenses/tests/test_virtproxyd.aug @@ -1858,7 +1873,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) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man1/virt-admin.1* @@ -1866,7 +1880,6 @@ exit 0 %{_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 @@ -1887,6 +1900,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

On Fri, Dec 02, 2022 at 05:17:33PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 53 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 15 deletions(-)
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 :|

Signed-off-by: Jim Fehlig <jfehlig@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

On Fri, Dec 02, 2022 at 05:17:34PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 57 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 17 deletions(-)
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 :|

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f6d644a3ae..d5243e859b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -441,6 +441,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} @@ -504,6 +505,13 @@ Requires: libvirt-libs = %{version}-%{release} Server side daemon used to manage locks held against virtual machine resources +%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release} + +%description daemon-plugin-lockd +A plugin for integrating with virtlockd + %package daemon-log Summary: Server side daemon for managing logs Requires: libvirt-libs = %{version}-%{release} @@ -1866,8 +1874,6 @@ exit 0 %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 -%attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so %{_datadir}/augeas/lenses/libvirtd.aug %{_datadir}/augeas/lenses/tests/test_libvirtd.aug @@ -1909,6 +1915,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

On 12/2/22 17:17, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index f6d644a3ae..d5243e859b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -441,6 +441,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}
@@ -504,6 +505,13 @@ Requires: libvirt-libs = %{version}-%{release} Server side daemon used to manage locks held against virtual machine resources
+%package daemon-plugin-lockd +Plugin for virtlockd
That no workie. I've squashed the below into my local branch. Regards, Jim diff --git a/libvirt.spec.in b/libvirt.spec.in index d5243e859b..b3f8b5d325 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -506,7 +506,7 @@ Server side daemon used to manage locks held against virtual machine resources %package daemon-plugin-lockd -Plugin for virtlockd +Summary: Plugin for virtlockd Requires: libvirt-libs = %{version}-%{release} %description daemon-plugin-lockd

On Fri, Dec 02, 2022 at 05:17:35PM -0700, Jim Fehlig wrote:
+%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
Maybe libvirt-daemon-lock-plugin-lockd? A bit verbose, but would help better differenciate it from other loadable drivers. Alternatively we could follow the example set by the storage drivers and go with libvirt-daemon-driver-lock-lockd. Pretty ugly, and also kind of inaccurate because, unlike the storage driver, the lock functionality can't be loaded into the monolithic daemon and always lives, by design, in a separate daemon. Either way, we should take the existing libvirt-lock-sanlock package and convert it to the new naming convention for consistency. Both packages should depend on libvirt-daemon-lock too, instead of just the libraries.
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package. -- Andrea Bolognani / Red Hat / Virtualization

On 12/11/22 11:22, Andrea Bolognani wrote:
On Fri, Dec 02, 2022 at 05:17:35PM -0700, Jim Fehlig wrote:
+%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
Maybe libvirt-daemon-lock-plugin-lockd? A bit verbose, but would help better differenciate it from other loadable drivers.
Alternatively we could follow the example set by the storage drivers and go with libvirt-daemon-driver-lock-lockd. Pretty ugly, and also kind of inaccurate because, unlike the storage driver, the lock functionality can't be loaded into the monolithic daemon and always lives, by design, in a separate daemon.
I slightly prefer libvirt-daemon-lock-plugin-lockd. Yes it's verbose, but it does a better job of describing the thing.
Either way, we should take the existing libvirt-lock-sanlock package and convert it to the new naming convention for consistency.
Both packages should depend on libvirt-daemon-lock too, instead of just the libraries.
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package.
Yep, I think libvirt-daemon-lock is correct. Thanks a lot for the review and comments! Regards, Jim

On Mon, Dec 12, 2022 at 03:39:44PM -0700, Jim Fehlig wrote:
On 12/11/22 11:22, Andrea Bolognani wrote:
On Fri, Dec 02, 2022 at 05:17:35PM -0700, Jim Fehlig wrote:
+%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
Maybe libvirt-daemon-lock-plugin-lockd? A bit verbose, but would help better differenciate it from other loadable drivers.
Alternatively we could follow the example set by the storage drivers and go with libvirt-daemon-driver-lock-lockd. Pretty ugly, and also kind of inaccurate because, unlike the storage driver, the lock functionality can't be loaded into the monolithic daemon and always lives, by design, in a separate daemon.
I slightly prefer libvirt-daemon-lock-plugin-lockd. Yes it's verbose, but it does a better job of describing the thing.
Either way, we should take the existing libvirt-lock-sanlock package and convert it to the new naming convention for consistency.
Both packages should depend on libvirt-daemon-lock too, instead of just the libraries.
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package.
Yep, I think libvirt-daemon-lock is correct. Thanks a lot for the review and comments!
libvirt-daemon-lock isn't the right place, as that's the home for virtlockd. This directory is what contains either lockd.so or sanlock.so, which are both client side plugins for other daemons. It could go in libvirt-daemon-common, or it can just be duplicated in both the daemon-plugin-lockd and daemon-lock-sanlock packages - its fine to have multiple RPMs own the same dir, as long as permissions/user/group match 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 :|

On Tue, Dec 13, 2022 at 09:55:19AM +0000, Daniel P. Berrangé wrote:
On Mon, Dec 12, 2022 at 03:39:44PM -0700, Jim Fehlig wrote:
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package.
Yep, I think libvirt-daemon-lock is correct. Thanks a lot for the review and comments!
libvirt-daemon-lock isn't the right place, as that's the home for virtlockd.
This directory is what contains either lockd.so or sanlock.so, which are both client side plugins for other daemons.
virlockd is the one that's going to load the plugins, so I don't think it's necessarily wrong for its package to own the directory.
It could go in libvirt-daemon-common, or it can just be duplicated in both the daemon-plugin-lockd and daemon-lock-sanlock packages - its fine to have multiple RPMs own the same dir, as long as permissions/user/group match
libvirt-daemon-common sounds good. It is already going to own the connection-driver directory. But libvirt-daemon-lock will need a dependency on it, which otherwise it wouldn't have. -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Dec 13, 2022 at 02:07:12AM -0800, Andrea Bolognani wrote:
On Tue, Dec 13, 2022 at 09:55:19AM +0000, Daniel P. Berrangé wrote:
On Mon, Dec 12, 2022 at 03:39:44PM -0700, Jim Fehlig wrote:
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package.
Yep, I think libvirt-daemon-lock is correct. Thanks a lot for the review and comments!
libvirt-daemon-lock isn't the right place, as that's the home for virtlockd.
This directory is what contains either lockd.so or sanlock.so, which are both client side plugins for other daemons.
virlockd is the one that's going to load the plugins, so I don't think it's necessarily wrong for its package to own the directory.
No it is not. virtqemud locks the lockd.so plugin, as lockd.so provides the client impl to talk to virtlockd. Think of lockd.so as being equiv of libvirt.so 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 :|

On Sun, Dec 11, 2022 at 10:22:00AM -0800, Andrea Bolognani wrote:
On Fri, Dec 02, 2022 at 05:17:35PM -0700, Jim Fehlig wrote:
+%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
Maybe libvirt-daemon-lock-plugin-lockd? A bit verbose, but would help better differenciate it from other loadable drivers.
The other loadable drivers are in libvirt-dameon-driver-XXX packages, so IMHO it is already easily distinguished by being in a libvirt-daemon-plugin-XXX package. So lets keep it more concise as Jim has it named here.
Either way, we should take the existing libvirt-lock-sanlock package and convert it to the new naming convention for consistency.
Yes.
Both packages should depend on libvirt-daemon-lock too, instead of just the libraries.
Nope, they shouldn't - that's the virtlockd server, which is completely separate from these plugins.
+%files daemon-plugin-lockd +%dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver
I believe this directory belongs to either the libvirt-daemon-lock package (more likely) or possibly the libvirt-daemon-common package.
-- Andrea Bolognani / Red Hat / Virtualization
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 :|

On Tue, Dec 13, 2022 at 09:57:31AM +0000, Daniel P. Berrangé wrote:
On Sun, Dec 11, 2022 at 10:22:00AM -0800, Andrea Bolognani wrote:
Both packages should depend on libvirt-daemon-lock too, instead of just the libraries.
Nope, they shouldn't - that's the virtlockd server, which is completely separate from these plugins.
Okay, thanks for explaining this. I was clearly providing bad advice based on my flawed understanding of the situation O:-)
+%package daemon-plugin-lockd +Plugin for virtlockd +Requires: libvirt-libs = %{version}-%{release}
Maybe libvirt-daemon-lock-plugin-lockd? A bit verbose, but would help better differenciate it from other loadable drivers.
The other loadable drivers are in libvirt-dameon-driver-XXX packages, so IMHO it is already easily distinguished by being in a libvirt-daemon-plugin-XXX package. So lets keep it more concise as Jim has it named here.
I think the distinction is not as obvious to someone who's not intimately familiar with the inner workings of libvirt. And the files in question are stored in a directory called "lock-driver", not "lock-plugin", so I'd say we're not entirely consistent about it internally either :) There's another naming question that I've been thinking about: the libvirt-daemon-driver-foo convention made perfect sense when the (monolithic) daemon would load the various drivers, but as we progress further towards a fully modular future it starts to become awkward. For example, you will have a system where libvirt-daemon-driver-qemu is installed but libvirt-daemon is not. That feels weird. I don't have a great solution for this. My instinct would be to have a libvirt-daemon-foo for each foo:// that libvirt supports, and then probably libvirt-daemon-foo-bar or libvirt-daemon-foo-plugin-bar for each bar backend/implementation of foo://. But for the various hypervisor drivers, those names are already taken... Any ideas? -- Andrea Bolognani / Red Hat / Virtualization

Move virt-admin, virt-host-validate, virt-ssh-helper, and libvirt-guests to a new libvirt-daemon-client subpackage. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 68 +++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d5243e859b..381f74c222 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -440,17 +440,12 @@ 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-client = %{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 @@ -480,6 +475,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils + +%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-client +Summary: Miscellaneous utilities +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} + # Needed by /usr/libexec/libvirt-guests.sh script. %if 0%{?fedora} >= 37 Requires: gettext-runtime @@ -492,10 +502,8 @@ 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-client +Miscellaneous utilities for use with other libvirt daemons %package daemon-lock Summary: Server side daemon for managing locks @@ -1464,7 +1472,7 @@ 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_sysconfig_pre libvirtd # '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. @@ -1476,22 +1484,13 @@ exit 0 %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 @@ -1526,6 +1525,22 @@ fi %libvirt_daemon_finish_restart libvirtd +%pre daemon-client +%libvirt_sysconfig_pre libvirt-guests + +%post daemon-client +%systemd_post libvirt-guests.service + +%preun daemon-client +%systemd_preun libvirt-guests.service + +%postun daemon-client +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%systemd_postun libvirt-guests.service + +%posttrans daemon-client +%libvirt_sysconfig_posttrans libvirt-guests + %pre daemon-lock %libvirt_sysconfig_pre virtlockd @@ -1855,7 +1870,6 @@ exit 0 %{_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 @@ -1883,20 +1897,18 @@ exit 0 %{_datadir}/polkit-1/rules.d/50-libvirt.rules %dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ +%attr(0755, root, root) %{_sbindir}/libvirtd +%{_mandir}/man8/libvirtd.8* +%files daemon-client +%{_unitdir}/libvirt-guests.service %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

On Fri, Dec 02, 2022 at 05:17:36PM -0700, Jim Fehlig wrote:
Move virt-admin, virt-host-validate, virt-ssh-helper, and libvirt-guests to a new libvirt-daemon-client subpackage.
These tools aren't really clients in general - only vuirt-admin is a client. virt-host-validate is a host configuration validation tool, while virt-ssh-helper is a helper tool for incoming connections. We could say libvirt-daemon-tools, but I'm a wondering if it is sufficient to have them in a libvirt-daemon-common package. With virt-admin in particular we really wanted it to always be present in any install with the daemons, as a key debugging/admin aid.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 68 +++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 28 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index d5243e859b..381f74c222 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -440,17 +440,12 @@ 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-client = %{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 @@ -480,6 +475,21 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils + +%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-client +Summary: Miscellaneous utilities +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} + # Needed by /usr/libexec/libvirt-guests.sh script. %if 0%{?fedora} >= 37 Requires: gettext-runtime @@ -492,10 +502,8 @@ 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-client +Miscellaneous utilities for use with other libvirt daemons
%package daemon-lock Summary: Server side daemon for managing locks @@ -1464,7 +1472,7 @@ 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_sysconfig_pre libvirtd # '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. @@ -1476,22 +1484,13 @@ exit 0 %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 @@ -1526,6 +1525,22 @@ fi
%libvirt_daemon_finish_restart libvirtd
+%pre daemon-client +%libvirt_sysconfig_pre libvirt-guests + +%post daemon-client +%systemd_post libvirt-guests.service + +%preun daemon-client +%systemd_preun libvirt-guests.service + +%postun daemon-client +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%systemd_postun libvirt-guests.service + +%posttrans daemon-client +%libvirt_sysconfig_posttrans libvirt-guests + %pre daemon-lock %libvirt_sysconfig_pre virtlockd
@@ -1855,7 +1870,6 @@ exit 0 %{_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 @@ -1883,20 +1897,18 @@ exit 0 %{_datadir}/polkit-1/rules.d/50-libvirt.rules
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/ +%attr(0755, root, root) %{_sbindir}/libvirtd +%{_mandir}/man8/libvirtd.8*
+%files daemon-client +%{_unitdir}/libvirt-guests.service %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
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 :|

On Tue, Dec 13, 2022 at 10:01:32AM +0000, Daniel P. Berrangé wrote:
On Fri, Dec 02, 2022 at 05:17:36PM -0700, Jim Fehlig wrote:
Move virt-admin, virt-host-validate, virt-ssh-helper, and libvirt-guests to a new libvirt-daemon-client subpackage.
These tools aren't really clients in general - only vuirt-admin is a client. virt-host-validate is a host configuration validation tool, while virt-ssh-helper is a helper tool for incoming connections.
We could say libvirt-daemon-tools, but I'm a wondering if it is sufficient to have them in a libvirt-daemon-common package. With virt-admin in particular we really wanted it to always be present in any install with the daemons, as a key debugging/admin aid.
Yeah, just stuffing all of this stuff in libvirt-daemon-common was my suggestion as well. I don't really see a reason to split things further at the moment. -- Andrea Bolognani / Red Hat / Virtualization

Remove the libvirt-daemon dependency from all the libvirt-daemon-driver-* packages. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 381f74c222..a7a80d7733 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -538,7 +538,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 @@ -547,7 +546,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 @@ -555,7 +553,6 @@ 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-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables @@ -568,7 +565,6 @@ bridge capabilities. %package daemon-driver-nwfilter Summary: Nwfilter driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: iptables Requires: ebtables @@ -581,7 +577,6 @@ iptables and ip6tables capabilities %package daemon-driver-nodedev Summary: Nodedev driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 @@ -596,7 +591,6 @@ capabilities. %package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %if %{with_netcf} Requires: netcf-libs >= 0.2.2 @@ -608,7 +602,6 @@ 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-libs = %{version}-%{release} %description daemon-driver-secret @@ -617,7 +610,6 @@ 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-libs = %{version}-%{release} Requires: nfs-utils # For mkfs @@ -778,7 +770,6 @@ 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-libs = %{version}-%{release} Requires: /usr/bin/qemu-img # For image compression @@ -799,7 +790,6 @@ QEMU %if %{with_lxc} %package daemon-driver-lxc Summary: LXC driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -815,7 +805,6 @@ 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-libs = %{version}-%{release} %description daemon-driver-vbox @@ -828,7 +817,6 @@ VirtualBox %if %{with_libxl} %package daemon-driver-libxl Summary: Libxl driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Obsoletes: libvirt-daemon-driver-xen < 4.3.0 @@ -1004,7 +992,6 @@ 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} %description lock-sanlock -- 2.38.1

On Fri, Dec 02, 2022 at 05:17:37PM -0700, Jim Fehlig wrote:
Remove the libvirt-daemon dependency from all the libvirt-daemon-driver-* packages.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 13 ------------- 1 file changed, 13 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 381f74c222..a7a80d7733 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -538,7 +538,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 @@ -547,7 +546,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 @@ -555,7 +553,6 @@ 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-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables
This is a problem, because we rely on that package to provide ownership of %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ since all the daemon-driver-XXX packages will install .so into that directory. If that %dir ends up in libvirt-daemon-common, then this patch needs to change 'libvirt-daemon' to 'libvirt-daemon-common' instead. 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 :|

Typo in $SUBJECT dependecy -> dependency On Fri, Dec 02, 2022 at 05:17:37PM -0700, Jim Fehlig wrote:
Remove the libvirt-daemon dependency from all the libvirt-daemon-driver-* packages.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 13 ------------- 1 file changed, 13 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 381f74c222..a7a80d7733 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -538,7 +538,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 @@ -547,7 +546,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 @@ -555,7 +553,6 @@ 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-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables @@ -568,7 +565,6 @@ bridge capabilities.
%package daemon-driver-nwfilter Summary: Nwfilter driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Requires: iptables Requires: ebtables @@ -581,7 +577,6 @@ iptables and ip6tables capabilities
%package daemon-driver-nodedev Summary: Nodedev driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 @@ -596,7 +591,6 @@ capabilities.
%package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} %if %{with_netcf} Requires: netcf-libs >= 0.2.2 @@ -608,7 +602,6 @@ 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-libs = %{version}-%{release}
%description daemon-driver-secret @@ -617,7 +610,6 @@ 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-libs = %{version}-%{release} Requires: nfs-utils # For mkfs @@ -778,7 +770,6 @@ 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-libs = %{version}-%{release} Requires: /usr/bin/qemu-img # For image compression @@ -799,7 +790,6 @@ QEMU %if %{with_lxc} %package daemon-driver-lxc Summary: LXC driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} # There really is a hard cross-driver dependency here Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -815,7 +805,6 @@ 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-libs = %{version}-%{release}
%description daemon-driver-vbox @@ -828,7 +817,6 @@ VirtualBox %if %{with_libxl} %package daemon-driver-libxl Summary: Libxl driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} Obsoletes: libvirt-daemon-driver-xen < 4.3.0
@@ -1004,7 +992,6 @@ 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}
%description lock-sanlock -- 2.38.1
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 :|

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 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index a7a80d7733..034bc2a96d 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -832,7 +832,10 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -852,7 +855,10 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests -Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -872,7 +878,10 @@ 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-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -891,7 +900,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-client = %{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} @@ -910,7 +921,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-client = %{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 12/2/22 17:17, 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 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index a7a80d7733..034bc2a96d 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -832,7 +832,10 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -852,7 +855,10 @@ capabilities of the QEMU TCG emulators %package daemon-kvm Summary: Server side daemon & driver required to run KVM guests
-Requires: libvirt-daemon = %{version}-%{release} +Requires: libvirt-daemon-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -872,7 +878,10 @@ 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-client = %{version}-%{release} +Requires: libvirt-daemon-log = %{version}-%{release} +Requires: libvirt-daemon-lock = %{version}-%{release} +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
Opps, too much copy-and-paste. I've dropped the last 3 additions in my local branch. Regards, Jim
Requires: libvirt-daemon-driver-lxc = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} @@ -891,7 +900,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-client = %{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} @@ -910,7 +921,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-client = %{version}-%{release} Requires: libvirt-daemon-driver-vbox = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release}

On Fri, Dec 02, 2022 at 05:17:31PM -0700, Jim Fehlig wrote:
The libvirt-daemon package still contains the following files, which likely need to move somewhere since they are needed by the modular daemons too.
%{_unitdir}/virt-guest-shutdown.target I thought of moving this to the libs package, but that would be a change for installations with only libvirt-client. AFAICT, it's used by libvirt-guests and the qemu and lxc drivers.
IIUC this basically acts as a synchronization point during shutdown: no guest will be torn down before it has been reached, and the daemon will not be shut down either. On a default install, this is where libvirt-guests.service would have a chance to perform the ON_SHUTDOWN action, but the local admin or management application can replace that with their own custom implementation.
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf Another file related to remote access. Should it go to libvirt-libs?
This configures the remote side of the connection.
%ghost %dir %{_rundir}/libvirt/ %ghost %dir %{_rundir}/libvirt/common/ %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ These files and directories are needed by the modular daemons as well, right? Where should they go? libvirt-daemon-<hypervisor> or libvirt-daemon-driver-<hypervisor>?
Server-side, and not specific to any hypervisor.
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules More files related to access. libvirt-libs?
These are for access to a local daemon, not remote access. And again it's the server configuring what clients should be allowed to connect to it. Assuming I've gotten all of the above right :) then it seems to me that all these files need to go in one of the server-side packages. I think we should just have a libvirt-daemon-common package that includes what you currently have put into the libvirt-daemon-client package plus these files, and have all hypervisor drivers depend on it directly. Which would basically keep things as they are: right now installing libvirt-daemon-driver-qemu results in these files begin present because they're part of the libvirt-daemon package, and after this change the same would be true except for the monolithic daemon not coming along for the ride. -- Andrea Bolognani / Red Hat / Virtualization

On 12/11/22 10:46, Andrea Bolognani wrote:
On Fri, Dec 02, 2022 at 05:17:31PM -0700, Jim Fehlig wrote:
The libvirt-daemon package still contains the following files, which likely need to move somewhere since they are needed by the modular daemons too.
%{_unitdir}/virt-guest-shutdown.target I thought of moving this to the libs package, but that would be a change for installations with only libvirt-client. AFAICT, it's used by libvirt-guests and the qemu and lxc drivers.
IIUC this basically acts as a synchronization point during shutdown: no guest will be torn down before it has been reached, and the daemon will not be shut down either. On a default install, this is where libvirt-guests.service would have a chance to perform the ON_SHUTDOWN action, but the local admin or management application can replace that with their own custom implementation.
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf Another file related to remote access. Should it go to libvirt-libs?
This configures the remote side of the connection.
%ghost %dir %{_rundir}/libvirt/ %ghost %dir %{_rundir}/libvirt/common/ %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/ %dir %attr(0711, root, root) %{_localstatedir}/cache/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/ %dir %attr(0755, root, root) %{_libdir}/libvirt/connection-driver/ These files and directories are needed by the modular daemons as well, right? Where should they go? libvirt-daemon-<hypervisor> or libvirt-daemon-driver-<hypervisor>?
Server-side, and not specific to any hypervisor.
%{_datadir}/polkit-1/actions/org.libvirt.unix.policy %{_datadir}/polkit-1/actions/org.libvirt.api.policy %{_datadir}/polkit-1/rules.d/50-libvirt.rules More files related to access. libvirt-libs?
These are for access to a local daemon, not remote access. And again it's the server configuring what clients should be allowed to connect to it.
Assuming I've gotten all of the above right :) then it seems to me that all these files need to go in one of the server-side packages.
I think we should just have a libvirt-daemon-common package that includes what you currently have put into the libvirt-daemon-client package plus these files, and have all hypervisor drivers depend on it directly.
Taking a cue from the storage driver, I called it libvirt-daemon-core (patches 4-6) in the original RFC https://listman.redhat.com/archives/libvir-list/2022-November/235924.html But I'm fine with libvirt-daemon-common too :-). I'll change it in V2 while addressing the other comments. Regards, Jim

On Mon, Dec 12, 2022 at 03:19:31PM -0700, Jim Fehlig wrote:
On 12/11/22 10:46, Andrea Bolognani wrote:
I think we should just have a libvirt-daemon-common package that includes what you currently have put into the libvirt-daemon-client package plus these files, and have all hypervisor drivers depend on it directly.
Taking a cue from the storage driver, I called it libvirt-daemon-core (patches 4-6) in the original RFC
https://listman.redhat.com/archives/libvir-list/2022-November/235924.html
But I'm fine with libvirt-daemon-common too :-). I'll change it in V2 while addressing the other comments.
I wasn't unable to find a document that contains a formal policy on this, but my understanding is that foo-core is a stripped-down version of foo that only contains the very basic functionality, while foo-common is stuff needed by foo and doesn't do anything useful on its own. Based on this reading, libvirt-daemon-driver-storage-core and libvirt-daemon-common are the appropriate names for the respective packages. Anyone with actual RPM packaging experience, please call me out if I'm spouting nonsense :) -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Dec 13, 2022 at 01:15:26AM -0800, Andrea Bolognani wrote:
On Mon, Dec 12, 2022 at 03:19:31PM -0700, Jim Fehlig wrote:
On 12/11/22 10:46, Andrea Bolognani wrote:
I think we should just have a libvirt-daemon-common package that includes what you currently have put into the libvirt-daemon-client package plus these files, and have all hypervisor drivers depend on it directly.
Taking a cue from the storage driver, I called it libvirt-daemon-core (patches 4-6) in the original RFC
https://listman.redhat.com/archives/libvir-list/2022-November/235924.html
But I'm fine with libvirt-daemon-common too :-). I'll change it in V2 while addressing the other comments.
I wasn't unable to find a document that contains a formal policy on this, but my understanding is that foo-core is a stripped-down version of foo that only contains the very basic functionality, while foo-common is stuff needed by foo and doesn't do anything useful on its own.
Based on this reading, libvirt-daemon-driver-storage-core and libvirt-daemon-common are the appropriate names for the respective packages.
Anyone with actual RPM packaging experience, please call me out if I'm spouting nonsense :)
Once you go beyond -devel, -docs and -libs, sub-RPM naming is almost[1] entirely arbitrary, and at the discretion of the package maintainer With regards, Daniel [1] caveat: programming language specific guidelines may apply -- |: 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 :|

On Fri, Dec 02, 2022 at 05:17:31PM -0700, Jim Fehlig wrote:
This is a V1 of my previous RFC to decompose the libvirt-daemon package
https://listman.redhat.com/archives/libvir-list/2022-November/235924.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.
snip
libvirt.spec.in | 274 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 183 insertions(+), 91 deletions(-)
Could you also update docs/daemons.rst to mention the new sub-RPMS that are getting created. 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 :|

On 12/13/22 02:31, Daniel P. Berrangé wrote:
On Fri, Dec 02, 2022 at 05:17:31PM -0700, Jim Fehlig wrote:
This is a V1 of my previous RFC to decompose the libvirt-daemon package
https://listman.redhat.com/archives/libvir-list/2022-November/235924.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.
snip
libvirt.spec.in | 274 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 183 insertions(+), 91 deletions(-)
Could you also update docs/daemons.rst to mention the new sub-RPMS that are getting created.
Currently that file contains no mention of RPM, package, subpackage, etc. But poking around I suppose you mean docs/kbase/rpm-deployment.rst. I'll update it in V2. Regards, Jim

On Tue, Dec 13, 2022 at 04:14:33PM -0700, Jim Fehlig wrote:
On 12/13/22 02:31, Daniel P. Berrangé wrote:
On Fri, Dec 02, 2022 at 05:17:31PM -0700, Jim Fehlig wrote:
This is a V1 of my previous RFC to decompose the libvirt-daemon package
https://listman.redhat.com/archives/libvir-list/2022-November/235924.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.
snip
libvirt.spec.in | 274 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 183 insertions(+), 91 deletions(-)
Could you also update docs/daemons.rst to mention the new sub-RPMS that are getting created.
Currently that file contains no mention of RPM, package, subpackage, etc. But poking around I suppose you mean docs/kbase/rpm-deployment.rst. I'll update it in V2.
Sigh, yes, I mean rpm-deployment.rst ! 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 (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Jim Fehlig