5 # $4 : $kernel_source_dir
10 if [ $1 = "lustre-client" ] ; then
11 SERVER="--disable-server"
14 SPL_VERSION=$(dkms status -m spl -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
15 if [ -z $SPL_VERSION ] ; then
16 echo "spl-dkms package must already be installed and built under DKMS control"
19 ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
20 if [ -z $ZFS_VERSION ] ; then
21 echo "zfs-dkms package must already be installed and built under DKMS control"
25 SERVER="--enable-server --disable-ldiskfs --with-linux=$4 --with-linux-obj=$4 \
26 --with-spl=$6/spl-${SPL_VERSION} \
27 --with-spl-obj=$7/spl/${SPL_VERSION}/$3/$5 \
28 --with-zfs=$6/zfs-${ZFS_VERSION} \
29 --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
31 KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
34 PACKAGE_CONFIG="/etc/sysconfig/lustre"
36 [[ -r ${PACKAGE_CONFIG} ]] \
37 && source ${PACKAGE_CONFIG} \
38 && shopt -q -s extglob \
41 if [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]]
43 echo --disable-libcfs-cdebug
45 if [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]]
47 echo --disable-libcfs-trace
49 if [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]]
51 echo --disable-libcfs-assert
56 rpm -qa | grep krb5-devel >/dev/null
63 # run a configure pass to clean "--enable-dist" only effect and also to
64 # ensure local/on-target environment to be taken into account for
65 # dkms.mkconf script customizations and before next build/MAKE step
66 ./configure --prefix=/usr --enable-modules --disable-iokit --disable-snmp \
67 --disable-doc --disable-utils --disable-tests --disable-maintainer-mode \
68 $KERNEL_STUFF $GSS $SERVER $DKMS_CONFIG_OPTS \
69 --disable-manpages --disable-dlc
72 echo "configure error, check $7/$1/$2/build/config.log"
76 # now re-create dkms.conf based on configure result, to set accurate Lustre
77 # modules names that will be built and their future install locations, for
78 # next DKMS module install step
79 lustre/scripts/dkms.mkconf -n $1 -v $2 -f $6/$1-$2/dkms.conf