Commit Graph

2607 Commits

Author SHA1 Message Date
Jim Meyering
f272378d52 build: automatically rerun ./bootstrap when needed
When "git pull" (or any other operation) brings in a new version of the
gnulib git submodule, you must rerun the autogen.sh script.  With this
change, "make" now fails and tells you to run ./autogen.sh, when needed.
* autogen.sh: Maintain a new file, .git-module-status, containing
the current submodule status.  If it doesn't exist or its content
is different from what "git submodule status" prints, then run
./bootstrap
* .gitignore: Add .git-module-status
* cfg.mk: Diagnose out of date submodule and fail.
* README-hacking: Update not to mention bootstrap.
* Makefile.am (MAINTAINERCLEANFILES): Add .git-module-status,
so that "make maintainerclean" will remove it.
2009-07-10 13:39:28 +02:00
Jim Meyering
e335b2ca90 build: make autogen.sh use autoreconf -if
* autogen.sh: Use "autoreconf -if" instead of open-coding it with
manual and unconditional invocation of each separate tool.
2009-07-10 13:39:28 +02:00
Mark McLoughlin
13709bdbf8 Use virDomainChrTypeFromString() instead of open coding
* src/domain_conf.c: replace open coded chr type parsing with
  virDomainChrTypeFromString(), retaining the existing semantics
  where unknown types are silently mapped to the "null" type and
  "pty" is used if none is specified
2009-07-10 09:33:34 +01:00
Mark McLoughlin
62455ed872 Switch to using a unix socket for the qemu monitor
We keep support for the pty based monitor so that we can re-connect
to VMs started by older versions of libvirtd.

* src/domain_conf.c: handle formatting and parsing unix monitors

* src/qemu_driver.c: add qemudOpenMonitorUnix(), remove the monitor
  pty path searching from qemudFindCharDevicePTYs(), switch
  qemudStartVMDaemon() and qemuDomainXMLToNative() to using a unix
  monitor

* tests/qemuxml2argvtest.c: switch to using a unix monitor

* tests/qemuxml2argvdata/qemuxml2argv-*.args: update test data
2009-07-09 20:04:09 +01:00
Mark McLoughlin
05d377bdd2 Add the monitor type to the domain state XML
There are no functional changes in this patch apart from adding the
monitor type to the state XML.

The patch mostly consists of switching to use virDomainChrDef every
where to describe the monitor.

* src/domain_conf.h: replace monitorpath with monitor_chr

* src/domain_conf.c: handle parsing the monitor type and initializing
  monitor chr

* src/qemu_conf.[ch]: make qemudBuildCommandLine take a
  virDomainChrDefPtr and use that to build the -monitor parameter

* src/qemu_driver.c: split pty specific and common code from
  qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr

* tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change
2009-07-09 20:04:07 +01:00
Mark McLoughlin
1f4ec305f0 Minor qemu monitor coding style fixes
* src/qemu_driver.c: use a consistent coding style for function
  definitions
2009-07-09 19:31:01 +01:00
Mark McLoughlin
8a52daa2d4 Don't leak vm->monitorpath on re-connect
* src/qemu_driver.c: vm->monitorpath is already initialized in the case
  of re-connect, so move the initialization for the normal startup case
  out of the common code
2009-07-09 19:31:01 +01:00
Jim Meyering
72978b9789 build: update from gnulib, for latest maint.mk
* gnulib: Update submodule to latest.
This fixes the make syntax-check failure whereby sc_po_check
would complain about cfg.mk.
2009-07-09 20:02:31 +02:00
Jim Meyering
bcf2aed1a9 avoid a "make syntax-check" failure
* .x-sc_avoid_if_before_free: Ignore *all* ChangeLog files,
now, including ChangeLog-old.
2009-07-09 20:00:37 +02:00
Daniel P. Berrange
75618aaf88 Fix wierd build problems due to autopoint overwriting gnulib m4
* Makefile.am: List -I m4 first, in ACLOCAL_AMFLAGS
* .gitignore: ignore gnulib/, ChangeLog, *rej, *orig, *#*# (emacs
  temporary files)
