Whamcloud - gitweb
LU-17850 build: prefer LINUXRELEASE over uname -r 15/55115/3
authorJian Yu <yujian@whamcloud.com>
Wed, 15 May 2024 04:52:41 +0000 (21:52 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 18:21:26 +0000 (18:21 +0000)
In a container or chroot environment, "uname -r" reports
the host instead of the target kernel version. We should
use the LINUXRELEASE variable which is configured in
config/lustre-build-linux.m4 with the value from UTS_RELEASE.

Lustre-change: https://review.whamcloud.com/55108
Lustre-commit: 0c46ba62efb35b31bb826e5898ffa6e52768e7fa

Test-Parameters: trivial
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: Iaa48027f5ae873e1298695a264db1c351d9eac5c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55115
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre.spec.in

index 2678d60..1cc3222 100644 (file)
@@ -52,7 +52,7 @@
 
 %{!?version: %global version @VERSION@}
 # if you want a custom kernel version set it variable with $ver.$arch
-%{!?kver:    %global kver    %(uname -r)}
+%{!?kver:    %global kver    @LINUXRELEASE@}
 # cut epoch for kmodtool
 %define _kver %(echo %{kver} | sed -e 's/^[0-9]*://')
 # trust version from kdir - but it can lost 'epoch'