1. 09 12月, 2011 1 次提交
    • E
      maint: allow bootstrap in a sandbox · f48ab7d8
      Eric Blake 提交于
      Jiri Denemark reported an instance of bootstrapping libvirt
      failing when run inside a sandbox, traced to rpm trying to
      access /var/ which was not permitted by the sandbox.
      
      Alex Jia reported that 0.9.8-rc1 failed to bootstrap if patch(1)
      is not installed.
      
      * bootstrap.conf (buildreq): Avoid rpm call if python-config
      exists.  Also, require patch, in case we have gnulib-local diffs.
      f48ab7d8
  2. 04 12月, 2011 1 次提交
    • E
      build: require more tools from maintainers · 2b094d56
      Eric Blake 提交于
      We want our tarballs to be complete - this means that any
      generated file that gets shipped as part of the tarball so that
      ordinary users don't have to rebuild it must be something
      that the maintainer can generate.  There have been various
      reports of random build failures when using libvirt.git
      instead of a tarball, and often it is due to missing a
      maintainer-specific tool to produce one of these generated
      files.  This patch raises the bar for what you must have
      installed to build libvirt.git, but does not impact what
      you can get away with for building tarballs.
      
      Note: It still remains possible to do a successful 'make dist'
      without these tools, when starting from a release tarball.
      
      * bootstrap.conf (buildreq): Add tools that maintainers need for a
      successful 'make dist' from a fresh git checkout.
      2b094d56
  3. 10 11月, 2011 1 次提交
    • E
      build: allow for local gnulib diffs · 676fdf8c
      Eric Blake 提交于
      Commit f7bd00c1 pulled in a gnulib module that fails to compile
      on mingw.  While it would be nice to pull in a newer version of
      .gnulib that fixes this, it is difficult to backport any .gnulib
      update to older releases.  So, it makes sense to take advantage
      of gnulib-tool's ability to support local diffs, where we can
      apply specific diffs in our use of gnulib without waiting for
      upstream gnulib to pick up those changes, as well as avoiding
      a wholesale .gnulib update.  The existence of local diffs will
      also make it easier to backport fixes against a tarball (as long
      as a tarball and libvirt.git share the same .gnulib commit, then
      the tarball can be patched by applying the same local diffs as
      a post-release libvirt.git commit, without having to rerun an
      entire gnulib-tool bootstrap).
      
      This patch introduces the framework for supporting local diffs,
      without actually introducing any.
      
      * bootstrap.conf (local_gl_dir): New variable.
      * autogen.sh (bootstrap_hash): Hash any local diffs, to force a
      re-bootstrap if just diffs change.
      * cfg.mk (_update_required): Likewise.
      676fdf8c
  4. 08 11月, 2011 1 次提交
    • E
      build: fix build on platforms without ptsname_r · f7bd00c1
      Eric Blake 提交于
      MacOS lacks ptsname_r, and gnulib doesn't (yet) provide it.
      But we can avoid it altogether, by using gnulib openpty()
      instead.  Note that we do _not_ want the pt_chown module;
      gnulib uses it only to implement a replacement openpty() if
      the system lacks both openpty() and granpt(), but all
      systems that we currently port to either have at least one of
      openpty() and/or grantpt(), or lack ptys altogether.  That is,
      we aren't porting to any system that requires us to deal with
      the hassle of installing a setuid pt_chown helper just to use
      gnulib's ability to provide openpty() on obscure platforms.
      
      * .gnulib: Update to latest, for openpty fixes
      * bootstrap.conf (gnulib_modules): Add openpty, ttyname_r.
      (gnulib_tool_option_extras): Exclude pt_chown module.
      * src/util/util.c (virFileOpenTty): Rewrite in terms of openpty
      and ttyname_r.
      * src/util/util.h (virFileOpenTtyAt): Delete dead prototype.
      f7bd00c1
  5. 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
  6. 17 9月, 2011 1 次提交
    • 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
  7. 15 8月, 2011 1 次提交
  8. 29 7月, 2011 1 次提交
    • 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
  9. 28 7月, 2011 1 次提交
  10. 27 7月, 2011 1 次提交
    • E
      build: support warnings on RHEL 5 · 1c93fbbb
      Eric Blake 提交于
      Without this, a configure built by autoconf 2.59 was broken when
      trying to detect which compiler warning flags were supported.
      
      * .gnulib: Update to latest, for warnings.m4 fix.
      * bootstrap.conf: Add fclose explicitly, to match recent gnulib
      implicit dependency changes.
      * src/qemu/qemu_conf.c (includes): Drop unused include.
      * src/uml/uml_conf.c (include): Likewise.
      Reported by Daniel P. Berrange.
      1c93fbbb
  11. 14 7月, 2011 1 次提交
    • E
      build: don't hand-roll cloexec code · ff98359d
      Eric Blake 提交于
      No need to repeat common code.
      
      * bootstrap.conf (gnulib_modules): Import calloc-posix.
      * src/util/bridge.c (brInit): Use virSetCloseExec.
      (brSetInterfaceUp): Adjust flags name.
      * src/uml/uml_driver.c (umlSetCloseExec): Delete.
      (umlStartVMDaemon): Use util version instead.
      ff98359d
  12. 12 7月, 2011 1 次提交
    • E
      build: avoid requiring -lm · df94811f
      Eric Blake 提交于
      log2() is heavy when ffs() can do the same thing.  But ffs()
      requires gnulib support for mingw.
      
      This patch solves this linker error on Fedora 14.
      
      /usr/bin/ld: libvirt_lxc-domain_conf.o: undefined reference to symbol 'log2@@GLIBC_2.2.5'
      /usr/bin/ld: note: 'log2@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
      /lib64/libm.so.6: could not read symbols: Invalid operation
      collect2: ld returned 1 exit status
      
      * .gnulib: Update to latest, for ffs.
      * bootstrap.conf (gnulib_modules): Import ffs.
      * src/conf/domain_conf.c (virDomainDefParseXML): Use ffs instead
      of log2.
      Reported by Dave Allan.
      df94811f
  13. 08 7月, 2011 2 次提交
    • 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
    • E
      build: fix virBufferVasprintf on mingw · c2dda6eb
      Eric Blake 提交于
      Gnulib documents that mingw vsnprintf is broken (it returns -1
      on out-of-space, instead of the count of what would have been
      printed); but while we were using the snprintf wrapper, we had
      not yet been using the vsnprintf wrapper.
      
      Meanwhile, mingw (but not mingw64) has a replacement snprintf
      that fixes return values, but still lacks %1$s support; so in
      that case, gnulib didn't replace snprintf, but libintl then
      went ahead and installed a version that supported %1$s but not
      return values.  Gnulib has since been fixed to guarantee that
      the snprintf module will always guarantee the constraints needed
      by libintl.
      
      Also, we want to guarantee that strdup sets errno on failure.
      
      * .gnulib: Update to latest, for vsnprintf fix.
      * bootstrap.conf (gnulib_modules): Add vsnprintf, strdup-posix.
      Reported by Matthias Bolte.
      c2dda6eb
  14. 29 6月, 2011 1 次提交
    • E
      build: fix mingw build · f05759e0
      Eric Blake 提交于
      ./autobuild.sh died on several messages resembling:
      
      ../../src/rpc/virnetsocket.c: In function 'virNetSocketNewListenTCP':
      ../../src/rpc/virnetsocket.c:231:9: error: implicit declaration of function 'bind_used_without_requesting_gnulib_module_bind' [-Wimplicit-function-declaration]
      ../../src/rpc/virnetsocket.c:231:9: error: nested extern declaration of 'bind_used_without_requesting_gnulib_module_bind' [-Wnested-externs]
      
      Basically, gnulib socket fds are not safe to pass to mingw socket
      functions unless we pull in those gnulib modules.
      
      * bootstrap.conf (gnulib_modules): Add modules to handle socket
      functions on mingw.
      f05759e0
  15. 25 6月, 2011 1 次提交
    • E
      build: update gnulib for intprops · 89d994ad
      Eric Blake 提交于
      Done as a separate commit to make backporting the next patch easier.
      We are already using "intprops.h", but this makes it explicit.
      
      * .gnulib: Update, for syntax-check fix.
      * bootstrap.conf (gnulib_modules): Make intprops use explicit.
      * src/locking/domain_lock.c (includes): Drop unused header.
      * src/nwfilter/nwfilter_learnipaddr.c (includes): Use "", not <>,
      for gnulib.
      89d994ad
  16. 20 5月, 2011 1 次提交
    • E
      build: require newer gettext · 0bb6e155
      Eric Blake 提交于
      Now that RHEL 5.6 ships with gettext 0.17, we can get out of the
      stone age and use the newer gettext capabilities and improved
      macros for certain configure tests.
      
      * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
      (MKINSTALLDIRS): Delete hack that is no longer needed.
      * bootstrap.conf (buildreq): Check for minimum gettext version.
      Based on a report by Wen Congyang.
      0bb6e155
  17. 09 5月, 2011 1 次提交
    • D
      Pull in gnulib fnmatch module · 604708df
      Daniel P. Berrange 提交于
      The libvirtd daemon uses fnmatch. Although we don't yet build
      it on Win32, we should use gnulib's fnmatch module to ensure
      portability to all platforms.
      
      * bootstrap.conf: Add fnmatch
      604708df
  18. 07 5月, 2011 1 次提交
    • D
      build: refactor generated RPC files · fb1e8d9c
      Daniel P. Berrange 提交于
      Always generate the rpc files, and require rpcgen during bootstrap.
      
      * daemon/Makefile.am: Removed generated files with
        maintainer-clean target
      * src/Makefile.am: Removed generated files with
        maintainer-clean target. Always run 'rpcgen' if
        generated files are missing
      fb1e8d9c
  19. 06 5月, 2011 1 次提交
    • E
      buf: add virBufferVasprintf · f09acccf
      Eric Blake 提交于
      Match the fact that we have virAsprintf and virVasprintf.
      
      * src/util/buf.h (virBufferVasprintf): New prototype.
      * src/util/buf.c (virBufferAsprintf): Move guts...
      (virBufferVasprintf): ...to new function.
      * src/libvirt_private.syms (buf.h): Export it.
      * bootstrap.conf (gnulib_modules): Add stdarg, for va_copy.
      f09acccf
  20. 30 4月, 2011 1 次提交
    • E
      build: fix getcwd portability problems · e39c46a5
      Eric Blake 提交于
      * bootstrap.conf (gnulib_modules): Add getcwd-lgpl.
      * tests/commandtest.c (checkoutput): Drop unused cwd.
      * tests/commandhelper.c (main): Let getcwd malloc.
      * tests/testutils.c (virTestMain): Likewise.
      * tools/virsh.c (cmdPwd): Likewise.
      (virshCmds): Expose cmdPwd and cmdCd on mingw.
      e39c46a5
  21. 27 4月, 2011 1 次提交
  22. 15 4月, 2011 1 次提交
    • S
      Migrate VMs between different-endianess hosts · cf2145d5
      Stefan Berger 提交于
      This patch enables the migration of Qemu VMs between hosts of different endianess. I tested this by migrating a i686 VM between a x86 and ppc64 host.
      
      I am converting the 'int's in the VM's state header to uint32_t assuming this doesn't break compatibility with existing deployments other than Linux.
      cf2145d5
  23. 08 4月, 2011 1 次提交
    • E
      virsh: fix mingw startup · 8ae5df5d
      Eric Blake 提交于
      * .gnulib: Update to latest, for pipe2.
      * bootstrap.conf (gnulib_modules): Add pipe2.
      * src/util/event_poll.c (virEventPollInit): Use it, to avoid
      problematic virSetCloseExec on mingw.
      8ae5df5d
  24. 05 4月, 2011 1 次提交
    • D
      Use gnulib's manywarnings & warnings modules · 0e867555
      Daniel P. Berrange 提交于
      Remove custom code for checking compiler warnings, using
      gl_WARN_ADD instead. Don't list all flags ourselves, use
      gnulib's gl_MANYWARN_ALL_GCC to get all possible GCC flags,
      then turn off the ones we don't want yet.
      
      * acinclude.m4: Rewrite to use gl_WARN_ADD and gl_MANYWARN_ALL_GCC
      * bootstrap.conf: Add warnings & manywarnings
      * configure.ac: Switch to gl_WARN_ADD
      * m4/compiler-flags.m4: Obsoleted by gl_WARN_ADD
      0e867555
  25. 01 4月, 2011 1 次提交
  26. 31 3月, 2011 2 次提交
    • E
      maint: avoid locale-sensitivity in string case comparisons · 6c9e89bb
      Eric Blake 提交于
      strcase{cmp/str} have the drawback of being sensitive to the global
      locale; this is unacceptable in a library setting.  Prefer a
      hard-coded C locale alternative for all but virsh, which is user
      facing and where the global locale isn't changing externally.
      
      * .gnulib: Update to latest, for c-strcasestr change.
      * bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase
      and c-strcasestr.
      * cfg.mk (sc_avoid_strcase): New rule.
      (exclude_file_name_regexp--sc_avoid_strcase): New exception.
      * src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN)
      (STRCASENEQLEN): Adjust offenders.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia):
      Likewise.
      * tools/virsh.c (namesorter): Document exception.
      6c9e89bb
    • J
      qemu: Fix media eject with qemu-0.12.* · e586f574
      Jiri Denemark 提交于
      In qemu-0.12.* "device '...' is locked" message was changed to "Device
      ..." so libvirt was no longer detecting this as an error.
      e586f574
  27. 24 3月, 2011 1 次提交
    • E
      build: nuke all .x-sc* files, and fix VPATH syntax-check · 2d24037d
      Eric Blake 提交于
      Not every day you see a patch that nukes 27 files!
      
      * .gnulib: Update to latest, for maint.mk improvements
      * bootstrap: Resync to gnulib.
      * bootstrap.conf (ACLOCAL): Swap the secondary aclocal include
      directory, now that bootstrap picks up gnulib/m4 instead of m4.
      * Makefile.am (syntax_check_exceptions, EXTRA_DIST): No longer
      worry about nuked files.
      * cfg.mk (sc_x_sc_dist_check): Delete dead rule.
      (VC_LIST_ALWAYS_EXCLUDE_REGEX): Add HACKING.
      (exclude_file_name_regexp--sc_*): Inline and simplify contents...
      * .x-sc_*: ...from here, then delete the files.
      2d24037d
  28. 22 2月, 2011 1 次提交
    • E
      maint: fix 'make dist' in VPATH build · 7e1dd7e0
      Eric Blake 提交于
      A diff of 'make dist' from in-tree vs. a VPATH build showed
      that we were missing docs/api_extension/*.patch files, but
      shipping other files that we didn't need.
      
      * bootstrap.conf (gnulib_extra_files): Don't distribute files we
      don't care about.
      * docs/Makefile.am (patches): Perform wildcard correctly.
      7e1dd7e0
  29. 25 1月, 2011 1 次提交
    • E
      build: avoid corrupted gnulib/tests/Makefile · 6cbab7c1
      Eric Blake 提交于
      Running 'make check' can sometimes fail in the gnulib/tests
      subdirectory, when doing an incremental build, because
      ./bootstrap generates a Makefile.am that tries to refer to
      ../../.. instead of ../.., and gets lost.
      
      This may be an upstream gnulib bug, where a more elegant
      solution will present itself in the future:
      http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24898
      
      But in the meantime, I was able to reproduce both the issue,
      and this solution to work around it.
      
      * bootstrap.conf (bootstrap_epilogue): Ensure that no stray
      ../../.. components remain in gnulib/tests/Makefile.in.
      Reported by Serge Hallyn.
      6cbab7c1
  30. 19 1月, 2011 1 次提交
    • E
      build: use more gnulib modules for simpler code · c5b11b3c
      Eric Blake 提交于
      * .gnulib: Update to latest, for sigpipe and sigaction modules.
      * bootstrap.conf (gnulib_modules): Add siaction, sigpipe, strerror_r.
      * tools/virsh.c (vshSetupSignals) [!SIGPIPE]: Delete, now that
      gnulib guarantees it.
      (SA_SIGINFO): Define for mingw fallback.
      * src/util/virterror.c (virStrerror): Simplify, now that gnulib
      guarantees the POSIX interface.
      * configure.ac (AC_CHECK_FUNCS_ONCE): Drop redundant check.
      (AM_PROG_CC_STDC): Move earlier, to keep autoconf happy.
      c5b11b3c
  31. 13 1月, 2011 1 次提交
  32. 14 12月, 2010 1 次提交
    • E
      build: update gnulib for pipe on mingw · 65c0f17a
      Eric Blake 提交于
      * .gnulib: Update to latest.
      * bootstrap.conf (gnulib_modules): Import pipe-posix and waitpid
      for mingw.
      * src/remote/remote_driver.c (pipe) [WIN32]: Drop dead macro.
      * daemon/event.c (pipe) [WIN32]: Drop dead function.
      65c0f17a
  33. 17 11月, 2010 1 次提交
    • E
      maint: use gnulib configmake rather than open-coding things · 0d5f54bb
      Eric Blake 提交于
      * bootstrap.conf (gnulib_modules): Add configmake.
      * daemon/Makefile.am (libvirtd_CFLAGS): Drop defines provided by
      gnulib.
      * src/Makefile.am (INCLUDES): Likewise.
      * tests/Makefile.am (INCLUDES): Likewise.
      * tools/Makefile.am (virsh_CFLAGS): Likewise.
      * daemon/libvirtd.c (qemudInitPaths, usage, main): Update
      clients.
      * src/cpu/cpu_map.c (CPUMAPFILE): Likewise.
      * src/driver.c (DEFAULT_DRIVER_DIR): Likewise.
      * src/internal.h (_): Likewise.
      * src/libvirt.c (virInitialize): Likewise.
      * src/lxc/lxc_conf.h (LXC_CONFIG_DIR, LXC_STATE_DIR, LXC_LOG_DIR):
      Likewise.
      * src/lxc/lxc_conf.c (lxcCapsInit, lxcLoadDriverConfig):
      Likewise.
      * src/network/bridge_driver.c (NETWORK_PID_DIR)
      (NETWORK_STATE_DIR, DNSMASQ_STATE_DIR, networkStartup): Likewise.
      * src/nwfilter/nwfilter_driver.c (nwfilterDriverStartup):
      Likewise.
      * src/qemu/qemu_conf.c (qemudLoadDriverConfig): Likewise.
      * src/qemu/qemu_driver.c (qemudStartup): Likewise.
      * src/remote/remote_driver.h (LIBVIRTD_PRIV_UNIX_SOCKET)
      (LIBVIRTD_PRIV_UNIX_SOCKET_RO, LIBVIRTD_CONFIGURATION_FILE)
      (LIBVIRT_PKI_DIR): Likewise.
      * src/secret/secret_driver.c (secretDriverStartup): Likewise.
      * src/security/security_apparmor.c (VIRT_AA_HELPER): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/storage/storage_backend_disk.c (PARTHELPER): Likewise.
      * src/storage/storage_driver.c (storageDriverStartup): Likewise.
      * src/uml/uml_driver.c (TEMPDIR, umlStartup): Likewise.
      * src/util/hooks.c (LIBVIRT_HOOK_DIR): Likewise.
      * tools/virsh.c (main): Likewise.
      * docs/hooks.html.in: Likewise.
      0d5f54bb
  34. 09 11月, 2010 1 次提交
  35. 06 10月, 2010 1 次提交
    • E
      build: require pkg-config for bootstrap · b0f34a6a
      Eric Blake 提交于
      * .gnulib: Update to latest, for bootstrap fixes.
      * bootstrap: Synchronize with upstream.
      * bootstrap.conf: Add pkg-config pre-requisite.
      * autogen.sh: Tweak wording message.
      Reported by Justin Clift, and with feedback from Bruno Haible.
      b0f34a6a
  36. 01 10月, 2010 1 次提交
    • E
      build: fix example build on MacOS X · f8db6c90
      Eric Blake 提交于
      Partial reversion of commit 76d87a59, now that bootstrap is smarter.
      
      * .gnulib: Update to latest, for poll and bootstrap fixes.
      * bootstrap: Resync from gnulib.
      * autogen.sh: Drop redundant tool checks; bootstrap does them
      better, by honoring environment variables.
      * examples/domain-events/events-c/Makefile.am (INCLUDES)
      (event_test_LDADD): Use gnulib library during build.
      * bootstrap.conf (gnulib_tool_option_extras): Revert --libtool
      addition, now that updated bootstrap does it for us.
      Reported by Justin Clift.
      f8db6c90
  37. 23 9月, 2010 1 次提交
    • E
      maint: update to latest gnulib · 76d87a59
      Eric Blake 提交于
      * .gnulib: Update to latest.
      * bootstrap.conf (gnulib_modules): Add new termios module.
      (gnulib_tool_option_extras): Make libtool usage explicit.
      * src/util/util.c (includes): Gnulib now guarantees termios.h.
      * bootstrap: Resync from gnulib.
      76d87a59
  38. 02 9月, 2010 1 次提交
    • E
      build: add some modules · ff578973
      Eric Blake 提交于
      snprintf is currently implicitly picked up by getaddrinfo, but we
      might as well make it explicit so that mingw doesn't break if
      getaddrinfo changes to drop the dependency.
      
      func doesn't matter for gcc compilation, but may help other compilers
      cope with our use of __func__.
      
      * bootstrap.conf (gnulib_modules): Add snprintf and func.
      ff578973