|
|
f30a82 |
%global pkg be2iscsi
|
|
|
f30a82 |
|
|
Kmods SIG |
5e9da4 |
%global driver_version 4.18.0-358.el8
|
|
|
f30a82 |
|
|
Kmods SIG |
5e9da4 |
%global kernel_version 4.18.0-358.el8
|
|
|
f30a82 |
|
|
|
f30a82 |
%global _use_internal_dependency_generator 0
|
|
|
f2b23e |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
f2b23e |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
f30a82 |
|
|
|
f30a82 |
%global debug_package %{nil}
|
|
|
f30a82 |
|
|
|
f30a82 |
%global __spec_install_post \
|
|
|
f30a82 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
f30a82 |
%{__arch_install_post} \
|
|
|
f30a82 |
%{__os_install_post} \
|
|
|
f30a82 |
%{__mod_compress_install_post}
|
|
|
f30a82 |
|
|
|
f30a82 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
Name: kmod-%{pkg}
|
|
Kmods SIG |
5e9da4 |
Version: 4.18.0.358
|
|
|
f4ba55 |
Release: 3%{?dist}
|
|
|
f30a82 |
Summary: Emulex OneConnectOpen-iSCSI (%{pkg}) driver
|
|
|
f30a82 |
|
|
|
f30a82 |
License: GPLv2
|
|
|
f30a82 |
URL: https://www.kernel.org/
|
|
|
f30a82 |
|
|
|
3920f4 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
f30a82 |
Patch1: 0001-add-deprecated-ids-be3.patch
|
|
|
f30a82 |
Patch2: 0002-add-deprecated-ids-be2.patch
|
|
|
f30a82 |
|
|
|
a323a8 |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
|
f30a82 |
|
|
|
f30a82 |
BuildRequires: elfutils-libelf-devel
|
|
|
f30a82 |
BuildRequires: gcc
|
|
|
f2b23e |
BuildRequires: kernel-rpm-macros
|
|
|
f30a82 |
BuildRequires: kmod
|
|
|
f30a82 |
BuildRequires: make
|
|
|
f30a82 |
BuildRequires: redhat-rpm-config
|
|
|
f30a82 |
BuildRequires: xz
|
|
|
f30a82 |
|
|
|
f2b23e |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
f30a82 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
b6feb1 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
f30a82 |
|
|
|
f2b23e |
Requires: kernel >= %{kernel_version}
|
|
|
f2b23e |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
f2b23e |
Requires: kernel-modules >= %{kernel_version}
|
|
|
f2b23e |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
f30a82 |
|
|
|
ec4502 |
Provides: installonlypkg(kernel-module)
|
|
|
f2b23e |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
f30a82 |
|
|
|
f2b23e |
Requires(post): %{_sbindir}/depmod
|
|
|
f2b23e |
Requires(postun): %{_sbindir}/depmod
|
|
|
f30a82 |
|
|
|
f2b23e |
Requires(post): %{_sbindir}/weak-modules
|
|
|
f2b23e |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
cffd0f |
|
|
|
f30a82 |
|
|
|
f4ba55 |
%if "%{version}" == "4.18.0.358" && "%{release}" == "2%{?dist}"
|
|
|
f4ba55 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
|
|
|
f4ba55 |
%endif
|
|
|
f4ba55 |
|
|
|
f4ba55 |
%if "%{version}" == "4.18.0.358" && "%{release}" == "3%{?dist}"
|
|
|
f4ba55 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
|
|
|
f4ba55 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
|
|
|
f4ba55 |
%endif
|
|
|
f4ba55 |
|
|
|
f4ba55 |
|
|
|
f30a82 |
%description
|
|
|
f30a82 |
This package provides the Emulex OneConnectOpen-iSCSI (%{pkg}) driver. Compared
|
|
|
f30a82 |
to the in-kernel driver this driver re-enables support for deprecated
|
|
|
f30a82 |
BladeEngine 2 and 3 adapters.
|
|
|
f30a82 |
|
|
|
f30a82 |
BladeEngine 2 (BE2) devices:
|
|
|
f30a82 |
- 0x19A2:0x0212: Emulex BladeEngine 2 10Gb iSCSI Initiator
|
|
|
f30a82 |
- 0x19A2:0x0702: Emulex OneConnect OCe10101/OCm10101/OCe10102/OCm10102
|
|
|
f30a82 |
- 0x19A2:0x0703: Emulex OneConnect OCe10100
|
|
|
f30a82 |
|
|
|
f30a82 |
BladeEngine 3 (BE3) devices:
|
|
|
f30a82 |
- 0x19A2:0x0222: Emulex BladeEngine 3 iSCSI
|
|
|
f30a82 |
- 0x19A2:0x0712: Emulex OneConnect Tomcat iSCSI
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%prep
|
|
|
3920f4 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%build
|
|
|
f30a82 |
pushd src
|
|
|
f30a82 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
f30a82 |
popd
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%install
|
|
|
f30a82 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
f30a82 |
|
|
|
f30a82 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
f30a82 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
f30a82 |
|
|
|
f2b23e |
# Generate depmod.conf
|
|
|
f2b23e |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
f2b23e |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
f2b23e |
do
|
|
|
f2b23e |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
f2b23e |
done
|
|
|
f2b23e |
|
|
|
f30a82 |
|
|
|
f30a82 |
%clean
|
|
|
f30a82 |
%{__rm} -rf %{buildroot}
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%post
|
|
|
94dffa |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
f2b23e |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
94dffa |
|
|
|
94dffa |
|
|
|
94dffa |
%preun
|
|
|
94dffa |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
f2b23e |
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
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%postun
|
|
|
f2b23e |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
94dffa |
then
|
|
|
f2b23e |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
f2b23e |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
94dffa |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
f2b23e |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
94dffa |
fi
|
|
|
94dffa |
|
|
|
94dffa |
|
|
|
f2b23e |
%pretrans -p <lua>
|
|
|
f2b23e |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
f2b23e |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
f2b23e |
|
|
|
f2b23e |
|
|
|
94dffa |
%posttrans
|
|
|
f2b23e |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
94dffa |
then
|
|
|
f2b23e |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
f2b23e |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
94dffa |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
f2b23e |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
94dffa |
fi
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%files
|
|
|
f30a82 |
%defattr(644,root,root,755)
|
|
|
f30a82 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
e438c1 |
%license LICENSES
|
|
|
f2b23e |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
f30a82 |
|
|
|
f30a82 |
|
|
|
f30a82 |
%changelog
|
|
|
f4ba55 |
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.358-3
|
|
|
f4ba55 |
- Add obsoletes for update path
|
|
|
f4ba55 |
|
|
|
a323a8 |
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.358-2
|
|
|
a323a8 |
- Enable ppc64le
|
|
|
a323a8 |
|
|
Kmods SIG |
5e9da4 |
* Fri Jan 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.358-1
|
|
Kmods SIG |
5e9da4 |
- Update to 4.18.0-358.el8
|
|
Kmods SIG |
5e9da4 |
|
|
|
db6fa3 |
* Thu Oct 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-4
|
|
|
db6fa3 |
- Rebuild for 4.18.0-348.el8
|
|
|
db6fa3 |
|
|
|
8cd2ab |
* Thu Oct 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-3
|
|
|
8cd2ab |
- Rebuild for 4.18.0-338.el8
|
|
|
8cd2ab |
|
|
|
ff44f6 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-2
|
|
|
ff44f6 |
- Rebuild for 4.18.0-326.el8
|
|
|
ff44f6 |
|
|
|
d38e41 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-1
|
|
|
af0706 |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-315.el8)
|
|
|
ba2acb |
- Build 4.18.0-257.el8 for 4.18.0-315.el8
|
|
|
af0706 |
- Use release number independent of kernel
|
|
|
af0706 |
- Add driver release number to version
|