[PATCH RFC 0/6] spec: Decompose the daemon subpackage

Currently it is not possible to install a modular daemon subpackage without also installing the monolithic daemon https://listman.redhat.com/archives/libvir-list/2022-September/234554.html This series is an initial attempt at moving common daemons, utilities, and files from the daemon subpackage to a new daemon-core subpackage. The monolithic and modular daemons can then depend on the new subpackage. libvirt-guests is moved to a new libvirt-guests subpackage, which is recommended by the daemon subpackage to provide smoother upgrade. I've likely overlooked several items, but before continuing down this path too far I first wanted to gauge interest and see if this work is worth pursuing. If so, any comments on the RFC are appreciated! Note that patches 1-3 are things I noticed while working on the others and could be pushed independently. Jim Fehlig (6): spec: Remove redundant with_libxl spec: Use more %{name} macro spec: Remove daemon postun trigger spec: Move common daemons to a separate subpackage spec: Move more files to the daemon-core subpackage spec: Move libvirt-guests to guests subpackage libvirt.spec.in | 406 ++++++++++++++++++++++++++---------------------- 1 file changed, 219 insertions(+), 187 deletions(-) -- 2.37.3

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index eb8ebbdd3f..277ecd3eb3 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -862,9 +862,7 @@ capabilities of LXC Summary: Server side daemon & driver required to run XEN guests Requires: libvirt-daemon = %{version}-%{release} - %if %{with_libxl} Requires: libvirt-daemon-driver-libxl = %{version}-%{release} - %endif Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -- 2.37.3

