summaryrefslogtreecommitdiffstats
path: root/recipes-extended/libvirt/libvirt/tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch
blob: 821af909cbb06365ded18521956837605546c837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
From 70700ad6bf2db2ba8e169168f225458743b90f86 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>
---
 examples/domain-events/events-c/Makefile.am |    6 ++++++
 examples/dominfo/Makefile.am                |    7 +++++++
 examples/domsuspend/Makefile.am             |    7 +++++++
 examples/hellolibvirt/Makefile.am           |    7 +++++++
 examples/openauth/Makefile.am               |    6 ++++++
 tools/Makefile.am                           |   13 +++++++++++++
 6 files changed, 46 insertions(+)

diff --git a/examples/domain-events/events-c/Makefile.am b/examples/domain-events/events-c/Makefile.am
index 0646aee..6b2f5bd 100644
--- a/examples/domain-events/events-c/Makefile.am
+++ b/examples/domain-events/events-c/Makefile.am
@@ -21,3 +21,9 @@ event_test_CFLAGS = $(WARN_CFLAGS)
 event_test_SOURCES = event-test.c
 event_test_LDADD = $(top_builddir)/src/libvirt.la \
 		 $(top_builddir)/gnulib/lib/libgnu.la
+
+if WITH_GNUTLS
+event_test_LDADD += ../../../src/libvirt-net-rpc.la \
+                    ../../../gnulib/lib/libgnu.la
+endif
+
diff --git a/examples/dominfo/Makefile.am b/examples/dominfo/Makefile.am
index 4a30c77..99b3e17 100644
--- a/examples/dominfo/Makefile.am
+++ b/examples/dominfo/Makefile.am
@@ -23,3 +23,10 @@ noinst_PROGRAMS=info1
 info1_SOURCES=info1.c
 info1_LDFLAGS=
 info1_LDADD= $(LDADDS)
+
+if WITH_GNUTLS
+info1_LDADD += $(top_builddir)/src/libvirt-net-rpc.la  \
+               $(top_builddir)/gnulib/lib/libgnu.la    \
+               $(NULL)
+endif
+
diff --git a/examples/domsuspend/Makefile.am b/examples/domsuspend/Makefile.am
index d0d9368..e368ffa 100644
--- a/examples/domsuspend/Makefile.am
+++ b/examples/domsuspend/Makefile.am
@@ -23,3 +23,10 @@ noinst_PROGRAMS=suspend
 suspend_SOURCES=suspend.c
 suspend_LDFLAGS=
 suspend_LDADD= $(LDADDS)
+
+if WITH_GNUTLS
+suspend_LDADD += $(top_builddir)/src/libvirt-net-rpc.la  \
+                 $(top_builddir)/gnulib/lib/libgnu.la    \
+                 $(NULL)
+endif
+
diff --git a/examples/hellolibvirt/Makefile.am b/examples/hellolibvirt/Makefile.am
index 060cc71..d6ff30a 100644
--- a/examples/hellolibvirt/Makefile.am
+++ b/examples/hellolibvirt/Makefile.am
@@ -19,3 +19,10 @@ noinst_PROGRAMS = hellolibvirt
 hellolibvirt_CFLAGS = $(WARN_CFLAGS)
 hellolibvirt_SOURCES = hellolibvirt.c
 hellolibvirt_LDADD = $(top_builddir)/src/libvirt.la
+
+if WITH_GNUTLS
+hellolibvirt_LDADD += $(top_builddir)/src/libvirt-net-rpc.la  \
+                      $(top_builddir)/gnulib/lib/libgnu.la    \
+                      $(NULL)
+endif
+
diff --git a/examples/openauth/Makefile.am b/examples/openauth/Makefile.am
index 1eb23fc..4d076f1 100644
--- a/examples/openauth/Makefile.am
+++ b/examples/openauth/Makefile.am
@@ -19,3 +19,9 @@ noinst_PROGRAMS = openauth
 openauth_CFLAGS = $(WARN_CFLAGS)
 openauth_SOURCES = openauth.c
 openauth_LDADD = $(top_builddir)/src/libvirt.la
+if WITH_GNUTLS
+openauth_LDADD += $(top_builddir)/src/libvirt-net-rpc.la  \
+                  $(top_builddir)/gnulib/lib/libgnu.la    \
+                  $(NULL)
+endif
+
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 1dac7c1..c4c6f72 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -121,6 +121,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 = \
 		$(WARN_CFLAGS)					\
 		$(PIE_CFLAGS)					\
@@ -162,6 +169,12 @@ virsh_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.7.10.4