Blame SPECS/kmod-lpfc.spec

9ab1c1
%global pkg lpfc
9ab1c1
Kmods SIG 32bd06
%global driver_version 5.14.0-57.el9
9ab1c1
Kmods SIG 3ec8bf
%global kernel_version 5.14.0-60.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}
Kmods SIG 32bd06
Version:          5.14.0.57
Kmods SIG 3ec8bf
Release:          3%{?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
b81dc8
ExclusiveArch:    x86_64 aarch64 ppc64le
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
a38e42
%if "%{version}" == "5.14.0.34" && "%{release}" == "9%{?dist}"
a38e42
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-8%{?dist}
a38e42
%endif
a38e42
a38e42
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}
eed1b3
%license LICENSES
dee7b7
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
9ab1c1
9ab1c1
9ab1c1
%changelog
Kmods SIG 3ec8bf
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-3
Kmods SIG 3ec8bf
- Rebuild for 5.14.0-60.el9
Kmods SIG 3ec8bf
Kmods SIG 7dd8ce
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-2
Kmods SIG 7dd8ce
- Rebuild for 5.14.0-58.el9
Kmods SIG 7dd8ce
Kmods SIG 32bd06
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-1
Kmods SIG 32bd06
- Update to 5.14.0-57.el9
Kmods SIG 32bd06
Kmods SIG 228f9f
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.48-4
Kmods SIG 228f9f
- Rebuild for 5.14.0-56.el9
Kmods SIG 228f9f
Kmods SIG 03d5ba
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.48-3
Kmods SIG 03d5ba
- Rebuild for 5.14.0-55.el9
Kmods SIG 03d5ba
Kmods SIG 471d6a
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.48-2
Kmods SIG 471d6a
- Rebuild for 5.14.0-51.el9
Kmods SIG 471d6a
Kmods SIG b3d67d
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.48-1
Kmods SIG b3d67d
- Update to 5.14.0-48.el9
Kmods SIG b3d67d
Kmods SIG 3bc894
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-10
Kmods SIG 3bc894
- Rebuild for 5.14.0-47.el9
Kmods SIG 3bc894
b81dc8
* Wed Jan 19 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.34-9
b81dc8
- Enable ppc64le
b81dc8
Kmods SIG d39b5a
* Wed Jan 19 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-8
Kmods SIG d39b5a
- Rebuild for 5.14.0-44.el9
Kmods SIG d39b5a
Kmods SIG 5c9b43
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-7
Kmods SIG 5c9b43
- Rebuild for 5.14.0-43.el9
Kmods SIG 5c9b43
Kmods SIG b5391a
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-6
Kmods SIG b5391a
- Rebuild for 5.14.0-42.el9
Kmods SIG b5391a
Kmods SIG 5ad0d6
* Fri Jan 14 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-5
Kmods SIG 5ad0d6
- Rebuild for 5.14.0-41.el9
Kmods SIG 5ad0d6
f82534
* Sat Dec 25 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-4
f82534
- Rebuild for 5.14.0-39.el9
f82534
- Skip unreleased kernel -38
Kmods SIG 0f66a6
Kmods SIG 251cd2
* Thu Dec 23 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-3
Kmods SIG 251cd2
- Rebuild for 5.14.0-37.el9
Kmods SIG 251cd2
Kmods SIG f5794d
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-2
Kmods SIG f5794d
- Rebuild for 5.14.0-36.el9
Kmods SIG f5794d
f8f186
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-1
7f2a0b
- Update to 5.14.0-34.el9
7f2a0b
- Skip unreleased kernel -32 and -33
Kmods SIG d4a6d2
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)