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