[libvirt] [PATCH] build: fix bootstrap on fresh clone
by Eric Blake
Commit 29db7a0 picked up a gnulib bug, where a change in
bootstrap meant that it would fail to run libtoolize on
projects, like libvirt, that used the older spelling
AM_PROG_LIBTOOL instead of LT_INIT for the sake of
building on RHEL 5. Now that gnulib is fixed, we should
pick up that fix.
* .gnulib: Update to latest, for bootstrap fix.
* bootstrap: Resync from gnulib.
---
Tested on a fresh clone of libvirt.git in RHEL 5, and pushing under
the build-breaker rule.
* .gnulib 980097f...dd6b2d7 (8):
> bootstrap: cater to autoconf 2.59
> bootstrap: properly check for libtool
> Improve support for MSVC 9.
> gnupload: we hold the master copy of this script now
> Fix module 'random'.
> Tests for module 'random'.
> New module 'random'.
> autoupdate
.gnulib | 2 +-
bootstrap | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/.gnulib b/.gnulib
index 980097f..dd6b2d7 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 980097f8eca9e08feb2073d06179f53ba46b805e
+Subproject commit dd6b2d751b3c6ad417f6a4c48f2adb9d27cc59d2
diff --git a/bootstrap b/bootstrap
index 66da981..2a409fc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2012-01-06.07; # UTC
+scriptversion=2012-01-16.17; # UTC
# Bootstrap this package from checked-out sources.
@@ -758,7 +758,7 @@ fi
# Autoreconf runs aclocal before libtoolize, which causes spurious
# warnings if the initial aclocal is confused by the libtoolized
# (or worse out-of-date) macro directory.
-if grep '^[ ]*LT_INIT' configure.ac >/dev/null; then
+if test $use_libtool = 1; then
echo "running: $LIBTOOLIZE --copy --install"
$LIBTOOLIZE --copy --install
fi
@@ -820,10 +820,14 @@ find "$m4_base" "$source_base" \
-type l -xtype l -delete > /dev/null 2>&1
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+no_recursive=
+case $($AUTORECONF --help) in
+ *--no-recursive*) no_recursive=--no-recursive;;
+esac
echo "running: AUTOPOINT=true LIBTOOLIZE=true " \
- "$AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS"
+ "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS"
AUTOPOINT=true LIBTOOLIZE=true \
- $AUTORECONF --verbose --install --no-recursive -I $m4_base $ACLOCAL_FLAGS \
+ $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \
|| exit 1
# Get some extra files from gnulib, overriding existing files.
--
1.7.7.5
12 years, 10 months
[libvirt] [PATCH 2/3] docs: Expose alias tag in domain RNG schema
by Osier Yang
Though <alias> is ignored when defining a domain, it can cause
failure if one validates (e.g. virt-xml-validate) the XML dumped
from a running domain. This patch expose it in domain RNG schema
for all the devices which support it.
---
docs/schemas/domaincommon.rng | 64 +++++++++++++++++++++++++++++++++++++----
1 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index b34526f..243ff93 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -734,6 +734,9 @@
<ref name="diskIoTune"/>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</interleave>
@@ -1099,6 +1102,9 @@
<ref name="usbmaster"/>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -1196,6 +1202,9 @@
<define name="filesystemtgt">
<interleave>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
<element name="target">
@@ -1396,6 +1405,9 @@
</element>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
<optional>
@@ -1811,6 +1823,9 @@
</element>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -1894,6 +1909,9 @@
<ref name="qemucdevTgtDef"/>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</interleave>
@@ -2012,6 +2030,9 @@
</choice>
</attribute>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2037,6 +2058,9 @@
</attribute>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2051,6 +2075,9 @@
</choice>
</attribute>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2094,6 +2121,9 @@
<ref name="virtioTarget"/>
</choice>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</interleave>
@@ -2135,6 +2165,9 @@
</group>
</choice>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2162,6 +2195,9 @@
</attribute>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2174,6 +2210,9 @@
</choice>
</attribute>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2190,6 +2229,9 @@
</attribute>
<ref name="qemucdevSrcDef"/>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
</element>
@@ -2238,6 +2280,9 @@
<ref name="deviceBoot"/>
</optional>
<optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
<ref name="address"/>
</optional>
<optional>
@@ -2356,12 +2401,6 @@
</attribute>
</optional>
</define>
- <!--
- Devices attached to a domain.
- Sub-elements such as <alias> are not documented here, as they
- can only exist when generated for a live domain and are ignored
- when defining a domain.
- -->
<define name="devices">
<element name="devices">
<interleave>
@@ -2970,4 +3009,17 @@
<param name="pattern">(0x)?[0-9a-fA-F]{1,16}</param>
</data>
</define>
+ <define name='aliasName'>
+ <data type="string">
+ <param name="pattern">[a-zA-Z0-9_-]+</param>
+ </data>
+ </define>
+ <define name='alias'>
+ <element name='alias'>
+ <attribute name='name'>
+ <ref name='aliasName'/>
+ </attribute>
+ </element>
+ <empty/>
+ </define>
</grammar>
--
1.7.7.3
12 years, 10 months
[libvirt] [PATCH 1/3] docs: Add readonly to filesystem RNG schema
by Osier Yang
"<readonly/>" is supported by filesystem XML, and also documented.
---
docs/schemas/domaincommon.rng | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 6d265f3..b34526f 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1186,6 +1186,11 @@
</choice>
</attribute>
</optional>
+ <optional>
+ <element name='readonly'>
+ <empty/>
+ </element>
+ </optional>
</element>
</define>
<define name="filesystemtgt">
--
1.7.7.3
12 years, 10 months
[libvirt] [libvirt-glib] libvirt dependency needs to be bumped
by Nirbheek Chauhan
Hey guys,
It seems libvirt-glib requires VIR_DOMAIN_EVENT_SHUTDOWN which was
only added in libvirt-0.9.8[1].
Hence, configure.ac needs LIBVIRT_REQUIRED=0.9.8 otherwise the build
fails in make instead of in configure.
Thanks!
1. 38527c9ae0d398a996e1e3c0897a104e3ffd1256 in libvirt.git
--
~Nirbheek Chauhan
Gentoo GNOME+Mozilla Team
12 years, 10 months
[libvirt] [PATCH] events: Return the correct number of registered events
by Adam Litke
Commit d09f6ba5feb655925175dc80122ca2a1e14db2b9 introduced a regression in event
registration. virDomainEventCallbackListAddID() will only return a positive
integer if the type of event being registered is VIR_DOMAIN_EVENT_ID_LIFECYCLE.
For other event types, 0 is always returned on success. This has the
unfortunate side effect of not enabling remote event callbacks because
remoteDomainEventRegisterAny() uses the return value from the local call to
determine if an event callback needs to be registered on the remote end.
Make sure virDomainEventCallbackListAddID() returns the callback count for the
eventID being registered.
Signed-off-by: Adam Litke <agl(a)us.ibm.com>
---
src/conf/domain_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 3fd3ed2..0431697 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -434,7 +434,7 @@ virDomainEventCallbackListAddID(virConnectPtr conn,
event->callbackID = cbList->nextID++;
for (i = 0 ; i < cbList->count ; i++) {
- if (cbList->callbacks[i]->eventID == VIR_DOMAIN_EVENT_ID_LIFECYCLE &&
+ if (cbList->callbacks[i]->eventID == eventID &&
cbList->callbacks[i]->conn == conn &&
!cbList->callbacks[i]->deleted)
ret++;
--
1.7.5.rc1
12 years, 10 months
[libvirt] [PATCH 3/3] docs: Improve the schema for fs device
by Osier Yang
<filesystemtgt> is just redundant, as every group uses it;
<address> shouldn't be in <filesystemtgt> in case of the meaning
could be "filesystemtarget"; The elements <address>, <alias>,
<target>, ... should be interleaved.
---
docs/schemas/domaincommon.rng | 58 ++++++++++++++++++----------------------
1 files changed, 26 insertions(+), 32 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 243ff93..96330e9 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1123,7 +1123,6 @@
</attribute>
<empty/>
</element>
- <ref name="filesystemtgt"/>
</interleave>
</group>
<group>
@@ -1137,7 +1136,6 @@
</attribute>
<empty/>
</element>
- <ref name="filesystemtgt"/>
</interleave>
</group>
<group>
@@ -1165,7 +1163,6 @@
<empty/>
</element>
</optional>
- <ref name="filesystemtgt"/>
</interleave>
</group>
<group>
@@ -1179,42 +1176,39 @@
</attribute>
<empty/>
</element>
- <ref name="filesystemtgt"/>
</interleave>
</group>
</choice>
- <optional>
- <attribute name="accessmode">
- <choice>
- <value>passthrough</value>
- <value>mapped</value>
- <value>squash</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <element name='readonly'>
+ <interleave>
+ <element name="target">
+ <attribute name="dir">
+ <ref name="absDirPath"/>
+ </attribute>
<empty/>
</element>
- </optional>
+ <optional>
+ <attribute name="accessmode">
+ <choice>
+ <value>passthrough</value>
+ <value>mapped</value>
+ <value>squash</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <element name='readonly'>
+ <empty/>
+ </element>
+ </optional>
+ <optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
+ <ref name="address"/>
+ </optional>
+ </interleave>
</element>
</define>
- <define name="filesystemtgt">
- <interleave>
- <optional>
- <ref name="alias"/>
- </optional>
- <optional>
- <ref name="address"/>
- </optional>
- <element name="target">
- <attribute name="dir">
- <ref name="absDirPath"/>
- </attribute>
- <empty/>
- </element>
- </interleave>
- </define>
<!--
An interface description can either be of type bridge in which case
it will use a bridging source, or of type ethernet which uses a device
--
1.7.7.3
12 years, 10 months
[libvirt] [libvirt-glib] Add gvir_config_domain_disk_set_readonly()
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
---
libvirt-gconfig/libvirt-gconfig-domain-disk.c | 11 +++++++++++
libvirt-gconfig/libvirt-gconfig-domain-disk.h | 2 ++
libvirt-gconfig/libvirt-gconfig.sym | 1 +
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.c b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
index a39bf03..fb4e2b4 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.c
@@ -292,3 +292,14 @@ gvir_config_domain_disk_get_target_dev(GVirConfigDomainDisk *disk)
return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(disk),
"target", "dev");
}
+
+void
+gvir_config_domain_disk_set_readonly(GVirConfigDomainDisk *disk,
+ gboolean readonly)
+{
+ if (readonly) {
+ GVirConfigObject *node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(disk), "readonly");
+ g_object_unref(node);
+ } else
+ gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(disk), "readonly");
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-disk.h b/libvirt-gconfig/libvirt-gconfig-domain-disk.h
index d9d90e5..3359049 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-disk.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-disk.h
@@ -117,6 +117,8 @@ char *gvir_config_domain_disk_get_driver_name(GVirConfigDomainDisk *disk);
char *gvir_config_domain_disk_get_driver_type(GVirConfigDomainDisk *disk);
GVirConfigDomainDiskBus gvir_config_domain_disk_get_target_bus(GVirConfigDomainDisk *disk);
char *gvir_config_domain_disk_get_target_dev(GVirConfigDomainDisk *disk);
+void gvir_config_domain_disk_set_readonly(GVirConfigDomainDisk *disk,
+ gboolean readonly);
G_END_DECLS
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 7cf3c3d..73fe279 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -80,6 +80,7 @@ LIBVIRT_GCONFIG_0.0.3 {
gvir_config_domain_disk_get_target_dev;
gvir_config_domain_disk_set_target_dev;
gvir_config_domain_disk_get_disk_type;
+ gvir_config_domain_disk_set_readonly;
gvir_config_domain_disk_set_type;
gvir_config_domain_filesys_get_type;
--
1.7.7.5
12 years, 10 months
[libvirt] [PATCH 1/4] Make drive unit attribute optional in the XML schema
by Michael Ellerman
The "unit" attribute of a drive address is optional in the code, so should
also be in the XML schema.
Signed-off-by: Michael Ellerman <michael(a)ellerman.id.au>
---
docs/schemas/domaincommon.rng | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index e93ae77..b9da906 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2307,9 +2307,11 @@
<ref name="driveBus"/>
</attribute>
</optional>
- <attribute name="unit">
- <ref name="driveUnit"/>
- </attribute>
+ <optional>
+ <attribute name="unit">
+ <ref name="driveUnit"/>
+ </attribute>
+ </optional>
</define>
<define name="virtioserialaddress">
<attribute name="controller">
--
1.7.7.3
12 years, 10 months