From: Brian J. Murrell Date: Fri, 14 Jul 2017 12:40:55 +0000 (-0400) Subject: LU-9775 Look for kernel-devel in /usr/src/kernels X-Git-Tag: 2.10.1-RC1~84 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ad7e776c076108dfa2b64120cd80c8adb5dafda2 LU-9775 Look for kernel-devel in /usr/src/kernels If one is building in a build [ch]root such as mock provides, one may not have the kernel installed which corresponds to $(uname -r). In such a case, also try to look for the kernel-devel in /usr/src/kernels/ and just build for the latest one. Ideally there is only one installed in any case. Test-Parameters: trivial Signed-off-by: Brian J. Murrell Change-Id: I7704c6ce7078a507fd6b5f9178b07f750dc03789 Reviewed-on: https://review.whamcloud.com/28064 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index 1224fdb..260047c 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -175,7 +175,7 @@ AC_DEFUN([LB_ARG_CANON_PATH], [ # Find paths for linux, handling kernel-source rpms # AC_DEFUN([LB_LINUX_PATH], [ -for DEFAULT_LINUX in /lib/modules/$(uname -r)/{source,build} /usr/src/linux; do +for DEFAULT_LINUX in /lib/modules/$(uname -r)/{source,build} /usr/src/linux $(find /usr/src/kernels/ -maxdepth 1 -name @<:@0-9@:>@\* | xargs -r ls -d | tail -n 1); do AS_IF([readlink -q -e $DEFAULT_LINUX >/dev/null], [break]) done if test "$DEFAULT_LINUX" = "/lib/modules/$(uname -r)/source"; then