]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
12 years agovirsh-domain.c: Switch to C99 initialization of vshCmdOptDef
Michal Privoznik [Mon, 14 Jan 2013 11:26:54 +0000 (12:26 +0100)]
virsh-domain.c: Switch to C99 initialization of vshCmdOptDef

12 years agovirsh.c: Switch to C99 initialization of vshCmdOptDef
Michal Privoznik [Mon, 14 Jan 2013 11:26:23 +0000 (12:26 +0100)]
virsh.c: Switch to C99 initialization of vshCmdOptDef

12 years agolibvirt.c: fix typo in comment
Claudio Bley [Thu, 17 Jan 2013 12:38:29 +0000 (13:38 +0100)]
libvirt.c: fix typo in comment

12 years agoMove comments after enum members
Claudio Bley [Wed, 9 Jan 2013 13:03:50 +0000 (14:03 +0100)]
Move comments after enum members

The api builder always associates comments to the last member it read,
not to the current member even if there was a comment for the previous
member and a comma was already seen.

This has the effect that the comment for the previous member gets
overwritten and the current member has no comment at all.

12 years agopython: Avoid freeing uninitialized new_params pointer
Jiri Denemark [Tue, 15 Jan 2013 23:44:29 +0000 (00:44 +0100)]
python: Avoid freeing uninitialized new_params pointer

12 years agoinclude virterror_internal.h in threads.h
Hu Tao [Wed, 16 Jan 2013 02:53:05 +0000 (10:53 +0800)]
include virterror_internal.h in threads.h

required by VIR_ONCE_GLOBAL_INIT using virSetError.

12 years agoinclude util.h in cgroup.h
Hu Tao [Wed, 16 Jan 2013 02:53:04 +0000 (10:53 +0800)]
include util.h in cgroup.h

required by VIR_ENUM_DECL.

12 years agocall virstateCleanup to do the cleanup before libvirtd exits
Hu Tao [Wed, 16 Jan 2013 02:53:03 +0000 (10:53 +0800)]
call virstateCleanup to do the cleanup before libvirtd exits

12 years agoFix typo in variable name
Guido Günther [Wed, 16 Jan 2013 19:55:42 +0000 (20:55 +0100)]
Fix typo in variable name

that broke the build like:

  CC     libvirt_conf_la-domain_conf.lo
  conf/domain_conf.c: In function 'virDomainVcpuPinAdd':
  conf/domain_conf.c:11920:29: error: 'vpcupin' undeclared (first use in this function)
  conf/domain_conf.c:11920:29: note: each undeclared identifier is reported only once for each function it appears in
  make[3]: *** [libvirt_conf_la-domain_conf.lo] Error 1

12 years agolibxl: Fix cleanup on domain start error
Jim Fehlig [Tue, 15 Jan 2013 22:56:35 +0000 (15:56 -0700)]
libxl: Fix cleanup on domain start error

If building the libxl domain config fails, cleanup before returning
failure.

12 years agolibxl: Check for libxl_ctx_alloc failure
Jim Fehlig [Tue, 15 Jan 2013 22:54:46 +0000 (15:54 -0700)]
libxl: Check for libxl_ctx_alloc failure

12 years agolibxl: Don't free domain death event
Jim Fehlig [Tue, 15 Jan 2013 22:50:35 +0000 (15:50 -0700)]
libxl: Don't free domain death event

Callers should not free death events provided by libxl_evdisable_FOO().

12 years agolibxl: Use consistent parameter naming scheme
Jim Fehlig [Tue, 15 Jan 2013 22:47:05 +0000 (15:47 -0700)]
libxl: Use consistent parameter naming scheme

Use consistent parameter names throughout the libxl timeout and fd
event functions.

12 years agolibxl: Use consistent style for function definitions
Jim Fehlig [Tue, 15 Jan 2013 22:44:58 +0000 (15:44 -0700)]
libxl: Use consistent style for function definitions

Commit dfa1e1dd added functions whose definitions do not conform
to the style used in the libxl driver.  Change these functions to
be consistent throughout the driver.