On Wed, Nov 23, 2022 at 04:11:50PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 2 -- 1 file changed, 2 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 | 250 ++++++++++++++++++++++++------------------------ 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 277ecd3eb3..3c9975b684 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -239,33 +239,33 @@ URL: https://libvirt.org/ %endif Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-config-network = %{version}-%{release} -Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-config-network = %{version}-%{release} +Requires: %{name}-daemon-config-nwfilter = %{version}-%{release} %if %{with_libxl} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} +Requires: %{name}-daemon-driver-libxl = %{version}-%{release} %endif %if %{with_lxc} -Requires: libvirt-daemon-driver-lxc = %{version}-%{release} +Requires: %{name}-daemon-driver-lxc = %{version}-%{release} %endif %if %{with_qemu} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +Requires: %{name}-daemon-driver-qemu = %{version}-%{release} %endif # We had UML driver, but we've removed it. -Obsoletes: libvirt-daemon-driver-uml <= 5.0.0 -Obsoletes: libvirt-daemon-uml <= 5.0.0 +Obsoletes: %{name}-daemon-driver-uml <= 5.0.0 +Obsoletes: %{name}-daemon-uml <= 5.0.0 %if %{with_vbox} -Requires: libvirt-daemon-driver-vbox = %{version}-%{release} +Requires: %{name}-daemon-driver-vbox = %{version}-%{release} %endif -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-client = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-client = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} # All build-time requirements. Run-time requirements are # listed against each sub-RPM @@ -484,9 +484,9 @@ Requires: gettext %endif # Ensure smooth upgrades -Obsoletes: libvirt-admin < 7.3.0 -Provides: libvirt-admin = %{version}-%{release} -Obsoletes: libvirt-bash-completion < 7.3.0 +Obsoletes: %{name}-admin < 7.3.0 +Provides: %{name}-admin = %{version}-%{release} +Obsoletes: %{name}-bash-completion < 7.3.0 %description daemon Server side daemon required to manage the virtualization capabilities @@ -496,8 +496,8 @@ for specific drivers. %package daemon-config-network Summary: Default configuration files for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} %description daemon-config-network Default configuration files for setting up NAT based networking @@ -505,16 +505,16 @@ 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} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} %description daemon-config-nwfilter 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: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: dnsmasq >= 2.41 Requires: iptables @@ -526,8 +526,8 @@ 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: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: iptables Requires: ebtables @@ -539,8 +539,8 @@ 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} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} # needed for device enumeration Requires: systemd >= 185 # For managing persistent mediated devices @@ -554,8 +554,8 @@ capabilities. %package daemon-driver-interface Summary: Interface driver plugin for the libvirtd daemon -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %if %{with_netcf} Requires: netcf-libs >= 0.2.2 %endif @@ -566,8 +566,8 @@ 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} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description daemon-driver-secret The secret driver plugin for the libvirtd daemon, providing @@ -575,8 +575,8 @@ 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: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: nfs-utils # For mkfs Requires: util-linux @@ -585,9 +585,9 @@ Requires: util-linux Requires: /usr/bin/qemu-img %endif %if !%{with_storage_rbd} -Obsoletes: libvirt-daemon-driver-storage-rbd < 5.2.0 +Obsoletes: %{name}-daemon-driver-storage-rbd < 5.2.0 %endif -Obsoletes: libvirt-daemon-driver-storage-sheepdog < 8.8.0 +Obsoletes: %{name}-daemon-driver-storage-sheepdog < 8.8.0 %description daemon-driver-storage-core The storage driver plugin for the libvirtd daemon, providing @@ -596,8 +596,8 @@ iSCSI, and multipath storage. %package daemon-driver-storage-logical Summary: Storage driver plugin for lvm volumes -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: lvm2 %description daemon-driver-storage-logical @@ -607,8 +607,8 @@ volumes using lvm. %package daemon-driver-storage-disk Summary: Storage driver plugin for disk -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: parted Requires: device-mapper @@ -619,8 +619,8 @@ volumes using the host disks. %package daemon-driver-storage-scsi Summary: Storage driver plugin for local scsi devices -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description daemon-driver-storage-scsi The storage driver backend adding implementation of the storage APIs for scsi @@ -629,8 +629,8 @@ host devices. %package daemon-driver-storage-iscsi Summary: Storage driver plugin for iscsi -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: iscsi-initiator-utils %description daemon-driver-storage-iscsi @@ -641,8 +641,8 @@ volumes using the host iscsi stack. %if %{with_storage_iscsi_direct} %package daemon-driver-storage-iscsi-direct Summary: Storage driver plugin for iscsi-direct -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description daemon-driver-storage-iscsi-direct The storage driver backend adding implementation of the storage APIs for iscsi @@ -652,8 +652,8 @@ volumes using libiscsi direct connection. %package daemon-driver-storage-mpath Summary: Storage driver plugin for multipath volumes -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: device-mapper %description daemon-driver-storage-mpath @@ -664,8 +664,8 @@ multipath storage using device mapper. %if %{with_storage_gluster} %package daemon-driver-storage-gluster Summary: Storage driver plugin for gluster -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %if 0%{?fedora} Requires: glusterfs-client >= 2.0.1 %endif @@ -682,8 +682,8 @@ volumes using libgfapi. %if %{with_storage_rbd} %package daemon-driver-storage-rbd Summary: Storage driver plugin for rbd -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description daemon-driver-storage-rbd The storage driver backend adding implementation of the storage APIs for rbd @@ -694,8 +694,8 @@ volumes using the ceph protocol. %if %{with_storage_zfs} %package daemon-driver-storage-zfs Summary: Storage driver plugin for ZFS -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-libs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} # Support any conforming implementation of zfs Requires: /sbin/zfs Requires: /sbin/zpool @@ -708,23 +708,23 @@ ZFS volumes. %package daemon-driver-storage Summary: Storage driver plugin including all backends for the libvirtd daemon -Requires: libvirt-daemon-driver-storage-core = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release} -Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-core = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-disk = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-logical = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-scsi = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-iscsi = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-mpath = %{version}-%{release} %if %{with_storage_iscsi_direct} -Requires: libvirt-daemon-driver-storage-iscsi-direct = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-iscsi-direct = %{version}-%{release} %endif %if %{with_storage_gluster} -Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-gluster = %{version}-%{release} %endif %if %{with_storage_rbd} -Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-rbd = %{version}-%{release} %endif %if %{with_storage_zfs} -Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release} +Requires: %{name}-daemon-driver-storage-zfs = %{version}-%{release} %endif %description daemon-driver-storage @@ -736,8 +736,8 @@ 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: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} Requires: /usr/bin/qemu-img # For image compression Requires: gzip @@ -757,10 +757,10 @@ 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} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} # There really is a hard cross-driver dependency here -Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} Requires: systemd-container %description daemon-driver-lxc @@ -773,8 +773,8 @@ 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} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description daemon-driver-vbox The vbox driver plugin for the libvirtd daemon, providing @@ -786,9 +786,9 @@ 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 +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} +Obsoletes: %{name}-daemon-driver-xen < 4.3.0 %description daemon-driver-libxl The Libxl driver plugin for the libvirtd daemon, providing @@ -802,14 +802,14 @@ Libxl %package daemon-qemu Summary: Server side daemon & driver required to run QEMU guests -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-qemu = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} Requires: qemu %description daemon-qemu @@ -822,14 +822,14 @@ 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-driver-qemu = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-qemu = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} Requires: qemu-kvm %description daemon-kvm @@ -842,14 +842,14 @@ 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-driver-lxc = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-lxc = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} %description daemon-lxc Server side daemon and driver required to manage the virtualization @@ -861,14 +861,14 @@ capabilities of LXC %package daemon-xen Summary: Server side daemon & driver required to run XEN guests -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-libxl = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-libxl = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} Requires: xen %description daemon-xen @@ -880,14 +880,14 @@ capabilities of XEN %package daemon-vbox Summary: Server side daemon & driver required to run VirtualBox guests -Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-driver-vbox = %{version}-%{release} -Requires: libvirt-daemon-driver-interface = %{version}-%{release} -Requires: libvirt-daemon-driver-network = %{version}-%{release} -Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} -Requires: libvirt-daemon-driver-secret = %{version}-%{release} -Requires: libvirt-daemon-driver-storage = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-driver-vbox = %{version}-%{release} +Requires: %{name}-daemon-driver-interface = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-nodedev = %{version}-%{release} +Requires: %{name}-daemon-driver-nwfilter = %{version}-%{release} +Requires: %{name}-daemon-driver-secret = %{version}-%{release} +Requires: %{name}-daemon-driver-storage = %{version}-%{release} %description daemon-vbox Server side daemon and driver required to manage the virtualization @@ -901,7 +901,7 @@ Requires: %{name}-libs = %{version}-%{release} Requires: gnutls-utils # Ensure smooth upgrades -Obsoletes: libvirt-bash-completion < 7.3.0 +Obsoletes: %{name}-bash-completion < 7.3.0 %description client The client binaries needed to access the virtualization @@ -910,7 +910,7 @@ capabilities of recent versions of Linux (and other OSes). %package client-qemu Summary: Additional client side utilities for QEMU Requires: %{name}-libs = %{version}-%{release} -Requires: python3-libvirt >= 3.7.0 +Requires: python3-%{name} >= 3.7.0 %description client-qemu The additional client binaries are used to interact @@ -972,26 +972,26 @@ driver %package nss Summary: Libvirt plugin for Name Service Switch -Requires: libvirt-daemon-driver-network = %{version}-%{release} +Requires: %{name}-daemon-driver-network = %{version}-%{release} %description nss Libvirt plugin for NSS for translating domain names into IP addresses. %if %{with_mingw} -%package -n mingw32-libvirt +%package -n mingw32-%{name} Summary: %{summary} -Obsoletes: mingw32-libvirt-static < 7.0.0 +Obsoletes: mingw32-%{name}-static < 7.0.0 BuildArch: noarch -%description -n mingw32-libvirt +%description -n mingw32-%{name} MinGW Windows libvirt virtualization library. -%package -n mingw64-libvirt +%package -n mingw64-%{name} Summary: %{summary} -Obsoletes: mingw64-libvirt-static < 7.0.0 +Obsoletes: mingw64-%{name}-static < 7.0.0 BuildArch: noarch -%description -n mingw64-libvirt +%description -n mingw64-%{name} MinGW Windows libvirt virtualization library. %{?mingw_debug_package} -- 2.37.3

