From b24509aa7e7540b8ab1186ed97a7c586d4ced1a9 Mon Sep 17 00:00:00 2001 From: Peter Georg Date: Aug 30 2021 12:38:28 +0000 Subject: Set specific kernel version to use --- diff --git a/SPECS/kmod-sata_sil24.spec b/SPECS/kmod-sata_sil24.spec index ace5d78..37492af 100644 --- a/SPECS/kmod-sata_sil24.spec +++ b/SPECS/kmod-sata_sil24.spec @@ -1,16 +1,6 @@ %global pkg sata_sil24 -%global kernel_version_min 4.18.0-80.el8 - -# To pick a specific kernel use `--define "kernel_version 4.18.0-315.el8"` -# Otherwise the latest installed kernel-devel version later than -# %%{kernel_version_min} will be used. - -%global kernel_version_latest %({ echo %{kernel_version_min}; rpm --query kernel-devel --queryformat '%%{VERSION}-%%{RELEASE}\\\n' | grep -v "package kernel-devel is not installed"; } | sort -V | sed -e '0,/^%{kernel_version_min}$/d' | tail -n 1) - -%if "%{kernel_version_latest}" != "" -%{!?kernel_version:%{expand:%%global kernel_version %{kernel_version_latest}}} -%endif +%global kernel_version 4.18.0-305.12.1.el8_4 %global _use_internal_dependency_generator 0 %global __find_requires %{nil} @@ -46,11 +36,6 @@ BuildRequires: make BuildRequires: redhat-rpm-config BuildRequires: xz -%{!?kernel_version: -BuildRequires: kernel-devel >= %{kernel_version_min} -} - -%{?kernel_version: BuildRequires: kernel-devel = %{kernel_version} BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch} @@ -61,7 +46,6 @@ Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch} Provides: installonlypkg(kernel-module) Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} -} Requires(post): /usr/sbin/depmod Requires(postun): /usr/sbin/depmod