Whamcloud - gitweb
LU-5866 build: add option to disable zfs build 76/12576/8
authorWang Shilong <wshilong@ddn.com>
Mon, 10 Nov 2014 12:51:30 +0000 (20:51 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Dec 2014 13:42:38 +0000 (13:42 +0000)
add option --disable-zfs to disable build zfs for Lustre.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: Ie7c1c5d0417979f61f0294390377eaebc36fd320
Reviewed-on: http://review.whamcloud.com/12576
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/lbuild/lbuild
contrib/lbuild/lbuild-rhel5
contrib/lbuild/lbuild-sles11

index 5087043..a0da907 100755 (executable)
@@ -71,6 +71,7 @@ OSDLDISKFSRPM=true
 OSDZFSRPM=false
 SMPTYPES="smp bigsmp default ''"
 PATCHLESS=false
+WITH_ZFS=""
 XEN=false
 LINUXOBJ=
 DISTRO=
@@ -187,6 +188,9 @@ Usage: ${0##*/} [OPTION]... [-- <lustre configure options>]
     Specifies that the files generated do not include timestamps, and
     that this is an official release.
 
+  --disable-zfs
+    Build Lustre without ZFS.
+
   --src
     Build a .src.rpm, a full kernel patch, and a patched kernel tarball.
 
@@ -964,7 +968,7 @@ build_lustre() {
     # These are required prior to the building of lustre server. Client does
     # not require spl/zfs. Use !PATCHLESS to indicate server which follows the
     # line above so is at least consistant.
-    if [ $PATCHLESS == false ] && [ "x$ZFSNOTSUPPORTED" == "x" ]; then
+    if [ $PATCHLESS == false ] && [ "x$WITH_ZFS" == "x" ]; then
         if ! build_spl_zfs; then
             popd >/dev/null # pushd lustre
             return 255
@@ -1962,7 +1966,7 @@ set -E
 
 [ -r ~/.lbuildrc ] && . ~/.lbuildrc
 
-options=$(getopt -o D:h -l kerneltree:,distro:,kernelrpm:,reusebuild:,patchless,ccache,norpm,external-patches:,timestamp:,extraversion:,kerneldir:,linux:,lustre:,nodownload,nosrc,noiokit,ofed-version:,mpss-version:,publish,release,set-value:,src,stage:,target:,target-archs:,with-linux:,xen -- "$@")
+options=$(getopt -o D:h -l kerneltree:,distro:,kernelrpm:,reusebuild:,patchless,ccache,norpm,external-patches:,timestamp:,extraversion:,kerneldir:,linux:,lustre:,nodownload,nosrc,noiokit,ofed-version:,mpss-version:,publish,disable-zfs,release,set-value:,src,stage:,target:,target-archs:,with-linux:,xen -- "$@")
 
 if [ $? != 0 ]; then
     usage 1
@@ -2067,6 +2071,10 @@ while [ "$1" ]; do
         --publish)
             shift
             ;;
+       --disable-zfs)
+           WITH_ZFS="no"
+           shift
+           ;;
         --release)
             RELEASE=true
             shift
@@ -2162,7 +2170,7 @@ if [ -n "$MPSS_VERSION" ]; then
     PATCHLESS=true
     IOKITRPM=false
     LDISKFSRPM=false
-    ZFSNOTSUPPORTED="yes"
+    WITH_ZFS="no"
 
     # define variables for cross compilation:
     CROSS_SUFFIX="-mic"
index 25c374f..887dd56 100644 (file)
@@ -7,9 +7,9 @@
 # distributions, update the BUILD_GEN variable in build/lbuild)
 BUILD_GEN+=".0"
 
-# This distro does not support zfs, so define ZFSNOTSUPPORTED
+# This distro does not support zfs, so define WITH_ZFS
 # use words that make the bash log readable.
-ZFSNOTSUPPORTED="Zfs Not Supported"
+WITH_ZFS="Zfs Not Supported"
 
 source ${LBUILD_DIR}/lbuild-rhel
 
index a404a8c..6d37a85 100644 (file)
@@ -5,9 +5,9 @@
 # build on all distributions, update the BUILD_GEN variable in build/lbuild)
 BUILD_GEN+=".0"
 
-# This distro does not support zfs, so define ZFSNOTSUPPORTED
+# This distro does not support zfs, so define WITH_ZFS
 # use words that make the bash log readable.
-ZFSNOTSUPPORTED="Zfs Not Supported"
+WITH_ZFS="Zfs Not Supported"
 
 source ${LBUILD_DIR}/lbuild-sles