On Wed, Nov 23, 2022 at 04:11:51PM -0700, Jim Fehlig wrote:
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 250 ++++++++++++++++++++++++------------------------ 1 file changed, 125 insertions(+), 125 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 277ecd3eb3..3c9975b684 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -239,33 +239,33 @@ URL: https://libvirt.org/ %endif Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
-Requires: libvirt-daemon = %{version}-%{release} -Requires: libvirt-daemon-config-network = %{version}-%{release} -Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} +Requires: %{name}-daemon = %{version}-%{release} +Requires: %{name}-daemon-config-network = %{version}-%{release} +Requires: %{name}-daemon-config-nwfilter = %{version}-%{release}
I think if anything, I would go the other way and eliminate almost all existing use of '%{name}'. It isn't like we're ever going to change what %{name} expands to, so IMHO it just harms legibility. I think the only exception I see is '%find_lang %{name}' since that is a documented design pattern for Fedora. 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 %triggerpostun. Upgrades from libvirt < 1.3.0 is now unlikely. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3c9975b684..6b1e351343 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1466,18 +1466,6 @@ if [ $1 -ge 1 ] ; then fi %systemd_postun libvirt-guests.service -# In upgrade scenario we must explicitly enable virtlockd/virtlogd -# sockets, if libvirtd is already enabled and start them if -# libvirtd is running, otherwise you'll get failures to start -# guests -%triggerpostun daemon -- libvirt-daemon < 1.3.0 -if [ $1 -ge 1 ] ; then - /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || : - /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && - /bin/systemctl start virtlogd.socket virtlogd-admin.socket || : -fi - %posttrans daemon %libvirt_sysconfig_posttrans libvirtd virtproxyd virtlogd virtlockd libvirt-guests if test %libvirt_daemon_needs_restart libvirtd -- 2.37.3

