Whamcloud - gitweb
LU-17507 build: Allow symlink in mofed default path 34/53934/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 6 Feb 2024 07:44:13 +0000 (14:44 +0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Feb 2024 07:16:16 +0000 (07:16 +0000)
A default installation is for /usr/src/ofa_kernel/default
to be a symlink, it is also the default place users expect
to find the MOFED kernel development headers.

Explicitly pass -H to find to allow the command line
arguments to find be symlinks.

Test-Parameters: trivial
Fixes: 3c66185c84 ("LU-17398 build: detect mlnx-ofa_kernel-devel contents")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I5d54f9b0a70db52c4be6a9a6ccaed2c59185098b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53934
Tested-by: Shuichi Ihara <sihara@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
contrib/lbuild/lbuild
lustre.spec.in

index 49303f3..c3b3f4f 100755 (executable)
@@ -1734,7 +1734,7 @@ build_ofed() {
                fatal 1 "could not unpack the $rpm."
        fi
        # find the path (this might not work for ofa and ifs)
-       o2ib_location=$(find $(pwd)/usr/src/${kib_prefix} -type d -name ofed_scripts)
+       o2ib_location=$(find -H $(pwd)/usr/src/${kib_prefix} -type d -name ofed_scripts)
        CONFIGURE_FLAGS="--with-o2ib=$(dirname ${o2ib_location}) ${CONFIGURE_FLAGS}"
        popd >/dev/null
 
index a534703..df06893 100644 (file)
@@ -635,7 +635,7 @@ fi
 
 WITH_O2IB=""
 %if %{with mofed}
-       o2ib_path=$(find %{mofed_default_path} -type d -name ofed_scripts | xargs dirname)
+       o2ib_path=$(find -H %{mofed_default_path} -type d -name ofed_scripts | xargs dirname)
        if [ -z "$o2ib_path" ]; then
                echo "ERROR: could not find OFED devel headers"
                exit 1