[libvirt] [PATCH] spec: Remove qemu-img dependency from storage driver

Daniel P. Berrange berrange at redhat.com
Wed Dec 3 15:58:45 UTC 2014


On Wed, Dec 03, 2014 at 04:52:25PM +0100, Jiri Denemark wrote:
> Both qemu-img and its stripped down version qcow-create are searched for
> dynamically with virFindFileInPath, functions using them report errors
> when the required binary is not present, and we don't compile in a fixed
> path detected by configure anymore. So I don't see a reason for keeping
> the dependencies for our storage driver. Moreover, it's weired when the
> dependencies (of the storage driver) change depending on wheter a
> particular hypervisor driver (xen/qemu) is enabled or not.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  libvirt.spec.in | 18 ------------------
>  1 file changed, 18 deletions(-)

Even if using the Xen hypervisor, you can use the qemu-img binary
for creating volumes. Since the qemu-img binary is in a separate
RPM from the main QEMU emulator binaries, it makes sense to depend
on qemu-img if we're enabling QEMU support in libvirt. Similarly the
LXC driver can make use of qemu-img for creating images that are then
used via qemu-nbd.

So I think our current Requires deps are actually correct here - they
ensure that the qemu-img binary is always pulled into the host, no
matter what daemon-driver-XXX is installed.

IMHO only the BuildRequires are redundant.

> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index bda28e7..dbeb62a 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -530,15 +530,6 @@ BuildRequires: PolicyKit-devel >= 0.6
>  # For mount/umount in FS driver
>  BuildRequires: util-linux
>  %endif
> -%if %{with_qemu}
> -# From QEMU RPMs
> -BuildRequires: /usr/bin/qemu-img
> -%else
> -    %if %{with_xen}
> -# From Xen RPMs
> -BuildRequires: /usr/sbin/qcow-create
> -    %endif
> -%endif
>  %if %{with_storage_lvm}
>  # For LVM drivers
>  BuildRequires: lvm2
> @@ -871,15 +862,6 @@ Requires: device-mapper
>  # For Sheepdog support
>  Requires: sheepdog
>              %endif
> -            %if %{with_qemu}
> -# From QEMU RPMs
> -Requires: /usr/bin/qemu-img
> -            %else
> -                %if %{with_xen}
> -# From Xen RPMs
> -Requires: /usr/sbin/qcow-create
> -                %endif
> -            %endif
>  
>  %description daemon-driver-storage
>  The storage driver plugin for the libvirtd daemon, providing

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list