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