|
|
a2ca9b |
%global pkg qla2xxx
|
|
|
a2ca9b |
|
|
|
327df6 |
%global driver_version 4.18.0-315.el8
|
|
|
a2ca9b |
|
|
|
327df6 |
%global kernel_version 4.18.0-315.el8
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%global _use_internal_dependency_generator 0
|
|
|
ba5469 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
ba5469 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%global debug_package %{nil}
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%global __spec_install_post \
|
|
|
a2ca9b |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
a2ca9b |
%{__arch_install_post} \
|
|
|
a2ca9b |
%{__os_install_post} \
|
|
|
a2ca9b |
%{__mod_compress_install_post}
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
Name: kmod-%{pkg}
|
|
|
a2ca9b |
Version: 4.18.0
|
|
|
327df6 |
Release: 350%{?dist}
|
|
|
a2ca9b |
Summary: QLogic Fibre Channel HBA (%{pkg}) driver
|
|
|
a2ca9b |
|
|
|
a2ca9b |
License: GPLv2
|
|
|
a2ca9b |
URL: https://www.kernel.org/
|
|
|
a2ca9b |
|
|
|
73ad01 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
a2ca9b |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
a2ca9b |
|
|
|
a2ca9b |
ExclusiveArch: x86_64 aarch64
|
|
|
a2ca9b |
|
|
|
a2ca9b |
BuildRequires: elfutils-libelf-devel
|
|
|
a2ca9b |
BuildRequires: gcc
|
|
|
ba5469 |
BuildRequires: kernel-rpm-macros
|
|
|
a2ca9b |
BuildRequires: kmod
|
|
|
a2ca9b |
BuildRequires: make
|
|
|
a2ca9b |
BuildRequires: redhat-rpm-config
|
|
|
a2ca9b |
BuildRequires: xz
|
|
|
a2ca9b |
|
|
|
ba5469 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
a2ca9b |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
d9abaf |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
a2ca9b |
|
|
|
ba5469 |
Requires: kernel >= %{kernel_version}
|
|
|
ba5469 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
ba5469 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
ba5469 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
a2ca9b |
|
|
|
ee666f |
Provides: installonlypkg(kernel-module)
|
|
|
ba5469 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
a2ca9b |
|
|
|
ba5469 |
Requires(post): %{_sbindir}/depmod
|
|
|
ba5469 |
Requires(postun): %{_sbindir}/depmod
|
|
|
a2ca9b |
|
|
|
ba5469 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
ba5469 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
0a6a21 |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%description
|
|
|
a2ca9b |
This package provides the QLogic Fibre Channel HBA (%{pkg}) driver. Compared to
|
|
|
a2ca9b |
the in-kernel driver this driver re-enables support for deprecated adapters:
|
|
|
a2ca9b |
|
|
|
a2ca9b |
- 0x1077:0x2100: QLogic ISP2100
|
|
|
a2ca9b |
- 0x1077:0x2200: QLogic ISP2200
|
|
|
a2ca9b |
- 0x1077:0x2300: QLogic ISP2300
|
|
|
a2ca9b |
- 0x1077:0x2312: QLogic ISP2312
|
|
|
a2ca9b |
- 0x1077:0x2322: QLogic ISP2322
|
|
|
a2ca9b |
- 0x1077:0x2422: QLogic ISP2422
|
|
|
a2ca9b |
- 0x1077:0x2432: QLogic ISP2432
|
|
|
a2ca9b |
- 0x1077:0x5422: QLogic ISP5422
|
|
|
a2ca9b |
- 0x1077:0x5432: QLogic ISP5432 / QLE220
|
|
|
a2ca9b |
- 0x1077:0x6312: QLogic ISP6312
|
|
|
a2ca9b |
- 0x1077:0x6322: QLogic ISP6322
|
|
|
a2ca9b |
- 0x1077:0x8001: QLogic ISP8001 / QLE81xx
|
|
|
a2ca9b |
- 0x1077:0x8021: QLogic ISP8021 / QLE82xx
|
|
|
a2ca9b |
- 0x1077:0x8044: QLogic ISP8044 / QLE84xx
|
|
|
a2ca9b |
- 0x1077:0x8432: QLogic ISP8432 / QLE8000
|
|
|
a2ca9b |
- 0x1077:0xF001: QLogic ISPF001 / QLE10000
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%prep
|
|
|
73ad01 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%build
|
|
|
a2ca9b |
pushd src
|
|
|
a2ca9b |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
a2ca9b |
popd
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%install
|
|
|
a2ca9b |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
a2ca9b |
|
|
|
a2ca9b |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
a2ca9b |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
a2ca9b |
|
|
|
ba5469 |
# Generate depmod.conf
|
|
|
ba5469 |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
ba5469 |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
ba5469 |
do
|
|
|
ba5469 |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
ba5469 |
done
|
|
|
ba5469 |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%clean
|
|
|
a2ca9b |
%{__rm} -rf %{buildroot}
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%post
|
|
|
66b402 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ba5469 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
66b402 |
|
|
|
66b402 |
|
|
|
66b402 |
%preun
|
|
|
66b402 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ba5469 |
rpm -ql kmod-%{pkg}-%{?epoch:%{epoch}:}%{version}-%{release}.%{_arch} | grep '/lib/modules/%{kernel_version}.%{_arch}/.*\.ko\.xz$' >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%postun
|
|
|
ba5469 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
66b402 |
then
|
|
|
ba5469 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
ba5469 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
66b402 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ba5469 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
66b402 |
fi
|
|
|
66b402 |
|
|
|
66b402 |
|
|
|
ba5469 |
%pretrans -p <lua>
|
|
|
ba5469 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
ba5469 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
ba5469 |
|
|
|
ba5469 |
|
|
|
66b402 |
%posttrans
|
|
|
ba5469 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
66b402 |
then
|
|
|
ba5469 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
ba5469 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
66b402 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ba5469 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
66b402 |
fi
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%files
|
|
|
a2ca9b |
%defattr(644,root,root,755)
|
|
|
a2ca9b |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
a2ca9b |
%license COPYING
|
|
|
ba5469 |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
a2ca9b |
|
|
|
a2ca9b |
|
|
|
a2ca9b |
%changelog
|
|
|
327df6 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-350
|
|
|
327df6 |
- Use release number independent of kernel
|
|
|
327df6 |
- Build 4.18.0-315.el8 for 4.18.0-315.el8
|
|
|
327df6 |
|
|
|
ba5469 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-348
|
|
|
ba5469 |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|
|
|
ba5469 |
- Update to 4.18.0-348.el8
|
|
|
ba5469 |
|
|
|
9717d5 |
* Mon Aug 30 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-338
|
|
|
9717d5 |
- Set specific kernel version to use
|
|
|
9717d5 |
- Rename kernel_version_min to driver_version
|
|
|
9717d5 |
- Add Provides kernel-modules
|
|
|
9717d5 |
- Rebuild for 4.18.0-338.el8
|
|
|
9717d5 |
|
|
|
eee71f |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-331
|
|
|
eee71f |
- Update to 4.18.0-331.el8
|
|
|
eee71f |
|
|
|
003ce7 |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
921504 |
- Rebuild for 4.18.0-326.el8
|
|
|
003ce7 |
- Fix provides/requires
|
|
|
003ce7 |
- Fix kernel dependencies
|
|
|
003ce7 |
- Add convenient provides kmod-aacraid-`uname -r`
|
|
|
003ce7 |
- Fix installonlypkg detection
|
|
|
003ce7 |
- Recreate source tarballs
|
|
|
003ce7 |
- Rebuild for dist = .el8s
|
|
|
003ce7 |
|
|
|
003ce7 |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-315
|
|
|
a2ca9b |
- Initial version
|