Commit Graph

25 Commits

Author SHA1 Message Date
Eric Blake
65c0f17acd build: update gnulib for pipe on mingw
* .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.
2010-12-13 16:09:50 -07:00
Eric Blake
0d5f54bb21 maint: use gnulib configmake rather than open-coding things
* 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.
2010-11-17 08:58:58 -07:00
Jiri Denemark
fb76151c28 virsh: Add .xml suffix to tmp files used in *edit commands
This helps editors with detecting the temporary files as XML since the
temporary files do not contain <?xml ...?> declaration.

Requested by https://bugzilla.redhat.com/show_bug.cgi?id=602277
2010-11-09 13:42:54 +01:00
Eric Blake
b0f34a6a1a build: require pkg-config for bootstrap
* .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.
2010-10-05 13:54:39 -06:00
Eric Blake
f8db6c90e3 build: fix example build on MacOS X
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.
2010-09-30 11:34:00 -06:00
Eric Blake
76d87a5959 maint: update to latest gnulib
* .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.
2010-09-23 08:15:16 -06:00
Eric Blake
ff578973c7 build: add some modules
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.
2010-09-01 12:22:59 -06:00
Matthias Bolte
92af69abad esx: Use MD5 sum of mount path as storage pool UUID
With the previous storage pool UUID source not all storage pools
had a proper UUID, especially GSX storage pools. The mount path
is unique per host and cannot change during the lifetime of the
datastore. Therefore, it's MD5 sum can be used as UUID.

Use gnulib's crypto/md5 module to generate the MD5 sum.
2010-08-21 01:30:08 +02:00
Eric Blake
f9a9214629 maint: add gnulib gettimeofday module
* bootstrap.conf (gnulib_modules): Add gettimeofday.
2010-06-25 07:46:28 -06:00
Eric Blake
3cf642a0f9 build: fix some mingw issues
On Fedora 13 with sufficient mingw32-* packages installed, running
./autobuild.sh failed to cross-compile to mingw because
mingw32-pthreads installed a broken <pthread.h>.  With that
issue fixed, the build still failed due to use of O_SYNC.
Meanwhile, recent .spec.in changes got out of sync.

* bootstrap.conf (gnulib_modules): Add fcntl-h, for O_SYNC.
* .gnulib: Update to latest, to work around buggy pthreads-win32
library.
* bootstrap: Import latest from gnulib.
* mingw32-libvirt.spec.in: Distribute new file.
2010-06-10 06:05:31 -06:00
Eric Blake
e8a1a730fe build: update gnulib
* .gnulib: Update to latest.
* bootstrap.conf (gnulib_modules): Import netdb.
* src/esx/esx_util.c (AI_ADDRCONFIG): Rely on gnulib.
* src/remote/remote_driver.c (AI_ADDRCONFIG): Likewise.
* tools/virsh.c (WEXITSTATUS, O_SYNC): Likewise.
2010-05-11 10:03:48 -06:00
Eric Blake
03ae900f02 build: allow older gettext
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext,
since the latter drags in a depedency on gettext 0.18.
Suggested by Bruno Haible.
2010-05-11 10:03:48 -06:00
Eric Blake
062a25f078 build: update gnulib
81 patches to gnulib, picks up several new syntax checks.

* .gnulib: Update to latest.
* .x-sc_prohibit_always_true_header_tests: New file.
* bootstrap.conf (gnulib_modules): Add sched.
* src/util/processinfo.c (includes): <sched.h> is now guaranteed.
* src/network/bridge_driver.c (includes): Drop useless
<strings.h>.
* src/openvz/openvz_conf.c (includes): Likewise.
* src/openvz/openvz_driver.c (includes): Likewise.
* src/phyp/phyp_driver.c (includes): Likewise.
* src/qemu/qemu_driver.c (includes): Likewise.
* src/uml/uml_driver.c (includes): Likewise.
2010-05-06 14:35:38 -06:00
Eric Blake
8acaeb730b build: use gnulib's sys/wait.h
* configure.ac: Drop sys/wait.h check.
* src/libvirt.c (includes): Use header unconditionally.
* src/remote/remote_driver.c (includes): Likewise.
* src/storage/storage_backend.c (includes): Likewise.
* src/util/ebtables.c (includes): Likewise.
* src/util/hooks.c (includes): Likewise.
* src/util/iptables.c (includes): Likewise.
* src/util/util.c (includes): Likewise.
2010-05-06 14:35:38 -06:00
Eric Blake
5349cf1ed2 build: use gnulib's uname
* bootstrap.conf (gnulib_modules): Add uname.
* configure.ac: Drop uname and sys/utsname.h checks.
* src/nodeinfo.c (nodeGetInfo): Use uname unconditionally.
2010-05-06 14:35:37 -06:00
Eric Blake
9017b9bcaf build: rely on gnulib's pthread module
Gnulib can guarantee that pthread.h exists, but for now, it is a dummy
header with no support for most pthread_* functions.  Modify our
use of pthread to use function checks, rather than header checks,
to determine how much pthread support is present.

