From 1a8c125e39f1a96c1afcbd5fac88c34e92d63eff Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 14 Jul 2017 08:40:55 -0400 Subject: [PATCH] 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 --- config/lustre-build-linux.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index dcee98c..8895e96 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -210,7 +210,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 -- 1.8.3.1