[PATCH V4 10/11] spec: Remove libvirt-daemon dependency from hypervisor subpackages

Jim Fehlig posted 11 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH V4 10/11] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Jim Fehlig 3 years, 1 month ago
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 | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e37dbdb0e3..a4a5221a41 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -820,7 +820,14 @@ Libxl
 %package daemon-qemu
 Summary: Server side daemon & driver required to run QEMU guests
 
+    %if %{with_modular_daemons}
+Requires: libvirt-daemon-common = %{version}-%{release}
+Requires: libvirt-daemon-log = %{version}-%{release}
+Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
+    %else
 Requires: libvirt-daemon = %{version}-%{release}
+    %endif
 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -839,7 +846,14 @@ capabilities of the QEMU TCG emulators
 %package daemon-kvm
 Summary: Server side daemon & driver required to run KVM guests
 
+    %if %{with_modular_daemons}
+Requires: libvirt-daemon-common = %{version}-%{release}
+Requires: libvirt-daemon-log = %{version}-%{release}
+Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
+    %else
 Requires: libvirt-daemon = %{version}-%{release}
+    %endif
 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -858,7 +872,11 @@ capabilities of the KVM hypervisor
 %package daemon-lxc
 Summary: Server side daemon & driver required to run LXC guests
 
+    %if %{with_modular_daemons}
+Requires: libvirt-daemon-common = %{version}-%{release}
+    %else
 Requires: libvirt-daemon = %{version}-%{release}
+    %endif
 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -876,7 +894,13 @@ capabilities of LXC
 %package daemon-xen
 Summary: Server side daemon & driver required to run XEN guests
 
+    %if %{with_modular_daemons}
+Requires: libvirt-daemon-common = %{version}-%{release}
+Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
+    %else
 Requires: libvirt-daemon = %{version}-%{release}
+    %endif
 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -895,7 +919,11 @@ capabilities of XEN
 %package daemon-vbox
 Summary: Server side daemon & driver required to run VirtualBox guests
 
+    %if %{with_modular_daemons}
+Requires: libvirt-daemon-common = %{version}-%{release}
+    %else
 Requires: libvirt-daemon = %{version}-%{release}
+    %endif
 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
-- 
2.38.1
Re: [PATCH V4 10/11] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Andrea Bolognani 3 years, 1 month ago
On Thu, Dec 22, 2022 at 11:03:41AM -0700, Jim Fehlig wrote:
>  %package daemon-qemu
>  Summary: Server side daemon & driver required to run QEMU guests
>
> +    %if %{with_modular_daemons}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +Requires: libvirt-daemon-log = %{version}-%{release}
> +Requires: libvirt-daemon-lock = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> +    %else
>  Requires: libvirt-daemon = %{version}-%{release}
> +    %endif
>
>  %package daemon-kvm
>  Summary: Server side daemon & driver required to run KVM guests
>
> +    %if %{with_modular_daemons}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +Requires: libvirt-daemon-log = %{version}-%{release}
> +Requires: libvirt-daemon-lock = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> +    %else
>  Requires: libvirt-daemon = %{version}-%{release}
> +    %endif
>
>  %package daemon-lxc
>  Summary: Server side daemon & driver required to run LXC guests
>
> +    %if %{with_modular_daemons}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +    %else
>  Requires: libvirt-daemon = %{version}-%{release}
> +    %endif
>
>  %package daemon-xen
>  Summary: Server side daemon & driver required to run XEN guests
> +    %if %{with_modular_daemons}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +Requires: libvirt-daemon-lock = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> +    %else
>  Requires: libvirt-daemon = %{version}-%{release}
> +    %endif
>
>  %package daemon-vbox
>  Summary: Server side daemon & driver required to run VirtualBox guests
> +    %if %{with_modular_daemons}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +    %else
>  Requires: libvirt-daemon = %{version}-%{release}
> +    %endif

So the xen driver doesn't use virtlogd, and the lxc and vbox drivers
don't use locking either? It's nice that we're making some of the
deployments leaner by default :)

I wonder if we could leave the locking part out for *all* of the
above, with the rationale that it's something that you have to
explicitly enable at the configuration file level anyway. But I guess
that wouldn't work too well when it comes to updates. Maybe after
Enough Time™ has passed?

