From: Shaun Tancheff Date: Tue, 6 Feb 2024 18:48:44 +0000 (+0700) Subject: LU-17461 dkms: improve /etc/sysconfig/lustre X-Git-Tag: 2.15.64~133 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F53787%2F8;p=fs%2Flustre-release.git LU-17461 dkms: improve /etc/sysconfig/lustre Expand the features available in /etc/sysconfig/lustre to enable more flexability to dkms users. Providing y/n switches for common features: LUSTRE_DKMS_ENABLE_GSS=y/n LUSTRE_DKMS_ENABLE_GSS_KEYRING=y/n LUSTRE_DKMS_ENABLE_CRYPTO=y/n LUSTRE_DKMS_ENABLE_IOKIT=y/n As well as a catch-all to pass to configure: LUSTRE_DKMS_CONFIGURE_EXTRA='string passed to configure' Add suport for dpkg checking for libkrb5-dev to enable or disable gss by default, if it is not otherwise specifed. Test-Parameters: trivial HPE-bug-id: LUS-12097 Signed-off-by: Shaun Tancheff Change-Id: Id8dd17c867d9aeb1ec27632729433ba128dcfd0a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53787 Reviewed-by: Oleg Drokin Reviewed-by: Petros Koutoupis Reviewed-by: Caleb Carlson Tested-by: jenkins Tested-by: Maloo --- diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in index f3afa4a..f85a1fd 100644 --- a/debian/dkms.conf.in +++ b/debian/dkms.conf.in @@ -17,65 +17,148 @@ # PACKAGE_NAME="lustre-client-modules" +PACKAGE_CONFIG="/etc/sysconfig/lustre" PACKAGE_VERSION="@UPVERSION@" -# We need to run autogen.sh between builds, see Ubuntu bug #952817 -MAKE="bash autogen.sh && ./configure --with-linux=$kernel_source_dir --with-linux-obj=$kernel_source_dir --disable-server --disable-quilt --disable-dependency-tracking --disable-doc --disable-utils --disable-iokit --disable-tests --enable-quota --with-kmp-moddir=updates && make" +OPTS="" +if [[ "x${PACKAGE_NAME}" = "xlustre-client-modules" ]] ; then + OPTS="${OPTS} --disable-server --disable-quilt" +fi +OPTS="${OPTS} --disable-dependency-tracking --disable-doc" +OPTS="${OPTS} --disable-utils --disable-iokit --disable-tests" +OPTS="${OPTS} --enable-quota --with-kmp-moddir=updates" + +if [[ -r ${PACKAGE_CONFIG} ]] ; then + source ${PACKAGE_CONFIG} + shopt -q -s extglob + if [[ -n ${LUSTRE_DKMS_DISABLE_CDEBUG} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]] && + OPTS="${OPTS} --disable-libcfs-cdebug" || + OPTS="${OPTS} --enable-libcfs-cdebug" + fi + if [[ -n ${LUSTRE_DKMS_DISABLE_TRACE} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]] && + OPTS="${OPTS} --disable-libcfs-trace" || + OPTS="${OPTS} --enable-libcfs-trace" + fi + if [[ -n ${LUSTRE_DKMS_DISABLE_ASSERT} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]] && + OPTS="${OPTS} --disable-libcfs-assert" || + OPTS="${OPTS} --enable-libcfs-assert" + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_GSS} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_GSS,,} == @(y|yes) ]] && + OPTS="${OPTS} --enable-gss" || OPTS="${OPTS} --disable-gss" + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_GSS_KEYRING} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_GSS_KEYRING,,} == @(y|yes) ]] && + OPTS="${OPTS} --enable-gss-keyring" || + OPTS="${OPTS} --disable-gss-keyring" + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_CRYPTO} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_CRYPTO,,} == @(y|yes) ]] && + OPTS="${OPTS} --enable-crypto" || OPTS="${OPTS} --disable-crypto" + fi + [[ -n ${LUSTRE_DKMS_CONFIGURE_EXTRA} ]] && + OPTS="${OPTS} ${LUSTRE_DKMS_CONFIGURE_EXTRA}" +fi +echo "${OPTS} " | grep -E -q -- '--disable-gss[^-]|--enable-gss[^-]' || + dpkg -l | grep libkrb5-dev | grep -q ^ii && + OPTS="${OPTS} --enable-gss" || OPTS="${OPTS} --disable-gss" + +AUTOGEN="sh ./autogen.sh" +CONFIGURE="./configure --with-linux=$kernel_source_dir" +CONFIGURE="${CONFIGURE} --with-linux-obj=$kernel_source_dir ${OPTS}" + +# Note OPTS, AUTOGEN, CONFIGURE are not exposed to dkms parser + +MAKE="${AUTOGEN} && ${CONFIGURE} && make" CLEAN="make distclean || true" +NO_WEAK_MODULES="yes" AUTOINSTALL="yes" STRIP="no" -# Module names -BUILT_MODULE_NAME[0]="fid" -BUILT_MODULE_NAME[1]="fld" -BUILT_MODULE_NAME[2]="lmv" -BUILT_MODULE_NAME[3]="lov" -BUILT_MODULE_NAME[4]="lustre" -BUILT_MODULE_NAME[5]="mdc" -BUILT_MODULE_NAME[6]="mgc" -BUILT_MODULE_NAME[7]="obdclass" -BUILT_MODULE_NAME[8]="obdecho" -BUILT_MODULE_NAME[9]="osc" -BUILT_MODULE_NAME[10]="ptlrpc" -BUILT_MODULE_NAME[11]="ko2iblnd" -BUILT_MODULE_NAME[12]="ksocklnd" -BUILT_MODULE_NAME[13]="libcfs" -BUILT_MODULE_NAME[14]="lnet" -BUILT_MODULE_NAME[15]="lnet_selftest" - -# Location of the modules in the source tree after build -BUILT_MODULE_LOCATION[0]="lustre/fid" -BUILT_MODULE_LOCATION[1]="lustre/fld" -BUILT_MODULE_LOCATION[2]="lustre/lmv" -BUILT_MODULE_LOCATION[3]="lustre/lov" -BUILT_MODULE_LOCATION[4]="lustre/llite" -BUILT_MODULE_LOCATION[5]="lustre/mdc" -BUILT_MODULE_LOCATION[6]="lustre/mgc" -BUILT_MODULE_LOCATION[7]="lustre/obdclass" -BUILT_MODULE_LOCATION[8]="lustre/obdecho" -BUILT_MODULE_LOCATION[9]="lustre/osc" -BUILT_MODULE_LOCATION[10]="lustre/ptlrpc" -BUILT_MODULE_LOCATION[11]="lnet/klnds/o2iblnd" -BUILT_MODULE_LOCATION[12]="lnet/klnds/socklnd" -BUILT_MODULE_LOCATION[13]="libcfs/libcfs" -BUILT_MODULE_LOCATION[14]="lnet/lnet" -BUILT_MODULE_LOCATION[15]="lnet/selftest" - -# Final destination of the modules under /lib/modules// -DEST_MODULE_LOCATION[0]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[1]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[2]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[3]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[4]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[5]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[6]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[7]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[8]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[9]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[10]="/updates/kernel/fs/lustre" -DEST_MODULE_LOCATION[11]="/updates/kernel/net/lustre" -DEST_MODULE_LOCATION[12]="/updates/kernel/net/lustre" -DEST_MODULE_LOCATION[13]="/updates/kernel/net/lustre" -DEST_MODULE_LOCATION[14]="/updates/kernel/net/lustre" -DEST_MODULE_LOCATION[15]="/updates/kernel/net/lustre" +# Where modules are installed +kmoddir="updates/kernel" + +module() { + built_name=$1 + built_loc=$2 + dest=$3 + do_strip=$4 + + [[ -z $do_strip ]] && do_strip=${STRIP} + BUILT_MODULE_NAME[${#BUILT_MODULE_NAME[@]}]=${built_name} + BUILT_MODULE_LOCATION[${#BUILT_MODULE_LOCATION[@]}]=${built_loc}/ + DEST_MODULE_LOCATION[${#DEST_MODULE_LOCATION[@]}]="/updates/kernel/${dest}/" + STRIP[${#STRIP[@]}]=${do_strip} +} + +module libcfs libcfs/libcfs net/lustre +module lnet lnet/lnet net/lustre +module lnet_selftest lnet/selftest net/lustre +module ksocklnd lnet/klnds/socklnd net/lustre + +# Determine which, if any, o2ib to install: +can_o2ib_mofed=no +can_o2ib_in_kernel=no +ext_mofed=no +int_mofed=no +[[ -f ${kernel_source_dir}/include/rdma/rdma_cm.h ]] && +[[ -f ${kernel_source_dir}/include/rdma/ib_cm.h ]] && +[[ -f ${kernel_source_dir}/include/rdma/ib_verbs.h ]] && + can_o2ib_in_kernel=yes +# Now check if ext_o2ib is explicit, or will be auto-detected: +o2ib=$(echo ${OPTS} | tr ' ' '\\n' | grep -- '--with-o2ib=' | cut -c 13-) +if [[ "x$o2ib" = "xno" ]] ; then + can_o2ib_in_kernel=no +elif [[ -f $o2ib ]] ; then + # User specified path, if the build completes it will be ext_ofed + can_o2ib_mofed=yes + ext_mofed=yes +else + # could be either, ext_ofed will be preferred by default + if which ofed_info >/dev/null ; then + pkgs="mlnx-ofed-kernel-dkms|mlnx-ofed-kernel-modules|mlnx-ofa_kernel-devel" + pkgs="${pkgs}|compat-rdma-devel|kernel-ib-devel|ofa_kernel-devel" + paths=$(dpkg -l | awk '{print $2}' | + grep -E -w "${pkgs}" | xargs dpkg --listfiles 2>/dev/null | + grep -E '/ofa_kernel|/ofa_kernel/default|/openib' | + grep -v /ofed_scripts/ | head -n1) + if [[ -n "$paths" ]]; then + epaths=$(find $paths -name rdma_cm.h | + grep -F -e "$(uname -r)" -e default | + sed -e 's:/include/rdma/rdma_cm.h::') + if [ $(echo $epaths | wc -w) -eq 1 ]; then + can_o2ib_mofed=yes + ext_mofed=yes + fi + fi + fi +fi +[[ "x${ext_mofed}" = "xno" ]] && [[ x${can_o2ib_in_kernel} = "xyes" ]] && + int_mofed=yes + +if [ "x${ext_mofed}" = "xyes" ] ; then + module ko2iblnd lnet/klnds/o2iblnd net/lustre +elif [ "x${int_mofed}" = "xyes" ] ; then + module ko2iblnd lnet/klnds/in-kernel-o2iblnd net/lustre +fi + +module fid lustre/fid fs/lustre +module fld lustre/fld fs/lustre +module lmv lustre/lmv fs/lustre +module lov lustre/lov fs/lustre +module lustre lustre/llite fs/lustre +module mdc lustre/mdc fs/lustre +module mgc lustre/mgc fs/lustre +module obdclass lustre/obdclass fs/lustre +module obdecho lustre/obdecho fs/lustre +module osc lustre/osc fs/lustre +module ptlrpc lustre/ptlrpc fs/lustre + +# Lustre optional gss module: +if echo "${OPTS} " | grep -E -q -- '--enable-gss[^-]' ; then + module ptlrpc_gss lustre/ptlrpc/gss fs/lustre +fi diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 54a95a6..367006f 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -102,7 +102,8 @@ case $with_o2ib in O2IBDIR_PATH=$(eval $LIST_ALL_PKG | egrep -w "$O2IBPKG" | xargs $LSPKG | - egrep "${O2IBDIR}$" | head -n1) + egrep "${O2IBDIR}$" | + grep -v /ofed_scripts/ | head -n1) if test -n "$O2IBDIR_PATH"; then if test -d $O2IBDIR_PATH/${LINUXRELEASE}; then diff --git a/lustre-dkms_pre-build.sh b/lustre-dkms_pre-build.sh index 54f9cc4..56baef7 100755 --- a/lustre-dkms_pre-build.sh +++ b/lustre-dkms_pre-build.sh @@ -65,26 +65,51 @@ DKMS_CONFIG_OPTS=$( && shopt -q -s extglob \ && \ { - if [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]] - then - echo --disable-libcfs-cdebug - fi - if [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]] - then - echo --disable-libcfs-trace - fi - if [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]] - then - echo --disable-libcfs-assert - fi + if [[ -n ${LUSTRE_DKMS_DISABLE_CDEBUG} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_CDEBUG,,} == @(y|yes) ]] && + echo --disable-libcfs-cdebug || + echo --enable-libcfs-cdebug + fi + if [[ -n ${LUSTRE_DKMS_DISABLE_TRACE} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_TRACE,,} == @(y|yes) ]] && + echo --disable-libcfs-trace || + echo --enable-libcfs-trace + fi + if [[ -n ${LUSTRE_DKMS_DISABLE_ASSERT} ]] ; then + [[ ${LUSTRE_DKMS_DISABLE_ASSERT,,} == @(y|yes) ]] && + echo --disable-libcfs-assert || + echo --enable-libcfs-assert + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_GSS} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_GSS,,} == @(y|yes) ]] && + echo --enable-gss || + echo --disable-gss + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_GSS_KEYRING} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_GSS_KEYRING,,} == @(y|yes) ]] && + echo --enable-gss-keyring || + echo --disable-gss-keyring + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_CRYPTO} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_CRYPTO,,} == @(y|yes) ]] && + echo --enable-crypto || + echo --disable-crypto + fi + if [[ -n ${LUSTRE_DKMS_ENABLE_IOKIT} ]] ; then + [[ ${LUSTRE_DKMS_ENABLE_IOKIT,,} == @(y|yes) ]] && + echo --enable-iokit || + echo --disable-iokit + fi + [[ -n ${LUSTRE_DKMS_CONFIGURE_EXTRA} ]] && + echo ${LUSTRE_DKMS_CONFIGURE_EXTRA} } - ) +) -rpm -qa | grep krb5-devel >/dev/null -if [ $? == 0 ] ; then - GSS="--enable-gss" -else - GSS="--disable-gss" +echo "${DKMS_CONFIG_OPTS} " | grep -E -q -- '--disable-gss[^-]|--enable-gss[^-]' +if [ $? != 0 ] ; then + # User did not force, guess for rpm distros + rpm -qa | grep krb5-devel >/dev/null + [[ $? == 0 ]] && GSS="--enable-gss" || GSS="--disable-gss" fi # run a configure pass to clean "--enable-dist" only effect and also to diff --git a/lustre/scripts/dkms.mkconf b/lustre/scripts/dkms.mkconf index ce43653..b6b8f9b 100755 --- a/lustre/scripts/dkms.mkconf +++ b/lustre/scripts/dkms.mkconf @@ -36,128 +36,145 @@ BUILD_DEPENDS[0]="zfs" EOF fi cat >>${filename} </dev/null + [[ \$? == 0 ]] && + OPTS="\${OPTS} --enable-gss" || + OPTS="\${OPTS} --disable-gss" +fi + +# Determine which, if any, o2ib to install: +can_o2ib_mofed=no +can_o2ib_in_kernel=no +ext_mofed=no +int_mofed=no +[[ -f \${kernel_source_dir}/include/rdma/rdma_cm.h ]] && +[[ -f \${kernel_source_dir}/include/rdma/ib_cm.h ]] && +[[ -f \${kernel_source_dir}/include/rdma/ib_verbs.h ]] && + can_o2ib_in_kernel=yes +# Now check if ext_o2ib is explicit, or will be auto-detected: +o2ib=\$(echo \${OPTS} | tr ' ' '\\n' | grep -- '--with-o2ib=' | cut -c 13-) +if [[ "x\$o2ib" = "xno" ]] ; then + can_o2ib_in_kernel=no +elif [[ -f \$o2ib ]] ; then + # User specified path, if the build completes it will be ext_ofed + can_o2ib_mofed=yes + ext_mofed=yes +else + # could be either, ext_ofed will be preferred by default + if which ofed_info >/dev/null ; then + pkgs="mlnx-ofed-kernel-dkms|mlnx-ofed-kernel-modules|mlnx-ofa_kernel-devel" + pkgs="\${pkgs}|compat-rdma-devel|kernel-ib-devel|ofa_kernel-devel" + paths=\$(rpm -qa | + grep -E -w "\${pkgs}" | xargs rpm -ql 2>/dev/null | + grep -E '/ofa_kernel|/ofa_kernel/default|/openib' | + grep -v /ofed_scripts/ | head -n1) + if [[ -n "\$paths" ]]; then + epaths=\$(find \$paths -name rdma_cm.h | + grep -F -e "\$(uname -r)" -e default | + sed -e 's:/include/rdma/rdma_cm.h::') + if [[ \$(echo \$epaths | wc -w) -eq 1 ]]; then + can_o2ib_mofed=yes + ext_mofed=yes + fi + fi + fi +fi +[[ "x\${ext_mofed}" = "xno" ]] && [[ x\${can_o2ib_in_kernel} = "xyes" ]] && + int_mofed=yes + +module() { + local built_name=\$1 + local built_loc=\$2 + local dest=\$3 + local do_strip=\$4 + + [[ -z \$do_strip ]] && do_strip=\${strip_default} + BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="\${built_name}" + BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="\${built_loc}/" + DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/\${dest}/" + STRIP[\${#STRIP[@]}]=\${strip_default} +} # Common modules for both Client & Server -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="lnet_selftest" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lnet/selftest/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lnet/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="lnet" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lnet/lnet/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lnet/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="ksocklnd" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lnet/klnds/socklnd/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lnet/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="ko2iblnd" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lnet/klnds/o2iblnd/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lnet/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="libcfs" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="libcfs/libcfs/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="ptlrpc" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/ptlrpc/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="lov" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/lov/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="fld" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/fld/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="obdecho" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/obdecho/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="osc" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/osc/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="mgc" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/mgc/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="fid" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/fid/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="mdc" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/mdc/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="obdclass" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/obdclass/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="lmv" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/lmv/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="lustre" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/llite/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" -if \$( rpm -qa | grep -q krb5-devel ) ; then -BUILT_MODULE_NAME[\${#BUILT_MODULE_NAME[@]}]="ptlrpc_gss" -BUILT_MODULE_LOCATION[\${#BUILT_MODULE_LOCATION[@]}]="lustre/ptlrpc/gss/" -DEST_MODULE_LOCATION[\${#DEST_MODULE_LOCATION[@]}]="/${kmoddir}/lustre/" +module lnet_selftest lnet/selftest lnet +module lnet lnet/lnet lnet +module ksocklnd lnet/klnds/socklnd lnet +# in-kernel-o2ib or mofed +if [ "x\${ext_mofed}" = "xyes" ] ; then + module ko2iblnd lnet/klnds/o2iblnd lnet +elif [ "x\${int_mofed}" = "xyes" ] ; then + module ko2iblnd lnet/klnds/in-kernel-o2iblnd lnet +fi +module libcfs libcfs/libcfs lnet +module ptlrpc lustre/ptlrpc lustre +module lov lustre/lov lustre +module fld lustre/fld lustre +module obdecho lustre/obdecho lustre +module osc lustre/osc lustre +module mgc lustre/mgc lustre +module fid lustre/fid lustre +module mdc lustre/mdc lustre +module obdclass lustre/obdclass lustre +module lmv lustre/lmv lustre +module lustre lustre/llite lustre +echo "\${OPTS} " | grep -E -q -- '--enable-gss[^-]' +if [[ \$? -eq 0 ]] ; then + module ptlrpc_gss lustre/ptlrpc/gss fs/lustre fi EOF if [ $pkgname != "lustre-client" ] ; then cat >>${filename} <>${filename} <>${filename} <