|
|
687889 |
%global pkg mpt3sas
|
|
|
687889 |
|
|
|
f84bcb |
%global driver_version 4.18.0-310.el8
|
|
|
687889 |
|
|
|
f84bcb |
%global kernel_version 4.18.0-315.el8
|
|
|
687889 |
|
|
|
687889 |
%global _use_internal_dependency_generator 0
|
|
|
78f51c |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
78f51c |
%global __find_provides /usr/lib/rpm/redhat/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}
|
|
|
83daa2 |
Version: 4.18.0~310
|
|
|
83daa2 |
Release: 1%{?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
|
|
|
78f51c |
BuildRequires: kernel-rpm-macros
|
|
|
687889 |
BuildRequires: kmod
|
|
|
687889 |
BuildRequires: make
|
|
|
687889 |
BuildRequires: redhat-rpm-config
|
|
|
687889 |
BuildRequires: xz
|
|
|
687889 |
|
|
|
78f51c |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
687889 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
3994a4 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
78f51c |
Requires: kernel >= %{kernel_version}
|
|
|
78f51c |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
78f51c |
Requires: kernel-modules >= %{kernel_version}
|
|
|
78f51c |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
ecb4db |
Provides: installonlypkg(kernel-module)
|
|
|
78f51c |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
687889 |
|
|
|
78f51c |
Requires(post): %{_sbindir}/depmod
|
|
|
78f51c |
Requires(postun): %{_sbindir}/depmod
|
|
|
687889 |
|
|
|
78f51c |
Requires(post): %{_sbindir}/weak-modules
|
|
|
78f51c |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
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 |
|
|
|
78f51c |
# Generate depmod.conf
|
|
|
78f51c |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
78f51c |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
78f51c |
do
|
|
|
78f51c |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
78f51c |
done
|
|
|
78f51c |
|
|
|
687889 |
|
|
|
687889 |
%clean
|
|
|
687889 |
%{__rm} -rf %{buildroot}
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%post
|
|
|
5c5027 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
78f51c |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
5c5027 |
|
|
|
5c5027 |
|
|
|
5c5027 |
%preun
|
|
|
5c5027 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
78f51c |
rpm -ql kmod-%{pkg}-%{?epoch:%{epoch}:}%{version}-%{release}.%{_arch} | grep '/lib/modules/%{kernel_version}.%{_arch}/.*\.ko\.xz$' >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%postun
|
|
|
78f51c |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
5c5027 |
then
|
|
|
78f51c |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
78f51c |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
5c5027 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
78f51c |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
5c5027 |
fi
|
|
|
5c5027 |
|
|
|
5c5027 |
|
|
|
78f51c |
%pretrans -p <lua>
|
|
|
78f51c |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
78f51c |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
78f51c |
|
|
|
78f51c |
|
|
|
5c5027 |
%posttrans
|
|
|
78f51c |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
5c5027 |
then
|
|
|
78f51c |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
78f51c |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
5c5027 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
78f51c |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
5c5027 |
fi
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%files
|
|
|
687889 |
%defattr(644,root,root,755)
|
|
|
687889 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
687889 |
%license COPYING
|
|
|
78f51c |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
687889 |
|
|
|
687889 |
|
|
|
687889 |
%changelog
|
|
|
83daa2 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0~310-1
|
|
|
83daa2 |
- Add driver release number to version
|
|
|
83daa2 |
|
|
|
f84bcb |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-350
|
|
|
f84bcb |
- Use release number independent of kernel
|
|
|
f84bcb |
- Build 4.18.0-310.el8 for 4.18.0-315.el8
|
|
|
f84bcb |
|
|
|
78f51c |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-348
|
|
|
78f51c |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-326.el8)
|
|
|
78f51c |
|
|
|
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
|