|
|
34d075 |
%global pkg hpsa
|
|
|
34d075 |
|
|
|
834d6b |
%global driver_version 4.18.0-305.el8
|
|
|
34d075 |
|
|
|
1da0b0 |
%global kernel_version 4.18.0-338.el8
|
|
|
34d075 |
|
|
|
34d075 |
%global _use_internal_dependency_generator 0
|
|
|
c0a486 |
%global __find_requires %{nil}
|
|
|
5c1d49 |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
34d075 |
|
|
|
34d075 |
%global debug_package %{nil}
|
|
|
34d075 |
|
|
|
34d075 |
%global __spec_install_post \
|
|
|
34d075 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
34d075 |
%{__arch_install_post} \
|
|
|
34d075 |
%{__os_install_post} \
|
|
|
34d075 |
%{__mod_compress_install_post}
|
|
|
34d075 |
|
|
|
34d075 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
Name: kmod-%{pkg}
|
|
|
34d075 |
Version: 4.18.0
|
|
|
1da0b0 |
Release: 338%{?dist}
|
|
|
34d075 |
Summary: HP Smart Array Controller (%{pkg}) driver
|
|
|
34d075 |
|
|
|
34d075 |
License: GPLv2
|
|
|
34d075 |
URL: https://www.kernel.org/
|
|
|
34d075 |
|
|
|
834d6b |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
34d075 |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
34d075 |
|
|
|
34d075 |
ExclusiveArch: x86_64 aarch64
|
|
|
34d075 |
|
|
|
34d075 |
BuildRequires: elfutils-libelf-devel
|
|
|
34d075 |
BuildRequires: gcc
|
|
|
34d075 |
BuildRequires: kmod
|
|
|
34d075 |
BuildRequires: make
|
|
|
34d075 |
BuildRequires: redhat-rpm-config
|
|
|
34d075 |
BuildRequires: xz
|
|
|
34d075 |
|
|
|
34d075 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
8891ce |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
34d075 |
|
|
|
699021 |
Requires: kernel-core = %{kernel_version}
|
|
|
8891ce |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
35c16a |
Requires: kernel-modules = %{kernel_version}
|
|
|
8891ce |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
34d075 |
|
|
|
ad4ffb |
Provides: installonlypkg(kernel-module)
|
|
|
1b760d |
Provides: kernel-modules = %{kernel_version}.%{_arch}
|
|
|
cf6ce4 |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
34d075 |
|
|
|
34d075 |
Requires(post): /usr/sbin/depmod
|
|
|
34d075 |
Requires(postun): /usr/sbin/depmod
|
|
|
34d075 |
|
|
|
f1ffb3 |
Requires(post): /usr/bin/dracut
|
|
|
f1ffb3 |
Requires(postun): /usr/bin/dracut
|
|
|
f1ffb3 |
|
|
|
34d075 |
|
|
|
34d075 |
%description
|
|
|
34d075 |
This package provides the HP Smart Array Controller (%{pkg}) driver. Compared
|
|
|
34d075 |
to the in-kernel driver this driver re-enables support for deprecated adapters
|
|
|
34d075 |
originally used with the old cciss driver.
|
|
|
34d075 |
|
|
|
34d075 |
- 0x0E11:*:*:*:01:04: Compaq
|
|
|
34d075 |
- 0x103C:*:*:*:01:04: HP
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%prep
|
|
|
834d6b |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%build
|
|
|
34d075 |
pushd src
|
|
|
34d075 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
34d075 |
popd
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%install
|
|
|
34d075 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi src/%{pkg}.ko
|
|
|
34d075 |
|
|
|
34d075 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
34d075 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%clean
|
|
|
34d075 |
%{__rm} -rf %{buildroot}
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%post
|
|
|
708e63 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
708e63 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
708e63 |
|
|
|
708e63 |
|
|
|
708e63 |
%preun
|
|
|
708e63 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
708e63 |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%postun
|
|
|
708e63 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
708e63 |
then
|
|
|
708e63 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
708e63 |
then
|
|
|
708e63 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
708e63 |
fi
|
|
|
708e63 |
|
|
|
f1ffb3 |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
f1ffb3 |
else
|
|
|
f1ffb3 |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
|
|
|
708e63 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
708e63 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
708e63 |
fi
|
|
|
708e63 |
|
|
|
708e63 |
|
|
|
708e63 |
%posttrans
|
|
|
708e63 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
708e63 |
then
|
|
|
708e63 |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
708e63 |
then
|
|
|
708e63 |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
708e63 |
fi
|
|
|
708e63 |
|
|
|
f1ffb3 |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f1ffb3 |
then
|
|
|
f1ffb3 |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
f1ffb3 |
else
|
|
|
f1ffb3 |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
fi
|
|
|
f1ffb3 |
|
|
|
708e63 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
708e63 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
708e63 |
fi
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%files
|
|
|
34d075 |
%defattr(644,root,root,755)
|
|
|
34d075 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
34d075 |
%license COPYING
|
|
|
34d075 |
|
|
|
34d075 |
|
|
|
34d075 |
%changelog
|
|
|
1da0b0 |
* Mon Aug 30 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-338
|
|
|
1da0b0 |
- Set specific kernel version to use
|
|
|
1da0b0 |
- Rename kernel_version_min to driver_version
|
|
|
1da0b0 |
- Add Provides kernel-modules
|
|
|
1da0b0 |
- Rebuild for 4.18.0-338.el8
|
|
|
1da0b0 |
|
|
|
66f8fa |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-331
|
|
|
66f8fa |
- Rebuild for 4.18.0-331.el8
|
|
|
66f8fa |
|
|
|
db674d |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
4f95a5 |
- Rebuild for 4.18.0-326.el8
|
|
|
db674d |
- Fix provides/requires
|
|
|
db674d |
- Fix kernel dependencies
|
|
|
db674d |
- Add convenient provides kmod-aacraid-`uname -r`
|
|
|
db674d |
- Fix installonlypkg detection
|
|
|
db674d |
- Recreate source tarballs
|
|
|
db674d |
- Rebuild for dist = .el8s
|
|
|
db674d |
|
|
|
db674d |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-305
|
|
|
34d075 |
- Initial version
|