|
|
b5727a |
%global pkg hpsa
|
|
|
b5727a |
|
|
|
b5727a |
%global driver_version 5.14.0-1.el9
|
|
|
b5727a |
|
|
|
5ee8e0 |
%global kernel_version 5.14.0-4.el9
|
|
|
b5727a |
|
|
|
b5727a |
%global _use_internal_dependency_generator 0
|
|
|
b5727a |
%global __find_requires %{nil}
|
|
|
b5727a |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
b5727a |
|
|
|
b5727a |
%global debug_package %{nil}
|
|
|
b5727a |
|
|
|
b5727a |
%global __spec_install_post \
|
|
|
b5727a |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
b5727a |
%{__arch_install_post} \
|
|
|
b5727a |
%{__os_install_post} \
|
|
|
b5727a |
%{__mod_compress_install_post}
|
|
|
b5727a |
|
|
|
b5727a |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
Name: kmod-%{pkg}
|
|
|
b5727a |
Version: 5.14.0
|
|
|
5ee8e0 |
Release: 4%{?dist}
|
|
|
b5727a |
Summary: HP Smart Array Controller (%{pkg}) driver
|
|
|
b5727a |
|
|
|
b5727a |
License: GPLv2
|
|
|
b5727a |
URL: https://www.kernel.org/
|
|
|
b5727a |
|
|
|
b5727a |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
b5727a |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
b5727a |
|
|
|
b5727a |
ExclusiveArch: x86_64 aarch64
|
|
|
b5727a |
|
|
|
b5727a |
BuildRequires: elfutils-libelf-devel
|
|
|
b5727a |
BuildRequires: gcc
|
|
|
b5727a |
BuildRequires: kmod
|
|
|
b5727a |
BuildRequires: make
|
|
|
b5727a |
BuildRequires: redhat-rpm-config
|
|
|
b5727a |
BuildRequires: xz
|
|
|
b5727a |
|
|
|
b5727a |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
b5727a |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
b5727a |
|
|
|
b5727a |
Requires: kernel-core = %{kernel_version}
|
|
|
b5727a |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
b5727a |
Requires: kernel-modules = %{kernel_version}
|
|
|
b5727a |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
b5727a |
|
|
|
b5727a |
Provides: installonlypkg(kernel-module)
|
|
|
b5727a |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
b5727a |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
b5727a |
|
|
|
b5727a |
Requires(post): /usr/sbin/depmod
|
|
|
b5727a |
Requires(postun): /usr/sbin/depmod
|
|
|
b5727a |
|
|
|
b5727a |
Requires(post): /usr/bin/dracut
|
|
|
b5727a |
Requires(postun): /usr/bin/dracut
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%description
|
|
|
b5727a |
This package provides the HP Smart Array Controller (%{pkg}) driver. Compared
|
|
|
b5727a |
to the in-kernel driver this driver re-enables support for deprecated adapters
|
|
|
b5727a |
originally used with the old cciss driver.
|
|
|
b5727a |
|
|
|
b5727a |
- 0x0E11:*:*:*:01:04: Compaq
|
|
|
b5727a |
- 0x103C:*:*:*:01:04: HP
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%prep
|
|
|
b5727a |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%build
|
|
|
b5727a |
pushd src
|
|
|
b5727a |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
b5727a |
popd
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%install
|
|
|
b5727a |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi src/%{pkg}.ko
|
|
|
b5727a |
|
|
|
b5727a |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
b5727a |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%clean
|
|
|
b5727a |
%{__rm} -rf %{buildroot}
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%post
|
|
|
b5727a |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b5727a |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%preun
|
|
|
b5727a |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b5727a |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%postun
|
|
|
b5727a |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
b5727a |
then
|
|
|
b5727a |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
b5727a |
then
|
|
|
b5727a |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
b5727a |
then
|
|
|
b5727a |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
b5727a |
then
|
|
|
b5727a |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b5727a |
then
|
|
|
b5727a |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
b5727a |
else
|
|
|
b5727a |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b5727a |
fi
|
|
|
b5727a |
fi
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b5727a |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%posttrans
|
|
|
b5727a |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
b5727a |
then
|
|
|
b5727a |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
b5727a |
then
|
|
|
b5727a |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
b5727a |
then
|
|
|
b5727a |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
b5727a |
then
|
|
|
b5727a |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b5727a |
then
|
|
|
b5727a |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
b5727a |
else
|
|
|
b5727a |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
b5727a |
fi
|
|
|
b5727a |
fi
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
b5727a |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b5727a |
fi
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%files
|
|
|
b5727a |
%defattr(644,root,root,755)
|
|
|
b5727a |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
b5727a |
%license COPYING
|
|
|
b5727a |
|
|
|
b5727a |
|
|
|
b5727a |
%changelog
|
|
|
5ee8e0 |
* Thu Sep 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0-4
|
|
|
5ee8e0 |
- Rebuild for 5.14.0-4.el9
|
|
|
5ee8e0 |
|
|
|
74c52c |
* Sun Sep 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0-3
|
|
|
74c52c |
- Rebuild for 5.14.0-3.el9
|
|
|
74c52c |
|
|
|
5131e7 |
* Wed Sep 15 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0-2
|
|
|
5131e7 |
- Rebuild for 5.14.0-2.el9
|
|
|
5131e7 |
|
|
|
b5727a |
* Tue Aug 31 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0-1
|
|
|
b5727a |
- Initial version
|