1. 13 4月, 2010 1 次提交
    • D
      Release of libvirt-0.8.0 · bfcca587
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in src/libvirt_public.syms:
        updates for release of 0.8.0
      * po/*.po po/libvirt.pot: updated a lar set of localizations, and merge
        the messages
      bfcca587
  2. 09 4月, 2010 1 次提交
  3. 08 4月, 2010 3 次提交
    • D
      Fix Win32 portability problems · 3d3af088
      Daniel P. Berrange 提交于
      The network filter / snapshot / hooks code introduced some
      non-portable pices that broke the win32 build
      
      * configure.ac: Check for net/ethernet.h required by nwfile config
         parsing code
      * src/conf/nwfilter_conf.c: Define ethernet protocol  constants
        if net/ethernet.h is missing
      * src/util/hooks.c: Disable hooks build on Win32 since it lacks
        fork/exec/pipe
      * src/util/threads-win32.c: Fix unchecked return value
      * tools/virsh.c: Disable SIGPIPE on Win32 since it doesn't exist.
        Fix non-portable strftime() formats
      3d3af088
    • D
      Avoid searching for windres when not building for Windows · 9cea2af3
      Diego Elio Pettenò 提交于
      Just checking for a windres tool might hit even on Linux systems when
      building for Linux (e.g.: when using Gentoo and having built binutils
      with multitarget support), and will then fail to link properly at the
      end of the build.
      
      * configure.ac: Avoid searching for windres on non windows target
      9cea2af3
    • S
      nwfilter: Support for learning a VM's IP address · 3bf24abc
      Stefan Berger 提交于
      This patch implements support for learning a VM's IP address. It uses
      the pcap library to listen on the VM's backend network interface (tap)
      or the physical ethernet device (macvtap) and tries to capture packets
      with source or destination MAC address of the VM and learn from DHCP
      Offers, ARP traffic, or first-sent IPv4 packet what the IP address of
      the VM's interface is. This then allows to instantiate the network
      traffic filtering rules without the user having to provide the IP
      parameter somewhere in the filter description or in the interface
      description as a parameter. This only supports to detect the parameter
      IP, which is for the assumed single IPv4 address of a VM. There is not
      support for interfaces that may have multiple  IP addresses (IP
      aliasing) or IPv6 that may then require more than one valid IP address
      to be detected. A VM can have multiple independent interfaces that each
      uses a different IP address and in that case it will be attempted to
      detect each one of the address independently.
      
      So, when for example an interface description in the domain XML has
      looked like this up to now:
      
          <interface type='bridge'>
            <source bridge='mybridge'/>
            <model type='virtio'/>
            <filterref filter='clean-traffic'>
              <parameter name='IP' value='10.2.3.4'/>
            </filterref>
          </interface>
      
      you may omit the IP parameter:
      
          <interface type='bridge'>
            <source bridge='mybridge'/>
            <model type='virtio'/>
            <filterref filter='clean-traffic'/>
          </interface>
      
      Internally I am walking the 'tree' of a VM's referenced network filters
      and determine with the given variables which variables are missing. Now,
      the above IP parameter may be missing and this causes a libvirt-internal
      thread to be started that uses the pcap library's API to listen to the
      backend interface  (in case of macvtap to the physical interface) in an
      attempt to determine the missing IP parameter. If the backend interface
      disappears the thread terminates assuming the VM was brought down. In
      case of a macvtap device a timeout is being used to wait for packets
      from the given VM (filtering by VM's interface MAC address). If the VM's
      macvtap device disappeared the thread also terminates. In all other
      cases it tries to determine the IP address of the VM and will then apply
      the rules late on the given interface, which would have happened
      immediately if the IP parameter had been explicitly given. In case an
      error happens while the firewall rules are applied, the VM's backend
      interface is 'down'ed preventing it to communicate. Reasons for failure
      for applying the network firewall rules may that an ebtables/iptables
      command failes or OOM errors. Essentially the same failure reasons may
      occur as when the firewall rules are applied immediately on VM start,
      except that due to the late application of the filtering rules the VM
      now is already running and cannot be hindered anymore from starting.
      Bringing down the whole VM would probably be considered too drastic.
      While a VM's IP address is attempted to be determined only limited
      updates to network filters are allowed. In particular it is prevented
      that filters are modified in such a way that they would introduce new
      variables.
      
      A caveat: The algorithm does not know which one is the appropriate IP
      address of a VM. If the VM spoofs an IP address in its first ARP traffic
      or IPv4 packets its filtering rules will be instantiated for this IP
      address, thus 'locking' it to the found IP address. So, it's still
      'safer' to explicitly provide the IP address of a VM's interface in the
      filter description if it is known beforehand.
      
      * configure.ac: detect libpcap
      * libvirt.spec.in: require libpcap[-devel] if qemu is built
      * src/internal.h: add the new ATTRIBUTE_PACKED define
      * src/Makefile.am src/libvirt_private.syms: add the new modules and symbols
      * src/nwfilter/nwfilter_learnipaddr.[ch]: new module being added
      * src/nwfilter/nwfilter_driver.c src/conf/nwfilter_conf.[ch]
        src/nwfilter/nwfilter_ebiptables_driver.[ch]
        src/nwfilter/nwfilter_gentech_driver.[ch]: plu the new functionality in
      * tests/nwfilterxml2xmltest: extend testing
      3bf24abc
  4. 01 4月, 2010 1 次提交
    • E
      build: more fallout from test -a · a792bf24
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_test_minus_ao): Also check for [.
      * docs/Makefile.am (%.html, html/index.html): Avoid non-portable
      test usage.
      * libvirt.spec.in (%post): Likewise.
      * tools/virt-pki-validate.in (servercert.pem): Likewise.
      * configure.ac (LOGNAME): Use test, not [, in files processed by
      autoconf.
      Detected by Matthias Bolte.
      a792bf24
  5. 30 3月, 2010 1 次提交
    • S
      Add ip6tables support for IPv6 filtering · bc210210
      Stefan Berger 提交于
      This patch adds IPv6 filtering support for the following protocols:
      - tcp-ipv6
      - udp-ipv6
      - udplite-ipv6
      - esp-ipv6
      - ah-ipv6
      - sctp-ipv6
      - all-ipv6
      - icmpv6
      
      Many of the IPv4 data structure could be re-used for IPv6 support.
      Since ip6tables also supports pretty much the same command line parameters
      as iptables does, also much of the code could be re-used and now
      command lines are invoked with the ip(6)tables tool parameter passed
      through the functions as a parameter.
      bc210210
  6. 27 3月, 2010 3 次提交
    • S
      Add some examples filters · e3a7137a
      Stefan Berger 提交于
      This patch adds some example filters to libvirt. They are automatically
      installed into the proper directory for libvirt to pick them up.
      e3a7137a
    • S
      Extensions for iptables rules · 1130085c
      Stefan Berger 提交于
      This patch adds support for L3/L4 filtering using iptables. This adds
      support for 'tcp', 'udp', 'icmp', 'igmp', 'sctp' etc. filtering.
      
      As mentioned in the introduction, a .c file provided by this patch
      is #include'd into a .c file. This will need work, but should be alright
      for review.
      Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
      1130085c
    • S
      Core driver implementation with ebtables support · 065b6571
      Stefan Berger 提交于
      This patch implements the core driver and provides
      - management functionality for managing the filter XMLs
      - compiling the internal filter representation into ebtables rules
      - applying ebtables rules on a network (tap,macvtap) interface
      - tearing down ebtables rules that were applied on behalf of an
      interface
      - updating of filters while VMs are running and causing the firewalls to
      be rebuilt
      - other bits and pieces
      Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
      065b6571
  7. 25 3月, 2010 1 次提交
  8. 24 3月, 2010 1 次提交
  9. 23 3月, 2010 2 次提交
  10. 15 3月, 2010 1 次提交
  11. 09 3月, 2010 1 次提交
  12. 06 3月, 2010 1 次提交
    • D
      Release of libvirt-0.7.7 · 703c1651
      Daniel Veillard 提交于
      * configure.ac libvirt.spec.in: update with new version
      * docs/news.html.in: add list of changes in 0.7.7
      * po/*po*: updated spanish and russian localisations, rebuilt
      703c1651
  13. 05 3月, 2010 2 次提交
  14. 26 2月, 2010 1 次提交
  15. 25 2月, 2010 2 次提交
    • J
      build: fix typos in makefile variable names · 5365ff40
      Jim Meyering 提交于
      * configure.ac: Fix typos:
      s/DRIVER_MODULES_CFLAGS/DRIVER_MODULE_CFLAGS/
      s/DRIVER_MODULES_LIBS/DRIVER_MODULE_LIBS/
      5365ff40
    • J
      build: ensure that MKINSTALLDIRS is AC_SUBST-defined · 89bdf84b
      Jim Meyering 提交于
      since we're using gettext-0.14.1, which uses that now-obsolete
      automake symbol.  Otherwise, make distcheck would fails like this:
      
          make[2]: Entering directory `/t/libvirt-0.7.6/_build/po'
          /bin/sh @MKINSTALLDIRS@ /t/libvirt-0.7.6/_inst/share
          /bin/sh: @MKINSTALLDIRS@: No such file or directory
          make[2]: *** [install-data-yes] Error 127
      
      * configure.ac (MKINSTALLDIRS): Define.
      For reference, we're currently hamstrung by our desire
      to support RHEL5, which still uses gettext-0.14:
      http://bugzilla.redhat.com/523713
      89bdf84b
  16. 24 2月, 2010 1 次提交
    • D
      Format FS pools on creation · b738016b
      Dave Allan 提交于
      Create the filesystem on the partition used by the pool
      * configure.ac: check for mkfs availability
      * libvirt.spec.in: add extra require on util-linux for mkfs
      * src/storage/storage_backend_fs.c: run mkfs with the expected
        fs type when creating a filesystem pool
      b738016b
  17. 17 2月, 2010 1 次提交
  18. 16 2月, 2010 1 次提交
    • S
      macvtap support for libvirt -- build support · fd5091db
      Stefan Berger 提交于
      This patch adds build support for libvirt checking for certain contents
      of /usr/include/linux/if_link.h to see whether macvtap support is
      compilable on that system. One can disable macvtap support in libvirt
      via --without-macvtap passed to configure.
      * configure.ac src/Makefile.am: new build support
      * src/libvirt_macvtap.syms: list of exported symbols
      * src/util/macvtap.c: empty module to not break compilation
      fd5091db
  19. 04 2月, 2010 1 次提交
    • D
      Release of libvirt-0.7.6 · 31a5ee92
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: version bump and doc
        updates
      * po/*.po*: updated and regenerated the localizations
      31a5ee92
  20. 25 1月, 2010 1 次提交
  21. 18 1月, 2010 2 次提交
    • D
      Change detection of xen so that it's actually automatic rather than forced. · 3c58896e
      Diego Elio Pettenò 提交于
      This ensures that ./configure will work fine if xen development packages
      are not around, rather than fail. When passing ./configure --with-xen, the
      lack of xen development packages become fatal.
      3c58896e
    • D
      Standardise ./configure --help options reporting. · 4d434da3
      Diego Elio Pettenò 提交于
      Always use AC_HELP_STRING for the help text for options at ./configure,
      so that the output is properly aligned.
      
      Use proper quadrigraphs for outputting the brackets.
      
      Always use autoconf-style [default=$foo] output to state the default, both
      where it was stated before and where it wasn't.
      
      This time, include Matthias Bolte notes regarding defaults, and removing
      PFX specification from phyp.
      4d434da3
  22. 09 1月, 2010 1 次提交
    • J
      let "configure --disable-shared" work once again · 048781fe
      Jim Meyering 提交于
      Without this change, ./autogen.sh --disable-shared && make would
      evoke a "can not build a shared library" failure for libvirtmod.la
      due to the new use of libtool's -shared link option in
      python/Makefile.am.  Now, --disable-shared also
      disables building python.
      
      * configure.in: Make --disable-shared imply --without-python and
      silently override --with-python.
      Improved by: Diego Elio Pettenò <flameeyes@gmail.com>
      048781fe
  23. 24 12月, 2009 1 次提交
  24. 22 12月, 2009 3 次提交
    • M
      Fix configure check for SASL · 156e36a2
      Matthias Bolte 提交于
      The option --with-sasl defaults to 'check', but an inverted test logic
      lets the SASL check fail with an error instead of disabling SASL.
      Fix the test logic so SASL support gets disabled if SASL is missing and
      --with-sasl is set to check.
      156e36a2
    • M
      Fix GnuTLS pkg-config check · cf30da7a
      Matthias Bolte 提交于
      The testlogic for $PKG_CONFIG was inverted, checking for an empty string
      before using PKG_CHECK_MODULES. Use -x instead of -z and add an else branch
      to the if checking for $GNUTLS_FOUND = no to add -lgcrypt in case the
      GnuTLS libraries are detected by pkg-config.
      cf30da7a
    • M
      Report an error if no XDR library can be found · 188852c9
      Matthias Bolte 提交于
      188852c9
  25. 19 12月, 2009 2 次提交
    • D
      Don't mix LDFLAGS and LIBS in the configure script · 1a43d0b2
      Diego Elio Pettenò 提交于
      * configure.in: If you pass libraries in the LDFLAGS variable, and then
        try AC_CHECK_FUNCS to find whether a function is present or not,
        it'll fail badly when using the --as-needed linker flag. Instead,
        pass the libraries through the LIBS library, so that they are passed
        after the conftest.c source file and the tests are done properly.
      1a43d0b2
    • D
      Don't make it possible to define HAVE_HAL but not enable it in automake · 3a524a2b
      Diego Elio Pettenò 提交于
      * configure.in: With the previous logic, if libhal_get_all_devices
        function was not found, HAVE_HAL would be defined for the preprocessor
        but it wouldn't be enabled in automake conditionals, causing the final
        link to fail with missing references to HAL entries.
      3a524a2b
  26. 18 12月, 2009 2 次提交
    • J
      Adds CPU selection infrastructure · 7286882c
      Jiri Denemark 提交于
      Each driver supporting CPU selection must fill in host CPU capabilities.
      When filling them, drivers for hypervisors running on the same node as
      libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
      such as VMware, need to implement their own way of getting such data.
      Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
      
      When implementing virConnectCompareCPU(), a hypervisor driver can just
      call cpuCompareXML() function with host CPU capabilities.
      
      For each guest for which a driver supports selecting CPU models, it must
      set the appropriate feature in guest's capabilities:
      
          virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
      
      Actions needed when a domain is being created depend on whether the
      hypervisor understands raw CPU data (currently CPUID for i686, x86_64
      architectures) or symbolic names has to be used.
      
      Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
      
      - convert guest CPU configuration from domain's XML into a set of raw
        data structures each representing one of the feature policies:
      
          cpuEncode(conn, architecture, guest_cpu_config,
                    &forced_data, &required_data, &optional_data,
                    &disabled_data, &forbidden_data)
      
      - create a mask or whatever the hypervisor expects to see and pass it
        to the hypervisor
      
      Typical use by hypervisors with symbolic model names (such as QEMU):
      
      - get raw CPU data for a computed guest CPU:
      
          cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
      
      - decode raw data into virCPUDefPtr with a possible restriction on
        allowed model names:
      
          cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
      
      - pass guest->model and guest->features to the hypervisor
      
      * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
        src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
        src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
      * configure.in: check for CPUID instruction
      * src/Makefile.am: glue the new files in
      * src/libvirt_private.syms: add new private symbols
      * po/POTFILES.in: add new cpu files containing translatable strings
      7286882c
    • D
      Initialize gcrypt threading · 33a198c1
      Daniel P. Berrange 提交于
      GNUTLS uses gcrypt for its crypto functions. gcrypt requires
      that the app/library initializes threading before using it.
      We don't want to force apps using libvirt to know about
      gcrypt, so we make virInitialize init threading on their
      behalf. This location also ensures libvirtd has initialized
      it correctly. This initialization is required even if libvirt
      itself were only using one thread, since another non-libvirt
      library (eg GTK-VNC) could also be using gcrypt from another
      thread
      
      * src/libvirt.c: Register thread functions for gcrypt
      * configure.in: Add -lgcrypt to linker flags
      33a198c1
  27. 16 12月, 2009 1 次提交
    • J
      avoid malfunction when virFileResolveLink is applied to non-POSIX FS · 5baa4635
      Jim Meyering 提交于
      The virFileResolveLink utility function relied on the POSIX guarantee
      that stat.st_size of a symlink is the length of the value.  However,
      on some types of file systems, it is invalid, so do not rely on it.
      Use gnulib's areadlink module instead.
      * bootstrap (modules): Add areadlink.
      * src/util/util.c: Include "areadlink.h".
      Let areadlink perform the readlink and malloc.
      * configure.in (AC_CHECK_FUNCS): Remove readlink.  No need,
      since it's presence is guaranteed by gnulib.
      5baa4635
  28. 15 12月, 2009 1 次提交
    • M
      Fix install location for Python bindings · d0857c01
      Matthias Bolte 提交于
      Commit 66137344 changed the Python detection
      mechanism in configure to use AM_PATH_PYTHON. This results in a changed
      install location for the Python bindings, at least on Fedora 12 64bit systems.
      
      Before this commit libvirt.py and libvirtmod.so were installed to
      
        /usr/lib64/python2.6/site-packages
      
      After this commit they are installed to
      
        /usr/lib/python2.6/site-packages
      
      Mixed Python packages (containing *.py and *.so files) should be installed to
      the pyexecdir directory detected by AM_PATH_PYTHON.
      
      This restores the install location from before the AM_PATH_PYTHON commit.
      
      * configure.in: remove unnecessary pythondir export
      * python/Makefile.am: switch from pythondir to pyexecdir
      d0857c01