summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/meta-virtualization/recipes-extended/libvirt/libvirt')
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch64
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch63
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch45
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch85
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.conf393
-rwxr-xr-ximport-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.sh103
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch39
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/run-ptest3
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/runptest.patch113
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch57
-rw-r--r--import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch89
11 files changed, 1054 insertions, 0 deletions
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch
new file mode 100644
index 000000000..16c3a16bc
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch
@@ -0,0 +1,64 @@
+From dd915e7f70e676aea93f750c75d16ce646e71e4b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Wed, 9 Sep 2015 11:52:44 -0400
+Subject: [PATCH] Revert "build: add $(prefix) to SYSTEMD_UNIT_DIR"
+
+This reverts upstream commit 00e9d6071b2450659ce01bc984f64ecb5d7ba62d
+with minor context changes to allow it to apply.
+
+Yocto based builds use /lib/systemd/system for systemd unit files and
+since upstream has chosen to use a mechanism for setting
+SYSTEMD_UNIT_DIR which is not flexible we have to resort to reverting
+this upstream commit to avoid having ${prefix} added to the path.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+[ywei: rebased to libvirt-1.3.2]
+Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
+---
+ daemon/Makefile.am | 2 +-
+ src/Makefile.am | 2 +-
+ tools/Makefile.am | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/daemon/Makefile.am b/daemon/Makefile.am
+index 2dbe81b..41ea2db 100644
+--- a/daemon/Makefile.am
++++ b/daemon/Makefile.am
+@@ -445,7 +445,7 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART
+
+ if LIBVIRT_INIT_SCRIPT_SYSTEMD
+
+-SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
++SYSTEMD_UNIT_DIR = /lib/systemd/system
+ BUILT_SOURCES += libvirtd.service libvirtd.socket
+
+ install-init-systemd: install-sysconfig libvirtd.service libvirtd.socket
+diff --git a/src/Makefile.am b/src/Makefile.am
+index a316b4d..d271291 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -2594,7 +2594,7 @@ EXTRA_DIST += \
+ if WITH_LIBVIRTD
+ if LIBVIRT_INIT_SCRIPT_SYSTEMD
+
+-SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
++SYSTEMD_UNIT_DIR = /lib/systemd/system
+
+ BUILT_SOURCES += virtlockd.service virtlockd.socket \
+ virtlogd.service virtlogd.socket
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index b3227a7..0e58f73 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -356,7 +356,7 @@ libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh
+
+
+ EXTRA_DIST += libvirt-guests.service.in
+-SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
++SYSTEMD_UNIT_DIR = /lib/systemd/system
+
+ if LIBVIRT_INIT_SCRIPT_SYSTEMD
+ install-systemd: libvirt-guests.service install-sysconfig libvirt-guests.sh
+--
+1.9.1
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch
new file mode 100644
index 000000000..558d5ef65
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-1.0.3-fix-thread-safety-in-lxc-callback-handling.patch
@@ -0,0 +1,63 @@
+From ad5d9cee87357f9f38f62583119606ef95ba10df Mon Sep 17 00:00:00 2001
+From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
+Date: Fri, 24 May 2013 16:46:00 +0300
+Subject: [PATCH] Fix thread safety in LXC callback handling
+
+Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
+---
+ src/lxc/lxc_process.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
+index aaa81a7..0eadc67 100644
+--- a/src/lxc/lxc_process.c
++++ b/src/lxc/lxc_process.c
+@@ -609,8 +609,13 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
+ virLXCProtocolExitStatus status,
+ virDomainObjPtr vm)
+ {
++ virLXCDriverPtr driver = lxc_driver;
+ virLXCDomainObjPrivatePtr priv = vm->privateData;
+
++ lxcDriverLock(driver);
++ virObjectLock(vm);
++ lxcDriverUnlock(driver);
++
+ switch (status) {
+ case VIR_LXC_PROTOCOL_EXIT_STATUS_SHUTDOWN:
+ priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
+@@ -628,6 +633,8 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
+ }
+ VIR_DEBUG("Domain shutoff reason %d (from status %d)",
+ priv->stopReason, status);
++
++ virObjectUnlock(vm);
+ }
+
+ /* XXX a little evil */
+@@ -636,12 +643,21 @@ static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
+ pid_t initpid,
+ virDomainObjPtr vm)
+ {
+- virLXCDomainObjPrivatePtr priv = vm->privateData;
++ virLXCDriverPtr driver = lxc_driver;
++ virLXCDomainObjPrivatePtr priv;
++
++ lxcDriverLock(driver);
++ virObjectLock(vm);
++ lxcDriverUnlock(driver);
++
++ priv = vm->privateData;
+ priv->initpid = initpid;
+ virDomainAuditInit(vm, initpid);
+
+ if (virDomainSaveStatus(lxc_driver->caps, lxc_driver->stateDir, vm) < 0)
+ VIR_WARN("Cannot update XML with PID for LXC %s", vm->def->name);
++
++ virObjectUnlock(vm);
+ }
+
+ static virLXCMonitorCallbacks monitorCallbacks = {
+--
+1.7.11.7
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch
new file mode 100644
index 000000000..65b046eea
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt-use-pkg-config-to-locate-libcap.patch
@@ -0,0 +1,45 @@
+From 3e271f6db12ffe34843428ec2f0bca7a8fe3aa65 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Wed, 8 Apr 2015 13:03:03 -0400
+Subject: [PATCH] libvirt: use pkg-config to locate libcap
+
+libvirt wants to use pcap-config to locate the exisence and location
+of libpcap. oe-core stubs this script and replaces it with pkg-config,
+which can lead to the host pcap-config triggering and either breaking
+the build or introducing host contamination.
+
+To fix this issue, we patch configure to use 'pkg-config libcap' to
+locate the correct libraries.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f37047599b76..5f9b84363b96 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1553,7 +1553,7 @@ fi
+ AM_CONDITIONAL([HAVE_NUMAD], [test "$with_numad" != "no"])
+
+ dnl pcap lib
+-LIBPCAP_CONFIG="pcap-config"
++LIBPCAP_CONFIG="pkg-config libpcap"
+ LIBPCAP_CFLAGS=""
+ LIBPCAP_LIBS=""
+ LIBPCAP_FOUND="no"
+@@ -1563,8 +1563,8 @@ AC_ARG_WITH([libpcap], [AS_HELP_STRING([--with-libpcap=@<:@PFX@:>@],
+ if test "$with_qemu" = "yes"; then
+ case $with_libpcap in
+ no) LIBPCAP_CONFIG= ;;
+- ''|yes) LIBPCAP_CONFIG="pcap-config" ;;
+- *) LIBPCAP_CONFIG="$with_libpcap/bin/pcap-config" ;;
++ ''|yes) LIBPCAP_CONFIG="pkg-config libpcap" ;;
++ *) LIBPCAP_CONFIG="$with_libpcap/bin/pkg-config libpcap" ;;
+ esac
+ AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [
+ AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
+--
+2.1.0
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch
new file mode 100644
index 000000000..3c2622c72
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch
@@ -0,0 +1,85 @@
+Adding support for LIBVIRT_CFLAGS and LIBVIRT_LIBS
+
+Signed-off-by: Amy Fong <amy.fong@windriver.com>
+
+
+Adding a support for LIBVIRT_API_PATH evironment variable, which can
+control where the script should look for the 'libvirt-api.xml' file.
+This allows building libvirt-python against different libvirt than the
+one installed in the system. This may be used for example in autotest
+or by packagers without the need to install libvirt into the system.
+
+Signed-off-by: Martin Kletzander <mkletzan redhat com>
+[ywei: rebased to 1.3.2]
+Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
+---
+ setup.py | 25 ++++++++++++++++++++++---
+ 1 file changed, 22 insertions(+), 3 deletions(-)
+
+Index: libvirt-python-1.2.4/setup.py
+===================================================================
+--- libvirt-python-1.2.4.orig/setup.py
++++ libvirt-python-1.2.4/setup.py
+@@ -40,13 +40,7 @@
+ "libvirt"])
+
+ def have_libvirt_lxc():
+- try:
+- spawn([get_pkgcfg(),
+- "--atleast-version=%s" % MIN_LIBVIRT_LXC,
+- "libvirt"])
+- return True
+- except DistutilsExecError:
+- return False
++ return True
+
+ def get_pkgconfig_data(args, mod, required=True):
+ """Run pkg-config to and return content associated with it"""
+@@ -68,7 +62,17 @@
+ """Check with pkg-config that libvirt is present and extract
+ the API XML file paths we need from it"""
+
+- libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"], "libvirt")
++ libvirt_api = os.getenv("LIBVIRT_API_PATH")
++
++ if libvirt_api:
++ if not libvirt_api.endswith("-api.xml"):
++ raise ValueError("Invalid path '%s' for API XML" % libvirt_api)
++ if not os.path.exists(libvirt_api):
++ raise ValueError("API XML '%s' does not exist, "
++ "have you built libvirt?" % libvirt_api)
++ else:
++ libvirt_api = get_pkgconfig_data(["--variable", "libvirt_api"],
++ "libvirt")
+
+ offset = libvirt_api.index("-api.xml")
+ libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml"
+@@ -88,8 +92,17 @@
+
+ c_modules = []
+ py_modules = []
+- ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
+- cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()
++ libvirt_cflags = os.getenv("LIBVIRT_CFLAGS")
++ if libvirt_cflags:
++ cflags = libvirt_cflags.split()
++ else:
++ cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()
++
++ libvirt_libs = os.getenv("LIBVIRT_LIBS")
++ if libvirt_libs:
++ ldflags = libvirt_libs.split()
++ else:
++ ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
+
+ module = Extension('libvirtmod',
+ sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'],
+@@ -138,7 +151,7 @@
+ class my_build(build):
+
+ def run(self):
+- check_minimum_libvirt_version()
++# check_minimum_libvirt_version()
+ apis = get_api_xml_files()
+
+ self.spawn([sys.executable, "generator.py", "libvirt", apis[0]])
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.conf b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.conf
new file mode 100644
index 000000000..c0462b47b
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.conf
@@ -0,0 +1,393 @@
+# Master libvirt daemon configuration file
+#
+# For further information consult http://libvirt.org/format.html
+#
+# NOTE: the tests/daemon-conf regression test script requires
+# that each "PARAMETER = VALUE" line in this file have the parameter
+# name just after a leading "#".
+
+#################################################################
+#
+# Network connectivity controls
+#
+
+# Flag listening for secure TLS connections on the public TCP/IP port.
+# NB, must pass the --listen flag to the libvirtd process for this to
+# have any effect.
+#
+# It is necessary to setup a CA and issue server certificates before
+# using this capability.
+#
+# This is enabled by default, uncomment this to disable it
+listen_tls = 0
+
+# Listen for unencrypted TCP connections on the public TCP/IP port.
+# NB, must pass the --listen flag to the libvirtd process for this to
+# have any effect.
+#
+# Using the TCP socket requires SASL authentication by default. Only
+# SASL mechanisms which support data encryption are allowed. This is
+# DIGEST_MD5 and GSSAPI (Kerberos5)
+#
+# This is disabled by default, uncomment this to enable it.
+listen_tcp = 1
+
+
+
+# Override the port for accepting secure TLS connections
+# This can be a port number, or service name
+#
+#tls_port = "16514"
+
+# Override the port for accepting insecure TCP connections
+# This can be a port number, or service name
+#
+#tcp_port = "16509"
+
+
+# Override the default configuration which binds to all network
+# interfaces. This can be a numeric IPv4/6 address, or hostname
+#
+#listen_addr = "192.168.0.1"
+
+
+# Flag toggling mDNS advertizement of the libvirt service.
+#
+# Alternatively can disable for all services on a host by
+# stopping the Avahi daemon
+#
+# This is enabled by default, uncomment this to disable it
+#mdns_adv = 0
+
+# Override the default mDNS advertizement name. This must be
+# unique on the immediate broadcast network.
+#
+# The default is "Virtualization Host HOSTNAME", where HOSTNAME
+# is subsituted for the short hostname of the machine (without domain)
+#
+#mdns_name = "Virtualization Host Joe Demo"
+
+
+#################################################################
+#
+# UNIX socket access controls
+#
+
+# Set the UNIX domain socket group ownership. This can be used to
+# allow a 'trusted' set of users access to management capabilities
+# without becoming root.
+#
+# This is restricted to 'root' by default.
+#unix_sock_group = "libvirt"
+
+# Set the UNIX socket permissions for the R/O socket. This is used
+# for monitoring VM status only
+#
+# Default allows any user. If setting group ownership may want to
+# restrict this to:
+#unix_sock_ro_perms = "0777"
+
+# Set the UNIX socket permissions for the R/W socket. This is used
+# for full management of VMs
+#
+# Default allows only root. If PolicyKit is enabled on the socket,
+# the default will change to allow everyone (eg, 0777)
+#
+# If not using PolicyKit and setting group ownership for access
+# control then you may want to relax this to:
+#unix_sock_rw_perms = "0770"
+
+# Set the name of the directory in which sockets will be found/created.
+#unix_sock_dir = "/var/run/libvirt"
+
+#################################################################
+#
+# Authentication.
+#
+# - none: do not perform auth checks. If you can connect to the
+# socket you are allowed. This is suitable if there are
+# restrictions on connecting to the socket (eg, UNIX
+# socket permissions), or if there is a lower layer in
+# the network providing auth (eg, TLS/x509 certificates)
+#
+# - sasl: use SASL infrastructure. The actual auth scheme is then
+# controlled from /etc/sasl2/libvirt.conf. For the TCP
+# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
+# For non-TCP or TLS sockets, any scheme is allowed.
+#
+# - polkit: use PolicyKit to authenticate. This is only suitable
+# for use on the UNIX sockets. The default policy will
+# require a user to supply their own password to gain
+# full read/write access (aka sudo like), while anyone
+# is allowed read/only access.
+#
+# Set an authentication scheme for UNIX read-only sockets
+# By default socket permissions allow anyone to connect
+#
+# To restrict monitoring of domains you may wish to enable
+# an authentication mechanism here
+#auth_unix_ro = "none"
+
+# Set an authentication scheme for UNIX read-write sockets
+# By default socket permissions only allow root. If PolicyKit
+# support was compiled into libvirt, the default will be to
+# use 'polkit' auth.
+#
+# If the unix_sock_rw_perms are changed you may wish to enable
+# an authentication mechanism here
+#auth_unix_rw = "none"
+
+# Change the authentication scheme for TCP sockets.
+#
+# If you don't enable SASL, then all TCP traffic is cleartext.
+# Don't do this outside of a dev/test scenario. For real world
+# use, always enable SASL and use the GSSAPI or DIGEST-MD5
+# mechanism in /etc/sasl2/libvirt.conf
+#auth_tcp = "sasl"
+
+# Change the authentication scheme for TLS sockets.
+#
+# TLS sockets already have encryption provided by the TLS
+# layer, and limited authentication is done by certificates
+#
+# It is possible to make use of any SASL authentication
+# mechanism as well, by using 'sasl' for this option
+#auth_tls = "none"
+
+
+
+#################################################################
+#
+# TLS x509 certificate configuration
+#
+
+
+# Override the default server key file path
+#
+#key_file = "/etc/pki/libvirt/private/serverkey.pem"
+
+# Override the default server certificate file path
+#
+#cert_file = "/etc/pki/libvirt/servercert.pem"
+
+# Override the default CA certificate path
+#
+#ca_file = "/etc/pki/CA/cacert.pem"
+
+# Specify a certificate revocation list.
+#
+# Defaults to not using a CRL, uncomment to enable it
+#crl_file = "/etc/pki/CA/crl.pem"
+
+
+
+#################################################################
+#
+# Authorization controls
+#
+
+
+# Flag to disable verification of our own server certificates
+#
+# When libvirtd starts it performs some sanity checks against
+# its own certificates.
+#
+# Default is to always run sanity checks. Uncommenting this
+# will disable sanity checks which is not a good idea
+#tls_no_sanity_certificate = 1
+
+# Flag to disable verification of client certificates
+#
+# Client certificate verification is the primary authentication mechanism.
+# Any client which does not present a certificate signed by the CA
+# will be rejected.
+#
+# Default is to always verify. Uncommenting this will disable
+# verification - make sure an IP whitelist is set
+#tls_no_verify_certificate = 1
+
+
+# A whitelist of allowed x509 Distinguished Names
+# This list may contain wildcards such as
+#
+# "C=GB,ST=London,L=London,O=Red Hat,CN=*"
+#
+# See the POSIX fnmatch function for the format of the wildcards.
+#
+# NB If this is an empty list, no client can connect, so comment out
+# entirely rather than using empty list to disable these checks
+#
+# By default, no DN's are checked
+#tls_allowed_dn_list = ["DN1", "DN2"]
+
+
+# A whitelist of allowed SASL usernames. The format for usernames
+# depends on the SASL authentication mechanism. Kerberos usernames
+# look like username@REALM
+#
+# This list may contain wildcards such as
+#
+# "*@EXAMPLE.COM"
+#
+# See the POSIX fnmatch function for the format of the wildcards.
+#
+# NB If this is an empty list, no client can connect, so comment out
+# entirely rather than using empty list to disable these checks
+#
+# By default, no Username's are checked
+#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
+
+
+
+#################################################################
+#
+# Processing controls
+#
+
+# The maximum number of concurrent client connections to allow
+# over all sockets combined.
+#max_clients = 20
+
+
+# The minimum limit sets the number of workers to start up
+# initially. If the number of active clients exceeds this,
+# then more threads are spawned, upto max_workers limit.
+# Typically you'd want max_workers to equal maximum number
+# of clients allowed
+#min_workers = 5
+#max_workers = 20
+
+
+# The number of priority workers. If all workers from above
+# pool will stuck, some calls marked as high priority
+# (notably domainDestroy) can be executed in this pool.
+#prio_workers = 5
+
+# Total global limit on concurrent RPC calls. Should be
+# at least as large as max_workers. Beyond this, RPC requests
+# will be read into memory and queued. This directly impact
+# memory usage, currently each request requires 256 KB of
+# memory. So by default upto 5 MB of memory is used
+#
+# XXX this isn't actually enforced yet, only the per-client
+# limit is used so far
+#max_requests = 20
+
+# Limit on concurrent requests from a single client
+# connection. To avoid one client monopolizing the server
+# this should be a small fraction of the global max_requests
+# and max_workers parameter
+#max_client_requests = 5
+
+#################################################################
+#
+# Logging controls
+#
+
+# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
+# basically 1 will log everything possible
+#log_level = 3
+
+# Logging filters:
+# A filter allows to select a different logging level for a given category
+# of logs
+# The format for a filter is:
+# x:name
+# where name is a match string e.g. remote or qemu
+# the x prefix is the minimal level where matching messages should be logged
+# 1: DEBUG
+# 2: INFO
+# 3: WARNING
+# 4: ERROR
+#
+# Multiple filter can be defined in a single @filters, they just need to be
+# separated by spaces.
+#
+# e.g:
+# log_filters="3:remote 4:event"
+# to only get warning or errors from the remote layer and only errors from
+# the event layer.
+
+# Logging outputs:
+# An output is one of the places to save logging information
+# The format for an output can be:
+# x:stderr
+# output goes to stderr
+# x:syslog:name
+# use syslog for the output and use the given name as the ident
+# x:file:file_path
+# output to a file, with the given filepath
+# In all case the x prefix is the minimal level, acting as a filter
+# 1: DEBUG
+# 2: INFO
+# 3: WARNING
+# 4: ERROR
+#
+# Multiple output can be defined, they just need to be separated by spaces.
+# e.g.:
+# log_outputs="3:syslog:libvirtd"
+# to log all warnings and errors to syslog under the libvirtd ident
+
+# Log debug buffer size: default 64
+# The daemon keeps an internal debug log buffer which will be dumped in case
+# of crash or upon receiving a SIGUSR2 signal. This setting allows to override
+# the default buffer size in kilobytes.
+# If value is 0 or less the debug log buffer is deactivated
+#log_buffer_size = 64
+
+
+##################################################################
+#
+# Auditing
+#
+# This setting allows usage of the auditing subsystem to be altered:
+#
+# audit_level == 0 -> disable all auditing
+# audit_level == 1 -> enable auditing, only if enabled on host (default)
+# audit_level == 2 -> enable auditing, and exit if disabled on host
+#
+#audit_level = 2
+#
+# If set to 1, then audit messages will also be sent
+# via libvirt logging infrastructure. Defaults to 0
+#
+#audit_logging = 1
+
+###################################################################
+# UUID of the host:
+# Provide the UUID of the host here in case the command
+# 'dmidecode -s system-uuid' does not provide a valid uuid. In case
+# 'dmidecode' does not provide a valid UUID and none is provided here, a
+# temporary UUID will be generated.
+# Keep the format of the example UUID below. UUID must not have all digits
+# be the same.
+
+# NB This default all-zeros UUID will not work. Replace
+# it with the output of the 'uuidgen' command and then
+# uncomment this entry
+#host_uuid = "00000000-0000-0000-0000-000000000000"
+
+###################################################################
+# Keepalive protocol:
+# This allows libvirtd to detect broken client connections or even
+# dead client. A keepalive message is sent to a client after
+# keepalive_interval seconds of inactivity to check if the client is
+# still responding; keepalive_count is a maximum number of keepalive
+# messages that are allowed to be sent to the client without getting
+# any response before the connection is considered broken. In other
+# words, the connection is automatically closed approximately after
+# keepalive_interval * (keepalive_count + 1) seconds since the last
+# message received from the client. If keepalive_interval is set to
+# -1, libvirtd will never send keepalive requests; however clients
+# can still send them and the deamon will send responses. When
+# keepalive_count is set to 0, connections will be automatically
+# closed after keepalive_interval seconds of inactivity without
+# sending any keepalive messages.
+#
+#keepalive_interval = 5
+#keepalive_count = 5
+#
+# If set to 1, libvirtd will refuse to talk to clients that do not
+# support keepalive protocol. Defaults to 0.
+#
+#keepalive_required = 1
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.sh b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.sh
new file mode 100755
index 000000000..29dbf3917
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/libvirtd.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: libvirtd
+# Required-Start: $local_fs $network dbus
+# Required-Stop: $local_fs $network dbus
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+if [ -f /lib/lsb/init-functions ]
+then
+ . /lib/lsb/init-functions
+else
+ # int log_begin_message (char *message)
+ log_begin_msg () {
+ if [ -z "$1" ]; then
+ return 1
+ fi
+ echo " * $@"
+ }
+
+ # int log_end_message (int exitstatus)
+ log_end_msg () {
+
+ # If no arguments were passed, return
+ [ -z "$1" ] && return 1
+
+ # Only do the fancy stuff if we have an appropriate terminal
+ # and if /usr is already mounted
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
+ COLS=`$TPUT cols`
+ if [ -n "$COLS" ]; then
+ COL=`$EXPR $COLS - 7`
+ else
+ COL=73
+ fi
+ UP=`$TPUT cuu1`
+ END=`$TPUT hpa $COL`
+ START=`$TPUT hpa 0`
+ RED=`$TPUT setaf 1`
+ NORMAL=`$TPUT op`
+ if [ $1 -eq 0 ]; then
+ echo "$UP$END[ ok ]"
+ else
+ echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"
+ fi
+ else
+ if [ $1 -eq 0 ]; then
+ echo " ...done."
+ else
+ echo " ...fail!"
+ fi
+ fi
+ return $1
+ }
+
+ log_warning_msg () {
+ if log_use_fancy_output; then
+ YELLOW=`$TPUT setaf 3`
+ NORMAL=`$TPUT op`
+ echo "$YELLOW*$NORMAL $@"
+ else
+ echo "$@"
+ fi
+ }
+
+fi
+
+case "$1" in
+ start)
+ if [ -e /var/run/libvirtd.pid ]; then
+ if [ -d /proc/$(cat /var/run/libvirtd.pid) ]; then
+ echo "virtualization library already started; not starting."
+ else
+ echo "Removing stale PID file /var/run/libvirtd.pid."
+ rm -f /var/run/libvirtd.pid
+ fi
+ fi
+ log_begin_msg "Starting virtualization library daemon: libvirtd"
+ if [ ! -e /var/run/libvirtd.pid ]; then
+ start-stop-daemon -K -x /usr/bin/dnsmasq --pidfile /var/run/libvirt/network/default.pid
+ fi
+ start-stop-daemon --start --quiet --pidfile /var/run/libvirtd.pid --exec /usr/sbin/libvirtd -- --daemon --listen
+ log_end_msg $?
+ ;;
+ stop)
+ log_begin_msg "Stopping virtualization library daemon: libvirtd"
+ start-stop-daemon --stop --quiet --retry 3 --exec /usr/sbin/libvirtd --pidfile /var/run/libvirtd.pid
+ log_end_msg $?
+ rm -f /var/run/libvirtd.pid
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch
new file mode 100644
index 000000000..3cf9e8392
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/qemu-fix-crash-in-qemuOpen.patch
@@ -0,0 +1,39 @@
+From 74bff2509080912ea8abf1de8fd95fa2412b659a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
+Date: Thu, 11 Apr 2013 11:37:25 +0200
+Subject: [PATCH] qemu: fix crash in qemuOpen
+
+commit 74bff2509080912ea8abf1de8fd95fa2412b659a from upsteam
+git://libvirt.org/libvirt.git
+
+If the path part of connection URI is not present, cfg is used
+unitialized.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=950855
+---
+ src/qemu/qemu_driver.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
+index 2c0d7d1..0d41e39 100644
+--- a/src/qemu/qemu_driver.c
++++ b/src/qemu/qemu_driver.c
+@@ -1026,6 +1026,7 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
+ goto cleanup;
+ }
+
++ cfg = virQEMUDriverGetConfig(qemu_driver);
+ if (conn->uri->path == NULL) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("no QEMU URI path given, try %s"),
+@@ -1033,7 +1034,6 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
+ goto cleanup;
+ }
+
+- cfg = virQEMUDriverGetConfig(qemu_driver);
+ if (cfg->privileged) {
+ if (STRNEQ(conn->uri->path, "/system") &&
+ STRNEQ(conn->uri->path, "/session")) {
+--
+1.7.1
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/run-ptest b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/run-ptest
new file mode 100644
index 000000000..a434b186f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C tests -k check-TESTS
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/runptest.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/runptest.patch
new file mode 100644
index 000000000..a33f56950
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/runptest.patch
@@ -0,0 +1,113 @@
+Add 'install-ptest' rule.
+Change TESTS_ENVIRONMENT to allow running outside build dir.
+
+Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
+Upstream-status: Pending
+
+Index: libvirt-1.2.4/tests/Makefile.am
+===================================================================
+--- libvirt-1.2.4.orig/tests/Makefile.am
++++ libvirt-1.2.4/tests/Makefile.am
+@@ -31,9 +31,11 @@
+ -I$(top_srcdir)/src/conf \
+ $(GETTEXT_CPPFLAGS)
+
++PTEST_DIR ?= $(libdir)/libvirt/ptest
++
+ AM_CFLAGS = \
+- -Dabs_builddir="\"$(abs_builddir)\"" \
+- -Dabs_srcdir="\"$(abs_srcdir)\"" \
++ -Dabs_builddir="\"$(PTEST_DIR)/tests\"" \
++ -Dabs_srcdir="\"$(PTEST_DIR)/tests\"" \
+ $(LIBXML_CFLAGS) \
+ $(LIBNL_CFLAGS) \
+ $(GNUTLS_CFLAGS) \
+@@ -48,7 +50,7 @@
+
+ if WITH_DRIVER_MODULES
+ INCLUDES += \
+- -DTEST_DRIVER_DIR=\"$(top_builddir)/src/.libs\"
++ -DTEST_DRIVER_DIR=\"$(PTEST_DIR)/src/.libs\"
+ endif WITH_DRIVER_MODULES
+
+ PROBES_O =
+@@ -409,20 +411,19 @@
+ # Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
+ # intermediate shell variable, but must do all the expansion in make
+
+-lv_abs_top_builddir=$(shell cd '$(top_builddir)' && pwd)
+ path_add = $(subst :,$(PATH_SEPARATOR),\
+- $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
++ $(subst !,$(PTEST_DIR)/,!daemon:!tools:!tests))
+
+ VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
+ TESTS_ENVIRONMENT = \
+- abs_top_builddir=$(lv_abs_top_builddir) \
+- abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \
+- abs_builddir=$(abs_builddir) \
+- abs_srcdir=$(abs_srcdir) \
+- CONFIG_HEADER="$(lv_abs_top_builddir)/config.h" \
++ abs_top_builddir="$(PTEST_DIR)" \
++ abs_top_srcdir="$(PTEST_DIR)" \
++ abs_builddir="$(PTEST_DIR)/tests" \
++ abs_srcdir="$(PTEST_DIR)/tests" \
++ CONFIG_HEADER="$(PTEST_DIR)/config.h" \
+ PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \
+ SHELL="$(SHELL)" \
+- LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \
++ LIBVIRT_DRIVER_DIR="$(PTEST_DIR)/src/.libs" \
+ LIBVIRT_AUTOSTART=0 \
+ LC_ALL=C \
+ VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \
+@@ -1137,5 +1138,51 @@
+ EXTRA_DIST += objectlocking.ml
+ endif ! WITH_CIL
+
++buildtest-TESTS: $(TESTS) $(test_libraries) $(test_helpers)
++
++PTESTS = $(TESTS) $(test_helpers) test-lib.sh schematestutils.sh
++
++install-ptest:
++ list='$(TESTS) $(test_helpers) test-lib.sh schematestutils.sh'
++ install -d $(DEST_DIR)/tools
++ @(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \
++ install * $(DEST_DIR)/tools)
++ install -d $(DEST_DIR)/src/network
++ cp ../src/network/*.xml $(DEST_DIR)/src/network
++ install -d $(DEST_DIR)/src/cpu
++ cp ../src/cpu/*.xml $(DEST_DIR)/src/cpu
++ install ../src/libvirt_iohelper $(DEST_DIR)/src
++ install -D ../daemon/libvirtd $(DEST_DIR)/daemon/libvirtd
++ install -D ../daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
++ @(if [ -d ../daemon/.libs ] ; then cd ../daemon/.libs; fi; \
++ install * $(DEST_DIR)/daemon)
++ install -d $(DEST_DIR)/src/.libs
++ @(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \
++ install * $(DEST_DIR)/src/.libs)
++ install -d $(DEST_DIR)/docs/schemas
++ cp ../docs/schemas/*.rng $(DEST_DIR)/docs/schemas
++ cp -r ../build-aux $(DEST_DIR)
++ install -d $(DEST_DIR)/examples/xml
++ cp -r ../examples/xml/test $(DEST_DIR)/examples/xml
++ install -d $(DEST_DIR)/tests/.libs
++ find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \;
++ find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \;
++ @(for file in $(PTESTS); do \
++ if [ -f .libs/$$file ]; then \
++ install .libs/$$file $(DEST_DIR)/tests; \
++ else \
++ install $$file $(DEST_DIR)/tests; \
++ fi; \
++ done;)
++ @(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;)
++ cp ../config.h $(DEST_DIR)
++ cp Makefile $(DEST_DIR)/tests
++ sed -i -e 's/^Makefile:/_Makefile:/' $(DEST_DIR)/tests/Makefile
++ cp ../Makefile $(DEST_DIR)
++ sed -i -e 's|^Makefile:|_Makefile:|' $(DEST_DIR)/Makefile
++ sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/tests/Makefile
++ sed -i -e 's|$(BUILD_DIR)|$(PTEST_DIR)|g' $(DEST_DIR)/Makefile
++ sed -i -e 's|^\(.*\.log:\) \(.*EXEEXT.*\)|\1|g' $(DEST_DIR)/tests/Makefile
++
+ CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
+ objectlocking-files.txt
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch
new file mode 100644
index 000000000..3964865bf
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tests-allow-separated-src-and-build-dirs.patch
@@ -0,0 +1,57 @@
+From 884b6e3724b75cd92766d5386455983e3557a286 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 2 May 2014 13:45:05 -0400
+Subject: [PATCH] tests: allow separated src and build dirs
+
+Fixup Makefile.am to search for static files back in srcdir.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ tests/Makefile.am | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 0da514b..b8d7c19 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1006,22 +1006,22 @@ install-ptest:
+ @(if [ -d ../tools/.libs ] ; then cd ../tools/.libs; fi; \
+ install * $(DEST_DIR)/tools)
+ install -d $(DEST_DIR)/src/network
+- cp ../src/network/*.xml $(DEST_DIR)/src/network
++ cp $(top_srcdir)/src/network/*.xml $(DEST_DIR)/src/network
+ install -d $(DEST_DIR)/src/cpu
+- cp ../src/cpu/*.xml $(DEST_DIR)/src/cpu
++ cp $(top_srcdir)/src/cpu/*.xml $(DEST_DIR)/src/cpu
+ install ../src/libvirt_iohelper $(DEST_DIR)/src
+ install -D ../daemon/libvirtd $(DEST_DIR)/daemon/libvirtd
+- install -D ../daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
++ install -D $(top_srcdir)/daemon/libvirtd.conf $(DEST_DIR)/daemon/libvirtd.conf
+ @(if [ -d ../daemon/.libs ] ; then cd ../daemon/.libs; fi; \
+ install * $(DEST_DIR)/daemon)
+ install -d $(DEST_DIR)/src/.libs
+ @(if [ -d ../src/.libs ] ; then cd ../src/.libs; fi; \
+ install * $(DEST_DIR)/src/.libs)
+ install -d $(DEST_DIR)/docs/schemas
+- cp ../docs/schemas/*.rng $(DEST_DIR)/docs/schemas
+- cp -r ../build-aux $(DEST_DIR)
++ cp $(top_srcdir)/docs/schemas/*.rng $(DEST_DIR)/docs/schemas
++ cp -r $(top_srcdir)/build-aux $(DEST_DIR)
+ install -d $(DEST_DIR)/examples/xml
+- cp -r ../examples/xml/test $(DEST_DIR)/examples/xml
++ cp -r $(top_srcdir)/examples/xml/test $(DEST_DIR)/examples/xml
+ install -d $(DEST_DIR)/tests/.libs
+ find . -type d -name "*xml2xml*" -exec cp -r {} $(DEST_DIR)/tests \;
+ find . -type d -name "*data" -exec cp -r {} $(DEST_DIR)/tests \;
+@@ -1029,7 +1029,7 @@ install-ptest:
+ if [ -f .libs/$$file ]; then \
+ install .libs/$$file $(DEST_DIR)/tests; \
+ else \
+- install $$file $(DEST_DIR)/tests; \
++ install $(srcdir)/$$file $(DEST_DIR)/tests; \
+ fi; \
+ done;)
+ @(if [ -d .libs ]; then install .libs/*.so $(DEST_DIR)/tests/.libs; fi;)
+--
+1.8.3.2
+
diff --git a/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch
new file mode 100644
index 000000000..a7fc727b7
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch
@@ -0,0 +1,89 @@
+From a790bfe8fa7b24b68cb6f9a1b7205fda2c6d558e Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Fri, 2 Aug 2013 11:38:43 -0400
+Subject: [PATCH] tools: add libvirt-net-rpc to virt-host-validate when TLS is
+ enabled
+
+When gnu-tls is enabled for libvirt references to virNetTLSInit are
+generated in libvirt. Any binaries linking against libvirt, must also
+link against libvirt-net-rpc which provides the implementation.
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+[ywei: rebased to libvirt-1.3.2]
+Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
+---
+ examples/Makefile.am | 19 +++++++++++++++++++
+ tools/Makefile.am | 13 +++++++++++++
+ 2 files changed, 32 insertions(+)
+
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index 2adcefb..fff49d4 100644
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -39,6 +39,10 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir) \
+ LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) $(COVERAGE_LDFLAGS) \
+ $(top_builddir)/src/libvirt.la $(top_builddir)/gnulib/lib/libgnu.la
+
++if WITH_GNUTLS
++LDADD += $(top_builddir)/src/libvirt-net-rpc.la
++endif
++
+ noinst_PROGRAMS=dominfo/info1 dommigrate/dommigrate domsuspend/suspend \
+ domtop/domtop hellolibvirt/hellolibvirt object-events/event-test \
+ openauth/openauth rename/rename
+@@ -52,6 +56,21 @@ object_events_event_test_SOURCES = object-events/event-test.c
+ openauth_openauth_SOURCES = openauth/openauth.c
+ rename_rename_SOURCES = rename/rename.c
+
++if WITH_GNUTLS
++dominfo_info1_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \
++ $(LDADD) \
++ $(NULL)
++domsuspend_suspend_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \
++ $(LDADD) \
++ $(NULL)
++hellolibvirt_hellolibvirt_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \
++ $(LDADD) \
++ $(NULL)
++openauth_openauth_LDADD = $(top_builddir)/src/libvirt-net-rpc.la \
++ $(LDADD) \
++ $(NULL)
++endif
++
+ if WITH_APPARMOR_PROFILES
+ apparmordir = $(sysconfdir)/apparmor.d/
+ apparmor_DATA = \
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 0be3567..b3227a7 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -169,6 +169,13 @@ virt_host_validate_LDADD = \
+ ../gnulib/lib/libgnu.la \
+ $(NULL)
+
++if WITH_GNUTLS
++virt_host_validate_LDADD += ../src/libvirt-net-rpc.la \
++ ../gnulib/lib/libgnu.la \
++ $(NULL)
++endif
++
++
+ virt_host_validate_CFLAGS = \
+ $(LIBXML_CFLAGS) \
+ $(WARN_CFLAGS) \
+@@ -256,6 +263,12 @@ virt_admin_CFLAGS = \
+ $(READLINE_CFLAGS)
+ BUILT_SOURCES =
+
++if WITH_GNUTLS
++virsh_LDADD += ../src/libvirt-net-rpc.la \
++ ../gnulib/lib/libgnu.la \
++ $(NULL)
++endif
++
+ if WITH_WIN_ICON
+ virsh_LDADD += virsh_win_icon.$(OBJEXT)
+
+--
+1.9.1
+
OpenPOWER on IntegriCloud