|
|
e28196 |
%global pkg mptsas
|
|
|
e28196 |
|
|
|
e28196 |
%global driver_version 5.14.0-1.el9
|
|
|
e28196 |
|
|
|
e28196 |
%global kernel_version 5.14.0-1.el9
|
|
|
e28196 |
|
|
|
e28196 |
%global _use_internal_dependency_generator 0
|
|
|
e28196 |
%global __find_requires %{nil}
|
|
|
e28196 |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
e28196 |
|
|
|
e28196 |
%global debug_package %{nil}
|
|
|
e28196 |
|
|
|
e28196 |
%global __spec_install_post \
|
|
|
e28196 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
e28196 |
%{__arch_install_post} \
|
|
|
e28196 |
%{__os_install_post} \
|
|
|
e28196 |
%{__mod_compress_install_post}
|
|
|
e28196 |
|
|
|
e28196 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
Name: kmod-%{pkg}
|
|
|
e28196 |
Version: 5.14.0
|
|
|
e28196 |
Release: 1%{?dist}
|
|
|
e28196 |
Summary: Fusion MPT SAS Host (%{pkg}) driver
|
|
|
e28196 |
|
|
|
e28196 |
License: GPLv2
|
|
|
e28196 |
URL: https://www.kernel.org/
|
|
|
e28196 |
|
|
|
e28196 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
e28196 |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
e28196 |
Patch2: 0002-remove-unsupported-warning.patch
|
|
|
e28196 |
|
|
|
e28196 |
ExclusiveArch: x86_64 aarch64
|
|
|
e28196 |
|
|
|
e28196 |
BuildRequires: elfutils-libelf-devel
|
|
|
e28196 |
BuildRequires: gcc
|
|
|
e28196 |
BuildRequires: kmod
|
|
|
e28196 |
BuildRequires: make
|
|
|
e28196 |
BuildRequires: redhat-rpm-config
|
|
|
e28196 |
BuildRequires: xz
|
|
|
e28196 |
|
|
|
e28196 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
e28196 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
e28196 |
|
|
|
e28196 |
Requires: kernel-core = %{kernel_version}
|
|
|
e28196 |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
e28196 |
Requires: kernel-modules = %{kernel_version}
|
|
|
e28196 |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
e28196 |
|
|
|
e28196 |
Provides: installonlypkg(kernel-module)
|
|
|
e28196 |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
e28196 |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
e28196 |
|
|
|
e28196 |
Requires(post): /usr/sbin/depmod
|
|
|
e28196 |
Requires(postun): /usr/sbin/depmod
|
|
|
e28196 |
|
|
|
e28196 |
Requires(post): /usr/bin/dracut
|
|
|
e28196 |
Requires(postun): /usr/bin/dracut
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%description
|
|
|
e28196 |
This package provides the Fusion MPT SAS Host (%{pkg}) driver. Compared to the
|
|
|
e28196 |
in-kernel driver this driver is not restricted to the virtualization use case.
|
|
|
e28196 |
It supports the following adapters:
|
|
|
e28196 |
|
|
|
e28196 |
- 0x1000:0x0050: LSI SAS1064
|
|
|
e28196 |
- 0x1000:0x0054: LSI SAS1068
|
|
|
e28196 |
- 0x1000:0x0056: LSI SAS1064E
|
|
|
e28196 |
- 0x1000:0x0058: LSI SAS1068E
|
|
|
e28196 |
- 0x1000:0x0059: LSI SAS1068_820XELP
|
|
|
e28196 |
- 0x1000:0x0062: LSI SAS1078
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%prep
|
|
|
e28196 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%build
|
|
|
e28196 |
pushd src
|
|
|
e28196 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
e28196 |
popd
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%install
|
|
|
e28196 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/message/fusion src/%{pkg}.ko
|
|
|
e28196 |
|
|
|
e28196 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
e28196 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%clean
|
|
|
e28196 |
%{__rm} -rf %{buildroot}
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%post
|
|
|
e28196 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
e28196 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%preun
|
|
|
e28196 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
e28196 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%postun
|
|
|
e28196 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
e28196 |
then
|
|
|
e28196 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
e28196 |
then
|
|
|
e28196 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
e28196 |
then
|
|
|
e28196 |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
e28196 |
then
|
|
|
e28196 |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
e28196 |
then
|
|
|
e28196 |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
e28196 |
else
|
|
|
e28196 |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
e28196 |
fi
|
|
|
e28196 |
fi
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
e28196 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%posttrans
|
|
|
e28196 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
e28196 |
then
|
|
|
e28196 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
e28196 |
then
|
|
|
e28196 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
e28196 |
then
|
|
|
e28196 |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
e28196 |
then
|
|
|
e28196 |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
e28196 |
then
|
|
|
e28196 |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
e28196 |
else
|
|
|
e28196 |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
e28196 |
fi
|
|
|
e28196 |
fi
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
e28196 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
e28196 |
fi
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%files
|
|
|
e28196 |
%defattr(644,root,root,755)
|
|
|
e28196 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
e28196 |
%license COPYING
|
|
|
e28196 |
|
|
|
e28196 |
|
|
|
e28196 |
%changelog
|
|
|
e28196 |
* Tue Aug 31 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0-1
|
|
|
e28196 |
- Initial version
|