From: Wang Shilong Date: Mon, 10 Nov 2014 12:51:30 +0000 (+0800) Subject: LU-5866 build: add option to disable zfs build X-Git-Tag: 2.6.91~2 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2e0a32f853b1ab4eac9f97d3f45e5f4cdfd3343a LU-5866 build: add option to disable zfs build add option --disable-zfs to disable build zfs for Lustre. Signed-off-by: Wang Shilong Change-Id: Ie7c1c5d0417979f61f0294390377eaebc36fd320 Reviewed-on: http://review.whamcloud.com/12576 Tested-by: Jenkins Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 5087043..a0da907 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -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]... [-- ] 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" diff --git a/contrib/lbuild/lbuild-rhel5 b/contrib/lbuild/lbuild-rhel5 index 25c374f..887dd56 100644 --- a/contrib/lbuild/lbuild-rhel5 +++ b/contrib/lbuild/lbuild-rhel5 @@ -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 diff --git a/contrib/lbuild/lbuild-sles11 b/contrib/lbuild/lbuild-sles11 index a404a8c..6d37a85 100644 --- a/contrib/lbuild/lbuild-sles11 +++ b/contrib/lbuild/lbuild-sles11 @@ -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