1. 11 1月, 2012 1 次提交
    • D
      Disable netcf if building without libvirtd · ba61012c
      Daniel P. Berrange 提交于
      Although the netcf interface driver can in theory be used by
      the stateless drivers, in practice none of them want to use
      it because they have different ways of dealing with interfaces.
      
      Furthermore, if you have mingw32-netcf installed, then the
      libvirt mingw32 build will fail with
      
        ../../src/interface/netcf_driver.c:644:5: error: unknown field 'close_used_without_including_unistd_h' specified in initializer
      
       * configure.ac: disable netcf if built without libvirtd
      ba61012c
  2. 07 1月, 2012 1 次提交
    • D
      Release of libvirt-0.9.9 · 2f667b56
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the release
      * po/*.po*: updated localizations from transifex and regenerated
      2f667b56
  3. 06 1月, 2012 1 次提交
    • E
      build: drop check for ANSI compiler · 307f3635
      Eric Blake 提交于
      Using automake.git (will become 1.12 someday), I got this error:
      
      configure.ac:90: error: automatic de-ANSI-fication support has been removed
      /usr/local/share/aclocal-1.11a/protos.m4:13: AM_C_PROTOTYPES is expanded from...
      configure.ac:90: the top level
      autom4te: /usr/bin/m4 failed with exit status: 1
      
      In short, pre-C89 compilers are no longer a viable portability
      target.  Besides, our code base already requires C99, so worrying
      about pre-C89 seems pointless.
      
      * configure.ac (AM_C_PROTOTYPES): Drop, since newer automake no
      longer provides it.
      307f3635
  4. 16 12月, 2011 1 次提交
    • E
      build: disable dtrace on non-Linux builds · f9d60b19
      Eric Blake 提交于
      Using dtrace (and systemtap in general) is Linux-specific.
      Running ./autobuild.sh shows that attempting a cross-build to
      target mingw was mistakenly trying to build dtrace code, merely
      because it was present on the compilation host.
      
      * configure.ac (with_dtrace): Don't attempt to use dtrace when
      doing a cross-build hosted on Linux but targetting elsewhere.
      Reported by Daniel P. Berrange.
      f9d60b19
  5. 08 12月, 2011 1 次提交
    • D
      Release of libvirt-0.9.8 · 7c6b0653
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updated for the release
      * po/*.po*: fetched localization update and regenerated
      7c6b0653
  6. 02 12月, 2011 1 次提交
    • D
      Fix build for platforms lacking struct ifreq · 949e1091
      Daniel P. Berrange 提交于
      This ought to fix the build if you have net/if.h but do
      not have struct ifreq
      
      * configure.ac: Check for struct ifreq in net/if.h
      * src/util/virnetdev.c: Conditionalize to avoid use of
        struct ifreq if it does not exist
      949e1091
  7. 30 11月, 2011 1 次提交
    • D
      Add internal APIs for dealing with time · 3ec12898
      Daniel P. Berrange 提交于
      The logging APIs need to be able to generate formatted timestamps
      using only async signal safe functions. This rules out using
      gmtime/localtime/malloc/gettimeday(!) and much more.
      
      Introduce a new internal API which is async signal safe.
      
        virTimeMillisNowRaw replacement for gettimeofday. Uses clock_gettime
                            where available, otherwise falls back to the unsafe
                            gettimeofday
      
        virTimeFieldsNowRaw  replacements for gmtime(), convert a timestamp
        virTimeFieldsThenRaw into a broken out set of fields. No localtime()
                             replacement is provided, because converting to
                             local time is not practical with only async signal
                             safe APIs.
      
        virTimeStringNowRaw  replacements for strftime() which print a timestamp
        virTimeStringThenRaw into a string, using a pre-determined format, with
                             a fixed size buffer (VIR_TIME_STRING_BUFLEN)
      
      For each of these there is also a version without the Raw postfix
      which raises a full libvirt error. These versions are not async
      signal safe
      
      * src/Makefile.am, src/util/virtime.c, src/util/virtime.h: New files
      * src/libvirt_private.syms: New APis
      * configure.ac: Check for clock_gettime in -lrt
      * tests/virtimetest.c, tests/Makefile.am: Test new APIs
      3ec12898
  8. 22 11月, 2011 1 次提交
    • C
      storage: Fallback to use lvchange first if lvremove fails · 3c540514
      Chang Liu 提交于
      virStorageBackendLogicalDeleteVol() could not remove the lv with error
      "could not remove open logical volume" sometimes. Generally it's caused
      by the volume is still active, even if lvremove tries to remove it with
      option "--force".
      
      This patch is to fix it by disbale the lv first using "lvchange -aln"
      and "lvremove -f" afterwards if the direct "lvremove -f" failed.
      3c540514
  9. 19 11月, 2011 1 次提交
    • D
      Add support for systemd init service · 4789fb2e
      Daniel P. Berrange 提交于
      This patch adds support for a systemd init service for libvirtd
      and libvirt-guests. The libvirtd.service is *not* written to use
      socket activation, since we want libvirtd to start on boot so it
      can do guest auto-start.
      
      The libvirt-guests.service is pretty lame, just exec'ing the
      original init script for now. Ideally we would factor out the
      functionality, into some shared tool.
      
      Instead of
      
        ./configure --with-init-script=redhat
      
      You can now do
      
        ./configure --with-init-script=systemd
      
      Or better still:
      
        ./configure --with-init-script=systemd+redhat
      
      We can also now support install of the upstart init script
      
      * configure.ac: Add systemd, and systemd+redhat options to
        --with-init-script option
      * daemon/Makefile.am: Install systemd services
      * daemon/libvirtd.sysconf: Add note about unused env variable
        with systemd
      * daemon/libvirtd.service.in: libvirtd systemd service unit
      * libvirt.spec.in: Add scripts to installing systemd services
        and migrating from legacy init scripts
      * tools/Makefile.am: Install systemd services
      * tools/libvirt-guests.init.sh: Rename to tools/libvirt-guests.init.in
      * tools/libvirt-guests.service.in: systemd service unit
      4789fb2e
  10. 10 11月, 2011 2 次提交
    • D
      Split bridge.h into three separate files · e49c9bf2
      Daniel P. Berrange 提交于
      Following the renaming of the bridge management APIs, we can now
      split the source file into 3 corresponding pieces
      
       * src/util/virnetdev.c: APIs for any type of network interface
       * src/util/virnetdevbridge.c: APIs for bridge interfaces
       * src/util/virnetdevtap.c: APIs for TAP interfaces
      
      * src/util/virnetdev.c, src/util/virnetdev.h,
        src/util/virnetdevbridge.c, src/util/virnetdevbridge.h,
        src/util/virnetdevtap.c, src/util/virnetdevtap.h: Copied
        from bridge.{c,h}
      * src/util/bridge.c, src/util/bridge.h: Split into 3 pieces
      * src/lxc/lxc_driver.c, src/network/bridge_driver.c,
        src/openvz/openvz_driver.c, src/qemu/qemu_command.c,
        src/qemu/qemu_conf.h, src/uml/uml_conf.c, src/uml/uml_conf.h,
        src/uml/uml_driver.c: Update #include directives
      e49c9bf2
    • D
      Remove usage of brctl command line tool · c1df2c14
      Daniel P. Berrange 提交于
      Convert the virNetDevBridgeSetSTP and virNetDevBridgeSetSTPDelay
      to use ioctls instead of spawning brctl.
      
      Implement the virNetDevBridgeGetSTP and virNetDevBridgeGetSTPDelay
      methods which were declared in the header but never existed
      
      * src/util/bridge.c: Convert to use bridge ioctls instead of brctl
      c1df2c14
  11. 08 11月, 2011 1 次提交
    • D
      Release of libvirt-0.9.7 · ab4823a0
      Daniel Veillard 提交于
      * confiure.ac docs/news.html.in libvirt.spec.in: update for release
      * po/*.po*: update localizations and rebuilt
      ab4823a0
  12. 05 11月, 2011 1 次提交
    • E
      build: fix linking on BSD · 9d86cbcf
      Eric Blake 提交于
      While building on FreeBSD (and after fixing a ptsname_r link error),
      I got this failure:
      
      ./.libs/libvirt_util.a(libvirt_util_la-threads.o)(.text+0x240): In function `virThreadCreate':
      util/threads-pthread.c:185: undefined reference to `pthread_create'
      
      It turns out that gnulib used only pthread_join for LIB_PTHREAD,
      but on FreeBSD, libc provides that (as a stub function); whereas
      the more complex pthread_create really does require -pthread,
      which gnulib tracked under [LT]LIBMULTITHREAD.
      
      * configure.ac (LIBS): Check LIBMULTITHREAD alongside LIB_PTHREAD.
      * src/Makefile.am (THREAD_LIBS): New variable.
      (libvirt_util_la_LIBADD, libvirt_lxc_LDADD): Use it.
      9d86cbcf
  13. 27 10月, 2011 1 次提交
  14. 25 10月, 2011 1 次提交
    • E
      build: use gnulib fdatasync · 9cf70dad
      Eric Blake 提交于
      Commit 1726a736 hacked around MacOS' lack of fdatasync, since
      gnulib did not have it at the time.  But now that we use newer
      gnulib, we can avoid the hack.
      
      * bootstrap.conf (gnulib_modules): Add fdatasync.
      * configure.ac (AC_CHECK_FUNCS_ONCE): Drop our own check.
      9cf70dad
  15. 22 9月, 2011 1 次提交
  16. 20 9月, 2011 2 次提交
    • D
      Release of libvirt-0.9.5 · a362f1f7
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the release
      * po/*.po*: fetch updated translations from transifex and rebuilt
      a362f1f7
    • D
      Update to require sanlock 1.8 for license compliance · 19ff0ddf
      Daniel P. Berrange 提交于
      Inexplicably the sanlock code all got placed under the GPLv2-only,
      so libvirt's use of sanlock introduces a license incompatibility.
      The sanlock developers have now rearranged the code such that there
      is a 'sanlock_client.so' which is LGPLv2+ while their daemon remains
      GPLv2-only. To use the new client library we need to call the new
      sanlock_init and sanlock_align APIs instead of sanlock_direct_init
      and sanlock_direct_align. These APIs calls are now routed via the
      sanlock daemon, instead of doing direct I/O calls to disk.
      
      For all this we require sanlock >= 1.8
      
      * configure.ac: Check for sanlock_client.so instead of sanlock.so
        and fix various comments
      * libvirt.spec.in: Mandate sanlock >= 1.8
      * src/Makefile.am: Link to -lsanlock_client
      * src/locking/lock_driver_sanlock.c: Use sanlock_init and
        sanlock_align
      19ff0ddf
  17. 17 9月, 2011 2 次提交
    • E
      build: work around lack of MacOS fdatasync · 1726a736
      Eric Blake 提交于
      Mingw lacks fsync, but gnulib provides that.  Meanwhile, gnulib does
      not (yet) provide fdatasync, so this is a quick hack to fake that
      function on MacOS X; we can revert this configure change once gnulib
      gives us a real module.
      
      We have been implicitly relying on gnulib's largefile module being
      pulled in by other modules, but it's better to make that explicit.
      
      * bootstrap.conf (gnulib_modules): Add fsync.  Make largefile use
      explicit.
      * configure.ac (AC_CHECK_FUNCS_ONCE): Check for fdatasync, and
      fake it with fsync when not present.
      1726a736
    • D
      Prevent crash from dlclose() of libvirt.so · 8e44e559
      Daniel P. Berrange 提交于
      When libvirt calls virInitialize it creates a thread local
      for the virErrorPtr storage, and registers a callback to
      cleanup memory when a thread exits. When libvirt is dlclose()d
      or otherwise made non-resident, the callback function is
      removed from memory, but the thread local may still exist
      and if a thread later exists, it will invoke the callback
      and SEGV. There may also be other thread locals with callbacks
      pointing to libvirt code, so it is in general never safe to
      unload libvirt.so from memory once initialized.
      
      To allow dlclose() to succeed, but keep libvirt.so resident
      in memory, link with '-z nodelete'. This issue was first
      found with the libvirt CIM provider, but can potentially
      hit many of the dynamic language bindings which all ultimately
      involve dlopen() in some way, either on libvirt.so itself,
      or on the glue code for the binding which in turns links
      to libvirt
      
      * configure.ac, src/Makefile.am: Ensure libvirt.so is linked
        with -z nodelete
      * cfg.mk, .gitignore, tests/Makefile.am, tests/shunloadhelper.c,
        tests/shunloadtest.c: A test case to unload libvirt while
        a thread is still running.
      8e44e559
  18. 02 9月, 2011 1 次提交
  19. 26 8月, 2011 1 次提交
  20. 04 8月, 2011 1 次提交
    • M
      Fix detection of GnuTLS 1.x.y · 099d30a8
      Matthias Bolte 提交于
      Detection based on gnutls_session doesn't work because GnuTLS 2.x.y
      comes with a compat.h that defines gnutls_session to gnutls_session_t.
      
      Instead detect this based on LIBGNUTLS_VERSION_MAJOR. Move this from
      configure/config.h to gnutls_1_0_compat.h and make sure that all users
      include gnutls_1_0_compat.h properly.
      
      Also fix header guard in gnutls_1_0_compat.h.
      099d30a8
  21. 03 8月, 2011 2 次提交
    • D
      Release of libvirt-0.9.4 · 14c2ca3d
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updates for new
        release
      * po/*.po*: pulled translations from the transifex teams and regenerated
        localizations
      14c2ca3d
    • E
      build: allow caching the input to STATIC_ANALYSIS · e4047f0a
      Eric Blake 提交于
      Right now, every re-run of configure re-evaluates whether a
      static analysis tool is in use.  But if you run configure under
      coverity, make a tweak, and then do an incremental rebuild with
      gcc but not coverity to test the tweak, then rerun a build under
      coverity, then configure does not get rerun, and static analysis
      ends up with lots of false positives.
      
      This patch caches the static analysis result, and also makes it
      easier to force static analysis even if the existing checks are
      insufficient to detect newer versions of the static analyzer tools.
      
      * configure.ac (lv_cv_static_analysis): New cache variable.
      e4047f0a
  22. 29 7月, 2011 2 次提交
    • M
      freebsd: Fix build problem due to picking up the wrong libvirt.h · b590866b
      Matthias Bolte 提交于
      Gettext annoyingly modifies CPPFLAGS in-place, putting
      -I/usr/local/include into the search patch if libintl headers
      must be used from that location.  But since we must support
      automake 1.9.6 which lacks AM_CPPFLAGS, and since CPPFLAGS is used
      prior to INCLUDES, this means that the build picks up the _old_
      installed libvirt.h in priority to the in-tree version, leading
      to all sorts of weird build failures on FreeBSD.
      
      Fix this by teaching configure to undo gettext's actions, but
      to keep any changes required by gettext at the end of INCLUDES
      after all in-tree locations are used first.  Also requires
      adding a wrapper Makefile.am and making gnulib-tool create
      just gnulib.mk files during the bootstrap process.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b590866b
    • E
      maint: add missing copyright notices · ff81956a
      Eric Blake 提交于
      I went with the shorter license notice used by src/libvirt.c,
      rather than spelling out the full LGPLv2+ clause into each of
      these files.
      
      * configure.ac: Declare copyright.
      * all Makefile.am: Likewise.
      ff81956a
  23. 25 7月, 2011 2 次提交
    • M
      bandwidth: Implement functions to enable and disable QoS · 90074ecf
      Michal Privoznik 提交于
      These function executes 'tc' with appropriate arguments to set
      desired QoS setting on interface or bridge during its creation.
      90074ecf
    • E
      tests: fix compilation failures · 5283ea9b
      Eric Blake 提交于
      Even though gnutls is a hard-req for libvirt, and gnutls depends
      on libtasn1, that does not mean that you have to have the libtasn1
      development files installed.  Skip the test rather than failing
      compilation in that case.
      
      With newer gcc, the test consumed too much stack space.  Move
      things to static storage to fix that.
      
      * configure.ac (AC_CHECK_HEADERS): Check for libtasn1.h.
      (HAVE_LIBTASN1): New automake conditional.
      * tests/Makefile.am (virnettlsconvirnettlscontexttest_SOURCES)
      (virnettlscontexttest_LDADD): Allow compilation without libtasn1.
      * tests/virnettlscontexttest.c: Skip test if headers not present.
      (struct testTLSCertReq): Alter time members.
      (testTLSGenerateCert): Reflect the change.
      (mymain): Reduce stack usage.
      5283ea9b
  24. 22 7月, 2011 1 次提交
    • E
      save: let iohelper work on O_DIRECT fds · 12291656
      Eric Blake 提交于
      Required for a coming patch where iohelper will operate on O_DIRECT
      fds.  There, the user-space memory must be aligned to file system
      boundaries (at least 512, but using page-aligned works better, and
      some file systems prefer 64k).  Made tougher by the fact that
      VIR_ALLOC won't work on void *, but posix_memalign won't work on
      char * and isn't available everywhere.
      
      This patch makes some simplifying assumptions - namely, output
      to an O_DIRECT fd will only be attempted on an empty seekable
      file (hence, no need to worry about preserving existing data
      on a partial block, and ftruncate will work to undo the effects
      of having to round up the size of the last block written), and
      input from an O_DIRECT fd will only be attempted on a complete
      seekable file with the only possible short read at EOF.
      
      * configure.ac (AC_CHECK_FUNCS_ONCE): Check for posix_memalign.
      * src/util/iohelper.c (runIO): Use aligned memory, and handle
      quirks of O_DIRECT on last write.
      12291656
  25. 12 7月, 2011 1 次提交
  26. 08 7月, 2011 2 次提交
    • J
      Skip some xen tests if xend is not running · 41828514
      Jim Fehlig 提交于
      Currently, the xen statstest and reconnect tests are only compiled
      if xend is running.  Compile them unconditionally if xen headers
      are present, but skip the tests at runtime if xend is not running.
      
      This is in response to Eric's suggestion here
      
      https://www.redhat.com/archives/libvir-list/2011-July/msg00367.html
      41828514
    • E
      build: use gnulib pthread_sigmask · 8437e738
      Eric Blake 提交于
      Gnulib finally learned how to do pthread_sigmask on mingw.
      
      * .gnulib: Update to latest, for pthread_sigmask.
      * bootstrap.conf (gnulib_modules): Add pthread_sigmask.
      * configure.ac (AC_CHECK_FUNCS): Drop redundant check.
      * src/rpc/virnetclient.c (virNetClientSetTLSSession)
      (virNetClientIOEventLoop): Make code unconditional.
      * src/util/command.c (virFork): Likewise.
      * tools/virsh.c (doMigrate, cmdMigrate): Likewise.
      8437e738
  27. 04 7月, 2011 1 次提交
    • D
      Release of libvirt-0.9.3 · 7976d96d
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the
        new release
      * po/*.po*: updated and regenerated localizations
      7976d96d
  28. 29 6月, 2011 1 次提交
    • D
      Convert libvirtd over to the new RPC handling APIs · df0b57a9
      Daniel P. Berrange 提交于
      This guts the libvirtd daemon, removing all its networking and
      RPC handling code. Instead it calls out to the new virServerPtr
      APIs for all its RPC & networking work
      
      As a fallout all libvirtd daemon error reporting now takes place
      via the normal internal error reporting APIs. There is no need
      to call separate error reporting APIs in RPC code, nor should
      code use VIR_WARN/VIR_ERROR for reporting fatal problems anymore.
      
      * daemon/qemu_dispatch_*.h, daemon/remote_dispatch_*.h: Remove
        old generated dispatcher code
      * daemon/qemu_dispatch.h, daemon/remote_dispatch.h: New dispatch
        code
      * daemon/dispatch.c, daemon/dispatch.h: Remove obsoleted code
      * daemon/remote.c, daemon/remote.h: Rewrite for new dispatch
        APIs
      * daemon/libvirtd.c, daemon/libvirtd.h: Remove all networking
        code
      * daemon/stream.c, daemon/stream.h: Update for new APIs
      * daemon/Makefile.am: Link to libvirt-net-rpc-server.la
      df0b57a9
  29. 24 6月, 2011 1 次提交
    • D
      Introduce a generic object for using network sockets · 58b5b14e
      Daniel P. Berrange 提交于
      Introduces a simple wrapper around the raw POSIX sockets APIs
      and name resolution APIs. Allows for easy creation of client
      and server sockets with correct usage of name resolution APIs
      for protocol agnostic socket setup.
      
      It can listen for UNIX and TCP stream sockets.
      
      It can connect to UNIX, TCP streams directly, or indirectly
      to UNIX sockets via an SSH tunnel or external command
      
      * src/Makefile.am: Add to libvirt-net-rpc.la
      * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Generic
        sockets APIs
      * tests/Makefile.am: Add socket test
      * tests/virnetsockettest.c: New test case
      * tests/testutils.c: Avoid overriding LIBVIRT_DEBUG settings
      * tests/ssh.c: Dumb helper program for SSH tunnelling tests
      58b5b14e
  30. 23 6月, 2011 1 次提交
  31. 14 6月, 2011 1 次提交
    • M
      Fix dlopen dependency · bfbeafbd
      Matthias Bolte 提交于
      Since the addition of the lock manager framework in 6a943419
      dlopen is always required, but the checks in configure wasn't changed
      to reflect that. This didn't show up directly because the VirtualBox
      driver linking dlopen in covered it. But disabling the VirtualBox
      driver makes the build fail due to missing dlopen.
      
      Change the dlopen check in configure to pick up dlopen when available.
      
      Reported by Ruben Kerkhof.
      bfbeafbd
  32. 08 6月, 2011 2 次提交
    • E
      build: detect Coverity 5.3.0 · 28ea3bf3
      Eric Blake 提交于
      Coverity 5.3.0 still outputs lots of COVERITY_* variables, but no
      longer modifies COVERITY_BUILD_COMMAND in the environment.  Pick
      one that seems likely to stay around.
      
      * configure.ac (STATIC_ANALYSIS): Detect newer Coverity.
      28ea3bf3
    • O
      build: Fix typos in configure.ac · 31967cff
      Osier Yang 提交于
      31967cff