mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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 <v.mayatskih@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained 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
|
||||
|
||||
Reference in New Issue
Block a user