* bootstrap.conf (gnulib_modules): Add pthread.
* configure.ac: Drop all pthread.h checks.  Optimize function
checks.  Add check for pthread functions.
* src/Makefile.am (libvirt_lxc_LDADD): Ensure proper link.
* src/remote/remote_driver.c (remoteIOEventLoop): Depend on
pthread_sigmask, now that gnulib guarantees pthread.h.
* src/util/util.c (virFork): Likewise.
* src/util/threads.c (threads-pthread.c): Depend on
pthread_mutexattr_init, as a witness of full pthread support.
* src/util/threads.h (threads-pthread.h): Likewise.
2010-05-06 14:35:37 -06:00
Matthias Bolte
7ca6a0996d Update to latest gnulib to get strtok_r relaxed to LGPLv2+
strtok_r will be used in the ESX driver to replace scanf-based code.

MinGW lacks strtok_r, so we need gnulib to provide it, but until now
strtok_r was licensed LGPL3.
2010-04-15 19:52:38 +02:00
Eric Blake
9819b41a20 build: include usleep gnulib module
Without this module, attempts to sleep for 1 or more seconds
on mingw instead become a no-delay no-op.

* bootstrap.conf (gnulib_modules): Add usleep.
2010-04-13 07:58:01 -06:00
Matthias Bolte
1aaa909116 esx: Add domain snapshot support
Fix invalid code generating in esx_vi_generator.py regarding deep copy
types that contain enum properties.

Add strptime and timegm to bootstrap.conf. Both are used to convert a
xsd:dateTime to calendar time.

Add a testcase of the xsd:dateTime conversion.
2010-04-08 21:54:43 +02:00
Matthias Bolte
2f80b2a013 bootstrap: Enable copy-mode for MinGW builds
MSYS' ln doesn't work well in the way bootstrap uses it with relative paths.
2010-03-23 02:12:07 +01:00
Matthias Bolte
17f7220891 bootstrap: Remove rsync from buildreq list
rsync is used to download .po files, but SKIP_PO=true is set and
downloading .po files is skipped.

This also fixes a problem with MinGW builds, because rsync is not
available for MinGW.
2010-03-23 02:10:14 +01:00
Chris Lalancette
aa2f6f96dd Get thread and socket information in virsh nodeinfo.
The current code for "nodeinfo" is pretty naive
about socket and thread information.  To determine the
sockets, it just takes the number of cpus and divides
by the number of cores.  For the thread count, it always
sets it to 1.  With more recent Intel machines, however,
hyperthreading is again an option, meaning that these
heuristics no longer work and give bogus numbers.  This
patch goes through /sys to get the additional
information so we properly report it.

Note that I had to edit the tests not to report on
socket and thread counts, since these are determined
dynamically now.

v2: As pointed out by Eric Blake, gnulib provides
    count-one-bits (which is LGPLv2+).  Use it instead
    of a hand-coded popcnt.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2010-03-08 09:26:04 -05:00
Eric Blake
c560fc4933 maint: relax git minimum version
Requiring git 1.6.4, just for the optional GNULIB_SRCDIR support,
was too harsh.  Resynchronize from gnulib.

* .gnulib: Import from latest gnulib.
* bootstrap: Re-synchronize from .gnulib/build-aux.
* bootstrap.conf: Drop git to 1.5.5.
* README-hacking: Document use of GNULIB_SRCDIR.
2010-02-24 14:29:27 -05:00
Eric Blake
38c9440a15 maint: import modern bootstrap
Copy the latest gnulib bootstrap, which runs autoreconf and
generates po/Makevars for us.  Other improvements include some
improved prerequisite tool checking.

This also fixes a bug in the .pot files, regarding the copyright holder.

* bootstrap: Update to version in .gnulib/build-aux.
* bootstrap.conf (MSGID_BUGS_ADDRESS, COPYRIGHT_HOLDER, SKIP_PO)
(gnulib_mk, ACLOCAL, bootstrap_epilogue): Provide overrides.
* autogen.sh (autoreconf): Avoid redundant autoreconf if bootstrap
was run.
* po/Makevars: Delete, now that bootstrap creates it.
* po/.gitignore: Update.
2010-02-23 21:31:21 +01:00
Eric Blake
1a51d05f8b maint: start factoring bootstrap
Borrow ideas from gnulib/build-aux/bootstrap, in order to factor the
specifics of libvirt into bootstrap.conf, while allowing future
upgrades of bootstrap to happen with less effort.

* bootstrap (gnulib_tool): Update invocation to be closer to
gnulib's version.  Move libvirt specifics...
* bootstrap.conf: ...into new file.
2010-02-23 21:31:17 +01:00