[PATCH V2 8/9] spec: Remove libvirt-daemon dependency from hypervisor subpackages

Jim Fehlig posted 9 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH V2 8/9] 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 | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index a39c2d170b..c372bca543 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -808,7 +808,11 @@ Libxl
 %package daemon-qemu
 Summary: Server side daemon & driver required to run QEMU guests
 
-Requires: libvirt-daemon = %{version}-%{release}
+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}
+Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -827,7 +831,11 @@ 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-common = %{version}-%{release}
+Requires: libvirt-daemon-log = %{version}-%{release}
+Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
+Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
 Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -846,7 +854,7 @@ capabilities of the KVM hypervisor
 %package daemon-lxc
 Summary: Server side daemon & driver required to run LXC guests
 
-Requires: libvirt-daemon = %{version}-%{release}
+Requires: libvirt-daemon-common = %{version}-%{release}
 Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -864,7 +872,10 @@ capabilities of LXC
 %package daemon-xen
 Summary: Server side daemon & driver required to run XEN guests
 
-Requires: libvirt-daemon = %{version}-%{release}
+Requires: libvirt-daemon-common = %{version}-%{release}
+Requires: libvirt-daemon-lock = %{version}-%{release}
+Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
+Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
 Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -883,7 +894,7 @@ capabilities of XEN
 %package daemon-vbox
 Summary: Server side daemon & driver required to run VirtualBox guests
 
-Requires: libvirt-daemon = %{version}-%{release}
+Requires: libvirt-daemon-common = %{version}-%{release}
 Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
-- 
2.38.1
Re: [PATCH V2 8/9] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Daniel P. Berrangé 3 years, 1 month ago
On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
> Remove the libvirt-daemon dependency from the various
> libvirt-daemon-<hypervisor> subpackages, replacing it with a set of the
> new sub subpackages providing the same functionality.
> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
>  libvirt.spec.in | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index a39c2d170b..c372bca543 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -808,7 +808,11 @@ Libxl
>  %package daemon-qemu
>  Summary: Server side daemon & driver required to run QEMU guests
>  
> -Requires: libvirt-daemon = %{version}-%{release}
> +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}
> +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}

Don't add sanlock in any of these. It pulls in more 3rd party packages
and almost no one uses sanlock. Historically we've never installed
the sanlock package in any default setup.

>  Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
>  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> @@ -827,7 +831,11 @@ 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-common = %{version}-%{release}
> +Requires: libvirt-daemon-log = %{version}-%{release}
> +Requires: libvirt-daemon-lock = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
>  Requires: libvirt-daemon-driver-qemu = %{version}-%{release}
>  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> @@ -846,7 +854,7 @@ capabilities of the KVM hypervisor
>  %package daemon-lxc
>  Summary: Server side daemon & driver required to run LXC guests
>  
> -Requires: libvirt-daemon = %{version}-%{release}
> +Requires: libvirt-daemon-common = %{version}-%{release}
>  Requires: libvirt-daemon-driver-lxc = %{version}-%{release}
>  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> @@ -864,7 +872,10 @@ capabilities of LXC
>  %package daemon-xen
>  Summary: Server side daemon & driver required to run XEN guests
>  
> -Requires: libvirt-daemon = %{version}-%{release}
> +Requires: libvirt-daemon-common = %{version}-%{release}
> +Requires: libvirt-daemon-lock = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-lockd = %{version}-%{release}
> +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
>  Requires: libvirt-daemon-driver-libxl = %{version}-%{release}
>  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> @@ -883,7 +894,7 @@ capabilities of XEN
>  %package daemon-vbox
>  Summary: Server side daemon & driver required to run VirtualBox guests
>  
> -Requires: libvirt-daemon = %{version}-%{release}
> +Requires: libvirt-daemon-common = %{version}-%{release}
>  Requires: libvirt-daemon-driver-vbox = %{version}-%{release}
>  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
>  Requires: libvirt-daemon-driver-network = %{version}-%{release}
> -- 
> 2.38.1
> 

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 :|
Re: [PATCH V2 8/9] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Andrea Bolognani 3 years, 1 month ago
On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
>  %package daemon-qemu
>  Summary: Server side daemon & driver required to run QEMU guests
>
> -Requires: libvirt-daemon = %{version}-%{release}
> +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}
> +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}

The sanlock plugin was an optional install before, but now it's a
hard dependency. I'm not sure we want that.

-- 
Andrea Bolognani / Red Hat / Virtualization
Re: [PATCH V2 8/9] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Jim Fehlig 3 years, 1 month ago
On 12/14/22 10:59, Andrea Bolognani wrote:
> On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
>>   %package daemon-qemu
>>   Summary: Server side daemon & driver required to run QEMU guests
>>
>> -Requires: libvirt-daemon = %{version}-%{release}
>> +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}
>> +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
> 
> The sanlock plugin was an optional install before, but now it's a
> hard dependency. I'm not sure we want that.

No, we don't. I'll remove it in V3.

Regards,
Jim
Re: [PATCH V2 8/9] spec: Remove libvirt-daemon dependency from hypervisor subpackages
Posted by Andrea Bolognani 3 years, 1 month ago
On Wed, Dec 14, 2022 at 09:59:41AM -0800, Andrea Bolognani wrote:
> On Tue, Dec 13, 2022 at 05:31:01PM -0700, Jim Fehlig wrote:
> >  %package daemon-qemu
> >  Summary: Server side daemon & driver required to run QEMU guests
> >
> > -Requires: libvirt-daemon = %{version}-%{release}
> > +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}
> > +Requires: libvirt-daemon-plugin-sanlock = %{version}-%{release}
>
> The sanlock plugin was an optional install before, but now it's a
> hard dependency. I'm not sure we want that.

Even if we decide that we do, we should only have this dependency if
%{with_sanlock}, otherwise the package will become impossible to
install in certain cases.

Also we need to be more careful here: we want the more granular
dependencies if %{with_modular_daemons}, but otherwise (e.g. RHEL 8)
we still want the monolithic daemon.

-- 
Andrea Bolognani / Red Hat / Virtualization