Whamcloud - gitweb
LU-2882 build: build broken with no zfs libraries installed
authorBruno Faccini <bruno.faccini@intel.com>
Sat, 9 Mar 2013 16:39:01 +0000 (17:39 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Mar 2013 22:32:06 +0000 (18:32 -0400)
Reverting default values (originaly set in LU-2391 patch) for
ldiskfs/zfs OSD RPMs builds, to comply for more ways
("rpmbuild -tb <lustre_source_tarball>") used to build Lustre.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I07eca22d03f597942284bbbc0bfd1b680ecb199b
Reviewed-on: http://review.whamcloud.com/5661
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
autoMakefile.am
build/lbuild
lustre.spec.in

index 883d13c..8a259bc 100644 (file)
@@ -136,11 +136,11 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
        if [[ "X$(BUILD_SERVER)" = Xfalse ]]; then \
                RPMARGS="$$RPMARGS --define \"lustre_name lustre-client\""; \
        fi; \
        if [[ "X$(BUILD_SERVER)" = Xfalse ]]; then \
                RPMARGS="$$RPMARGS --define \"lustre_name lustre-client\""; \
        fi; \
-       if [[ "X$(BUILD_OSD_LDISKFS)" = Xfalse ]]; then \
-               RPMARGS="$$RPMARGS --define \"build_lustre_osd_ldiskfs 0\""; \
+       if [[ "X$(BUILD_OSD_LDISKFS)" = Xtrue ]]; then \
+               RPMARGS="$$RPMARGS --define \"build_lustre_osd_ldiskfs 1\""; \
        fi; \
        fi; \
-       if [[ "X$(BUILD_OSD_ZFS)" = Xfalse ]]; then \
-               RPMARGS="$$RPMARGS --define \"build_lustre_osd_zfs 0\""; \
+       if [[ "X$(BUILD_OSD_ZFS)" = Xtrue ]]; then \
+               RPMARGS="$$RPMARGS --define \"build_lustre_osd_zfs 1\""; \
        fi; \
        echo "Building Lustre RPM with $$RPMARGS"; \
        eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
        fi; \
        echo "Building Lustre RPM with $$RPMARGS"; \
        eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
index bd5182e..faf56bc 100755 (executable)
@@ -68,6 +68,8 @@ USE_BUILD_CACHE=true
 NORPM=false
 IOKITRPM=true
 LDISKFSRPM=true
 NORPM=false
 IOKITRPM=true
 LDISKFSRPM=true
+OSDLDISKFSRPM=true
+OSDZFSRPM=false
 SKIPLDISKFSRPM="v1_4_* b1_4"
 SMPTYPES="smp bigsmp default ''"
 PATCHLESS=false
 SKIPLDISKFSRPM="v1_4_* b1_4"
 SMPTYPES="smp bigsmp default ''"
 PATCHLESS=false
@@ -942,9 +944,21 @@ build_lustre() {
         lustre_tests="no"
     fi
 
         lustre_tests="no"
     fi
 
+    local osd_zfs=""
+    if $OSDZFSRPM; then
+        osd_zfs="yes"
+    fi
+
+    local osd_ldiskfs=""
+    if $OSDLDISKFSRPM; then
+        osd_ldiskfs="yes"
+    fi
+
     $RPMBUILD $targets $rpmbuildopt "$LUSTRE" \
         ${is_patchless:+--define "lustre_name lustre-client"} \
         ${lustre_tests:+--define "build_lustre_tests 0"} \
     $RPMBUILD $targets $rpmbuildopt "$LUSTRE" \
         ${is_patchless:+--define "lustre_name lustre-client"} \
         ${lustre_tests:+--define "build_lustre_tests 0"} \
+        ${osd_zfs:+--define "build_lustre_osd_zfs 1"} \
+        ${osd_ldiskfs:+--define "build_lustre_osd_ldiskfs 1"} \
         ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
         --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \
         --define "kdir $linux" \
         ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
         --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \
         --define "kdir $linux" \
@@ -1080,6 +1094,8 @@ build_spl_zfs() {
         CONFIGURE_FLAGS="--with-$pkg=$(ls -d $TOPDIR/usr/src/$pkg-*/*) ${CONFIGURE_FLAGS}"
     done
 
         CONFIGURE_FLAGS="--with-$pkg=$(ls -d $TOPDIR/usr/src/$pkg-*/*) ${CONFIGURE_FLAGS}"
     done
 
+    OSDZFSRPM=true
+
     return 0
 }
 
     return 0
 }
 
index 5d02349..edd02f5 100644 (file)
@@ -20,8 +20,8 @@
 %{!?lustre_name: %global lustre_name lustre}
 %{!?build_lustre_tests: %global build_lustre_tests 1}
 
 %{!?lustre_name: %global lustre_name lustre}
 %{!?build_lustre_tests: %global build_lustre_tests 1}
 
-%{!?build_lustre_osd_ldiskfs: %global build_lustre_osd_ldiskfs 1}
-%{!?build_lustre_osd_zfs: %global build_lustre_osd_zfs 1}
+%{!?build_lustre_osd_ldiskfs: %global build_lustre_osd_ldiskfs 0}
+%{!?build_lustre_osd_zfs: %global build_lustre_osd_zfs 0}
 
 # in order to get kernel symset and/or kernel module dependencies into
 # the RPM, in order to support weak-modules, the internal dependency gen-
 
 # in order to get kernel symset and/or kernel module dependencies into
 # the RPM, in order to support weak-modules, the internal dependency gen-