|
|
9ab1c1 |
%global pkg lpfc
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
%global driver_version 5.14.0-21.el9
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
%global kernel_version 5.14.0-31.el9
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%global debug_package %{nil}
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%global __spec_install_post \
|
|
|
9ab1c1 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
9ab1c1 |
%{__arch_install_post} \
|
|
|
9ab1c1 |
%{__os_install_post} \
|
|
|
9ab1c1 |
%{__mod_compress_install_post}
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
Name: kmod-%{pkg}
|
|
|
dee7b7 |
Version: 5.14.0.21
|
|
|
dee7b7 |
Release: 1%{?dist}
|
|
|
9ab1c1 |
Summary: Emulex LightPulse Fibre Channel SCSI (%{pkg}) driver
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
License: GPLv2
|
|
|
9ab1c1 |
URL: https://www.kernel.org/
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
9ab1c1 |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
ExclusiveArch: x86_64 aarch64
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
BuildRequires: elfutils-libelf-devel
|
|
|
9ab1c1 |
BuildRequires: gcc
|
|
|
dee7b7 |
BuildRequires: kernel-rpm-macros
|
|
|
9ab1c1 |
BuildRequires: kmod
|
|
|
9ab1c1 |
BuildRequires: make
|
|
|
9ab1c1 |
BuildRequires: redhat-rpm-config
|
|
|
9ab1c1 |
BuildRequires: xz
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
9ab1c1 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
9ab1c1 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
Requires: kernel >= %{kernel_version}
|
|
|
dee7b7 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
dee7b7 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
dee7b7 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
Provides: installonlypkg(kernel-module)
|
|
|
dee7b7 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
Requires(post): %{_sbindir}/depmod
|
|
|
dee7b7 |
Requires(postun): %{_sbindir}/depmod
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
dee7b7 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%description
|
|
|
9ab1c1 |
This package provides the Emulex LightPulse Fibre Channel SCSI (%{pkg}) driver.
|
|
|
9ab1c1 |
Compared to the in-kernel driver this driver re-enables support for some
|
|
|
9ab1c1 |
deprecated adapters.
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
BladeEngine 2 (BE2) devices:
|
|
|
9ab1c1 |
- 0x19A2:0x0704: Emulex OneConnect Tigershark FCoE
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
BladeEngine 3 (BE3) devices:
|
|
|
9ab1c1 |
- 0x19A2:0x0714: Emulex OneConnect Tomcat FCoE
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
Fibre Channel (FC) devices:
|
|
|
9ab1c1 |
- 0x10DF:0x1AE5: FIREFLY
|
|
|
9ab1c1 |
- 0x10DF:0xE100: PROTEUS VF
|
|
|
9ab1c1 |
- 0x10DF:0xE131: BALIUS
|
|
|
9ab1c1 |
- 0x10DF:0xE180: PROTEUS PF
|
|
|
9ab1c1 |
- 0x10DF:0xF095: RFLY
|
|
|
9ab1c1 |
- 0x10DF:0xF098: PFLY
|
|
|
9ab1c1 |
- 0x10DF:0xF0A1: LP101
|
|
|
9ab1c1 |
- 0x10DF:0xF0A5: TFLY
|
|
|
9ab1c1 |
- 0x10DF:0xF0D1: BSMB
|
|
|
9ab1c1 |
- 0x10DF:0xF0F5: NEPTUNE
|
|
|
9ab1c1 |
- 0x10DF:0xF0F6: NEPTUNE SCSP
|
|
|
9ab1c1 |
- 0x10DF:0xF0F7: NEPTUNE DCSP
|
|
|
9ab1c1 |
- 0x10DF:0xF700: SUPERFLY
|
|
|
9ab1c1 |
- 0x10DF:0xF800: DRAGONFLY
|
|
|
9ab1c1 |
- 0x10DF:0xF900: CENTAUR
|
|
|
9ab1c1 |
- 0x10DF:0xF980: PEGASUS
|
|
|
9ab1c1 |
- 0x10DF:0xFA00: THOR
|
|
|
9ab1c1 |
- 0x10DF:0xFB00: VIPER
|
|
|
9ab1c1 |
- 0x10DF:0xFC00: LP10000S
|
|
|
9ab1c1 |
- 0x10DF:0xFC10: LP11000S
|
|
|
9ab1c1 |
- 0x10DF:0xFC20: LPE11000S
|
|
|
9ab1c1 |
- 0x10DF:0xFC50: PROTEUS S
|
|
|
9ab1c1 |
- 0x10DF:0xFD00: HELIOS
|
|
|
9ab1c1 |
- 0x10DF:0xFD11: HELIOS SCSP
|
|
|
9ab1c1 |
- 0x10DF:0xFD12: HELIOS DCSP
|
|
|
9ab1c1 |
- 0x10DF:0xFE05: HORNET
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
Lancer FCoE CNA devices:
|
|
|
9ab1c1 |
- 0x10DF:0xE208: LANCER_FC_VF
|
|
|
9ab1c1 |
- 0x10DF:0xE260: Emulex OneConnect OCe15102-FM/OCe15104-FM/OCm15108-F-P
|
|
|
9ab1c1 |
- 0x10DF:0xE268: LANCER_FCOE_VF
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%prep
|
|
|
9ab1c1 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%build
|
|
|
9ab1c1 |
pushd src
|
|
|
9ab1c1 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
9ab1c1 |
popd
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%install
|
|
|
9ab1c1 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
9ab1c1 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
# Generate depmod.conf
|
|
|
dee7b7 |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
dee7b7 |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
dee7b7 |
do
|
|
|
dee7b7 |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
dee7b7 |
done
|
|
|
dee7b7 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%clean
|
|
|
9ab1c1 |
%{__rm} -rf %{buildroot}
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%post
|
|
|
9ab1c1 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
dee7b7 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%preun
|
|
|
9ab1c1 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
dee7b7 |
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
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%postun
|
|
|
dee7b7 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
9ab1c1 |
then
|
|
|
dee7b7 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
dee7b7 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
9ab1c1 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
dee7b7 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
9ab1c1 |
fi
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
dee7b7 |
%pretrans -p <lua>
|
|
|
dee7b7 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
dee7b7 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
dee7b7 |
|
|
|
dee7b7 |
|
|
|
9ab1c1 |
%posttrans
|
|
|
dee7b7 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
9ab1c1 |
then
|
|
|
dee7b7 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
dee7b7 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
9ab1c1 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
dee7b7 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
9ab1c1 |
fi
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%files
|
|
|
9ab1c1 |
%defattr(644,root,root,755)
|
|
|
9ab1c1 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
9ab1c1 |
%license COPYING
|
|
|
dee7b7 |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
|
|
|
9ab1c1 |
%changelog
|
|
|
dee7b7 |
* Thu Dec 16 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.21-1
|
|
|
dee7b7 |
- Convert to kABI tracking kmod package (kernel >= 5.14.0-31.el9)
|