From: Shaun Tancheff Date: Tue, 6 Feb 2024 07:44:13 +0000 (+0700) Subject: LU-17507 build: Allow symlink in mofed default path X-Git-Tag: 2.15.62~182 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F53934%2F3;p=fs%2Flustre-release.git LU-17507 build: Allow symlink in mofed default path 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 Change-Id: I5d54f9b0a70db52c4be6a9a6ccaed2c59185098b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53934 Tested-by: Shuichi Ihara Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Petros Koutoupis Reviewed-by: Oleg Drokin --- diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 49303f3..c3b3f4f 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -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 diff --git a/lustre.spec.in b/lustre.spec.in index a534703..df06893 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -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