# Define the kmod package name here. %define kmod_name sata_sil %{!?kmod_kernel_version: %define kmod_kernel_version 4.18.0-32.el8} # If kversion isn't defined on the rpmbuild line, define it here. %{!?kversion: %define kversion 4.18.0-32.el8.%{_target_cpu}} Name: %{kmod_name}-kmod #Version: 4.18.0.107 Version: 4.18.0.32 Release: 1%{?dist} Group: System Environment/Kernel License: GPLv2 Summary: %{kmod_name} kernel module(s) URL: http://www.intel.com/ BuildRequires: redhat-rpm-config ExclusiveArch: x86_64 #BuildRequires: kernel-devel elfutils-libelf-devel BuildRequires: kernel-devel = 4.18.0-32.el8 elfutils-libelf-devel Provides: kernel-modules >= %{kmod_kernel_version}.%{_arch} # Sources. Source0: linux-%{kmod_kernel_version}.tar.xz Source10: kmodtool-el8.sh # Magic hidden here. %{expand:%(sh %{SOURCE10} rpmtemplate %{kmod_name} %{kversion} "")} # Disable the building of the debug package(s). %define debug_package %{nil} %description This package provides the sata_sil kernel module as it was removed from centos 8 %prep %setup -q -n linux-%{kmod_kernel_version} echo "/usr/lib/rpm/redhat/find-requires | %{__sed} -e '/^ksym.*/d'" > filter-requires.sh echo "override sata_sil * weak-updates/sata_sil" > kmod-%{kmod_name}.conf %build %{__make} %{?_smp_mflags} -C %{_usrsrc}/kernels/%{kversion} modules M="$PWD/drivers/ata/" CONFIG_SATA_SIL=m %install %{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/ %{__install} drivers/ata/sata_sil.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/ %{__install} -d %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/ %{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/ %{__install} -d %{buildroot}%{_mandir}/man7/ # Set the module(s) to be executable, so that they will be stripped when packaged. find %{buildroot} -type f -name \*.ko -exec %{__chmod} u+x \{\} \; %clean %{__rm} -rf %{buildroot} %changelog * Sun Aug 25 2019 Nathan Coulson - 4.18.0.107-1 - Restore the sata_sil kernel module for centos 8