12 years agolocking: Resolve resource leaks on non error path
John Ferlan [Tue, 15 Jan 2013 14:23:29 +0000 (09:23 -0500)]
locking: Resolve resource leaks on non error path

Both 'dir' and 'path' were not free'd on successful return

12 years agoconf: fix leak in virDomainVcpuPinAdd
Ján Tomko [Tue, 15 Jan 2013 14:43:08 +0000 (15:43 +0100)]
conf: fix leak in virDomainVcpuPinAdd

Fix the leak of vcpupin on failure to allocate cpumask and the leak of
cpumask if we fail to expand vcpupin_list.

12 years agoconf: fix class_id bitmap leak in virNetworkObj
Ján Tomko [Tue, 15 Jan 2013 14:20:02 +0000 (15:20 +0100)]
conf: fix class_id bitmap leak in virNetworkObj

Commit '07d1b6b' added class_id bitmap to virNetworkObj but never freed
it.

12 years agoqemu: fix QEMU_CAPS_NO_ACPI detection
Ján Tomko [Fri, 21 Dec 2012 13:20:11 +0000 (14:20 +0100)]
qemu: fix QEMU_CAPS_NO_ACPI detection

In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the
whole check useless.

This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to
qemuCapsInitQMP, and removes the no longer needed exception for S390.

It also clears the flag for all non-x86 archs instead of just S390 in
qemuCapsInitHelp.

12 years agoConvert libxl driver over to use virPortAllocator APIs
Daniel P. Berrange [Fri, 11 Jan 2013 12:09:53 +0000 (12:09 +0000)]
Convert libxl driver over to use virPortAllocator APIs

Replace the current libxl driver code for managing port
reservations with the new virPortAllocator APIs.

12 years agoConvert QEMU driver over to use virPortAllocator APIs
Daniel P. Berrange [Wed, 9 Jan 2013 15:28:58 +0000 (15:28 +0000)]
Convert QEMU driver over to use virPortAllocator APIs

Replace the current QEMU driver code for managing port
reservations with the new virPortAllocator APIs.

12 years agoAdd a port allocator class
Daniel P. Berrange [Wed, 9 Jan 2013 15:11:50 +0000 (15:11 +0000)]
Add a port allocator class

Introduce a virPortAllocator for managing TCP port allocations.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert all rpc classes over to virObjectLockable
Daniel P. Berrange [Wed, 9 Jan 2013 21:27:28 +0000 (21:27 +0000)]
Convert all rpc classes over to virObjectLockable

12 years agoConvert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable
Daniel P. Berrange [Wed, 9 Jan 2013 21:00:32 +0000 (21:00 +0000)]
Convert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable

The  virDomainObj, qemuAgent, qemuMonitor, lxcMonitor classes
all require a mutex, so can be switched to use virObjectLockable

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoutil: Check for negative indent in virBufferAdd
John Ferlan [Tue, 15 Jan 2013 18:12:59 +0000 (13:12 -0500)]
util: Check for negative indent in virBufferAdd

Since virBufferGetIndent() will check and fail on buf->error, I
removed that check from virBufferAdd() and used the -1 return as the
way to exit.

12 years agotools: Check return status on virBufferTrim()
John Ferlan [Tue, 15 Jan 2013 18:12:57 +0000 (13:12 -0500)]
tools: Check return status on virBufferTrim()

12 years agorpc: Check and message setsockopt()
John Ferlan [Tue, 15 Jan 2013 18:12:56 +0000 (13:12 -0500)]
rpc: Check and message setsockopt()

Check status when attempting to set SO_REUSEADDR flag on outgoing connection
On failure, VIR_WARN(), but continue to connect. This code path is on the
sender side where the setting is just a hint and would only take effect if
the sender is overflowed with TCP connections.  Inability to set doesn't mean
failure to establish a connection.

12 years agoparallels: Remove unused JSON fetch of "OS"
John Ferlan [Tue, 15 Jan 2013 18:38:19 +0000 (13:38 -0500)]
parallels: Remove unused JSON fetch of "OS"

Commit id ac1c77f0 removed the "os" field in "parallelsDomObj" that
commit id aa296e6c had added and the data is not used by the function.

