Merge "QEMU update with VENOM (CVE-2015-3456) patch" into 5.0.2
[packages/centos6/qemu.git] / 0125-Add-ability-to-force-enable-disable-of-tools-build.patch
1 From d9f498f4b7b7ca2ff96b4d87827713caea3743b5 Mon Sep 17 00:00:00 2001
2 From: "Daniel P. Berrange" <berrange@redhat.com>
3 Date: Mon, 10 Sep 2012 12:26:29 +0100
4 Subject: [PATCH] Add ability to force enable/disable of tools build
5
6 The qemu-img, qemu-nbd and qemu-io tools are built conditionally
7 based on whether any softmmu target is enabled. These are useful
8 self-contained tools which can be used in many other scenarios.
9 Add new --enable-tools/--disable-tools args to configure to allow
10 the user to explicitly turn on / off their build. The default
11 behaviour is now to build these tools are all times, regardless
12 of whether any softmmu target is enabled
13
14 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
15 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
16 (cherry picked from commit 4b1c11fd20e8901f04a2d9c225cd10fc05a762ff)
17
18 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
19 ---
20  configure | 21 +++++++++++++++------
21  1 file changed, 15 insertions(+), 6 deletions(-)
22
23 diff --git a/configure b/configure
24 index d01f9dc..a8061c1 100755
25 --- a/configure
26 +++ b/configure
27 @@ -225,6 +225,7 @@ usb_redir=""
28  opengl=""
29  zlib="yes"
30  guest_agent="yes"
31 +want_tools="yes"
32  libiscsi=""
33  coroutine=""
34  seccomp=""
35 @@ -857,6 +858,10 @@ for opt do
36    ;;
37    --disable-guest-agent) guest_agent="no"
38    ;;
39 +  --enable-tools) want_tools="yes"
40 +  ;;
41 +  --disable-tools) want_tools="no"
42 +  ;;
43    --enable-seccomp) seccomp="yes"
44    ;;
45    --disable-seccomp) seccomp="no"
46 @@ -3017,9 +3022,14 @@ fi
47  qemu_confdir=$sysconfdir$confsuffix
48  qemu_datadir=$datadir$confsuffix
49  
50 -tools=
51 -if test "$softmmu" = yes ; then
52 +tools=""
53 +if test "$want_tools" = "yes" ; then
54    tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
55 +  if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
56 +    tools="qemu-nbd\$(EXESUF) $tools"
57 +  fi
58 +fi
59 +if test "$softmmu" = yes ; then
60    if test "$virtfs" != no ; then
61      if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
62        virtfs=yes
63 @@ -3033,14 +3043,13 @@ if test "$softmmu" = yes ; then
64      fi
65    fi
66    if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
67 -      tools="qemu-nbd\$(EXESUF) $tools"
68      if [ "$guest_agent" = "yes" ]; then
69        tools="qemu-ga\$(EXESUF) $tools"
70      fi
71    fi
72 -fi
73 -if test "$smartcard_nss" = "yes" ; then
74 -  tools="vscclient\$(EXESUF) $tools"
75 +  if test "$smartcard_nss" = "yes" ; then
76 +    tools="vscclient\$(EXESUF) $tools"
77 +  fi
78  fi
79  
80  # Mac OS X ships with a broken assembler
81 -- 
82 1.7.12.1
83