Whamcloud - gitweb
LU-12678 socklnd: initialize the_ksocklnd at compile-time.
[fs/lustre-release.git] / lustre-dkms_pre-build.sh
index c7b5a1c..eea05e2 100755 (executable)
@@ -7,29 +7,42 @@
 # $6 : $source_tree
 # $7 : $dkms_tree
 
-if [ $1 = "lustre-client" ] ; then
+case $1 in
+    lustre-client)
        SERVER="--disable-server"
        KERNEL_STUFF=""
-else
-       SPL_VERSION=$(dkms status -m spl -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
-       if [ -z $SPL_VERSION ] ; then
-               echo "spl-dkms package must already be installed and built under DKMS control"
-               exit 1
+       ;;
+
+    lustre-zfs|lustre-all)
+       LDISKFS=""
+       if [ "$1" == "lustre-zfs" ]; then
+           LDISKFS="--disable-ldiskfs"
        fi
+
+       # ZFS and SPL are version locked
        ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
        if [ -z $ZFS_VERSION ] ; then
                echo "zfs-dkms package must already be installed and built under DKMS control"
                exit 1
        fi
 
-       SERVER="--enable-server --disable-ldiskfs --with-linux=$4 --with-linux-obj=$4 \
-              --with-spl=$6/spl-${SPL_VERSION} \
-              --with-spl-obj=$7/spl/${SPL_VERSION}/$3/$5 \
-              --with-zfs=$6/zfs-${ZFS_VERSION} \
-              --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
+       SERVER="--enable-server $LDISKFS \
+               --with-linux=$4 --with-linux-obj=$4 \
+               --with-spl=$6/spl-${ZFS_VERSION} \
+               --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
+               --with-zfs=$6/zfs-${ZFS_VERSION} \
+               --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
 
        KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
-fi
+       ;;
+
+    lustre-ldiskfs)
+       SERVER="--enable-server --without-zfs --without-spl \
+               --with-linux=$4 --with-linux-obj=$4"
+
+       KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
+       ;;
+esac
 
 PACKAGE_CONFIG="/etc/sysconfig/lustre"
 DKMS_CONFIG_OPTS=$(
@@ -66,14 +79,9 @@ fi
 ./configure --prefix=/usr --enable-modules --disable-iokit --disable-snmp \
        --disable-doc --disable-utils --disable-tests --disable-maintainer-mode \
        $KERNEL_STUFF $GSS $SERVER $DKMS_CONFIG_OPTS \
-       --disable-manpages --disable-dlc
+       --disable-manpages --disable-mpitests
 
 if [ $? != 0 ] ; then
        echo "configure error, check $7/$1/$2/build/config.log"
        exit 1
 fi
-
-# now re-create dkms.conf based on configure result, to set accurate Lustre
-# modules names that will be built and their future install locations, for
-# next DKMS module install step
-lustre/scripts/dkms.mkconf -n $1 -v $2 -f $6/$1-$2/dkms.conf