Whamcloud - gitweb
EX-2596 build: add ddn tag to build MOFED
authorMinh Diep <mdiep@whamcloud.com>
Thu, 11 Feb 2021 05:12:58 +0000 (21:12 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 6 Mar 2021 20:51:24 +0000 (20:51 +0000)
We need to add ddn tag to MOFED kmod build
to indicate that kmod-mlnx-ofed_kernel is different
from the stock version

Test-Parameters: trivial

Change-Id: Ibc8b95c228afa921cedbc30d74196754e0f0cc24
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/41879
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
contrib/lbuild/lbuild

index f6b4fda..77b4e36 100755 (executable)
@@ -1338,13 +1338,14 @@ EOF
                        fatal 1 "Error building ${kib_rpm}"
                fi
                ;;
-               mlnx)
+               mlnx) local DDNTAG=$(echo ${linuxrelease//.${TARGET_ARCH}} | awk -F '_' '{print $2}')
                if ! $RPMBUILD $BUILD_TYPE \
                        ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
                        --define "_topdir ${TOPDIR}" --target ${TARGET_ARCH} \
                        --define "KVERSION ${linuxrelease}" \
                        --define "KMP 1" \
                        --define "$K_SRC ${linux}" \
+                       ${DDNTAG:+--define "_dist _${DDNTAG}"} \
                        ${OFA_KERNEL_RELEASE:+--define "_release $OFA_KERNEL_RELEASE"} \
                        ${SOURCE} 2>&1; then
                        fatal 1 "Error building ${kib_rpm}"