Whamcloud - gitweb
LU-3466 iokit: Make lustre-iokit a subpackage of lustre
[fs/lustre-release.git] / contrib / lbuild / lbuild
index 17f62b5..575bd37 100755 (executable)
@@ -748,39 +748,6 @@ do_patch_linux() {
 
 }
 
-build_iokit() {
-    local rpmbuildopt="$1"
-
-    pushd lustre-iokit > /dev/null || return 255
-
-    if ! ./configure; then
-        echo "failed to configure in lustre-iokit"
-        popd >/dev/null # pushd lustre-iokit
-        return 255
-    fi
-
-    if ! make dist; then
-        echo "failed to make dist in lustre-iokit"
-        popd >/dev/null # pushd lustre-iokit
-        return 255
-    fi
-
-    if ! $RPMBUILD $rpmbuildopt lustre-iokit*.tar.gz \
-        --define "_tmppath /var/tmp" \
-        --define "_topdir $TOPDIR" 2>&1; then
-        popd >/dev/null # pushd lustre-iokit
-        return 255
-    fi
-
-    if $DO_SRC && ! $RPMBUILD -ts lustre-iokit*.tar.gz \
-            --define "_tmppath /var/tmp" \
-            --define "_topdir $TOPDIR" 2>&1; then
-            popd >/dev/null # pushd lustre-iokit
-            return 255
-    fi
-    popd >/dev/null # pushd lustre-iokit
-}
-
 build_lustre() {
     local linux="$1"
     local linuxobj="$2"
@@ -818,14 +785,6 @@ build_lustre() {
         fi
     fi
 
-    if $IOKITRPM; then
-        if ! build_iokit $rpmbuildopt; then
-            echo "failed to build lustre-iokit"
-            popd >/dev/null # pushd lustre
-            return 255
-        fi
-    fi
-
     # convert the $PATCHLESS boolean to an empty/not-empty boolean
     # as silly as this seems, it makes the syntax of the rpmbuild command
     # simpler and not need an eval to deal with the quotes in the quotes
@@ -840,6 +799,11 @@ build_lustre() {
         lustre_tests="no"
     fi
 
+    local lustre_iokit=""
+    if ! $IOKITRPM; then
+        lustre_iokit="no"
+    fi
+
     local osd_zfs=""
     if $OSDZFSRPM; then
         osd_zfs="yes"
@@ -853,6 +817,7 @@ build_lustre() {
     $RPMBUILD $targets $rpmbuildopt "$LUSTRE" \
         ${is_patchless:+--without servers} \
         ${lustre_tests:+--without lustre_tests} \
+        ${lustre_iokit:+--without lustre_iokit} \
         ${osd_zfs:+--with zfs} \
         ${osd_ldiskfs:+--with ldiskfs} \
         ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
@@ -867,6 +832,7 @@ build_lustre() {
         if ! $RPMBUILD -ts "$LUSTRE" \
                  ${is_patchless:+--without servers} \
                  ${lustre_tests:+--without lustre_tests} \
+                 ${lustre_iokit:+--without lustre_iokit} \
                  ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
                  --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \
                  --define "kdir $linux" \