|
|
687889 |
%global pkg mpt3sas
|
|
|
687889 |
|
|
|
687889 |
%global kernel_version_min 4.18.0-310.el8
|
|
|
687889 |
|
|
|
687889 |
# To pick a specific kernel use `--define "kernel_version 4.18.0-315.el8"`
|
|
|
687889 |
# Otherwise the latest installed kernel-devel version later than
|
|
|
687889 |
# %%{kernel_version_min} will be used.
|
|
|
687889 |
|
|
|
687889 |
%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)
|
|
|
687889 |
|
|
|
687889 |
%if "%{kernel_version_latest}" != ""
|
|
|
687889 |
%{!?kernel_version:%{expand:%%global kernel_version %{kernel_version_latest}}}
|
|
|
687889 |
%endif
|
|
|
687889 |
|
|
|
687889 |
%global _use_internal_dependency_generator 0
|
|
|
687889 |
|
|
|
687889 |
%global debug_package %{nil}
|
|
|
687889 |
|
|
|
687889 |
%global __spec_install_post \
|
|
|
687889 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
687889 |
%{__arch_install_post} \
|
|
|
687889 |
%{__os_install_post} \
|
|
|
687889 |
%{__mod_compress_install_post}
|
|
|
687889 |
|
|
|
687889 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
Name: kmod-%{pkg}
|
|
|
687889 |
Version: 4.18.0
|
|
|
687889 |
Release: 310%{?dist}
|
|
|
687889 |
Summary: LSI MPT Fusion SAS 3.0 Device (%{pkg}) driver
|
|
|
687889 |
|
|
|
687889 |
License: GPLv2
|
|
|
687889 |
URL: https://www.kernel.org/
|
|
|
687889 |
|
|
|
687889 |
Source0: %{pkg}-%{kernel_version_min}.tar.xz
|
|
|
687889 |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
687889 |
|
|
|
687889 |
ExclusiveArch: x86_64 aarch64
|
|
|
687889 |
|
|
|
687889 |
BuildRequires: elfutils-libelf-devel
|
|
|
687889 |
BuildRequires: gcc
|
|
|
687889 |
BuildRequires: kernel-abi-whitelists
|
|
|
687889 |
BuildRequires: kernel-rpm-macros
|
|
|
687889 |
BuildRequires: kmod
|
|
|
687889 |
BuildRequires: make
|
|
|
687889 |
BuildRequires: redhat-rpm-config
|
|
|
687889 |
BuildRequires: xz
|
|
|
687889 |
|
|
|
687889 |
%{!?kernel_version:
|
|
|
687889 |
BuildRequires: kernel-devel >= %{kernel_version_min}
|
|
|
687889 |
}
|
|
|
687889 |
|
|
|
687889 |
%{?kernel_version:
|
|
|
687889 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
687889 |
|
|
|
687889 |
Supplements: kernel = %{kernel_version}
|
|
|
687889 |
|
|
|
687889 |
Requires: (kernel = %{kernel_version} if kernel)
|
|
|
687889 |
|
|
|
687889 |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
687889 |
}
|
|
|
687889 |
|
|
|
687889 |
Requires(post): /usr/sbin/depmod
|
|
|
687889 |
Requires(postun): /usr/sbin/depmod
|
|
|
687889 |
|
|
|
687889 |
Provides: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%description
|
|
|
687889 |
This package provides the LSI MPT Fusion SAS 3.0 Device (%{pkg}) driver.
|
|
|
687889 |
Compared to the in-kernel driver this driver re-enables support for deprecated
|
|
|
687889 |
mpt2sas adapters:
|
|
|
687889 |
|
|
|
687889 |
- 0x1000:0x0064: LSI SAS2116_1
|
|
|
687889 |
- 0x1000:0x0065: LSI SAS2116_2
|
|
|
687889 |
- 0x1000:0x0070: LSI SAS2004
|
|
|
687889 |
- 0x1000:0x0072: LSI SAS2008
|
|
|
687889 |
- 0x1000:0x0074: LSI SAS2108_1
|
|
|
687889 |
- 0x1000:0x0076: LSI SAS2108_2
|
|
|
687889 |
- 0x1000:0x0077: LSI SAS2108_3
|
|
|
687889 |
- 0x1000:0x007E: LSI SSS6200
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%prep
|
|
|
687889 |
%autosetup -p1 -n %{pkg}-%{kernel_version_min}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%build
|
|
|
687889 |
pushd src
|
|
|
687889 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
687889 |
popd
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%install
|
|
|
687889 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
687889 |
|
|
|
687889 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
687889 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%clean
|
|
|
687889 |
%{__rm} -rf %{buildroot}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%post
|
|
|
687889 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%postun
|
|
|
687889 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%files
|
|
|
687889 |
%defattr(644,root,root,755)
|
|
|
687889 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
687889 |
%license COPYING
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%changelog
|
|
|
687889 |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18-310
|
|
|
687889 |
- Initial version
|