|
|
b1bdcf |
%global pkg isci
|
|
|
b1bdcf |
|
|
|
76e4c8 |
%global kernel_version 5.14.0-2.el9
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%global _use_internal_dependency_generator 0
|
|
|
b1bdcf |
%global __find_requires %{nil}
|
|
|
b1bdcf |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%global debug_package %{nil}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%global __spec_install_post \
|
|
|
b1bdcf |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
b1bdcf |
%{__arch_install_post} \
|
|
|
b1bdcf |
%{__os_install_post} \
|
|
|
b1bdcf |
%{__mod_compress_install_post}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Name: kmod-%{pkg}
|
|
|
b1bdcf |
Version: 5.14
|
|
|
76e4c8 |
Release: 2%{?dist}
|
|
|
b1bdcf |
Summary: Intel(R) C600 Series Chipset SAS Controller (%{pkg}) driver
|
|
|
b1bdcf |
|
|
|
b1bdcf |
License: GPLv2 and (BSD or GPLv2)
|
|
|
b1bdcf |
URL: https://www.kernel.org/
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
b1bdcf |
|
|
|
b1bdcf |
ExclusiveArch: x86_64
|
|
|
b1bdcf |
|
|
|
b1bdcf |
BuildRequires: elfutils-libelf-devel
|
|
|
b1bdcf |
BuildRequires: gcc
|
|
|
b1bdcf |
BuildRequires: kmod
|
|
|
b1bdcf |
BuildRequires: make
|
|
|
b1bdcf |
BuildRequires: redhat-rpm-config
|
|
|
b1bdcf |
BuildRequires: xz
|
|
|
b1bdcf |
|
|
|
b1bdcf |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
b1bdcf |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Requires: kernel-core = %{kernel_version}
|
|
|
b1bdcf |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
Requires: kernel-modules = %{kernel_version}
|
|
|
b1bdcf |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Provides: installonlypkg(kernel-module)
|
|
|
b1bdcf |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Requires(post): /usr/sbin/depmod
|
|
|
b1bdcf |
Requires(postun): /usr/sbin/depmod
|
|
|
b1bdcf |
|
|
|
b1bdcf |
Requires(post): /usr/bin/dracut
|
|
|
b1bdcf |
Requires(postun): /usr/bin/dracut
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%description
|
|
|
b1bdcf |
This driver supports the 6Gb/s SAS capabilities of the storage control unit
|
|
|
b1bdcf |
found in the Intel(R) C600 series chipset. Supported devices:
|
|
|
b1bdcf |
|
|
|
b1bdcf |
- 0x8086:0x1D60
|
|
|
b1bdcf |
- 0x8086:0x1D61
|
|
|
b1bdcf |
- 0x8086:0x1D62
|
|
|
b1bdcf |
- 0x8086:0x1D63
|
|
|
b1bdcf |
- 0x8086:0x1D64
|
|
|
b1bdcf |
- 0x8086:0x1D65
|
|
|
b1bdcf |
- 0x8086:0x1D66
|
|
|
b1bdcf |
- 0x8086:0x1D67
|
|
|
b1bdcf |
- 0x8086:0x1D68
|
|
|
b1bdcf |
- 0x8086:0x1D69
|
|
|
b1bdcf |
- 0x8086:0x1D6A
|
|
|
b1bdcf |
- 0x8086:0x1D6B
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%prep
|
|
|
b1bdcf |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%build
|
|
|
b1bdcf |
pushd src
|
|
|
b1bdcf |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
b1bdcf |
popd
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%install
|
|
|
b1bdcf |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
b1bdcf |
%{__install} -d %{buildroot}/%{_sysconfdir}/dracut.conf.d/
|
|
|
b1bdcf |
echo "add_drivers+=\" %{pkg} \"" > %{buildroot}/%{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
b1bdcf |
|
|
|
b1bdcf |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
b1bdcf |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%clean
|
|
|
b1bdcf |
%{__rm} -rf %{buildroot}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%post
|
|
|
b1bdcf |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b1bdcf |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%preun
|
|
|
b1bdcf |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b1bdcf |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%postun
|
|
|
b1bdcf |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
b1bdcf |
else
|
|
|
b1bdcf |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b1bdcf |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%posttrans
|
|
|
b1bdcf |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b1bdcf |
then
|
|
|
b1bdcf |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
b1bdcf |
else
|
|
|
b1bdcf |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b1bdcf |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b1bdcf |
fi
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%files
|
|
|
b1bdcf |
%defattr(644,root,root,755)
|
|
|
b1bdcf |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
b1bdcf |
%license COPYING
|
|
|
b1bdcf |
%config(noreplace) %{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
b1bdcf |
|
|
|
b1bdcf |
|
|
|
b1bdcf |
%changelog
|
|
|
76e4c8 |
* Wed Sep 15 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14-2
|
|
|
76e4c8 |
- Rebuild for 5.14.0-2.el9
|
|
|
76e4c8 |
|
|
|
b1bdcf |
* Sat Sep 04 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14-1
|
|
|
b1bdcf |
- Initial version
|