[libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

Daniel P. Berrange berrange at redhat.com
Fri Mar 30 19:30:50 UTC 2012


On Fri, Mar 30, 2012 at 03:00:03PM -0400, Laine Stump wrote:
> On 03/30/2012 12:53 PM, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> >
> > There are a number of flaws with our packaging of the libvirtd
> > daemon:
> >
> >  - Installing 'libvirt' does not install 'qemu-kvm' or 'xen'
> >    etc which are required to actually run the hypervisor in
> >    question
> >  - Installing 'libvirt' pulls in the default configuration
> >    files which may not be wanted & cause problems if installed
> >    inside a guest
> >  - It is not possible to explicitly required all the peices
> >    required to manage a specific hypervisor
> >
> > This change takes the 'libvirt' RPM and and changes it thus
> >
> >  - libvirt: just a virtual package with dep on libvirt-daemon,
> >    libvirt-daemon-config-network & libvirt-daemon-config-nwfilter
> >  - libvirt-daemon: the libvirt daemon and related pieces
> >  - libvirt-daemon-config-network: the default network config
> >  - libvirt-daemon-config-nwfilter: the network filter configs
> >  - libvirt-docs: the website HTML
> >
> > We then introduce some more virtual (empty) packages
> >
> >  - libvirt-daemon-qemu: Deps on libvirt-daemon & 'qemu'
> >  - libvirt-daemon-kvm: Deps on libvirt-daemon & 'qemu-kvm'
> >  - libvirt-daemon-lxc: Deps on libvirt-daemon
> >  - libvirt-daemon-uml: Deps on libvirt-daemon
> >  - libvirt-daemon-xen: Deps on libvirt-daemon & 'xen'
> >
> >  - libvirt-qemu: Deps on libvirt-daemon-qemu & libvirt-daemon-config-{network,nwfilter}
> >  - libvirt-kvm: Deps on libvirt-daemon-kvm & libvirt-daemon-config-{network,nwfilter}
> >  - libvirt-lxc: Deps on libvirt-daemon-lxc & libvirt-daemon-config-{network,nwfilter}
> >  - libvirt-uml: Deps on libvirt-daemon-uml & libvirt-daemon-config-{network,nwfilter}
> >  - libvirt-xen: Deps on libvirt-daemon-xen & libvirt-daemon-config-network
> >
> > My intent in the future is to turn on the driver modules by
> > default, at which time 'libvirt-daemon' will cease to include
> > any specific drivers, instead we'll get libvirt-daemon-driver-XXXX
> > packages for each driver. The libvirt-daemon-XXX packages will
> > then pull in each driver that they require.
> >
> > It is recommended that applications required a locally installed
> > libvirtd daemon, use either 'Requires: libvirt-daemon-XXXX' or
> > 'Requires: libvirt-XXX' and *not* "Requires: libvirt-daemon"
> > or 'Requires: libvirt'
> 
> I did a successful "make rpm" on Fedora 16, which resulted in 21 rpm's
> (including the source rpm).
> 
> When I tried to update using rpm -U, I was told that I didn't have the
> required "qemu" and "xen" packages installed (not surprising, since I
> never use them). Installing qemu cost 52MB on my disk, and xen another
> 27. This isn't a bother to me, but I suppose it could be for someone who
> was trying to make images as small as possible. On the other hand, that
> person will just need to start using the "libvirt-kvm" package instead
> of "libvirt".

I assume that is because you did 'rpm -Uvh *.rpm', which means it
would have included libvirt-qemu and libvirt-xen which in turn
dep on 'qemu' and 'xen' respectively. If you had merely asked to
install 'libvirt', it would not have required libvirt-qemu or
libvirt-xen.

To clarify the dependancy chain is this:

  libvirt ->  libvirt-daemon, libvirt-config-network, libvirt-config-nwfilter

  libvirt-daemon-qemu -> libvirt-daemon, qemu
  libvirt-daemon-kvm  -> libvirt-daemon, qemu-kvm
  libvirt-daemon-xen  -> libvirt-daemon, xen

  libvirt-qemu -> libvirt-daemon-qemu, libvirt-config-network, libvirt-config-nwfilter
  libvirt-kvm  -> libvirt-daemon-kvm, libvirt-config-network, libvirt-config-nwfilter
  libvirt-xen  -> libvirt-daemon-xen, libvirt-config-network

Notice there is no direct dep from 'libvirt' to 'qemu' or 'xen', only
from the libvirt-qemu RPMs, which are not required by anything else.


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