12 years agovirsh: Remove unused setting of 'br_node' and 'if_node'
John Ferlan [Tue, 15 Jan 2013 18:38:18 +0000 (13:38 -0500)]
virsh: Remove unused setting of 'br_node' and 'if_node'

12 years agoutil: Remove the unused setting of 'res' for virHashLookup return
John Ferlan [Tue, 15 Jan 2013 18:38:17 +0000 (13:38 -0500)]
util: Remove the unused setting of 'res' for virHashLookup return

12 years agolocking: Remove unnecessary setting of lockspace
John Ferlan [Tue, 15 Jan 2013 18:38:16 +0000 (13:38 -0500)]
locking: Remove unnecessary setting of lockspace

In virLockSpaceProtocolDispatchNew() the returned value of lockspace from
virLockDaemonFindLockSpace() is overwritten by the virLockSpaceNew() return.
Coverity complains that it's unused.

In virLockSpaceProtocolDispatchCreateLockSpace() lockspace is also overwritten
in a similar manner resulting in the same Coverity message.

12 years agoopenvz: Need to check 'vm' first before dereferencing 'def'
John Ferlan [Tue, 15 Jan 2013 18:35:38 +0000 (13:35 -0500)]
openvz: Need to check 'vm' first before dereferencing 'def'

12 years agointerface: Need to check ifacedef->mac not just ifacedef after strdup()
John Ferlan [Tue, 15 Jan 2013 18:35:36 +0000 (13:35 -0500)]
interface: Need to check ifacedef->mac not just ifacedef after strdup()

12 years agoqemu: Don't update count of vCPUs if hot-unplug has failed
Peter Krempa [Tue, 15 Jan 2013 15:09:43 +0000 (16:09 +0100)]
qemu: Don't update count of vCPUs if hot-unplug has failed

After live change of cpu counts, the number of processor threads is
verified. This patch makes use of this approach to check if qemu ignored
the request for cpu hot-unplug and report an appropriate message.

12 years agoxen: Ignore return status for TCP_NODELAY
John Ferlan [Tue, 8 Jan 2013 17:40:21 +0000 (12:40 -0500)]
xen: Ignore return status for TCP_NODELAY

12 years agoAdd a virObjectLockable class holding a mutex
Daniel P. Berrange [Wed, 9 Jan 2013 17:54:07 +0000 (17:54 +0000)]
Add a virObjectLockable class holding a mutex

A great many virObject instances require a mutex, so introduce
a convenient class for this which provides a mutex. This avoids
repeating the tedious init/destroy code

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAllow for multi-level inheritance of virObject classes
Daniel P. Berrange [Wed, 9 Jan 2013 17:37:27 +0000 (17:37 +0000)]
Allow for multi-level inheritance of virObject classes

Currently all classes must directly inherit from virObject.
This allows for arbitrarily deep hierarchy. There's not much
to this aside from chaining up the 'dispose' handlers from
each class & providing APIs to check types.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd 'lxc-enter-namespace' command to virsh
Daniel P. Berrange [Fri, 21 Dec 2012 16:51:33 +0000 (16:51 +0000)]
Add 'lxc-enter-namespace' command to virsh

Add a 'lxc-enter-namespace' command which accepts a domain name
and then a command + args to run, attached to the container

eg

  virsh -c lxc:/// lxc-enter-namespace demo -- /bin/ps -auxf

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agolibvirt: lxc: don't mkdir when selinux is disabled
Gao feng [Wed, 9 Jan 2013 11:20:59 +0000 (19:20 +0800)]
libvirt: lxc: don't mkdir when selinux is disabled

