[libvirt] [PATCH V3 0/4] Xen-xl parser
by Jim Fehlig
This is V3 of David's series to add support for parsing and formating
Xen's xl config format
https://www.redhat.com/archives/libvir-list/2014-September/msg00587.html
Patch 1 has been rebased, but otherwise unchanged.
In patch 2, I was able to get automake and flex play together using
LEX_OUTPUT_ROOT and AM_LFLAGS. Files generated from flex are placed
in a separate convenience lib to avoid compilation with WARN_FLAGS.
The generated files are also excluded from syntax-check.
I switched the order of patches 3 and 4 since config parsing/
formating tests should come right after the implementation. I also
added more diskspecs to the test configs.
Kiarie Kahurani (4):
src/xenconfig: Export helper functions
src/xenconfig: Xen-xl parser
tests: Tests for the xen-xl parser
libxl: Add support for parsing/formating Xen XL config
.gitignore | 1 +
cfg.mk | 3 +-
configure.ac | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 25 +-
src/libvirt_xenconfig.syms | 4 +
src/libxl/libxl_driver.c | 32 ++-
src/xenconfig/xen_common.c | 149 +++++------
src/xenconfig/xen_common.h | 24 +-
src/xenconfig/xen_xl.c | 499 +++++++++++++++++++++++++++++++++++
src/xenconfig/xen_xl.h | 33 +++
src/xenconfig/xen_xl_disk.l | 256 ++++++++++++++++++
src/xenconfig/xen_xl_disk_i.h | 39 +++
tests/Makefile.am | 9 +-
tests/testutilsxen.c | 50 ++++
tests/testutilsxen.h | 9 +-
tests/xlconfigdata/test-new-disk.cfg | 26 ++
tests/xlconfigdata/test-new-disk.xml | 51 ++++
tests/xlconfigdata/test-spice.cfg | 32 +++
tests/xlconfigdata/test-spice.xml | 45 ++++
tests/xlconfigtest.c | 224 ++++++++++++++++
21 files changed, 1421 insertions(+), 92 deletions(-)
create mode 100644 src/xenconfig/xen_xl.c
create mode 100644 src/xenconfig/xen_xl.h
create mode 100644 src/xenconfig/xen_xl_disk.l
create mode 100644 src/xenconfig/xen_xl_disk_i.h
create mode 100644 tests/xlconfigdata/test-new-disk.cfg
create mode 100644 tests/xlconfigdata/test-new-disk.xml
create mode 100644 tests/xlconfigdata/test-spice.cfg
create mode 100644 tests/xlconfigdata/test-spice.xml
create mode 100644 tests/xlconfigtest.c
--
1.8.4.5
9 years, 11 months
[libvirt] [PATCH] Fix few memory leaks found by Coverity
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/conf/domain_conf.c | 10 ++++++++--
src/openvz/openvz_driver.c | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d1a483a..eacd687 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17264,17 +17264,20 @@ virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
virSocketAddrPtr address = &ips[i]->address;
char *ipStr = virSocketAddrFormat(address);
const char *familyStr = NULL;
+
if (VIR_SOCKET_ADDR_IS_FAMILY(address, AF_INET6))
familyStr = "ipv6";
else if (VIR_SOCKET_ADDR_IS_FAMILY(address, AF_INET))
familyStr = "ipv4";
- virBufferAsprintf(buf, "<ip address='%s'",
- ipStr);
+
+ virBufferAsprintf(buf, "<ip address='%s'", ipStr);
if (familyStr)
virBufferAsprintf(buf, " family='%s'", familyStr);
if (ips[i]->prefix != 0)
virBufferAsprintf(buf, " prefix='%u'", ips[i]->prefix);
virBufferAddLit(buf, "/>\n");
+
+ VIR_FREE(ipStr);
}
}
@@ -17306,6 +17309,9 @@ virDomainNetRoutesFormat(virBufferPtr buf,
virBufferAsprintf(buf, " prefix='%d'", route->prefix);
virBufferAddLit(buf, "/>\n");
+
+ VIR_FREE(via);
+ VIR_FREE(to);
}
}
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index c144eca..64f5219 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -911,6 +911,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
for (i = 0; i < net->nips; i++) {
char *ipStr = virSocketAddrFormat(&net->ips[i]->address);
virCommandAddArgList(cmd, "--ipadd", ipStr, NULL);
+ VIR_FREE(ipStr);
}
}
--
2.0.5
9 years, 11 months
[libvirt] [PATCHv2] conf: fix cannot get mutli value settings when parse controllers XML
by Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1179684
We generate the scsi controller XML like this before
(actualy this is wrong, we shouldn't set mutli-drivers in different line):
<controller type='scsi' index='0' model='virtio-scsi'>
<driver queues='12'/>
<driver cmd_per_lun='123'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
But this will cause a issue when we parse controllers XML in
virDomainControllerDefParseXML, we will try to get queues,
cmd_per_lun,max_sectors settings from XML, we will try to get
this three values in multi-loop(depend on the number of value
we set here), then the old value will be covered by new value
in new loop. The result is we only can get one value settings
after these loop even we set 3.
The loop is here:
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if (xmlStrEqual(cur->name, BAD_CAST "driver")) {
queues = virXMLPropString(cur, "queues");
cmd_per_lun = virXMLPropString(cur, "cmd_per_lun");
max_sectors = virXMLPropString(cur, "max_sectors");
}
}
cur = cur->next;
}
this patch will change the XML to this:
<controller type='scsi' index='0' model='virtio-scsi'>
<driver queues='12' cmd_per_lun='123'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/conf/domain_conf.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b9858cd..b3e9448 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17120,14 +17120,19 @@ virDomainControllerDefFormat(virBufferPtr buf,
virDomainDeviceInfoIsSet(&def->info, flags) || pcihole64) {
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
- if (def->queues)
- virBufferAsprintf(buf, "<driver queues='%u'/>\n", def->queues);
- if (def->cmd_per_lun)
- virBufferAsprintf(buf, "<driver cmd_per_lun='%u'/>\n", def->cmd_per_lun);
+ if (def->queues || def->cmd_per_lun || def->max_sectors) {
+ virBufferAddLit(buf, "<driver");
+ if (def->queues)
+ virBufferAsprintf(buf, " queues='%u'", def->queues);
- if (def->max_sectors)
- virBufferAsprintf(buf, "<driver max_sectors='%u'/>\n", def->max_sectors);
+ if (def->cmd_per_lun)
+ virBufferAsprintf(buf, " cmd_per_lun='%u'", def->cmd_per_lun);
+
+ if (def->max_sectors)
+ virBufferAsprintf(buf, " max_sectors='%u'", def->max_sectors);
+ virBufferAddLit(buf, "/>\n");
+ }
if (virDomainDeviceInfoIsSet(&def->info, flags) &&
virDomainDeviceInfoFormat(buf, &def->info, flags) < 0)
--
1.8.3.1
9 years, 11 months
[libvirt] [PATCH v2 0/2] Fix migration to older libvirt
by Pavel Hrdina
Recently I've implemented new feature that we can set "vgamem_mb" for QXL device
and also I've fixed libvirt to honor the 'vram' attribute and pass that value to
QEMU process. But with this change the migration to older libvirt stopped
working because QEMU silently updates the video memory size if the value is too
low or there are some dependencies (for example QXL device has to have 'ram'
size twice as 'vgamem').
To fix the migration we need to load the updated values from QEMU and store them
into the status XML.
v1:
- removed unnecessary movement of qemuMonitorJSONObjectProperty
- completely rewritten the second patch
Pavel Hrdina (2):
qemu_monitor: introduce new function to get QOM path
qemu_process: detect updated video ram size values from QEMU
src/qemu/qemu_monitor.c | 210 ++++++++++++++++++++++++++++---------------
src/qemu/qemu_monitor.h | 4 +
src/qemu/qemu_monitor_json.c | 69 ++++++++++++++
src/qemu/qemu_monitor_json.h | 3 +
src/qemu/qemu_process.c | 71 +++++++++++++++
5 files changed, 287 insertions(+), 70 deletions(-)
--
2.0.5
9 years, 11 months
[libvirt] [PATCH] safezero: fall back to writing zeroes even when resizing
by Ján Tomko
Remove the resize flag and use the same code path for all callers.
This flag was added by commit 18f0316 to allow virStorageFileResize
use 'safezero' while preserving the behavior.
Explicitly return -2 when a fallback to a different method should
be done, to make the code path more obvious.
Fail immediately when ftruncate fails in the mmap method,
as we did before commit 18f0316.
---
src/locking/lock_driver_sanlock.c | 4 ++--
src/storage/storage_backend.c | 2 +-
src/util/virfile.c | 34 ++++++++++++----------------------
src/util/virfile.h | 2 +-
src/util/virstoragefile.c | 13 ++++---------
5 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 9fc97db..60f305c 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -281,7 +281,7 @@ static int virLockManagerSanlockSetupLockspace(void)
/*
* Pre allocate enough data for 1 block of leases at preferred alignment
*/
- if (safezero(fd, 0, rv, false) < 0) {
+ if (safezero(fd, 0, rv) < 0) {
virReportSystemError(errno,
_("Unable to allocate lockspace %s"),
path);
@@ -690,7 +690,7 @@ static int virLockManagerSanlockCreateLease(struct sanlk_resource *res)
/*
* Pre allocate enough data for 1 block of leases at preferred alignment
*/
- if (safezero(fd, 0, rv, false) < 0) {
+ if (safezero(fd, 0, rv) < 0) {
virReportSystemError(errno,
_("Unable to allocate lease %s"),
res->disks[0].path);
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 472cec6..b990a82 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -399,7 +399,7 @@ createRawFile(int fd, virStorageVolDefPtr vol,
}
if (remain && need_alloc) {
- if (safezero(fd, vol->target.allocation - remain, remain, false) < 0) {
+ if (safezero(fd, vol->target.allocation - remain, remain) < 0) {
ret = -errno;
virReportSystemError(errno, _("cannot fill file '%s'"),
vol->target.path);
diff --git a/src/util/virfile.c b/src/util/virfile.c
index a2bf008..5f56005 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1053,7 +1053,7 @@ safezero_posix_fallocate(int fd ATTRIBUTE_UNUSED,
off_t offset ATTRIBUTE_UNUSED,
off_t len ATTRIBUTE_UNUSED)
{
- return -1;
+ return -2;
}
#endif /* !HAVE_POSIX_FALLOCATE */
@@ -1063,9 +1063,7 @@ safezero_sys_fallocate(int fd,
off_t offset,
off_t len)
{
- int rc = -1;
- rc = syscall(SYS_fallocate, fd, 0, offset, len);
- return rc;
+ return syscall(SYS_fallocate, fd, 0, offset, len);
}
#else /* !HAVE_SYS_SYSCALL_H || !defined(SYS_fallocate) */
static int
@@ -1073,9 +1071,7 @@ safezero_sys_fallocate(int fd ATTRIBUTE_UNUSED,
off_t offset ATTRIBUTE_UNUSED,
off_t len ATTRIBUTE_UNUSED)
{
- int rc = -1;
- errno = ENOSYS;
- return rc;
+ return -2;
}
#endif /* !HAVE_SYS_SYSCALL_H || !defined(SYS_fallocate) */
@@ -1111,7 +1107,7 @@ safezero_mmap(int fd, off_t offset, off_t len)
/* fall back to writing zeroes using safewrite if mmap fails (for
* example because of virtual memory limits) */
- return -1;
+ return -2;
}
#else /* !HAVE_MMAP */
static int
@@ -1119,7 +1115,7 @@ safezero_mmap(int fd ATTRIBUTE_UNUSED,
off_t offset ATTRIBUTE_UNUSED,
off_t len ATTRIBUTE_UNUSED)
{
- return -1;
+ return -2;
}
#endif /* !HAVE_MMAP */
@@ -1160,26 +1156,20 @@ safezero_slow(int fd, off_t offset, off_t len)
return 0;
}
-int safezero(int fd, off_t offset, off_t len, bool resize)
+int safezero(int fd, off_t offset, off_t len)
{
int ret;
- /* posix_fallocate returns 0 on success or error number on failure,
- * but errno is not set so use that to our advantage since we set
- * errno to the returned value if we make the call. If we don't make
- * the call because it doesn't exist, then errno won't change and
- * we can try other methods.
- */
- errno = 0;
ret = safezero_posix_fallocate(fd, offset, len);
- if (ret == 0 || errno != 0)
+ if (ret != -2)
return ret;
- if (resize)
- return safezero_sys_fallocate(fd, offset, len);
-
- if (safezero_mmap(fd, offset, len) == 0)
+ if (safezero_sys_fallocate(fd, offset, len) == 0)
return 0;
+
+ ret = safezero_mmap(fd, offset, len);
+ if (ret != -2)
+ return ret;
return safezero_slow(fd, offset, len);
}
diff --git a/src/util/virfile.h b/src/util/virfile.h
index b8e30c3..403d0ba 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -41,7 +41,7 @@ typedef enum {
ssize_t saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
ssize_t safewrite(int fd, const void *buf, size_t count)
ATTRIBUTE_RETURN_CHECK;
-int safezero(int fd, off_t offset, off_t len, bool resize)
+int safezero(int fd, off_t offset, off_t len)
ATTRIBUTE_RETURN_CHECK;
/* Don't call these directly - use the macros below */
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 2be6c34..7a4f9a0 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1117,15 +1117,10 @@ virStorageFileResize(const char *path,
}
if (pre_allocate) {
- if (safezero(fd, offset, len, true) != 0) {
- if (errno == ENOSYS)
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
- _("preallocate is not supported on this "
- "platform"));
- else
- virReportSystemError(errno,
- _("Failed to pre-allocate space for "
- "file '%s'"), path);
+ if (safezero(fd, offset, len) != 0) {
+ virReportSystemError(errno,
+ _("Failed to pre-allocate space for "
+ "file '%s'"), path);
goto cleanup;
}
} else {
--
2.0.4
9 years, 11 months
[libvirt] [PATCH] virsh.pod: Update description
by John Ferlan
The 'pool-build' command description for --overwrite and --no-overwrite
indicated usage for only 'filesystem' pools; however, the 'disk' pool
also supports the flags as of commit id 'afa1029a'. So add a description
for that usage.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
tools/virsh.pod | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 63b6035..56fe896 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2953,13 +2953,20 @@ Configure whether I<pool> should automatically start at boot.
Build a given pool.
Options I<--overwrite> and I<--no-overwrite> can only be used for
-B<pool-build> a filesystem pool. If neither of them is specified,
-B<pool-build> on a filesystem pool only makes the directory; If
+B<pool-build> a filesystem or disk pool. For a file system pool if
+neither of them is specified, B<pool-build> makes the directory. If
I<--no-overwrite> is specified, it probes to determine if a
filesystem already exists on the target device, returning an error
-if exists, or using mkfs to format the target device if not; If
-I<--overwrite> is specified, mkfs is always executed, any existed
-data on the target device is overwritten unconditionally.
+if exists, or using mkfs to format the target device if not. If
+I<--overwrite> is specified, mkfs is always executed and any existing
+data on the target device is overwritten unconditionally. For a disk
+pool, if neither of them is specified or I<--no-overwrite> is specified,
+B<pool-build> will use 'parted --print' in order to determine if the
+disk already has a label before attempting to create one. Only if a disk
+does not already have one will a label be created. If I<--overwrite> is
+specified or it's been determined that the disk doesn't already have one,
+'parted mklabel' will be used to create a label of the format specified
+by the pool source format type or "dos" if not specified for the pool.
=item B<pool-create> I<file>
@@ -3939,7 +3946,7 @@ Alternatively report bugs to your software distributor / vendor.
=head1 COPYRIGHT
-Copyright (C) 2005, 2007-2014 Red Hat, Inc., and the authors listed in the
+Copyright (C) 2005, 2007-2015 Red Hat, Inc., and the authors listed in the
libvirt AUTHORS file.
=head1 LICENSE
--
2.1.0
9 years, 11 months
[libvirt] [PATCH] Firewall : let libvirtd proceed after verifying locking args
by Prerna Saxena
I recently encountered a situation where an unclean ebtables shutdown
caused /var/lib/ebtables/lock to be left behind. When libvirtd was
started on such a system, it caused libvirtd to "hang". Reason:
While probing to check if locking was supported, libvirt runs this
command synchronously :
# /usr/sbin/ebtables --concurrent -L
And this seemed to go on with msgs like :
Trying to obtain lock /var/lib/ebtables/lock
Trying to obtain lock /var/lib/ebtables/lock
Trying to obtain lock /var/lib/ebtables/lock
Result:
Libvirtd never recovered from this scenario, and the system was
essentially unable to start any VMs.
The following patch fixes this scenario:
-----------------------------------------------------------
>From ec245eccc03e8a69dc2c2e6edbf30a7b34eb74d0 Mon Sep 17 00:00:00 2001
From: Prerna Saxena <prerna(a)linux.vnet.ibm.com>
Date: Fri, 26 Dec 2014 15:24:45 -0500
Subject: [PATCH] Firewall : let libvirtd proceed after verifying valid locking
args.
Commit dc33e6e4a5a5d42 introduces locking args to be run with [eb/ip]tables to
determine whether locking is supported. However, this command needs to be
run asynchronously ( as against its present synchronous run), and needs to be
gracefully terminated once the job is done. Else it can potentially stall libvirtd
with messages like :
"Trying to acquire lock ..."
Signed-off-by: Prerna Saxena <prerna(a)linux.vnet.ibm.com>
---
src/util/virfirewall.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index b536912..c120717 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -121,12 +121,16 @@ virFirewallCheckUpdateLock(bool *lockflag,
{
int status; /* Ignore failed commands without logging them */
virCommandPtr cmd = virCommandNewArgs(args);
- if (virCommandRun(cmd, &status) < 0 || status) {
+ status = virCommandRunAsync(cmd, NULL);
+ if (status < 0) {
VIR_INFO("locking not supported by %s", args[0]);
+ goto cleanup;
} else {
VIR_INFO("using locking for %s", args[0]);
*lockflag = true;
}
+cleanup:
+ virCommandAbort(cmd);
virCommandFree(cmd);
}
--
1.8.4.2
Regards,
----------
Prerna Saxena,
IBM Systems & technology Labs,
Bangalore
9 years, 11 months
[libvirt] [PATCH] lxc: Cleaning up mount setup
by Daniel P. Berrange
We have historically done a number of things with LXC that are
somewhat questionable in retrospect
1. Mounted /proc/sys read-only, but then mounted
/proc/sys/net/ipv* read-write again
2. Mounted /sys read only
3. Mount /sys/fs/cgroup/NNN/the/guest/dir to /sys/fs/cgroup/NNN
4. FUSE mount on /proc/meminfo
Items 1 & 2 are pointless as they offer no security benefit either
with or without user namespaces. Without userns it is always insecure,
with userns it is always secure, no matter what the mount state is.
Item 3 is some what dubious, since /proc/self/cgroup paths for
processes are now not visible at /sys/fs/cgroup. This really
confuses systemd inside the container making it create a broken
layout
Item 4 is some what dubious, since we're only changing some of the
fields in /proc/meminfo. It helps apps which blindly parse
/proc/meminfo to determine free system resources they can consume.
Those apps are broken even without containers being involved though,
since any application must expect to be placed inside a cgroup with
limited resources. Faking /proc/meminfo is a pretty limited workaround
that just delays the inevitable fixing of such apps..
The patch that follows just removes the items 1 & 2, but I'm thinking
we should go further and remove items 3 & 4 too.
Changing 4 in particular though is certainly classed as a guest ABI
change though, so is not something distros may wish to see when
upgrading libvirt. There is scope to argue that 1-3 are guest ABI
changes too
In full machine virt world, we deal with this using machine types.
eg each new KVM version introduces a new machine type which models
the guest ABI in a stable fashion. Guest machine types are fixed at
time of first deployment. So when libvirt / KVM is upgraded, existing
guests will not see any changes, but new guests will automatically
get the new machine type.
I'm thinking we might want make use of this in LXC before making
these changes. eg introduce a new machine 'libvirt-lxc-1' to
represent the current guest mount setup and make sure all existing
guests get that machine type. Then introduce a new machine type
libvirt-lxc-2 that removes all this cruft, which new guests will
get by default.
Alternatively we could call them 'libvirt-lxc-compat-1' and
'libvirt-lxc-bare-1' to give a clearer indication of their
functional difference and version them separately in the future ?
Regards,
Daniel
Daniel P. Berrange (1):
lxc: Stop mouning /proc and /sys read only
src/lxc/lxc_container.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--
2.1.0
9 years, 11 months
[libvirt] [PATCH] maint: in makefiles, $(top_srcdir)/src is verbose
by Eric Blake
I noticed this while working on the previous commit. Why should
we be calling out '../src/' when it is sufficient to refer to just
'./'? Blind copy-and-paste runs rampant in this file :)
* src/Makefile.am (INCLUDES, *_CFLAGS): Shorten to $(srcdir).
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I'll wait for a review on this one. Let me know if I should redo
the patch to keep trailing \ lined up in the sections where it
started as aligned...
src/Makefile.am | 112 ++++++++++++++++++++++++++++----------------------------
1 file changed, 56 insertions(+), 56 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index f970d60..645d801 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,7 @@ INCLUDES = -I../gnulib/lib \
-I$(top_srcdir) \
-I../include \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/src/util \
+ -I$(srcdir)/util \
-DIN_LIBVIRT \
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
$(GETTEXT_CPPFLAGS)
@@ -1036,7 +1036,7 @@ libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \
$(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \
$(DBUS_CFLAGS) $(LDEXP_LIBM) $(NUMACTL_CFLAGS) \
$(SYSTEMD_DAEMON_CFLAGS) $(POLKIT_CFLAGS) \
- -I$(top_srcdir)/src/conf
+ -I$(srcdir)/conf
libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \
$(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \
$(LIB_CLOCK_GETTIME) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) \
@@ -1054,7 +1054,7 @@ libvirt_conf_la_LIBADD = $(LIBXML_LIBS)
noinst_LTLIBRARIES += libvirt_cpu.la
libvirt_la_BUILT_LIBADD += libvirt_cpu.la
libvirt_cpu_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_cpu_la_SOURCES = $(CPU_SOURCES)
libvirt_cpu_la_DEPENDENCIES = $(abs_builddir)/cpu/cpu_map.xml
@@ -1065,7 +1065,7 @@ if WITH_VMX
noinst_LTLIBRARIES += libvirt_vmx.la
libvirt_la_BUILT_LIBADD += libvirt_vmx.la
libvirt_vmx_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_vmx_la_SOURCES = $(VMX_SOURCES)
endif WITH_VMX
@@ -1075,14 +1075,14 @@ if WITH_XENCONFIG
noinst_LTLIBRARIES += libvirt_xenxldiskparser.la
libvirt_xenxldiskparser_la_CFLAGS = \
-I$(srcdir)/xenconfig \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS) -Wno-unused-parameter
+ -I$(srcdir)/conf $(AM_CFLAGS) -Wno-unused-parameter
libvirt_xenxldiskparser_la_SOURCES = \
$(XENXLDISKPARSER_SOURCES)
noinst_LTLIBRARIES += libvirt_xenconfig.la
libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la
libvirt_xenconfig_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_xenconfig_la_LIBADD = libvirt_xenxldiskparser.la
libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES)
endif WITH_XENCONFIG
@@ -1094,7 +1094,7 @@ libvirt_driver_la_SOURCES = $(DRIVER_SOURCES)
libvirt_driver_la_CFLAGS = \
$(GNUTLS_CFLAGS) $(CURL_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_la_LIBADD = \
$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)
@@ -1111,7 +1111,7 @@ if WITH_TEST
noinst_LTLIBRARIES += libvirt_driver_test.la
libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
libvirt_driver_test_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_test_la_SOURCES = $(TEST_DRIVER_SOURCES)
endif WITH_TEST
@@ -1121,8 +1121,8 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la
libvirt_driver_remote_la_CFLAGS = \
$(GNUTLS_CFLAGS) \
$(XDR_CFLAGS) \
- -I$(top_srcdir)/src/conf \
- -I$(top_srcdir)/src/rpc \
+ -I$(srcdir)/conf \
+ -I$(srcdir)/rpc \
$(AM_CFLAGS)
libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) \
@@ -1159,9 +1159,9 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_xen_impl_la_CFLAGS = \
$(XEN_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
- -I$(top_srcdir)/src/xenconfig \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
+ -I$(srcdir)/xenconfig \
$(AM_CFLAGS)
libvirt_driver_xen_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_xen_impl_la_LIBADD = $(XEN_LIBS)
@@ -1173,7 +1173,7 @@ noinst_LTLIBRARIES += libvirt_driver_phyp.la
libvirt_la_BUILT_LIBADD += libvirt_driver_phyp.la
libvirt_driver_phyp_la_LIBADD = $(SSH2_LIBS)
libvirt_driver_phyp_la_CFLAGS = $(SSH2_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_phyp_la_SOURCES = $(PHYP_DRIVER_SOURCES)
endif WITH_PHYP
@@ -1181,7 +1181,7 @@ if WITH_OPENVZ
noinst_LTLIBRARIES += libvirt_driver_openvz.la
libvirt_la_BUILT_LIBADD += libvirt_driver_openvz.la
libvirt_driver_openvz_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
endif WITH_OPENVZ
@@ -1189,7 +1189,7 @@ if WITH_VMWARE
noinst_LTLIBRARIES += libvirt_driver_vmware.la
libvirt_la_BUILT_LIBADD += libvirt_driver_vmware.la
libvirt_driver_vmware_la_CFLAGS = \
- -I$(top_srcdir)/src/conf -I$(top_srcdir)/src/vmx $(AM_CFLAGS)
+ -I$(srcdir)/conf -I$(srcdir)/vmx $(AM_CFLAGS)
libvirt_driver_vmware_la_SOURCES = $(VMWARE_DRIVER_SOURCES)
endif WITH_VMWARE
@@ -1225,7 +1225,7 @@ libvirt_driver_vbox_la_LIBADD += libvirt_driver_vbox_network_impl.la \
endif ! WITH_DRIVER_MODULES
libvirt_driver_vbox_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) \
-DVBOX_DRIVER
libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
@@ -1235,7 +1235,7 @@ libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) \
libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
libvirt_driver_vbox_network_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) \
-DVBOX_NETWORK_DRIVER
libvirt_driver_vbox_network_impl_la_LDFLAGS = $(AM_LDFLAGS)
@@ -1246,7 +1246,7 @@ libvirt_driver_vbox_network_impl_la_LIBADD = $(DLOPEN_LIBS) \
libvirt_driver_vbox_network_impl_la_SOURCES = $(VBOX_NETWORK_DRIVER_SOURCES)
libvirt_driver_vbox_storage_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) \
-DVBOX_STORAGE_DRIVER
libvirt_driver_vbox_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
@@ -1261,7 +1261,7 @@ if WITH_XENAPI
noinst_LTLIBRARIES += libvirt_driver_xenapi.la
libvirt_la_BUILT_LIBADD += libvirt_driver_xenapi.la
libvirt_driver_xenapi_la_CFLAGS = $(LIBXENSERVER_CFLAGS) $(CURL_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_xenapi_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_xenapi_la_LIBADD = $(LIBXENSERVER_LIBS) $(CURL_LIBS)
libvirt_driver_xenapi_la_SOURCES = $(XENAPI_DRIVER_SOURCES)
@@ -1283,9 +1283,9 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_libxl_impl_la_CFLAGS = \
$(LIBXL_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
- -I$(top_srcdir)/src/xenconfig \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
+ -I$(srcdir)/xenconfig \
$(AM_CFLAGS)
libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) libvirt_xenconfig.la
@@ -1309,8 +1309,8 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_qemu_impl_la_CFLAGS = \
$(GNUTLS_CFLAGS) \
$(LIBNL_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \
@@ -1348,8 +1348,8 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_lxc_impl_la_CFLAGS = \
$(LIBNL_CFLAGS) \
$(FUSE_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_lxc_impl_la_LIBADD = $(CAPNG_LIBS) $(LIBNL_LIBS) $(FUSE_LIBS)
if WITH_BLKID
@@ -1383,8 +1383,8 @@ noinst_LTLIBRARIES += libvirt_driver_uml.la
endif ! WITH_DRIVER_MODULES
libvirt_driver_uml_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_uml_impl_la_LDFLAGS = $(AM_LDFLAGS)
# libvirt_driver_uml_impl_la_LIBADD =
@@ -1412,7 +1412,7 @@ if WITH_ESX
noinst_LTLIBRARIES += libvirt_driver_esx.la
libvirt_la_BUILT_LIBADD += libvirt_driver_esx.la
libvirt_driver_esx_la_CFLAGS = $(CURL_CFLAGS) \
- -I$(top_srcdir)/src/conf -I$(top_srcdir)/src/vmx $(AM_CFLAGS)
+ -I$(srcdir)/conf -I$(srcdir)/vmx $(AM_CFLAGS)
libvirt_driver_esx_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_esx_la_LIBADD = $(CURL_LIBS)
libvirt_driver_esx_la_SOURCES = $(ESX_DRIVER_SOURCES)
@@ -1440,7 +1440,7 @@ if WITH_HYPERV
noinst_LTLIBRARIES += libvirt_driver_hyperv.la
libvirt_la_BUILT_LIBADD += libvirt_driver_hyperv.la
libvirt_driver_hyperv_la_CFLAGS = $(OPENWSMAN_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_hyperv_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_hyperv_la_LIBADD = $(OPENWSMAN_LIBS)
libvirt_driver_hyperv_la_SOURCES = $(HYPERV_DRIVER_SOURCES)
@@ -1450,7 +1450,7 @@ if WITH_PARALLELS
noinst_LTLIBRARIES += libvirt_driver_parallels.la
libvirt_la_BUILT_LIBADD += libvirt_driver_parallels.la
libvirt_driver_parallels_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS) \
+ -I$(srcdir)/conf $(AM_CFLAGS) \
$(PARALLELS_SDK_CFLAGS)
libvirt_driver_parallels_la_LIBADD = $(PARALLELS_SDK_LIBS)
libvirt_driver_parallels_la_SOURCES = $(PARALLELS_DRIVER_SOURCES)
@@ -1469,8 +1469,8 @@ noinst_LTLIBRARIES += libvirt_driver_bhyve.la
endif ! WITH_DRIVER_MODULES
libvirt_driver_bhyve_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_bhyve_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_bhyve_impl_la_SOURCES = $(BHYVE_DRIVER_SOURCES)
@@ -1496,8 +1496,8 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_network_impl_la_CFLAGS = \
$(LIBNL_CFLAGS) \
$(DBUS_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
libvirt_driver_network_impl_la_LIBADD = $(DBUS_LIBS)
@@ -1514,8 +1514,8 @@ noinst_LTLIBRARIES += libvirt_driver_interface.la
#libvirt_la_BUILT_LIBADD += libvirt_driver_interface.la
endif ! WITH_DRIVER_MODULES
libvirt_driver_interface_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) $(LIBNL_CFLAGS)
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_interface_la_LIBADD =
@@ -1544,8 +1544,8 @@ noinst_LTLIBRARIES += libvirt_driver_secret.la
#libvirt_la_BUILT_LIBADD += libvirt_driver_secret.la
endif ! WITH_DRIVER_MODULES
libvirt_driver_secret_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
if WITH_DRIVER_MODULES
libvirt_driver_secret_la_LIBADD = ../gnulib/lib/libgnu.la
@@ -1557,8 +1557,8 @@ endif WITH_SECRETS
# Needed to keep automake quiet about conditionals
libvirt_driver_storage_impl_la_SOURCES =
libvirt_driver_storage_impl_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_storage_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_storage_impl_la_LIBADD =
@@ -1637,8 +1637,8 @@ endif ! WITH_DRIVER_MODULES
libvirt_driver_nodedev_la_SOURCES = $(NODE_DEVICE_DRIVER_SOURCES)
libvirt_driver_nodedev_la_CFLAGS = \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) $(LIBNL_CFLAGS)
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_nodedev_la_LIBADD =
@@ -1679,8 +1679,8 @@ libvirt_driver_nwfilter_impl_la_CFLAGS = \
$(LIBPCAP_CFLAGS) \
$(LIBNL_CFLAGS) \
$(DBUS_CFLAGS) \
- -I$(top_srcdir)/src/access \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/access \
+ -I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_nwfilter_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_nwfilter_impl_la_LIBADD = \
@@ -1699,7 +1699,7 @@ libvirt_security_manager_la_SOURCES = $(SECURITY_DRIVER_SOURCES)
noinst_LTLIBRARIES += libvirt_security_manager.la
libvirt_la_BUILT_LIBADD += libvirt_security_manager.la
libvirt_security_manager_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_security_manager_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_security_manager_la_LIBADD = $(SECDRIVER_LIBS)
if WITH_SECDRIVER_SELINUX
@@ -1716,7 +1716,7 @@ libvirt_driver_access_la_SOURCES = \
noinst_LTLIBRARIES += libvirt_driver_access.la
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
libvirt_driver_access_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_driver_access_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_access_la_LIBADD =
@@ -2257,8 +2257,8 @@ libvirt_setuid_rpc_client_la_LDFLAGS = \
$(NULL)
libvirt_setuid_rpc_client_la_CFLAGS = \
-DLIBVIRT_SETUID_RPC_CLIENT \
- -I$(top_srcdir)/src/conf \
- -I$(top_srcdir)/src/rpc \
+ -I$(srcdir)/conf \
+ -I$(srcdir)/rpc \
$(AM_CFLAGS) \
$(SECDRIVER_CFLAGS) \
$(NULL)
@@ -2273,7 +2273,7 @@ lockd_la_SOURCES = \
$(LOCK_DRIVER_LOCKD_SOURCES) \
$(LOCK_PROTOCOL_GENERATED) \
$(NULL)
-lockd_la_CFLAGS = -I$(top_srcdir)/src/conf \
+lockd_la_CFLAGS = -I$(srcdir)/conf \
$(XDR_CFLAGS) \
$(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version
@@ -2460,7 +2460,7 @@ virtlockd.socket: locking/virtlockd.socket.in $(top_builddir)/config.status
if WITH_SANLOCK
lockdriver_LTLIBRARIES += sanlock.la
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
-sanlock_la_CFLAGS = -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+sanlock_la_CFLAGS = -I$(srcdir)/conf $(AM_CFLAGS)
sanlock_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
sanlock_la_LIBADD = -lsanlock_client \
../gnulib/lib/libgnu.la
@@ -2656,7 +2656,7 @@ libexec_PROGRAMS += libvirt_sanlock_helper
libvirt_sanlock_helper_SOURCES = $(LOCK_DRIVER_SANLOCK_HELPER_SOURCES)
libvirt_sanlock_helper_CFLAGS = \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) \
$(PIE_CFLAGS) \
$(NULL)
@@ -2692,7 +2692,7 @@ libvirt_lxc_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES
libvirt_lxc_LDADD += $(SECDRIVER_LIBS)
libvirt_lxc_CFLAGS = \
- -I$(top_srcdir)/src/conf \
+ -I$(srcdir)/conf \
$(AM_CFLAGS) \
$(PIE_CFLAGS) \
$(LIBNL_CFLAGS) \
@@ -2728,8 +2728,8 @@ if WITH_DTRACE_PROBES
virt_aa_helper_LDADD += libvirt_probes.lo
endif WITH_DTRACE_PROBES
virt_aa_helper_CFLAGS = \
- -I$(top_srcdir)/src/conf \
- -I$(top_srcdir)/src/security \
+ -I$(srcdir)/conf \
+ -I$(srcdir)/security \
$(AM_CFLAGS) \
$(PIE_CFLAGS) \
$(NULL)
--
2.1.0
9 years, 11 months