2009-07-09 12:18:14 +01:00
Jim Meyering
59254c9beb doc: clone+build instructions
* README-hacking: New file.
* bootstrap: Remove obsolete comments.
2009-07-09 09:32:21 +02:00
Jim Meyering
2d9bf021a1 build: adjust aclocal's search patch to prefer gnulib's m4 files.
* Makefile.am (ACLOCAL_AMFLAGS): Search gnulib/m4/ before m4/.
2009-07-08 21:27:41 +02:00
Jim Meyering
27b175b9a2 generate ChangeLog from git logs into distribution tarball
No longer maintain a version-controlled ChangeLog file, but do
continue to include a ChangeLog file in distribution tarball.
* Makefile.am (gen-ChangeLog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Add ChangeLog-old.
* bootstrap (modules): Add gitlog-to-changelog.
* ChangeLog: Remove file.  Renamed to...
* ChangeLog-old: ...this.  New file.
* autogen.sh: Touch ChangeLog, to ensure it exists.  For automake.
2009-07-08 16:17:51 +02:00
Jim Meyering
bf773e0467 use gnumakefile and maintainer-makefile modules from gnulib
* bootstrap (modules): Add gnumakefile and maintainer-makefile.
* GNUmakefile: Remove file, now provided by gnulib.
* Makefile.maint: Remove.  Replaced by maint.mk from gnulib.
.gitignore: Add GNUmakefile and maint.mk.
* cfg.mk (prev_version_file): Disable this feature.
Setting this to /dev/null avoids an otherwise harmless diagnostic.
2009-07-08 16:17:51 +02:00
Jim Meyering
fb98f4b10d remove all .cvsignore files 2009-07-08 16:17:51 +02:00
Jim Meyering
7bb22f58b8 make .gnulib a submodule
This makes it so we record (via a git submodule)
a snapshot of whatever version of gnulib we're using,
and none of gnulib sources are in the libvirt repository.
The result is that we have as much reproducibility as when
we version-controlled imported copies of the gnulib sources,
but without the hassle of the manual process we used when
syncing with upstream.

Note that when you clone libvirt, you get only the libvirt
repository, but when you first run ./bootstrap, it clones
gnulib (at the SHA1 recorded via the submodule), creating
the .gnulib/ hierarchy.  Then, the bootstrap script runs
gnulib-tool to populate gnulib/ with the files that make
up the selected modules.

Put the following in your ~/.gitconfig file.
[alias]
  syncsub = submodule foreach git pull origin master

The update procedure is simple:
  git syncsub
  ...build & test...
  git commit -m 'gnulib: sync submodule to latest' .gnulib

* .gitmodules: New file.
* .gnulib: Initialize.
* bootstrap: Set up to use the new submodule.
Stop using --no-vc-files.
Don't remove .gitignore files.
Don't use or create .cvsignore.
Diagnose an invalid --gnulib-srcdir=DIR argument.
* build-aux/vc-list-files: Delete file, now pulled from gnulib.
* build-aux/useless-if-before-free: Likewise.
* po/POTFILES.in: Remove gnulib/lib/gai_strerror.c, since
it no longer contains translatable strings.
* gnulib/*: Remove gnulib/ hierarchy.
2009-07-08 16:17:51 +02:00
Jim Meyering
360194bfb5 skip some of gnulib's new rules
* cfg.mk (local-checks-to-skip): Add these: sc_error_message_uppercase,
sc_program_name, sc_require_test_exit_idiom, sc_makefile_check.
2009-07-08 16:17:51 +02:00
Jim Meyering
c120fcc06a Prepare to use maint.mk from gnulib
Since Makefile.maint will soon come from gnulib's maint.mk,
sync Makefile.maint to have the same contents (modulo minor
things).  In syncing it, we have to remove some libvirt-specific
rules.  Since we want to keep them (of course), put those in cfg.mk.
* Makefile.maint: Merge from gnulib's maint.mk.
* cfg.mk (sc_avoid_write): New rule.  From Makefile.cfg.
(sc_prohibit_strcmp_and_strncmp): Likewise, and rename.
(sc_prohibit_asprintf, sc_prohibit_VIR_ERR_NO_MEMORY): Likewise.
(sc_prohibit_nonreentrant): Likewise.
(sc_prohibit_ctype_h): Likewise.
(sc_TAB_in_indentation, sc_avoid_ctype_macros): Likewise.
(sc_prohibit_virBufferAdd_with_string_literal): Likewise.
(sc_prohibit_gethostby): Likewise.
(sc_libvirt_unmarked_diagnostics): Likewise.  Also, rename the
rule, inserting "_libvirt", since this rule is a specialization of
the one in gnulib.
* GNUmakefile: Include cfg.mk, not Makefile.cfg
* .x-sc_prohibit_strcmp_and_strncmp: New file.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp_and_strncmp
2009-07-08 16:17:51 +02:00
Jim Meyering
96c807feb8 * Makefile.cfg: Rename to...
* cfg.mk: ...this.  New file.
2009-07-08 16:17:51 +02:00
Jim Meyering
b731d7830e use automake-1.11's silent-rules option, when possible
Don't use mylibtool, (subsumed by automake's silent rules)
Its use was causing a non-srcdir build to fail.
* Makefile.am (EXTRA_DIST): Remove mylibtool.
* configure.in: Don't use mylibtool.

* configure.in: Use AM_SILENT_RULES([yes]),
but only if that m4 macro is defined.
Thus, it works even on systems that lack automake-1.11.
Daniel Berrange suggested adding the conditional, so that
we don't have a hard requirement on 1.11, e.g., for RHEL5.
2009-07-08 16:15:46 +02:00
Jim Meyering
aef9746874 fix another failing "make distcheck" (qemuhelptest)
It failed in a non-srcdir build because those 5 sample output
files were not included in the distribution tarball.  Include them.
* tests/Makefile.am (qemuhelpdata, EXTRA_DIST): Include these:
kvm-74, kvm-86, qemu-0.10.5, qemu-0.9.1, qemu-kvm-0.10.5.
2009-07-08 16:00:05 +02:00
Jim Meyering
568583adf7 fix failing "make distcheck"
* docs/Makefile.am (xml): Distribute testpool.xml and testvol.xml,
which are referenced from testnode.xml.
2009-07-08 15:59:58 +02:00
Daniel P. Berrange
561e60732f Make it easier to debug tests running programs
* tests/testutils.c: Don't discard stderr when running
	external programs during tests
2009-07-08 13:40:32 +01:00
Daniel P. Berrange
ad6d5acb42 Support <video> element for QEMU guests
* src/qemu_conf.c, src/qemu_conf.h: Use -vga or -std-vga
	when starting guests if video card is present
	* tests/qemuhelptest.c: Change to use constants instead
	of hardcoded hex numbers, and add VGA support
	* tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml,
	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml,
	tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml: Add <video>
	element for testing graphics adapter
	* tests/qemuxml2argvtest.c: Add QEMUD_CMD_FLAG_VGA flag
	* tests/qemuxml2xmltest.c: Add missing graphics-vnc-sasl/tls tests
2009-07-08 13:40:32 +01:00
Daniel P. Berrange
6b4d18c7b3 Support <video> tag for defining VGA card properties
* docs/schemas/domain.rng: Define <video> element schema
 * src/domain_conf.c, src/domain_conf.h, src/libvirt_private.syms:
   Add parsing and formatting for <video> element
2009-07-08 13:40:32 +01:00
Daniel Veillard
c6cd55d38e Report the object name on lookup error
* src/network_driver.c src/node_device.c src/storage_driver.c:
  many places in the code reported 'No xxx with matching name" after
  a Lookup error without reporting the name used by the failed lookup
2009-07-08 12:01:35 +02:00
Harshavardhana
2562303a45 Add new net filesystem glusterfs
* src/storage_conf.c src/storage_conf.h: adds glusterfs to the list
  of network storage
* libvirt.spec.in: adds the dependency on glusterfs-client
2009-07-08 11:46:25 +02:00
Paolo Bonzini
b0e48bfdfe Avoid raising an internal error
* src/qemu_conf.c: when connecting an interface if it reference
  an undefined network, then we used to raise an internal error.
2009-07-07 16:54:55 +02:00
Daniel Veillard
f093e7ad6b Fix informations about previous git server
* docs/downloads.html[.in]: update the secton about
the server on git.et.redhat.com based on the plans
Jim posted.
2009-07-07 10:34:55 +02:00
Dan Kenigsberg
813a2f683d Fix python examples to use read-write conn
* docs/examples/python/domstart.py python/tests/create.py:
The two example were broken as they needed full-access connection
but only opened read-only connections
2009-07-06 17:05:41 +02:00
Daniel Veillard
9fc567db7b update download informations after switch to git
* docs/downloads.html docs/downloads.html.in: update download
  informations after switch to git
daniel
2009-07-06 14:27:00 +02:00
Daniel Veillard
c759ae5509 Release of libvirt-0.6.5
* configure.in libvirt.spec.in NEWS docs/* po/*: release of
  libvirt-0.6.5
* .gitignore: adding cscope files
Daniel
2009-07-03 14:32:17 +00:00
Daniel Veillard
d81275974a Add support for arm emulation if qemu-system-arm is present
* src/qemu_conf.c: patch from C.J. Adams-Collier adding support
  for arm emulation if qemu-system-arm is present
daniel
2009-07-03 13:15:55 +00:00
Mark McLoughlin
67d0c6eb94 Skip labelling if no src path present
Fixes startup of guest's with sourceless cdrom devices.

Patch from Cole Robinson originally posted here:

  https://bugzilla.redhat.com/499569

but never sent upstream.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-07-03 10:29:09 +00:00
Mark McLoughlin
add254feea Don't unnecessarily try to change a file context
As pointed out by Tim Waugh here:

  https://bugzilla.redhat.com/507555

We shouldn't bother trying to set the context of a file if it already
matches what we want.

(Fixed to use STREQ() and not use tabs, as pointed out by danpb)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-07-03 10:27:46 +00:00
Mark McLoughlin
547147084d Re-label shared and readonly images
This patch was posted ages ago here:

  https://bugzilla.redhat.com/493692

But was never posted upstream AFAICT.

Patch from Dan Berrange

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-07-03 10:26:37 +00:00
Daniel Veillard
1e4434d652 Fix some missing parts in network code and schemas
* docs/schemas/network.rng: fix the network schemas to match
  new accepted elements, patch by Satoru SATOH
* src/network_conf.c: fix network driver to save the domain name
  in XML if present, patch by Satoru SATOH
* AUTHORS: adding Satoru SATOH
Daniel
2009-07-02 14:02:18 +00:00
Daniel Veillard
bc429a0e54 fix an endless loop in node device XML dump
* src/node_device.c: fix an endless loop in node device XML dump,
  patch by Cole Robinson
Daniel
2009-07-01 21:30:41 +00:00
Daniel Veillard
bf32184d48 small OpenNebula driver doc update
* docs/drvone.html docs/drvone.html.in: small OpenNebula driver
  doc update by Abel Miguez Rodriguez
daniel
2009-07-01 21:24:47 +00:00
Daniel Veillard
9dfcca0353 OpenNebula driver documentation
* docs/drvone.html.in docs/drvone.html docs/drivers.html.in
  docs/hvsupport.html.in docs/sitemap.html.in docs/*: added
  documentation for OpenNebula driver by Abel Miguez Rodriguez
  and regenerated the docs
Daniel
2009-07-01 14:27:24 +00:00
Daniel Veillard
88b4cc5fe9 Regenerated the documentation and localization files
* src/libvirt.c src/virterror.c: fix some missing comments in public
  modules.
* docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/devhelp/libvirt-libvirt.html docs/html/libvirt-libvirt.html:
  regenerated documentation
* po/*: updated the polish localization and regenerated
Daniel
2009-07-01 13:08:17 +00:00
Daniel Veillard
2a004db6c7 Various logging cleanups in code and doc
* docs/logging.html[.in] qemud/libvirtd.conf qemud/qemud.c
  src/logging.[ch]: cleanup the logging code and docs to remove
  all references to log level 0, cleanup hardcoded values and add
  a default VIR_LOG_DEFAULT value, patch by Amy Griffis
daniel
2009-07-01 11:21:15 +00:00
Daniel Veillard
f7bd305904 cleanup and small update for OpenNebula
* src/opennebula/one_conf.c src/opennebula/one_driver.c: cleanup
  and small update for OpenNebula driver by Abel Miguez Rodriguez
Daniel
2009-07-01 10:42:10 +00:00
Daniel P. Berrange
69ba4d0971 Remove unused code. Ensure null termination after strncpy in opennebula 2009-07-01 10:40:12 +00:00
Daniel Veillard
1476b6d487 * src/storage_driver.c: don't destroy a pool when calling create
by mistake, patch by Dave Allan.
daniel
2009-07-01 08:33:22 +00:00
Daniel P. Berrange
eb6d21cc0e Reduce LXC capabilities 2009-06-29 17:09:42 +00:00
Daniel P. Berrange
96619805cb Use libcap-ng to clear capabilities for many child processes 2009-06-29 17:00:52 +00:00
Daniel P. Berrange
1a982aef18 Prepare for using libcap-ng 2009-06-29 11:33:13 +00:00
Daniel P. Berrange
2c359dd609 Add HACKING doc to the website 2009-06-29 11:09:17 +00:00
Daniel P. Berrange
39c7e7a6b7 Fix crash in QEMU driver with bad capabilities data 2009-06-29 10:41:56 +00:00