1. 01 8月, 2012 6 次提交
    • D
      parallels: add storage driver · aa296e6c
      Dmitry Guryanov 提交于
      Parallels Cloud Server has one serious discrepancy with libvirt:
      libvirt stores domain configuration files in one place, and storage
      files in other places (with the API of storage pools and storage volumes).
      Parallels Cloud Server stores all domain data in a single directory,
      for example, you may have domain with name fedora-15, which will be
      located in '/var/parallels/fedora-15.pvm', and it's hard disk image will be
      in '/var/parallels/fedora-15.pvm/harddisk1.hdd'.
      
      I've decided to create storage driver, which produces pseudo-volumes
      (xml files with volume description), and they will be 'converted' to
      real disk images after attaching to a VM.
      
      So if someone creates VM with one hard disk using virt-manager,
      at first virt-manager creates a new volume, and then defines a
      domain. We can lookup a volume by path in XML domain definition
      and find out location of new domain and size of its hard disk.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      aa296e6c
    • D
      parallels: add functions to list domains and get info · e93c33a9
      Dmitry Guryanov 提交于
      Parallels driver is 'stateless', like vmware or openvz drivers.
      It collects information about domains during startup using
      command-line utility prlctl. VMs in Parallels are identified by UUIDs
      or unique names, which can be used as respective fields in
      virDomainDef structure. Currently only basic info, like
      description, virtual cpus number and memory amount, is implemented.
      Querying devices information will be added in the next patches.
      
      Parallels doesn't support non-persistent domains - you can't run
      a domain having only disk image, it must always be registered
      in system.
      
      Functions for querying domain info have been just copied from
      test driver with some changes - they extract needed data from
      previously created list of virDomainObj objects.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e93c33a9
    • D
      parallels: add driver skeleton · cafc26ff
      Dmitry Guryanov 提交于
      Parallels Cloud Server is a cloud-ready virtualization
      solution that allows users to simultaneously run multiple virtual
      machines and containers on the same physical server.
      
      More information can be found here: http://www.parallels.com/products/pcs/
      Also beta version of Parallels Cloud Server can be downloaded there.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      cafc26ff
    • D
      Only perform symbol check against libvirt.so · 8c63ff39
      Daniel P. Berrange 提交于
      The 'check-symfile' test case was checking the contents of
      libvirt.syms against libvirt.so + all of libvirt_driver_XXX.so
      This was in fact bogus - libvirt.syms should only refer to
      stuff in libvirt.so, but it had some symbols from the various
      driver modules in it too. Now that libvirt.syms has been
      fixed, the check-symfile test can be simplified to only
      consider libvirt.so
      8c63ff39
    • D
      Don't link nwfilter or secrets driver to libvirt.so · aae5cfb6
      Daniel P. Berrange 提交于
      The nwfilter and secrets drivers are both stateful and are already
      linked directly to libvirtd. Linking them to libvirt.so is thus
      wrong, likewise exporting their symbols in libvirt.so is wrong
      aae5cfb6
    • D
      Remove bogus libvirt_network.syms file · 5830c72e
      Daniel P. Berrange 提交于
      The network driver is stateful, so it is linked directly to libvirtd,
      rather than libvirt.so. Thus there are no network symbols to be exported
      in libvirt.so, and libvirt_network.syms can be deleted
      5830c72e
  2. 30 7月, 2012 3 次提交
    • D
      Run an RPC protocol over the LXC controller monitor · 9117fcb2
      Daniel P. Berrange 提交于
      This defines a new RPC protocol to be used between the LXC
      controller and the libvirtd LXC driver. There is only a
      single RPC message defined thus far, an asynchronous "EXIT"
      event that is emitted just before the LXC controller process
      exits. This provides the LXC driver with details about how
      the container shutdown - normally, or abnormally (crashed),
      thus allowing the driver to emit better libvirt events.
      
      Emitting the event in the LXC controller requires a few
      little tricks with the RPC service. Simply calling the
      virNetServiceClientSendMessage does not work, since this
      merely queues the message for asynchronous processing.
      In addition the main event loop is no longer running at
      the point the event is emitted, so no I/O is processed.
      
      Thus after invoking virNetServiceClientSendMessage it is
      necessary to mark the client as being in "delayed close"
      mode. Then the event loop is run again, until the client
      completes its close - this happens only after the queued
      message has been fully transmitted. The final complexity
      is that it is not safe to run virNetServerQuit() from the
      client close callback, since that is invoked from a
      context where the server is locked. Thus a zero-second
      timer is used to trigger shutdown of the event loop,
      causing the controller to finally exit.
      
      * src/Makefile.am: Add rules for generating RPC protocol
        files and dispatch methods
      * src/lxc/lxc_controller.c: Emit an RPC event immediately
        before exiting
      * src/lxc/lxc_domain.h: Record the shutdown reason
        given by the controller
      * src/lxc/lxc_monitor.c, src/lxc/lxc_monitor.h: Register
        RPC program and event handler. Add callback to let
        driver receive EXIT event.
      * src/lxc/lxc_process.c: Use monitor exit event to decide
        what kind of domain event to emit
      * src/lxc/lxc_protocol.x: Define wire protocol for LXC
        controller monitor.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      9117fcb2
    • D
      Make RPC code generator a little more flexible · ca5ab840
      Daniel P. Berrange 提交于
      Update the gendispatch.pl script to get a little closer to
      being able to generate code for the LXC monitor, by passing
      in the struct prefix separately from the procedure prefix.
      Also allow method names using virCapitalLetters instead
      of vir_underscore_separator
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ca5ab840
    • D
      Move LXC monitor code out into separate file · de4b32e4
      Daniel P. Berrange 提交于
      Move the code that handles the LXC monitor out of the
      lxc_process.c file and into lxc_monitor.{c,h}
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      de4b32e4
  3. 27 7月, 2012 1 次提交
  4. 23 7月, 2012 1 次提交
    • D
      Make ESX & Hyper-V code generator safe with parallel builds · 1bfb47df
      Daniel P. Berrange 提交于
      If from a clean GIT checkout 'make -j 8' is run, the ESX
      and Hyper-V code will be generated multiple times over.
      This is because there are multiple files being generated
      from one invocation of the generator script. make does not
      realize this and so invokes the generator once per file.
      This doesn't matter with serialized builds, but with
      parallel builds multiple instances of the generator get
      run at once.
      
      make[2]: Entering directory `/home/berrange/src/virt/libvirt/src'
        GEN    util/virkeymaps.h
        GEN    remote/remote_protocol.h
        GEN    remote/remote_client_bodies.h
        GEN    remote/qemu_protocol.h
        GEN    remote/qemu_client_bodies.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        GEN    esx/esx_vi_methods.generated.c
        GEN    esx/esx_vi_methods.generated.macro
        GEN    esx/esx_vi.generated.h
        GEN    esx/esx_vi.generated.c
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typedef
        GEN    esx/esx_vi_types.generated.typeenum
        GEN    esx/esx_vi_types.generated.typetostring
        GEN    esx/esx_vi_types.generated.typefromstring
        GEN    esx/esx_vi_types.generated.h
        GEN    esx/esx_vi_types.generated.c
        GEN    esx/esx_vi_methods.generated.h
        ...snip...
        GEN    hyperv/hyperv_wmi.generated.h
        GEN    libvirt_qemu_probes.h
        GEN    locking/qemu-sanlock.conf
        GEN    hyperv/hyperv_wmi.generated.c
        GEN    rpc/virnetprotocol.h
        GEN    hyperv/hyperv_wmi_classes.generated.typedef
        GEN    hyperv/hyperv_wmi_classes.generated.h
        GEN    hyperv/hyperv_wmi_classes.generated.c
        GEN    rpc/virkeepaliveprotocol.h
        GEN    remote/remote_protocol.c
        GEN    remote/qemu_protocol.c
        GEN    rpc/virkeepaliveprotocol.c
        GEN    rpc/virnetprotocol.c
        GEN    libvirt.def
      
      Prevent this using a timestamp file to control generation,
      as was previously done for the python bindings in commit
      a7868e01Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1bfb47df
  5. 19 7月, 2012 4 次提交
    • D
      Move LXC process management code into separate file · fdf588a6
      Daniel P. Berrange 提交于
      Move all the code that manages stop/start of LXC processes
      into separate lxc_process.{c,h} file to make the lxc_driver.c
      file smaller
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      fdf588a6
    • D
      Move cgroup setup code out of lxc_controller.c · 43e532d3
      Daniel P. Berrange 提交于
      Move the cgroup setup code out of the lxc_controller.c file
      and into lxc_cgroup.{c,h}. This reduces the size of the
      lxc_controller.c file and paves the way to invoke cgroup
      setup from lxc_driver.c instead of lxc_controller.c in the
      future
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      43e532d3
    • D
      Move LXC domain private data into separate file · f93518c7
      Daniel P. Berrange 提交于
      Move the LXC driver code related to the virDomainObjPtr
      private data into separate lxc_domain.{c,h} files
      to reduce the size of lxc_driver.c
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f93518c7
    • S
      Add a sheepdog backend for the storage driver · 29bc4fe6
      Sebastian Wiedenroth 提交于
      This patch brings support to manage sheepdog pools and volumes to libvirt.
      It uses the "collie" command-line utility that comes with sheepdog for that.
      
      A sheepdog pool in libvirt maps to a sheepdog cluster.
      It needs a host and port to connect to, which in most cases
      is just going to be the default of localhost on port 7000.
      
      A sheepdog volume in libvirt maps to a sheepdog vdi.
      To create one specify the pool, a name and the capacity.
      Volumes can also be resized later.
      
      In the volume XML the vdi name has to be put into the <target><path>.
      To use the volume as a disk source for virtual machines specify
      the vdi name as "name" attribute of the <source>.
      The host and port information from the pool are specified inside the host tag.
      
        <disk type='network'>
          ...
          <source protocol="sheepdog" name="vdi_name">
            <host name="localhost" port="7000"/>
          </source>
        </disk>
      
      To work right this patch parses the output of collie,
      so it relies on the raw output option. There recently was a bug which caused
      size information to be reported wrong. This is fixed upstream already and
      will be in the next release.
      Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
      29bc4fe6
  6. 14 7月, 2012 1 次提交
  7. 05 7月, 2012 2 次提交
  8. 25 6月, 2012 1 次提交
  9. 19 6月, 2012 1 次提交
  10. 13 6月, 2012 1 次提交
    • E
      build: fix 'make dist' on virgin checkout · 9b5970c6
      Eric Blake 提交于
      'make dist' was depending on *protocol-structs files, which are
      stored in git but in turn depended on generated files.  We still
      want to ship the protocol-structs files, but by renaming the
      tests to something not matching a file name, we separate 'make
      check' (which depends on the generated file) from 'make dist'
      (which only depends on the git files).  After all, the tarball
      should never depend on a generated file not stored in git.
      
      I found one more case of a git file depending on a generated
      file, in a bogus virkeycode.c listing; but at least this one
      had no associated rules so it never broke 'make dist'.
      
      Reported by Wen Congyang.  Latent bug has been present since
      commit 62dee6fa, but only recently exposed by commit 7bff56a0.
      
      * src/Makefile.am ($(srcdir)/util/virkeycode.c): Drop useless
      dependency.
      (BUILT_SOURCES): ...and build virkeymaps.h sooner.
      (PROTOCOL_STRUCTS): Rather than depend on the struct file...
      (check-local): ...convert things into a phony target of...
      (check-protocol): ...a new check.
      ($(srcdir)/remote_protocol-struct): Rename to isolate the distributed
      file from the conditional test.
      (PDWTAGS): Deal with rename.  Swap to compare 'expected actual'.
      9b5970c6
  11. 07 6月, 2012 1 次提交
    • E
      build: fix build of fresh checkout · ca02b101
      Eric Blake 提交于
      Commit 7bff56a0 worked in an incremental build, but fails for a
      fresh clone; apparently, if make sees both an actual file
      spelling and an inference rule, only the exact spelling is used.
      
        CCLD   libvirt_driver_test.la
        CC     libvirt_driver_remote_la-remote_driver.lo
      remote/remote_driver.c:4707:34: fatal error: remote_client_bodies.h: No such file or directory
      compilation terminated.
      
      BUILT_SOURCES to the rescue, instead of trying to mess with .lo
      dependencies directly.
      
      * src/Makefile.am (REMOTE_DRIVER_PREREQS, %remote_driver.lo): Drop...
      (BUILT_SOURCES): ...and add here instead.
      ca02b101
  12. 06 6月, 2012 1 次提交
    • E
      build: ensure storage driver is used · 3c3644d3
      Eric Blake 提交于
      Commit 1c275e9a accidentally dropped the storage driver from
      libvirtd, because it depended on a C preprocessor macro that
      was not defined.  Furthermore, if you do './configure
      --without-storage-dir --with-storage-disk' or any other combination
      where you explicitly build a subset of storage backends excluding
      the dir backend, then the build is broken.
      
      Based on analysis by Osier Yang.
      
      * configure.ac (WITH_STORAGE): Define top-level conditional.
      * src/Makefile.am (mod_LTLIBRARIES): Build driver even when
      storage_dir is disabled.
      * daemon/libvirtd.c: Pick up storage driver for any backend, not
      just dir.
      * daemon/Makefile.am (libvirtd_LDADD): Likewise.
      3c3644d3
  13. 05 6月, 2012 2 次提交
    • E
      build: fix 'make distcheck' issues · 7bff56a0
      Eric Blake 提交于
      We had a distributed file (remote_protocol.h, which in turn was
      a prereq to remote_driver.c) depending on a generated file
      (libvirt_probes.h), which is a no-no for a VPATH build from a
      read-only source tree (no wonder 'make distcheck' tests precisely
      that situation):
      
           File `libvirt_driver_remote.la' does not exist.
             File `libvirt_driver_remote_la-remote_driver.lo' does not exist.
                   Prerequisite `libvirt_probes.h' is newer than target `../../src/remote/remote_protocol.h'.
                  Must remake target `../../src/remote/remote_protocol.h'.
      Invoking recipe from Makefile:7464 to update target `../../src/remote/remote_protocol.h'.
      make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/libvirt-0.9.12/_build/src'
        GEN    ../../src/remote/remote_protocol.h
      cannot create ../../src/remote/remote_protocol.h: Permission denied at ../../src/rpc/genprotocol.pl line 31.
      make[3]: *** [../../src/remote/remote_protocol.h] Error 13
      
      Rather than making distributed .c files depend on generated files, we
      really want to ensure that compilation into .lo files is not attempted
      until the generated files are present, done by this patch.  Since there
      were two different sets of conditionally generated files that both
      feed the .lo file, I had to introduce a new variable REMOTE_DRIVER_PREREQS
      to keep automake happy.
      
      After that fix, the next issue was that make treats './foo' and 'foo'
      differently in determining whether an implicit %foo rule is applicable,
      with the result that locking/qemu-sanlock.conf wasn't properly being
      built at the right times.  Also, the output for using the .aug test
      files was a bit verbose.
      
      After fixing the src directory, the next error is related to the docs
      directory, where the tarball is missing a stamp file and thus tries to
      regenerate files that are already present:
      
        GEN    ../../docs/apibuild.py.stamp
      Traceback (most recent call last):
        File "../../docs/apibuild.py", line 2511, in <module>
          rebuild("libvirt")
        File "../../docs/apibuild.py", line 2495, in rebuild
          builder.serialize()
        File "../../docs/apibuild.py", line 2424, in serialize
          output = open(filename, "w")
      IOError: [Errno 13] Permission denied: '../../docs/libvirt-api.xml'
      make[5]: *** [../../docs/apibuild.py.stamp] Error 1
      
      and fixing that exposed another case of a distributed file (generated
      html) depending on a built file (libvirt.h), but only when doing an
      in-tree build, because of a file glob.
      
      * src/Makefile.am ($(srcdir)/remote/remote_driver.c): Change...
      (libvirt_driver_remote_la-remote_driver.lo): ...to the real
      dependency.
      ($(builddir)/locking/%-sanlock.conf): Drop $(builddir), so that
      rule gets run in time for test_libvirt_sanlock.aug.
      (test_libvir*.aug): Cater to silent build.
      (conf_DATA): Don't ship qemu-sanlock.conf in the tarball, since it
      is trivial to regenerate.
      * docs/Makefile.am (EXTRA_DIST): Ship our stamp file.
      ($(APIBUILD_STAMP)): Don't depend on generated file.
      7bff56a0
    • L
      util: fix "make rpm" when viratomic.h is used · 80e4b166
      Laine Stump 提交于
      Although src/util/viratomic.h has been added to the repo, up until now
      it hasn't been used. Stefan Berger is using it in his proposed dhcp
      snooping patches, and an rpm build with those patches failed due to
      viratomic.h not being packed up with the rest of the sources.
      80e4b166
  14. 02 6月, 2012 2 次提交
    • S
      nwfilter: move code for IP address map into separate file · 797b4758
      Stefan Berger 提交于
      The goal of this patch is to prepare for support for multiple IP
      addresses per interface in the DHCP snooping code.
      
      Move the code for the IP address map that maps interface names to
      IP addresses into their own file. Rename the functions on the way
      but otherwise leave the code as-is. Initialize this new layer
      separately before dependent layers (iplearning, dhcpsnooping)
      and shut it down after them.
      797b4758
    • S
      nwfilter: add DHCP snooping · cec281fc
      Stefan Berger 提交于
      This patch adds DHCP snooping support to libvirt. The learning method for
      IP addresses is specified by setting the "CTRL_IP_LEARNING" variable to one of
      "any" [default] (existing IP learning code), "none" (static only addresses)
      or "dhcp" (DHCP snooping).
      
      Active leases are saved in a lease file and reloaded on restart or HUP.
      
      The following interface XML activates and uses the DHCP snooping:
      
          <interface type='bridge'>
            <source bridge='virbr0'/>
            <filterref filter='clean-traffic'>
              <parameter name='CTRL_IP_LEARNING' value='dhcp'/>
            </filterref>
          </interface>
      
      All filters containing the variable 'IP' are automatically adjusted when
      the VM receives an IP address via DHCP. However, multiple IP addresses per
      interface are silently ignored in this patch, thus only supporting one IP
      address per interface. Multiple IP address support is added in a later
      patch in this series.
      Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      cec281fc
  15. 31 5月, 2012 1 次提交
  16. 30 5月, 2012 7 次提交
    • W
      build: include augeas-gentest.pl into dist file · 23292f73
      Wen Congyang 提交于
      We generate *.aug from *.aug.in by augeas-gentest.pl, so this script
      should be included in dist file.
      23292f73
    • E
      build: use same perl binary throughout build · 13af87f2
      Eric Blake 提交于
      Some of our rules used $(PERL), while others used 'perl'.  Always
      using the variable allows a developer to point to a different (often
      better) perl than the default one found on $PATH.
      
      * daemon/Makefile.am ($(srcdir)/remote_dispatch.h): s/perl/$(PERL).
      * src/Makefile.am ($(srcdir)/remote/remote_client_bodies.h)
      (PDWTAGS, %protocol.c, %_probes.stp): Likewise.
      13af87f2
    • E
      build: fix testing of augeas files in VPATH builds · fb59cf7a
      Eric Blake 提交于
      Without this fix, a VPATH build (such as used by ./autobuild.sh)
      fails with messages like:
      
      make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon'
      ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug
      cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38.
      
      Since the test files are not part of the tarball, we can generate
      them into the build dir, but rather than create a subdirectory
      just for the test file, it is easier to test them directly in
      libvirt.git/src.
      
      * daemon/Makefile.am (AUG_GENTEST): Factor out definition.
      (test_libvirtd.aug): Look for correct file.
      * src/Makefile.am (AUG_GENTEST): Use $(PERL).
      (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug)
      (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories.
      (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect
      location of built tests.
      * configure.ac (PERL): Substitute perl.
      fb59cf7a
    • M
      build: Fixed generating of libvirt_qemu_probes.h · be6c46b1
      Martin Kletzander 提交于
      I added libvirt_qemu_probes.h into BUILT_SOURCES. That makes it
      generated, but most probably it is not the clearest way how to do
      that, but it fixes the build.
      be6c46b1
    • E
      build: don't lose probes.o files · 620dda66
      Eric Blake 提交于
      The previous patch fixed an incremental build, but missed that on
      a fresh checkout, we now have nothing left that stops make from
      nuking libvirt_qemu_probes.o.
      
      * src/Makefile.am ($(libvirt_driver_qemu_la_SOURCES)): Delete,
      since this variable is empty.
      (.PRECIOUS): Add %_probes.o, so they don't get nuked as an
      intermediate by-product after creating %_probes.lo.
      620dda66
    • E
      build: fix missing dependencies for libvirt-qemu.so · fca009fd
      Eric Blake 提交于
      The moment you specify a _DEPENDENCIES, older automake (stupidly)
      assumes that you will specify _all_ dependencies for that target.
      This stupidity has been fixed in automake 1.12, but we cannot rely on
      newer automake everywhere.  For libvirt_la_DEPENDENCIES, we took
      care of providing the full list, but for libvirt_qemu_la_DEPENDENCIES,
      we were missing the dependency on libvirt_qemu_impl.la, which resulted
      in a failed build:
      
      make[3]: Entering directory `/home/ajia/Workspace/libvirt/src'
         CCLD   libvirt_driver_qemu.la
      libtool: link: `libvirt_qemu_probes.lo' is not a valid libtool object
      
      * src/Makefile.am (libvirt_driver_qemu_la_DEPENDENCIES): Delete;
      automake does a better job if it does the entire job.
      fca009fd
    • E
      build: don't clean a file that belongs in the tarball · 28dbf01d
      Eric Blake 提交于
      Otherwise, 'make rpm' fails with:
      
      make[2]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `distdir'.  Stop.
      make[2]: Leaving directory `/home/dipankar/src/powerpc/libvirt-ppc/src'
      make[1]: *** [distdir] Error 1
      
      Reported by Dipankar Sarma.
      
      * src/Makefile.am (CLEANFILES): Clean only the generated file.
      28dbf01d
  17. 28 5月, 2012 4 次提交
    • E
      build: silence libtool during tests · 1d22ba95
      Eric Blake 提交于
      Libtool is picky about linking against a module library (aka a .so);
      giving lots of warnings like this in the tests directory:
      
        CCLD   networkxml2argvtest
      
      *** Warning: Linking the executable networkxml2argvtest against the loadable module
      *** libvirt_driver_network.so is not portable!
      
      Fix that by splitting things into a convenience library which can
      be used directly by the tests, and making the real .so just wrap
      the convenience library.
      
      Based on a suggestion by Daniel P. Berrange.
      
      * configure.ac (--with-driver-modules): Fix help test.
      * src/Makefile.am (libvirt_driver_xen.la, libvirt_driver_libxl.la)
      (libvirt_driver_qemu.la, libvirt_driver_lxc.la)
      (libvirt_driver_uml.la): Factor into new convenience libraries.
      * tests/Makefile.am (xen_LDADDS, qemu_LDADDS, lxc_LDADDS)
      (networkxml2argvtest_LDADD): Link to convenience libraries, not
      shared libraries.
      1d22ba95
    • D
      Fix linking to DTrace probes file · 1e8ecfed
      Daniel P. Berrange 提交于
      There was no rule forcing libvirt_qemu_probes.o to be built
      before libvirt_qemu_probes.lo was used. Also libvirtd was
      still referencing the .o file, rather than the .lo file.
      
      Both the .lo and .o file must be listed as DEPENDENCIES,
      otherwise libtool will unhelpfully delete the .o file
      once the .lo file is created.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1e8ecfed
    • D
      Fix Win32 build by linking to ole32 · 7cd77b6b
      Daniel P. Berrange 提交于
      The CoTaskMemFree function requires the ole32 DLL to be
      linked against. Currently this is only done for the
      VirtualBox driver. Also add it to libvirt_util.la
      
      * configure.ac: Unconditionally add ole32 DLL to Win32
      * src/Makefile.am: Link old32 to libvirt_util.la
      7cd77b6b
    • D
      Autogenerate augeas test case from default config files · de9758ae
      Daniel P. Berrange 提交于
      When adding new config file parameters, the corresponding
      additions to the augeas lens' are constantly forgotten.
      Also there are augeas test cases, these don't catch the
      error, since they too are never updated.
      
      To address this, the augeas test cases need to be auto-generated
      from the example config files.
      
      * build-aux/augeas-gentest.pl: Helper to generate an
        augeas test file, substituting in elements from the
        example config files
      * src/Makefile.am, daemon/Makefile.am: Switch to
        auto-generated augeas test cases
      * daemon/test_libvirtd.aug, daemon/test_libvirtd.aug.in,
        src/locking/test_libvirt_sanlock.aug,
        src/locking/test_libvirt_sanlock.aug.in,
        src/lxc/test_libvirtd_lxc.aug,
        src/lxc/test_libvirtd_lxc.aug.in,
        src/qemu/test_libvirtd_qemu.aug,
        src/qemu/test_libvirtd_qemu.aug.in: Remove example
        config file data, replacing with a ::CONFIG:: placeholder
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      de9758ae
  18. 26 5月, 2012 1 次提交
    • E
      build: silence libtool warning on probes.o · 0159295d
      Eric Blake 提交于
      Libtool supports linking directly against .o files on some platforms
      (such as Linux), which happens to be the only place where we are
      actually doing that (for the dtrace-generated probes.o files).  However,
      it raises a big stink about the non-portability, even though we don't
      attempt it on platforms where it would actually fail:
      
        CCLD   libvirt_driver_qemu.la
      
      *** Warning: Linking the shared library libvirt_driver_qemu.la against
      the non-libtool
      *** objects  libvirt_qemu_probes.o is not portable!
      
      This shuts libtool up by creating a proper .lo file that matches
      what libtool normally expects.
      
      * src/Makefile.am (%_probes.lo): New rule.
      (libvirt_probes.stp, libvirt_qemu_probes.stp): Simplify into...
      (%_probes.stp): ...shorter rule.
      (CLEANFILES): Clean new .lo files.
      (libvirt_la_BUILT_LIBADD, libvirt_driver_qemu_la_LIBADD)
      (libvirt_lxc_LDADD, virt_aa_helper_LDADD): Link against .lo file.
      * tests/Makefile.am (PROBES_O, qemu_LDADDS): Likewise.
      0159295d