libvirt lxc will fail to start when selinux is disabled.
error: Failed to start domain noroot
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=b9873916-3516-c199-8112-1592ff694a9e LIBVIRT_LXC_UUID=b9873916-3516-c199-8112-1592ff694a9e LIBVIRT_LXC_NAME=noroot /bin/sh
2013-01-09 11:04:05.384+0000: 1: info : libvirt version: 1.0.1
2013-01-09 11:04:05.384+0000: 1: error : lxcContainerMountBasicFS:546 : Failed to mkdir /sys/fs/selinux: No such file or directory
2013-01-09 11:04:05.384+0000: 7536: info : libvirt version: 1.0.1
2013-01-09 11:04:05.384+0000: 7536: error : virLXCControllerRun:1466 : error receiving signal from container: Input/output error
2013-01-09 11:04:05.404+0000: 7536: error : virCommandWait:2287 : internal error Child process (ip link del veth1) unexpected exit status 1: Cannot find device "veth1"

fix this problem by checking if selinuxfs is mounted
in host before we try to create dir /sys/fs/selinux.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
12 years agobuild: add new file, for lxc_protocol checking
Eric Blake [Tue, 15 Jan 2013 18:54:57 +0000 (11:54 -0700)]
build: add new file, for lxc_protocol checking

Commit 509eb51 added lxc_protocol.x; but without the initial
checkin of src/lxc_protocol-structs, 'make check' would fail for
anyone with pdwtags installed:
make[3]: *** No rule to make target `lxc_protocol-structs', needed by `check-protocol'.  Stop.

* src/lxc_protocol-structs: New file.

12 years agoAdd implementation of virDomainLxcOpenNamespace to LXC driver
Daniel P. Berrange [Fri, 21 Dec 2012 14:22:31 +0000 (14:22 +0000)]
Add implementation of virDomainLxcOpenNamespace to LXC driver

The virDomainLxcOpenNamespace method needs to open every file
in /proc/$INITPID/ns and return the open file descriptor to the
client application.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoImplement the RPC protocol for the libvirt-lxc.la library
Daniel P. Berrange [Fri, 21 Dec 2012 14:20:04 +0000 (14:20 +0000)]
Implement the RPC protocol for the libvirt-lxc.la library

Add the infrastructure for the libvirt-lxc.la library to
the remote protocol client and daemon

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoxen: Resolve resource leak with 'cpuset'
John Ferlan [Thu, 10 Jan 2013 17:46:52 +0000 (12:46 -0500)]
xen: Resolve resource leak with 'cpuset'

Make cpuset local to the while loop and free it once done with it each
time through the loop.  Add a sa_assert() to virBitmapParse() to keep Coverity
from believing there could be a negative return and possible resource leak.

12 years agointerface: Resolve resource leak wth 'tmp_iface_objs'
John Ferlan [Wed, 9 Jan 2013 14:54:16 +0000 (09:54 -0500)]
interface: Resolve resource leak wth 'tmp_iface_objs'

12 years agostorage: Resource resource leak using 'tmp_vols'
John Ferlan [Wed, 9 Jan 2013 14:54:15 +0000 (09:54 -0500)]
storage: Resource resource leak using 'tmp_vols'

12 years agotest: Resource resource leak with 'tmp_vols'
John Ferlan [Wed, 9 Jan 2013 14:54:14 +0000 (09:54 -0500)]
test: Resource resource leak with 'tmp_vols'

12 years agorpc: Avoid resource leak of 'socks' if any object append fails
John Ferlan [Wed, 9 Jan 2013 14:54:12 +0000 (09:54 -0500)]
rpc: Avoid resource leak of 'socks' if any object append fails

12 years agoutil: Resolve resource leak for 'res' in virSetInherit error path.
John Ferlan [Wed, 9 Jan 2013 14:54:10 +0000 (09:54 -0500)]
util: Resolve resource leak for 'res' in virSetInherit error path.

12 years ago.gitignore: Sort alphabetically
Michal Privoznik [Tue, 15 Jan 2013 12:30:30 +0000 (13:30 +0100)]
.gitignore: Sort alphabetically

12 years agointerface: Need to initialize 'add_to_list'
John Ferlan [Tue, 8 Jan 2013 15:41:01 +0000 (10:41 -0500)]
interface: Need to initialize 'add_to_list'

12 years agolxc: Initialize dst due to potential cleanup usage before setting
John Ferlan [Tue, 8 Jan 2013 15:41:00 +0000 (10:41 -0500)]
lxc: Initialize dst due to potential cleanup usage before setting