-- 
Andrea Bolognani / Red Hat / Virtualization
Re: [PATCH V4 10/11] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Andrea Bolognani 3 years, 1 month ago
On Fri, Dec 23, 2022 at 04:42:08AM -0500, Andrea Bolognani wrote:
> On Thu, Dec 22, 2022 at 11:03:41AM -0700, Jim Fehlig wrote:
> >  %package daemon-qemu
> >  Summary: Server side daemon & driver required to run QEMU guests
> >
> > +    %if %{with_modular_daemons}
> > +Requires: libvirt-daemon-common = %{version}-%{release}
> > +Requires: libvirt-daemon-log = %{version}-%{release}
> > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > +    %else
> >  Requires: libvirt-daemon = %{version}-%{release}
> > +    %endif
> >
> >  %package daemon-kvm
> >  Summary: Server side daemon & driver required to run KVM guests
> >
> > +    %if %{with_modular_daemons}
> > +Requires: libvirt-daemon-common = %{version}-%{release}
> > +Requires: libvirt-daemon-log = %{version}-%{release}
> > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > +    %else
> >  Requires: libvirt-daemon = %{version}-%{release}
> > +    %endif
> >
> >  %package daemon-lxc
> >  Summary: Server side daemon & driver required to run LXC guests
> >
> > +    %if %{with_modular_daemons}
> > +Requires: libvirt-daemon-common = %{version}-%{release}
> > +    %else
> >  Requires: libvirt-daemon = %{version}-%{release}
> > +    %endif
> >
> >  %package daemon-xen
> >  Summary: Server side daemon & driver required to run XEN guests
> > +    %if %{with_modular_daemons}
> > +Requires: libvirt-daemon-common = %{version}-%{release}
> > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > +    %else
> >  Requires: libvirt-daemon = %{version}-%{release}
> > +    %endif
> >
> >  %package daemon-vbox
> >  Summary: Server side daemon & driver required to run VirtualBox guests
> > +    %if %{with_modular_daemons}
> > +Requires: libvirt-daemon-common = %{version}-%{release}
> > +    %else
> >  Requires: libvirt-daemon = %{version}-%{release}
> > +    %endif
>
> So the xen driver doesn't use virtlogd, and the lxc and vbox drivers
> don't use locking either? It's nice that we're making some of the
> deployments leaner by default :)
>
> I wonder if we could leave the locking part out for *all* of the
> above, with the rationale that it's something that you have to
> explicitly enable at the configuration file level anyway. But I guess
> that wouldn't work too well when it comes to updates. Maybe after
> Enough Time™ has passed?

Actually, since after your changes the libvirt-daemon package still
depends on libvirt-daemon-log, libvirt-daemon-lock and all the new
packages that contain files that were originally in that package, I
think the upgrade scenarios are taken care of by that and we could
trim down the libvirt-daemon-{qemu,kvm,xen} packages like I suggested
above. Dan, what do you think?

-- 
Andrea Bolognani / Red Hat / Virtualization
Re: [PATCH V4 10/11] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Daniel P. Berrangé 3 years, 1 month ago
On Fri, Dec 23, 2022 at 05:35:46AM -0500, Andrea Bolognani wrote:
> On Fri, Dec 23, 2022 at 04:42:08AM -0500, Andrea Bolognani wrote:
> > On Thu, Dec 22, 2022 at 11:03:41AM -0700, Jim Fehlig wrote:
> > >  %package daemon-qemu
> > >  Summary: Server side daemon & driver required to run QEMU guests
> > >
> > > +    %if %{with_modular_daemons}
> > > +Requires: libvirt-daemon-common = %{version}-%{release}
> > > +Requires: libvirt-daemon-log = %{version}-%{release}
> > > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > > +    %else
> > >  Requires: libvirt-daemon = %{version}-%{release}
> > > +    %endif
> > >
> > >  %package daemon-kvm
> > >  Summary: Server side daemon & driver required to run KVM guests
> > >
> > > +    %if %{with_modular_daemons}
> > > +Requires: libvirt-daemon-common = %{version}-%{release}
> > > +Requires: libvirt-daemon-log = %{version}-%{release}
> > > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > > +    %else
> > >  Requires: libvirt-daemon = %{version}-%{release}
> > > +    %endif
> > >
> > >  %package daemon-lxc
> > >  Summary: Server side daemon & driver required to run LXC guests
> > >
> > > +    %if %{with_modular_daemons}
> > > +Requires: libvirt-daemon-common = %{version}-%{release}
> > > +    %else
> > >  Requires: libvirt-daemon = %{version}-%{release}
> > > +    %endif
> > >
> > >  %package daemon-xen
> > >  Summary: Server side daemon & driver required to run XEN guests
> > > +    %if %{with_modular_daemons}
> > > +Requires: libvirt-daemon-common = %{version}-%{release}
> > > +Requires: libvirt-daemon-lock = %{version}-%{release}
> > > +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> > > +    %else
> > >  Requires: libvirt-daemon = %{version}-%{release}
> > > +    %endif
> > >
> > >  %package daemon-vbox
> > >  Summary: Server side daemon & driver required to run VirtualBox guests
> > > +    %if %{with_modular_daemons}
> > > +Requires: libvirt-daemon-common = %{version}-%{release}
> > > +    %else
> > >  Requires: libvirt-daemon = %{version}-%{release}
> > > +    %endif
> >
> > So the xen driver doesn't use virtlogd, and the lxc and vbox drivers
> > don't use locking either? It's nice that we're making some of the
> > deployments leaner by default :)
> >
> > I wonder if we could leave the locking part out for *all* of the
> > above, with the rationale that it's something that you have to
> > explicitly enable at the configuration file level anyway. But I guess
> > that wouldn't work too well when it comes to updates. Maybe after
> > Enough Time™ has passed?
> 
> Actually, since after your changes the libvirt-daemon package still
> depends on libvirt-daemon-log, libvirt-daemon-lock and all the new
> packages that contain files that were originally in that package, I
> think the upgrade scenarios are taken care of by that and we could
> trim down the libvirt-daemon-{qemu,kvm,xen} packages like I suggested
> above. Dan, what do you think?

Something needs to be pulling in libvirt-daemon-plugin-lockd for
the upgrade to work, otherwise upgrades will loos the loadable
module they were potentially using.

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 :|