On Wed, Nov 23, 2022 at 04:11:52PM -0700, Jim Fehlig wrote:
Remove %triggerpostun. Upgrades from libvirt < 1.3.0 is now unlikely.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 12 ------------ 1 file changed, 12 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 :|

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

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 71 +++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 86b4922531..c83e6a1ab3 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1810,53 +1810,16 @@ exit 0 %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd -%dir %{_datadir}/libvirt/ - -%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/ -%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 -%{_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 - -%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 - %files daemon-core %{_unitdir}/virtproxyd.service %{_unitdir}/virtproxyd.socket @@ -1874,6 +1837,19 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/virtlogd.conf %config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf +%dir %{_datadir}/libvirt/ + +%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/ %dir %attr(0755, root, root) %{_libdir}/libvirt/lock-driver %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/lockd.so @@ -1883,6 +1859,20 @@ exit 0 %{_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 + +%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}/virtproxyd %attr(0755, root, root) %{_sbindir}/virtlogd @@ -1891,6 +1881,13 @@ exit 0 %{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtlockd.8* %{_mandir}/man8/virtproxyd.8* +%{_mandir}/man1/virt-admin.1* +%{_mandir}/man1/virt-host-validate.1* +%{_mandir}/man8/virt-ssh-helper.8* + +%{_bindir}/virt-host-validate +%{_bindir}/virt-admin +%{_datadir}/bash-completion/completions/virt-admin %files daemon-config-network %dir %{_datadir}/libvirt/networks/ -- 2.37.3

Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- libvirt.spec.in | 64 +++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index c83e6a1ab3..11c163fa69 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -443,11 +443,8 @@ Requires: %{name}-daemon-core = %{version}-%{release} # The client side, i.e. shared libs are in a subpackage Requires: %{name}-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: %{name}-client = %{version}-%{release} +# Weak dependency on libvirt-guests for a smoother upgrade +Recommends: %{name}-guests = %{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 @@ -478,12 +475,6 @@ Requires: numad Requires: dbus # For uid creation during pre Requires(pre): shadow-utils -# Needed by /usr/libexec/libvirt-guests.sh script. -%if 0%{?fedora} >= 37 -Requires: gettext-runtime -%else -Requires: gettext -%endif # Ensure smooth upgrades Obsoletes: %{name}-admin < 7.3.0 @@ -502,6 +493,21 @@ Requires: %{name}-libs = %{version}-%{release} %description daemon-core Core daemons, utilities, and files used by the primary daemons +%package guests +Summary: Service for suspending and resuming guests +Requires: %{name}-client = %{version}-%{release} + +# Needed by /usr/libexec/libvirt-guests.sh script. +%if 0%{?fedora} >= 37 +Requires: gettext-runtime +%else +Requires: gettext +%endif + +%description guests +libvirt-guests provides a service that can be used to coordinate guest +and host lifecycle actions + %package daemon-config-network Summary: Default configuration files for the libvirtd daemon @@ -1439,7 +1445,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. @@ -1452,21 +1458,13 @@ exit 0 %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 @@ -1501,6 +1499,22 @@ fi %libvirt_daemon_finish_restart libvirtd +%pre guests +%libvirt_sysconfig_pre libvirt-guests + +%post guests +%systemd_post libvirt-guests.service + +%preun guests +%systemd_preun libvirt-guests.service + +%postun guests +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%systemd_postun libvirt-guests.service + +%posttrans guests +%libvirt_sysconfig_posttrans libvirt-guests + %pre daemon-core %libvirt_sysconfig_pre virtproxyd virtlogd virtlockd @@ -1804,7 +1818,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 @@ -1815,10 +1828,15 @@ exit 0 %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %attr(0755, root, root) %{_sbindir}/libvirtd + +%{_mandir}/man8/libvirtd.8* + +%files guests +%{_unitdir}/libvirt-guests.service + %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh %{_mandir}/man8/libvirt-guests.8* -%{_mandir}/man8/libvirtd.8* %files daemon-core %{_unitdir}/virtproxyd.service -- 2.37.3

On Wed, Nov 23, 2022 at 04:11:49PM -0700, Jim Fehlig wrote:
Currently it is not possible to install a modular daemon subpackage without also installing the monolithic daemon
https://listman.redhat.com/archives/libvir-list/2022-September/234554.html
This series is an initial attempt at moving common daemons, utilities, and files from the daemon subpackage to a new daemon-core subpackage. The monolithic and modular daemons can then depend on the new subpackage.
libvirt-guests is moved to a new libvirt-guests subpackage, which is recommended by the daemon subpackage to provide smoother upgrade.
I've likely overlooked several items, but before continuing down this path too far I first wanted to gauge interest and see if this work is worth pursuing. If so, any comments on the RFC are appreciated!
With this refactoring the two big questions - What is the desired end state - Can we ensure a clean upgrade path Let me ignore everything except the QEMU driver and the nodedev driver, for sake of illustration. Today we've got a few install approaches recommended - Ask for 'libvirt', which gives you - libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev All the libvirt pieces, but not the hypervisor itself - Ask for 'libvirt-daemon-kvm', which also gives you - libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev - qemu-kvm All the recommended libvirt pieces for QEMU, including the hypervisor itself - Ask for 'libvirt-daemon-driver-qemu', 'libvirt-daemon-driver-nodedev', which also gives you - libvirt-daemon The bare minimum libvirt pieces, but not the hypervisor itself In terms of package contents - libvirt-daemon-driver-qemu /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so /usr/sbin/virtqemud - libvirt-daemon /usr/sbin/libvirtd /usr/sbin/virtlogd /usr/sbin/virtlockd /usr/sbin/virtproxyd Our goal is the ability to install only the module daemon, without libvirtd. This implies that we need to cut the dependency from libvirt-daemon-driver-qemu, to libvirt-daemon. I didn't do that originally because it would break apps that installed libvirt-daemon-driver-qemu, expecting to get libvirtd. We also needed it for the virtlogd/virtproxyd dep. That decision, however, was made when libvirtd was still the default active daemon. Since we changed the systemd presets in Fedora/RHEL to activate modular daemons, we don't need the deps to pull in libvirtd by default. We do not want to force virlockd as that's an opt-in feature, and also don't want to force virtproxyd as that's only needed for back compat with old remote libvirt clients, or for exposing over TCP. virtlogd is more difficult, it is possible to turn that off and if people do that they might prefer not to have it installed. Or they may want to use it, but have it installed in a different container from virtqemud. So on balance I thin we need to sever the dependancy there too. So I'd say we need to have - libvirt-daemon-lock /usr/sbin/virtlockd - libvirt-daemon-log /usr/sbin/virtlogd - libvirt-daemon-proxy /usr/sbin/virtproxyd Probably a 'libvirt-daemon-plugin-lockd' for the lock-driver/lockd.so as that really ought to be an optional component too. A 'libvirt-daemon-client' package for 'virt-admin' The libvirt-daemon package would need to hold /usr/sbin/libvirtd and would also need dependencies for the upgrade path on libvirt-daemon-lock libvirt-daemon-log libvirt-daemon-proxy libvirt-daemon-pugin-lockd libvirt-daemon-client I'm not sure if we'll still need a 'libvirt-daemon-core' too as your patches suggest, for some of the common files, or if they all end up in one of the other sub-RPMs above. The libvirt-daemon-driver-XXX packages would then have *no* dependency on anything. If you are asking for libvirt-daemon-driver-XXXX packages of any kind, you're responsible for pickin the exact set of pieces you want to have present. Installing 'libvirt-daemon' will give you libvirtd, virtproxyd, virtlockd etc, and you can ask for libvirt-daemon-driver-XXX on top. The 'libvirt-daemon-kvm' would give you the sensible set of pieces, *not* included libvirt-daemon any more though on distro versions which have switched to module daemons. The only thing we can't achieve this way is to install libvirtd and QEMU, without having the module daemons present. I'm not sure that matters though, if we aim to discontinue shipping libvirtd long term. 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 11/24/22 03:57, Daniel P. Berrangé wrote:
On Wed, Nov 23, 2022 at 04:11:49PM -0700, Jim Fehlig wrote:
Currently it is not possible to install a modular daemon subpackage without also installing the monolithic daemon
https://listman.redhat.com/archives/libvir-list/2022-September/234554.html
This series is an initial attempt at moving common daemons, utilities, and files from the daemon subpackage to a new daemon-core subpackage. The monolithic and modular daemons can then depend on the new subpackage.
libvirt-guests is moved to a new libvirt-guests subpackage, which is recommended by the daemon subpackage to provide smoother upgrade.
I've likely overlooked several items, but before continuing down this path too far I first wanted to gauge interest and see if this work is worth pursuing. If so, any comments on the RFC are appreciated!
With this refactoring the two big questions
- What is the desired end state - Can we ensure a clean upgrade path
Let me ignore everything except the QEMU driver and the nodedev driver, for sake of illustration.
Today we've got a few install approaches recommended
- Ask for 'libvirt', which gives you
- libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev
All the libvirt pieces, but not the hypervisor itself
- Ask for 'libvirt-daemon-kvm', which also gives you
- libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev - qemu-kvm
All the recommended libvirt pieces for QEMU, including the hypervisor itself
- Ask for 'libvirt-daemon-driver-qemu', 'libvirt-daemon-driver-nodedev', which also gives you
- libvirt-daemon
The bare minimum libvirt pieces, but not the hypervisor itself
Why not the hypervisor in this scenario?
In terms of package contents
- libvirt-daemon-driver-qemu
/usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so /usr/sbin/virtqemud
- libvirt-daemon
/usr/sbin/libvirtd /usr/sbin/virtlogd /usr/sbin/virtlockd /usr/sbin/virtproxyd
Our goal is the ability to install only the module daemon, without libvirtd. This implies that we need to cut the dependency from libvirt-daemon-driver-qemu, to libvirt-daemon.
I didn't do that originally because it would break apps that installed libvirt-daemon-driver-qemu, expecting to get libvirtd. We also needed it for the virtlogd/virtproxyd dep.
That decision, however, was made when libvirtd was still the default active daemon. Since we changed the systemd presets in Fedora/RHEL to activate modular daemons, we don't need the deps to pull in libvirtd by default.
We do not want to force virlockd as that's an opt-in feature, and also don't want to force virtproxyd as that's only needed for back compat with old remote libvirt clients, or for exposing over TCP.
virtlogd is more difficult, it is possible to turn that off and if people do that they might prefer not to have it installed. Or they may want to use it, but have it installed in a different container from virtqemud. So on balance I thin we need to sever the dependancy there too.
So I'd say we need to have
- libvirt-daemon-lock
/usr/sbin/virtlockd
- libvirt-daemon-log
/usr/sbin/virtlogd
- libvirt-daemon-proxy
/usr/sbin/virtproxyd
I considered splitting these as you suggest, but wasn't sure if the proliferation of subpackages would receive a warm welcome :-).
Probably a 'libvirt-daemon-plugin-lockd' for the lock-driver/lockd.so as that really ought to be an optional component too.
A 'libvirt-daemon-client' package for 'virt-admin'
The libvirt-daemon package would need to hold
/usr/sbin/libvirtd
and would also need dependencies for the upgrade path on
libvirt-daemon-lock libvirt-daemon-log libvirt-daemon-proxy libvirt-daemon-pugin-lockd libvirt-daemon-client
I'm not sure if we'll still need a 'libvirt-daemon-core' too as your patches suggest, for some of the common files, or if they all end up in one of the other sub-RPMs above.
I'll see if they can be placed in other subpackages while reworking this series.
The libvirt-daemon-driver-XXX packages would then have *no* dependency on anything. If you are asking for libvirt-daemon-driver-XXXX packages of any kind, you're responsible for pickin the exact set of pieces you want to have present.
Installing 'libvirt-daemon' will give you libvirtd, virtproxyd, virtlockd etc, and you can ask for libvirt-daemon-driver-XXX on top.
The 'libvirt-daemon-kvm' would give you the sensible set of pieces, *not* included libvirt-daemon any more though on distro versions which have switched to module daemons.
The only thing we can't achieve this way is to install libvirtd and QEMU, without having the module daemons present. I'm not sure that matters though, if we aim to discontinue shipping libvirtd long term.
Could be avoided by moving the qemu dependency to libvirt-daemon-driver-qemu right? Regards, Jim

On Mon, Nov 28, 2022 at 10:53:52AM -0700, Jim Fehlig wrote:
On 11/24/22 03:57, Daniel P. Berrangé wrote:
On Wed, Nov 23, 2022 at 04:11:49PM -0700, Jim Fehlig wrote:
Currently it is not possible to install a modular daemon subpackage without also installing the monolithic daemon
https://listman.redhat.com/archives/libvir-list/2022-September/234554.html
This series is an initial attempt at moving common daemons, utilities, and files from the daemon subpackage to a new daemon-core subpackage. The monolithic and modular daemons can then depend on the new subpackage.
libvirt-guests is moved to a new libvirt-guests subpackage, which is recommended by the daemon subpackage to provide smoother upgrade.
I've likely overlooked several items, but before continuing down this path too far I first wanted to gauge interest and see if this work is worth pursuing. If so, any comments on the RFC are appreciated!
With this refactoring the two big questions
- What is the desired end state - Can we ensure a clean upgrade path
Let me ignore everything except the QEMU driver and the nodedev driver, for sake of illustration.
Today we've got a few install approaches recommended
- Ask for 'libvirt', which gives you
- libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev
All the libvirt pieces, but not the hypervisor itself
- Ask for 'libvirt-daemon-kvm', which also gives you - libvirt-daemon - libvirt-daemon-driver-qemu - libvirt-daemon-driver-nodedev - qemu-kvm
All the recommended libvirt pieces for QEMU, including the hypervisor itself
- Ask for 'libvirt-daemon-driver-qemu', 'libvirt-daemon-driver-nodedev', which also gives you
- libvirt-daemon
The bare minimum libvirt pieces, but not the hypervisor itself
Why not the hypervisor in this scenario?
'qemu-kvm' is a "typical installation" of QEMU packages on Fedora. People wanting minimal installations want to fine tune exactly which qemu-kvm-XXXX sub packages they install. So we don't force any dep from 'libvirt-daemon-driver-qemu', let the user choose exactly what they want.
So I'd say we need to have
- libvirt-daemon-lock /usr/sbin/virtlockd
- libvirt-daemon-log /usr/sbin/virtlogd
- libvirt-daemon-proxy /usr/sbin/virtproxyd
I considered splitting these as you suggest, but wasn't sure if the proliferation of subpackages would receive a warm welcome :-).
We lost the non-proliferation war years ago ;-P Three more is merely noise
The libvirt-daemon-driver-XXX packages would then have *no* dependency on anything. If you are asking for libvirt-daemon-driver-XXXX packages of any kind, you're responsible for pickin the exact set of pieces you want to have present.
Installing 'libvirt-daemon' will give you libvirtd, virtproxyd, virtlockd etc, and you can ask for libvirt-daemon-driver-XXX on top.
The 'libvirt-daemon-kvm' would give you the sensible set of pieces, *not* included libvirt-daemon any more though on distro versions which have switched to module daemons.
The only thing we can't achieve this way is to install libvirtd and QEMU, without having the module daemons present. I'm not sure that matters though, if we aim to discontinue shipping libvirtd long term.
Could be avoided by moving the qemu dependency to libvirt-daemon-driver-qemu right?
See above for why we don't have a qemu dep from there. 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 Mon, Nov 28, 2022 at 06:03:29PM +0000, Daniel P. Berrangé wrote:
On Mon, Nov 28, 2022 at 10:53:52AM -0700, Jim Fehlig wrote:
On 11/24/22 03:57, Daniel P. Berrangé wrote:
- Ask for 'libvirt-daemon-driver-qemu', 'libvirt-daemon-driver-nodedev', which also gives you
- libvirt-daemon
The bare minimum libvirt pieces, but not the hypervisor itself
Why not the hypervisor in this scenario?
'qemu-kvm' is a "typical installation" of QEMU packages on Fedora.
People wanting minimal installations want to fine tune exactly which qemu-kvm-XXXX sub packages they install. So we don't force any dep from 'libvirt-daemon-driver-qemu', let the user choose exactly what they want.
I wonder if we could use Requires: qemu-kvm-core Recommends: qemu-kvm here. The idea being that default installations would get a fully-featured QEMU binary, whiel those aiming for a minimal install would be able to disable recommends and get a stripped down, but still functional, QEMU binary.
The only thing we can't achieve this way is to install libvirtd and QEMU, without having the module daemons present. I'm not sure that matters though, if we aim to discontinue shipping libvirtd long term.
That's already the case today, so I'd say there's no need to worry about it. -- Andrea Bolognani / Red Hat / Virtualization

On 11/23/22 16:11, Jim Fehlig wrote:
Currently it is not possible to install a modular daemon subpackage without also installing the monolithic daemon
https://listman.redhat.com/archives/libvir-list/2022-September/234554.html
This series is an initial attempt at moving common daemons, utilities, and files from the daemon subpackage to a new daemon-core subpackage. The monolithic and modular daemons can then depend on the new subpackage.
libvirt-guests is moved to a new libvirt-guests subpackage, which is recommended by the daemon subpackage to provide smoother upgrade.
I've likely overlooked several items, but before continuing down this path too far I first wanted to gauge interest and see if this work is worth pursuing. If so, any comments on the RFC are appreciated!
I have a small bit of time for this task today and have started reworking the series as Daniel suggested.
Note that patches 1-3 are things I noticed while working on the others and could be pushed independently.
But I forgot about these patches, which are unrelated. Patch 1 could nearly be pushed under the trivial rule. Any comments on 2 or 3? Regards, Jim
Jim Fehlig (6): spec: Remove redundant with_libxl spec: Use more %{name} macro spec: Remove daemon postun trigger spec: Move common daemons to a separate subpackage spec: Move more files to the daemon-core subpackage spec: Move libvirt-guests to guests subpackage
libvirt.spec.in | 406 ++++++++++++++++++++++++++---------------------- 1 file changed, 219 insertions(+), 187 deletions(-)
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Jim Fehlig