|
|
687889 |
%global pkg mpt3sas
|
|
|
687889 |
|
|
|
93f672 |
%global driver_version 4.18.0-326.el8
|
|
|
687889 |
|
|
|
f43eec |
%global kernel_version 4.18.0-338.el8
|
|
|
687889 |
|
|
|
687889 |
%global _use_internal_dependency_generator 0
|
|
|
47980d |
%global __find_requires %{nil}
|
|
|
fe99c5 |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
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
|
|
|
f43eec |
Release: 338%{?dist}
|
|
|
687889 |
Summary: LSI MPT Fusion SAS 3.0 Device (%{pkg}) driver
|
|
|
687889 |
|
|
|
687889 |
License: GPLv2
|
|
|
687889 |
URL: https://www.kernel.org/
|
|
|
687889 |
|
|
|
93f672 |
Source0: %{pkg}-%{driver_version}.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: kmod
|
|
|
687889 |
BuildRequires: make
|
|
|
687889 |
BuildRequires: redhat-rpm-config
|
|
|
687889 |
BuildRequires: xz
|
|
|
687889 |
|
|
|
687889 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
3994a4 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
a19e16 |
Requires: kernel-core = %{kernel_version}
|
|
|
3994a4 |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
3230f9 |
Requires: kernel-modules = %{kernel_version}
|
|
|
3994a4 |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
ecb4db |
Provides: installonlypkg(kernel-module)
|
|
|
b1a0be |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
6bf572 |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
687889 |
|
|
|
687889 |
Requires(post): /usr/sbin/depmod
|
|
|
687889 |
Requires(postun): /usr/sbin/depmod
|
|
|
687889 |
|
|
|
f94e2b |
Requires(post): /usr/bin/dracut
|
|
|
f94e2b |
Requires(postun): /usr/bin/dracut
|
|
|
f94e2b |
|
|
|
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
|
|
|
93f672 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
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
|
|
|
5c5027 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
5c5027 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
5c5027 |
|
|
|
5c5027 |
|
|
|
5c5027 |
%preun
|
|
|
5c5027 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
5c5027 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%postun
|
|
|
5c5027 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
5c5027 |
then
|
|
|
5c5027 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
5c5027 |
then
|
|
|
5c5027 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
5c5027 |
fi
|
|
|
5c5027 |
|
|
|
f94e2b |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
f94e2b |
then
|
|
|
f94e2b |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
f94e2b |
then
|
|
|
f94e2b |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f94e2b |
then
|
|
|
f94e2b |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
f94e2b |
else
|
|
|
f94e2b |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
|
|
|
5c5027 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
5c5027 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
5c5027 |
fi
|
|
|
5c5027 |
|
|
|
5c5027 |
|
|
|
5c5027 |
%posttrans
|
|
|
5c5027 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
5c5027 |
then
|
|
|
5c5027 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
5c5027 |
then
|
|
|
5c5027 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
5c5027 |
fi
|
|
|
5c5027 |
|
|
|
f94e2b |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
f94e2b |
then
|
|
|
f94e2b |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
f94e2b |
then
|
|
|
f94e2b |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f94e2b |
then
|
|
|
f94e2b |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
f94e2b |
else
|
|
|
f94e2b |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
fi
|
|
|
f94e2b |
|
|
|
5c5027 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
5c5027 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
5c5027 |
fi
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%files
|
|
|
687889 |
%defattr(644,root,root,755)
|
|
|
687889 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
687889 |
%license COPYING
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%changelog
|
|
|
f43eec |
* Mon Aug 30 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-338
|
|
|
f43eec |
- Set specific kernel version to use
|
|
|
f43eec |
- Rename kernel_version_min to driver_version
|
|
|
f43eec |
- Add Provides kernel-modules
|
|
|
f43eec |
- Rebuild for 4.18.0-338.el8
|
|
|
f43eec |
|
|
|
17462a |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-331
|
|
|
17462a |
- Rebuild for 4.18.0-331.el8
|
|
|
17462a |
|
|
|
8e666f |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
43c940 |
- Update to 4.18.0-326.el8
|
|
|
8e666f |
- Fix provides/requires
|
|
|
8e666f |
- Fix kernel dependencies
|
|
|
8e666f |
- Add convenient provides kmod-aacraid-`uname -r`
|
|
|
8e666f |
- Fix installonlypkg detection
|
|
|
8e666f |
- Recreate source tarballs
|
|
|
8e666f |
- Rebuild for dist = .el8s
|
|
|
8e666f |
|
|
|
8e666f |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-310
|
|
|
687889 |
- Initial version
|