From 42cd180a9e436aab28cbbdfc0e4f26fdb925c889 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 28 Aug 2015 17:04:04 +0000 Subject: [PATCH] scst.spec: Fix code for determining kernel RPM version I hit couple of issues in scst.spec.in: 1. krpmver sets to oldest available kernel rpm version (RedHat/Fedora typically keeps 3 kernels), that causes rpm dependency on a wrong kernel version 2. if system has a newer kernel version installed but not booted into it yet, build goes against currently running kernel version, disrespecting what KVER is set to. Signed-off-by: Vitaly Mayatskih git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6490 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scst.spec.in b/scst.spec.in index dbea39d35..e1a21f0a4 100644 --- a/scst.spec.in +++ b/scst.spec.in @@ -9,7 +9,7 @@ %{!?kversion:%define kversion %{expand:%%( if rpm --quiet -q kernel-headers; then rpm -q --qf '%%%%{version}-%%%%{release}.%%%%{arch}\\n' \\ - kernel-headers | head -n1; + kernel-headers | tail -n1; else uname -r; fi @@ -104,9 +104,9 @@ Authors: %setup -q -n %{kmod_name}-%{version} %build -make 2release export KVER=%{kversion} PREFIX=%{_prefix} export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y +make 2release for d in scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local srpt; do %{make} -C $d done