|
|
3e045e |
%global pkg mptsas
|
|
|
3e045e |
|
|
|
5ef591 |
%global kernel_version_min 4.18.0-326.el8
|
|
|
3e045e |
|
|
|
3e045e |
# To pick a specific kernel use `--define "kernel_version 4.18.0-315.el8"`
|
|
|
3e045e |
# Otherwise the latest installed kernel-devel version later than
|
|
|
3e045e |
# %%{kernel_version_min} will be used.
|
|
|
3e045e |
|
|
|
3e045e |
%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)
|
|
|
3e045e |
|
|
|
3e045e |
%if "%{kernel_version_latest}" != ""
|
|
|
3e045e |
%{!?kernel_version:%{expand:%%global kernel_version %{kernel_version_latest}}}
|
|
|
3e045e |
%endif
|
|
|
3e045e |
|
|
|
3e045e |
%global _use_internal_dependency_generator 0
|
|
|
3e045e |
|
|
|
3e045e |
%global debug_package %{nil}
|
|
|
3e045e |
|
|
|
3e045e |
%global __spec_install_post \
|
|
|
3e045e |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
3e045e |
%{__arch_install_post} \
|
|
|
3e045e |
%{__os_install_post} \
|
|
|
3e045e |
%{__mod_compress_install_post}
|
|
|
3e045e |
|
|
|
3e045e |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
Name: kmod-%{pkg}
|
|
|
3e045e |
Version: 4.18.0
|
|
|
5ef591 |
Release: 326%{?dist}
|
|
|
3e045e |
Summary: Fusion MPT SAS Host (%{pkg}) driver
|
|
|
3e045e |
|
|
|
3e045e |
License: GPLv2
|
|
|
3e045e |
URL: https://www.kernel.org/
|
|
|
3e045e |
|
|
|
3e045e |
Source0: %{pkg}-%{kernel_version_min}.tar.xz
|
|
|
3e045e |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
3e045e |
|
|
|
3e045e |
ExclusiveArch: x86_64 aarch64
|
|
|
3e045e |
|
|
|
3e045e |
BuildRequires: elfutils-libelf-devel
|
|
|
3e045e |
BuildRequires: gcc
|
|
|
3e045e |
BuildRequires: kernel-abi-whitelists
|
|
|
3e045e |
BuildRequires: kernel-rpm-macros
|
|
|
3e045e |
BuildRequires: kmod
|
|
|
3e045e |
BuildRequires: make
|
|
|
3e045e |
BuildRequires: redhat-rpm-config
|
|
|
3e045e |
BuildRequires: xz
|
|
|
3e045e |
|
|
|
3e045e |
%{!?kernel_version:
|
|
|
3e045e |
BuildRequires: kernel-devel >= %{kernel_version_min}
|
|
|
3e045e |
}
|
|
|
3e045e |
|
|
|
3e045e |
%{?kernel_version:
|
|
|
3e045e |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
3e045e |
|
|
|
3e045e |
Supplements: kernel = %{kernel_version}
|
|
|
3e045e |
|
|
|
3e045e |
Requires: (kernel = %{kernel_version} if kernel)
|
|
|
3e045e |
|
|
|
3e045e |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
3e045e |
}
|
|
|
3e045e |
|
|
|
3e045e |
Requires(post): /usr/sbin/depmod
|
|
|
3e045e |
Requires(postun): /usr/sbin/depmod
|
|
|
3e045e |
|
|
|
3e045e |
Provides: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%description
|
|
|
3e045e |
This package provides the Fusion MPT SAS Host (%{pkg}) driver. Compared to the
|
|
|
3e045e |
in-kernel driver this driver is not restricted to the virtualization use case.
|
|
|
3e045e |
It supports the following adapters:
|
|
|
3e045e |
|
|
|
3e045e |
- 0x1000:0x0050: LSI SAS1064
|
|
|
3e045e |
- 0x1000:0x0054: LSI SAS1068
|
|
|
3e045e |
- 0x1000:0x0056: LSI SAS1064E
|
|
|
3e045e |
- 0x1000:0x0058: LSI SAS1068E
|
|
|
3e045e |
- 0x1000:0x0059: LSI SAS1068_820XELP
|
|
|
3e045e |
- 0x1000:0x0062: LSI SAS1078
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%prep
|
|
|
3e045e |
%autosetup -p1 -n %{pkg}-%{kernel_version_min}
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%build
|
|
|
3e045e |
pushd src
|
|
|
3e045e |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
3e045e |
popd
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%install
|
|
|
3e045e |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/message/fusion src/%{pkg}.ko
|
|
|
3e045e |
|
|
|
3e045e |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
3e045e |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%clean
|
|
|
3e045e |
%{__rm} -rf %{buildroot}
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%post
|
|
|
3e045e |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%postun
|
|
|
3e045e |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%files
|
|
|
3e045e |
%defattr(644,root,root,755)
|
|
|
3e045e |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
3e045e |
%license COPYING
|
|
|
3e045e |
|
|
|
3e045e |
|
|
|
3e045e |
%changelog
|
|
|
5ef591 |
* Thu Jul 29 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
5ef591 |
- Update to 4.18.0-326.el8
|
|
|
5ef591 |
|
|
|
3e045e |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18-293
|
|
|
3e045e |
- Initial version
|