From 0c46ba62efb35b31bb826e5898ffa6e52768e7fa Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Tue, 14 May 2024 10:50:20 -0700 Subject: [PATCH] LU-17850 build: prefer LINUXRELEASE over uname -r 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. Change-Id: Iaa48027f5ae873e1298695a264db1c351d9eac5c Test-Parameters: trivial Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55108 Tested-by: jenkins Tested-by: Maloo Reviewed-by: ake sandgren Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- lustre.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre.spec.in b/lustre.spec.in index bb64629..386a7ec 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -67,7 +67,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' -- 1.8.3.1