12 years agoopenvz: Need to initialize 'ret' for kb_per_pages error path
John Ferlan [Tue, 8 Jan 2013 15:40:59 +0000 (10:40 -0500)]
openvz: Need to initialize 'ret' for kb_per_pages error path

12 years agoparallels: Resolve issues with uninitialized 'ret' value
John Ferlan [Tue, 8 Jan 2013 17:34:13 +0000 (12:34 -0500)]
parallels: Resolve issues with uninitialized 'ret' value

Added some messaging to indicate possible failure from virXPathULongLong()
as well

12 years agostorage: Need to also VIR_FREE(reg)
John Ferlan [Thu, 10 Jan 2013 19:44:26 +0000 (14:44 -0500)]
storage: Need to also VIR_FREE(reg)

Commit-id 'afc4631b' added the regfree(reg) to free resources alloc'd
during regcomp; however, reg still needed to be VIR_FREE()'d. The call
to regfree() also didn't account for possible NULL value.  Reformatted
the call to be closer to usage.

12 years agobuild: further fixes for broken if_bridge.h
Eric Blake [Mon, 14 Jan 2013 17:47:41 +0000 (10:47 -0700)]
build: further fixes for broken if_bridge.h

Commit c308a9ae was incomplete; it resolved the configure failure,
but not a later build failure.

* src/util/virnetdevbridge.c: Include pre-req header.
* configure.ac (AC_CHECK_HEADERS): Prefer standard in.h over
non-standard ip6.h.

12 years agodocs: remove extra "
Eric Blake [Mon, 14 Jan 2013 23:46:30 +0000 (16:46 -0700)]
docs: remove extra "

* tools/virsh.pod: Fix typo.

12 years agosecurityselinuxhelper.c: Don't try to include xattr.h if not available
John Ferlan [Mon, 14 Jan 2013 18:45:55 +0000 (13:45 -0500)]
securityselinuxhelper.c: Don't try to include xattr.h if not available

