9ae3a8
From 5d5af5b18e07ef4c97a45feeaad3fe493d38f427 Mon Sep 17 00:00:00 2001
9ae3a8
From: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
Date: Wed, 6 Nov 2013 15:43:26 +0100
9ae3a8
Subject: [PATCH 60/81] Build ceph/rbd only for rhev
9ae3a8
9ae3a8
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
Message-id: <58854c39ceb485b1ea685c02398db4462493dd35.1383752552.git.mrezanin@redhat.com>
9ae3a8
Patchwork-id: 55544
9ae3a8
O-Subject: [RHEL7 qemu-kvm PATCH] Build ceph/rbd only for rhev
9ae3a8
Bugzilla: 987583
9ae3a8
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
9ae3a8
From: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=987583
9ae3a8
Brewbuild: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6536646 (RHEL)
9ae3a8
Brewbuild: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6536615 (RHEV)
9ae3a8
9ae3a8
We support ceph/rbd only for rhev qemu-kvm so it has to be disabled for rhel
9ae3a8
qemu-kvm. This patch forwardport RHEL-6 way of disabling rbd but use new
9ae3a8
way of handling introduced by Jeff Cody.
9ae3a8
9ae3a8
This patch is based on Jeff's "RHEL Storage Differentiation" series and should be
9ae3a8
applied with it. Both brew build include all 4 differentiation patches.
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/Makefile.objs           |  2 +-
9ae3a8
 configure                     | 11 +++++++++++
9ae3a8
 redhat/qemu-kvm.spec.template |  6 ++++++
9ae3a8
 3 files changed, 18 insertions(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/Makefile.objs           |    2 +-
9ae3a8
 configure                     |   11 +++++++++++
9ae3a8
 redhat/qemu-kvm.spec.template |    6 ++++++
9ae3a8
 3 files changed, 18 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/block/Makefile.objs b/block/Makefile.objs
9ae3a8
index f355271..41a284b 100644
9ae3a8
--- a/block/Makefile.objs
9ae3a8
+++ b/block/Makefile.objs
9ae3a8
@@ -12,7 +12,7 @@ ifeq ($(CONFIG_POSIX),y)
9ae3a8
 block-obj-y += nbd.o sheepdog.o
9ae3a8
 block-obj-$(CONFIG_LIBISCSI) += iscsi.o
9ae3a8
 block-obj-$(CONFIG_CURL) += curl.o
9ae3a8
-block-obj-y += rbd.o
9ae3a8
+block-obj-$(CONFIG_CEPH_SUPPORT) += rbd.o
9ae3a8
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
9ae3a8
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
9ae3a8
 endif
9ae3a8
diff --git a/configure b/configure
9ae3a8
index d658434..1af1079 100755
9ae3a8
--- a/configure
9ae3a8
+++ b/configure
9ae3a8
@@ -242,6 +242,7 @@ tpm="no"
9ae3a8
 libssh2=""
9ae3a8
 live_block_ops="yes"
9ae3a8
 live_block_migration="no"
9ae3a8
+ceph_support="yes"
9ae3a8
 
9ae3a8
 # parse CC options first
9ae3a8
 for opt do
9ae3a8
@@ -937,6 +938,10 @@ for opt do
9ae3a8
   ;;
9ae3a8
   --enable-live-block-migration) live_block_migration="yes"
9ae3a8
   ;;
9ae3a8
+  --disable-ceph-support) ceph_support=="no"
9ae3a8
+  ;;
9ae3a8
+  --enable-ceph-support) ceph_support=="yes"
9ae3a8
+  ;;
9ae3a8
 *) echo "ERROR: unknown option $opt"; show_help="yes"
9ae3a8
   ;;
9ae3a8
   esac
9ae3a8
@@ -1209,6 +1214,8 @@ echo "  --disable-live-block-ops disable live block operations support"
9ae3a8
 echo "  --enable-live-block-ops  enable live block operations support"
9ae3a8
 echo "  --disable-live-block-migration disable live block migration"
9ae3a8
 echo "  --enable-live-block-migration  enable live block migration"
9ae3a8
+echo "  --disable-ceph-support   disable support for rbd block driver support"
9ae3a8
+echo "  --enable-ceph-support    enable support for rbd block driver support"
9ae3a8
 echo ""
9ae3a8
 echo "NOTE: The object files are built at the place where configure is launched"
9ae3a8
 exit 1
9ae3a8
@@ -3964,6 +3971,10 @@ if test "$live_block_migration" = "yes" ; then
9ae3a8
   echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
9ae3a8
 fi
9ae3a8
 
9ae3a8
+if test "ceph_support" = "yes"; then
9ae3a8
+  echo "CONFIG_CEPH_SUPPORT=y" >> $config_host_mak
9ae3a8
+fi
9ae3a8
+
9ae3a8
 # USB host support
9ae3a8
 if test "$libusb" = "yes"; then
9ae3a8
   echo "HOST_USB=libusb legacy" >> $config_host_mak
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8