|
|
66dd61 |
%global pkg mptspi
|
|
|
66dd61 |
|
|
|
2862ee |
%global driver_version 4.18.0-80.el8
|
|
|
66dd61 |
|
|
|
477750 |
%global kernel_version 4.18.0-338.el8
|
|
|
66dd61 |
|
|
|
66dd61 |
%global _use_internal_dependency_generator 0
|
|
|
3c477a |
%global __find_requires %{nil}
|
|
|
f00f16 |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
66dd61 |
|
|
|
66dd61 |
%global debug_package %{nil}
|
|
|
66dd61 |
|
|
|
66dd61 |
%global __spec_install_post \
|
|
|
66dd61 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
66dd61 |
%{__arch_install_post} \
|
|
|
66dd61 |
%{__os_install_post} \
|
|
|
66dd61 |
%{__mod_compress_install_post}
|
|
|
66dd61 |
|
|
|
66dd61 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
Name: kmod-%{pkg}
|
|
|
66dd61 |
Version: 4.18.0
|
|
|
477750 |
Release: 338%{?dist}
|
|
|
66dd61 |
Summary: Fusion MPT SPI Host (%{pkg}) driver
|
|
|
66dd61 |
|
|
|
66dd61 |
License: GPLv2
|
|
|
66dd61 |
URL: https://www.kernel.org/
|
|
|
66dd61 |
|
|
|
2862ee |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
66dd61 |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
66dd61 |
|
|
|
66dd61 |
ExclusiveArch: x86_64 aarch64
|
|
|
66dd61 |
|
|
|
66dd61 |
BuildRequires: elfutils-libelf-devel
|
|
|
66dd61 |
BuildRequires: gcc
|
|
|
66dd61 |
BuildRequires: kmod
|
|
|
66dd61 |
BuildRequires: make
|
|
|
66dd61 |
BuildRequires: redhat-rpm-config
|
|
|
66dd61 |
BuildRequires: xz
|
|
|
66dd61 |
|
|
|
66dd61 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
93e98c |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
66dd61 |
|
|
|
f74135 |
Requires: kernel-core = %{kernel_version}
|
|
|
93e98c |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
e60d7e |
Requires: kernel-modules = %{kernel_version}
|
|
|
93e98c |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
66dd61 |
|
|
|
125b9b |
Provides: installonlypkg(kernel-module)
|
|
|
ddb182 |
Provides: kernel-modules = %{kernel_version}
|
|
|
4563c8 |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
66dd61 |
|
|
|
66dd61 |
Requires(post): /usr/sbin/depmod
|
|
|
66dd61 |
Requires(postun): /usr/sbin/depmod
|
|
|
66dd61 |
|
|
|
daed2c |
Requires(post): /usr/bin/dracut
|
|
|
daed2c |
Requires(postun): /usr/bin/dracut
|
|
|
daed2c |
|
|
|
66dd61 |
|
|
|
66dd61 |
%description
|
|
|
66dd61 |
This package provides the Fusion MPT SPI Host (%{pkg}) driver. Compared to the
|
|
|
66dd61 |
in-kernel driver this driver is not restricted to the virtualization use case.
|
|
|
66dd61 |
It supports the following adapters:
|
|
|
66dd61 |
|
|
|
66dd61 |
- 0x1000:0x0030: LSI 53C1020/53C1020A/53C1030
|
|
|
66dd61 |
- 0x1000:0x0040: LSI 53C1035
|
|
|
66dd61 |
- 0x117C:0x0030: ATTO UL4D
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%prep
|
|
|
2862ee |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%build
|
|
|
66dd61 |
pushd src
|
|
|
66dd61 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
66dd61 |
popd
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%install
|
|
|
66dd61 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/message/fusion src/%{pkg}.ko
|
|
|
66dd61 |
|
|
|
66dd61 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
66dd61 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%clean
|
|
|
66dd61 |
%{__rm} -rf %{buildroot}
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%post
|
|
|
38b0b6 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
38b0b6 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
38b0b6 |
|
|
|
38b0b6 |
|
|
|
38b0b6 |
%preun
|
|
|
38b0b6 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
38b0b6 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%postun
|
|
|
38b0b6 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
38b0b6 |
then
|
|
|
38b0b6 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
38b0b6 |
then
|
|
|
38b0b6 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
38b0b6 |
fi
|
|
|
38b0b6 |
|
|
|
daed2c |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
daed2c |
then
|
|
|
daed2c |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
daed2c |
then
|
|
|
daed2c |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
daed2c |
then
|
|
|
daed2c |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
daed2c |
else
|
|
|
daed2c |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
daed2c |
fi
|
|
|
daed2c |
fi
|
|
|
daed2c |
fi
|
|
|
daed2c |
|
|
|
38b0b6 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
38b0b6 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
38b0b6 |
fi
|
|
|
38b0b6 |
|
|
|
38b0b6 |
|
|
|
38b0b6 |
%posttrans
|
|
|
38b0b6 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
38b0b6 |
then
|
|
|
38b0b6 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
38b0b6 |
then
|
|
|
38b0b6 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
38b0b6 |
fi
|
|
|
38b0b6 |
|
|
|
daed2c |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
daed2c |
then
|
|
|
daed2c |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
daed2c |
then
|
|
|
daed2c |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
daed2c |
then
|
|
|
daed2c |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
daed2c |
else
|
|
|
daed2c |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
daed2c |
fi
|
|
|
daed2c |
fi
|
|
|
daed2c |
fi
|
|
|
daed2c |
|
|
|
38b0b6 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
38b0b6 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
38b0b6 |
fi
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%files
|
|
|
66dd61 |
%defattr(644,root,root,755)
|
|
|
66dd61 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
66dd61 |
%license COPYING
|
|
|
66dd61 |
|
|
|
66dd61 |
|
|
|
66dd61 |
%changelog
|
|
|
477750 |
* Mon Aug 30 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-338
|
|
|
477750 |
- Set specific kernel version to use
|
|
|
477750 |
- Rename kernel_version_min to driver_version
|
|
|
477750 |
- Add Provides kernel-modules
|
|
|
477750 |
- Rebuild for 4.18.0-338.el8
|
|
|
477750 |
|
|
|
9b6803 |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-331
|
|
|
9b6803 |
- Rebuild for 4.18.0-331.el8
|
|
|
9b6803 |
|
|
|
c6a7ab |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
4868b0 |
- Rebuild for 4.18.0-326.el8
|
|
|
c6a7ab |
- Fix provides/requires
|
|
|
c6a7ab |
- Fix kernel dependencies
|
|
|
c6a7ab |
- Add convenient provides kmod-aacraid-`uname -r`
|
|
|
c6a7ab |
- Fix installonlypkg detection
|
|
|
c6a7ab |
- Recreate source tarballs
|
|
|
c6a7ab |
- Rebuild for dist = .el8s
|
|
|
4868b0 |
|
|
|
d4d9f0 |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-80
|
|
|
66dd61 |
- Initial version
|