Commit 907a39e7 missed adding the WITH_ATTR around #include <attr/xattr.h>
resulting in a build failure:

  CC     libsecurityselinuxhelper_la-securityselinuxhelper.lo
  securityselinuxhelper.c:27:24: fatal error: attr/xattr.h: No such file or directory
  compilation terminated.
  make[2]: *** [libsecurityselinuxhelper_la-securityselinuxhelper.lo] Error 1
  make[2]: Leaving directory `/home/jferlan/libvirt.work/tests'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/jferlan/libvirt.work'
  make: *** [all] Error 2

12 years agoAdd missing stubs to securityselinuxhelper.c
Daniel P. Berrange [Mon, 14 Jan 2013 18:33:44 +0000 (18:33 +0000)]
Add missing stubs to securityselinuxhelper.c

Make sure we override both the raw and non-raw stubs in
securityselinuxhelper.c. Also add diagnostics if
securityselinuxlabeltest fails a test item

12 years agoFix typo LIBCURL_{CFLAGS,LIBS} to CURL_{CFLAGS,LIBS}
Daniel P. Berrange [Mon, 14 Jan 2013 17:07:26 +0000 (17:07 +0000)]
Fix typo LIBCURL_{CFLAGS,LIBS} to CURL_{CFLAGS,LIBS}

Some places missed the conversion from LIBCURL_{CFLAGS,LIBS} to
CURL_{CFLAGS,LIBS}, and a part of curl check was left in
configure.ac instead of m4/virt-curl.m4 by mistake

12 years agobuild: work around broken kernel header
Eric Blake [Mon, 14 Jan 2013 16:54:25 +0000 (09:54 -0700)]
build: work around broken kernel header

I got this scary warning during ./configure on rawhide:

checking linux/if_bridge.h usability... no
checking linux/if_bridge.h presence... yes
configure: WARNING: linux/if_bridge.h: present but cannot be compiled
configure: WARNING: linux/if_bridge.h:     check for missing prerequisite headers?
configure: WARNING: linux/if_bridge.h: see the Autoconf documentation
configure: WARNING: linux/if_bridge.h:     section "Present But Cannot Be Compiled"
configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------- ##
configure: WARNING:     ## Report this to libvir-list@redhat.com ##
configure: WARNING:     ## ------------------------------------- ##
checking for linux/if_bridge.h... no

* configure.ac (AC_CHECK_HEADERS): Provide struct in6_addr, since
linux/if_bridge.h uses it without declaring it.

12 years agoFix build due to previous LXC patch
Daniel P. Berrange [Mon, 14 Jan 2013 16:34:51 +0000 (16:34 +0000)]
Fix build due to previous LXC patch

Mark virDomainLxcEnterNamespace as skipped in python binding
and remove reference to lxcDomainOpenNamespace which doesn't
arrive until a later patch

12 years agomaint: typo fix
Eric Blake [Mon, 14 Jan 2013 16:33:48 +0000 (09:33 -0700)]
maint: typo fix

I noticed this typo while configuring on a freshly-installed machine.

* m4/virt-udev.m4: Correct pciaccess name.

12 years agoIntroduce an LXC specific public API & library
Daniel P. Berrange [Fri, 21 Dec 2012 13:15:19 +0000 (13:15 +0000)]
Introduce an LXC specific public API & library

This patch introduces support for LXC specific public APIs. In
common with what was done for QEMU, this creates a libvirt_lxc.so
library and libvirt/libvirt-lxc.h header file.

The actual APIs are

  int virDomainLxcOpenNamespace(virDomainPtr domain,
                                int **fdlist,
                                unsigned int flags);

  int virDomainLxcEnterNamespace(virDomainPtr domain,
                                 unsigned int nfdlist,
                                 int *fdlist,
                                 unsigned int *noldfdlist,
                                 int **oldfdlist,
                                 unsigned int flags);

which provide a way to use the setns() system call to move the
calling process into the container's namespace. It is not
practical to write in a generically applicable manner. The
nearest that we could get to such an API would be an API which
allows to pass a command + argv to be executed inside a
container. Even if we had such a generic API, this LXC specific
API is still useful, because it allows the caller to maintain
the current process context, in particular any I/O streams they
have open.

NB the virDomainLxcEnterNamespace() API is special in that it
runs client side, so does not involve the internal driver API.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoAdd a test suite for validating SELinux labelling
Daniel P. Berrange [Wed, 19 Sep 2012 13:00:34 +0000 (14:00 +0100)]
Add a test suite for validating SELinux labelling

There are many aspects of the guest XML which result in the
SELinux driver applying file labelling. With the increasing
configuration options it is desirable to test this behaviour.
It is not possible to assume that the test suite has the
ability to set SELinux labels. Most filesystems though will
support extended attributes. Thus for the purpose of testing,
it is possible to extend the existing LD_PRELOAD hack to
override setfilecon() and getfilecon() to simply use the
'user.libvirt.selinux' attribute for the sake of testing.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoRename HAVE_POLKIT to WITH_POLKIT
Daniel P. Berrange [Tue, 8 Jan 2013 22:19:00 +0000 (22:19 +0000)]
Rename HAVE_POLKIT to WITH_POLKIT

12 years agoRemove unused XMLRPC_REQUIRED var
Daniel P. Berrange [Tue, 8 Jan 2013 22:10:57 +0000 (22:10 +0000)]
Remove unused XMLRPC_REQUIRED var

12 years agoConvert openwsman check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Tue, 8 Jan 2013 22:08:53 +0000 (22:08 +0000)]
Convert openwsman check to use LIBVIRT_CHECK_PKG

12 years agoConvert ssh2 check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Tue, 8 Jan 2013 21:47:55 +0000 (21:47 +0000)]
Convert ssh2 check to use LIBVIRT_CHECK_PKG

This converts the libssh2 configure check to use LIBVIRT_CHECK_PKG.
Previously it would check version 1.0 and 1.3, but this simplifies
things to just require version 1.3

12 years agoRename HAVE_LIBSSH2 to WITH_SSH2
Daniel P. Berrange [Tue, 8 Jan 2013 21:34:15 +0000 (21:34 +0000)]
Rename HAVE_LIBSSH2 to WITH_SSH2

12 years agoConvert curl check over to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Tue, 8 Jan 2013 21:31:58 +0000 (21:31 +0000)]
Convert curl check over to use LIBVIRT_CHECK_PKG

12 years agoRename HAVE_LIBCURL to WITH_CURL
Daniel P. Berrange [Tue, 8 Jan 2013 21:09:09 +0000 (21:09 +0000)]
Rename HAVE_LIBCURL to WITH_CURL

12 years agoConvert fuse check over to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Tue, 8 Jan 2013 21:06:57 +0000 (21:06 +0000)]
Convert fuse check over to use LIBVIRT_CHECK_PKG

12 years agoRename HAVE_FUSE to WITH_FUSE
Daniel P. Berrange [Tue, 8 Jan 2013 21:04:35 +0000 (21:04 +0000)]
Rename HAVE_FUSE to WITH_FUSE

12 years agoRename HAVE_GNUTLS to WITH_GNUTLS
Daniel P. Berrange [Tue, 8 Jan 2013 21:02:05 +0000 (21:02 +0000)]
Rename HAVE_GNUTLS to WITH_GNUTLS

12 years agoConvert blkid check over to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:52:14 +0000 (15:52 +0100)]
Convert blkid check over to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_LIBBLKID to WITH_BLKID
Daniel P. Berrange [Thu, 20 Sep 2012 14:43:12 +0000 (15:43 +0100)]
Convert HAVE_LIBBLKID to WITH_BLKID

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAL check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:39:12 +0000 (15:39 +0100)]
Convert HAL check to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_HAL to WITH_HAL
Daniel P. Berrange [Thu, 20 Sep 2012 14:38:35 +0000 (15:38 +0100)]
Convert HAVE_HAL to WITH_HAL

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert udev/pciaccess checks to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:34:13 +0000 (15:34 +0100)]
Convert udev/pciaccess checks to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_UDEV to WITH_UDEV
Daniel P. Berrange [Thu, 20 Sep 2012 14:24:47 +0000 (15:24 +0100)]
Convert HAVE_UDEV to WITH_UDEV

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert avahi check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:22:09 +0000 (15:22 +0100)]
Convert avahi check to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_AVAHI to WITH_AVAHI
Daniel P. Berrange [Thu, 20 Sep 2012 14:21:13 +0000 (15:21 +0100)]
Convert HAVE_AVAHI to WITH_AVAHI

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert DBus check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:12:08 +0000 (15:12 +0100)]
Convert DBus check to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_DBUS to WITH_DBUS
Daniel P. Berrange [Thu, 20 Sep 2012 14:05:39 +0000 (15:05 +0100)]
Convert HAVE_DBUS to WITH_DBUS

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert netcf check to use LIBVIRT_CHECK_PKG
Daniel P. Berrange [Thu, 20 Sep 2012 14:14:52 +0000 (15:14 +0100)]
Convert netcf check to use LIBVIRT_CHECK_PKG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert cap-ng check to use LIBVIRT_CHECK_LIB
Daniel P. Berrange [Thu, 20 Sep 2012 12:58:37 +0000 (13:58 +0100)]
Convert cap-ng check to use LIBVIRT_CHECK_LIB

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_CAPNG to WITH_CAPNG
Daniel P. Berrange [Thu, 20 Sep 2012 14:17:56 +0000 (15:17 +0100)]
Convert HAVE_CAPNG to WITH_CAPNG

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert numactl checks to use LIBVIRT_CHECK_LIB
Daniel P. Berrange [Thu, 20 Sep 2012 12:47:23 +0000 (13:47 +0100)]
Convert numactl checks to use LIBVIRT_CHECK_LIB

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_NUMACTL to WITH_NUMACTL
Daniel P. Berrange [Thu, 20 Sep 2012 12:41:15 +0000 (13:41 +0100)]
Convert HAVE_NUMACTL to WITH_NUMACTL

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert apparmor check to use LIBVIRT_CHECK_LIB
Daniel P. Berrange [Thu, 20 Sep 2012 12:28:45 +0000 (13:28 +0100)]
Convert apparmor check to use LIBVIRT_CHECK_LIB

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert selinux check to use LIBVIRT_CHECK_LIB
Daniel P. Berrange [Thu, 20 Sep 2012 12:21:48 +0000 (13:21 +0100)]
Convert selinux check to use LIBVIRT_CHECK_LIB

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agoConvert HAVE_SELINUX to WITH_SELINUX
Daniel P. Berrange [Thu, 20 Sep 2012 12:17:58 +0000 (13:17 +0100)]
Convert HAVE_SELINUX to WITH_SELINUX

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
12 years agodocs: restrict the set of characters for info keys
Claudio Bley [Fri, 11 Jan 2013 10:39:19 +0000 (11:39 +0100)]
docs: restrict the set of characters for info keys

When parsing the top level comment of a file, apibuild.py used
to split on any ':' character of a line regarding the first part
as a key for a setting, e.g. "Summary". The second part would then
be assigned as the value for that key.

This means you could not use a ':' character inside those comments
without ill effects.

Now, a key must consist solely of alphanumeric characters, '_' or '.'.

12 years agodocs: simplify code
Claudio Bley [Thu, 10 Jan 2013 15:02:23 +0000 (16:02 +0100)]
docs: simplify code

12 years agobuild: avoid m4_expand for RHEL 5
Eric Blake [Fri, 11 Jan 2013 18:30:55 +0000 (11:30 -0700)]
build: avoid m4_expand for RHEL 5

Problem introduced in commit cd699ed.

* m4/virt-lib.m4 (LIBVIRT_CHECK_LIB, LIBVIRT_CHECK_PKG): Set up
direct expansions, since autoconf 2.59 lacked m4_expand.

12 years agodocs: mention git rename detection
Eric Blake [Fri, 11 Jan 2013 00:39:04 +0000 (17:39 -0700)]
docs: mention git rename detection

I've noticed a number of people sending patches with file
renames not compressed, so we might as well document how to
set this up.  (Git won't do it by default, for back-compat
reasons)

* docs/hacking.html.in: Add git config tip.
* HACKING: Regenerate.

12 years agodocs: add some more hacking tips
Eric Blake [Fri, 4 Jan 2013 17:27:16 +0000 (10:27 -0700)]
docs: add some more hacking tips

Based on a suggestion by John Ferlan:
https://www.redhat.com/archives/libvir-list/2013-January/msg00158.html

* docs/hacking.html.in: Add some commit message instructions.
Mention the ./run script.
* HACKING: Regenerate.

12 years agobuild: fix incomplete WITH_SASL conversion
Eric Blake [Fri, 11 Jan 2013 17:29:03 +0000 (10:29 -0700)]
build: fix incomplete WITH_SASL conversion

Commit 321a7d53 missed a spot.

* src/rpc/virnetsocket.c (virNetSocketPreExecRestart): Use right
conditional.

12 years agoqemu: Fix grouping of capabilities strings
Peter Krempa [Fri, 11 Jan 2013 16:43:49 +0000 (17:43 +0100)]
qemu: Fix grouping of capabilities strings

Commit f8d478b6dfc46a0ad2459844b96937599dec06e1 broke the grouping by
five items.

12 years agonetwork: Report real error if addition of firewall rules fails
Peter Krempa [Fri, 11 Jan 2013 10:38:30 +0000 (11:38 +0100)]
network: Report real error if addition of firewall rules fails

If addition of rules in networkAddIptablesRules() failed the real error
was masked by error reported when trying to clean up the remaining
rules.

With this patch the original error message is saved and set back after
the removal is complete.

12 years agovirsh: Reformat output of virsh net-list
Peter Krempa [Fri, 11 Jan 2013 10:14:54 +0000 (11:14 +0100)]
virsh: Reformat output of virsh net-list

This patch changes whitespace and the length of the separation line from
this format:

$ virsh net-list --all
Name                 State      Autostart     Persistent
--------------------------------------------------
default              inactive   yes           yes

to

$ virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              inactive   yes           yes

to match the output of virsh list.