|
|
f3328c |
%global pkg megaraid_sas
|
|
|
f3328c |
|
|
|
e6a0d7 |
%global driver_version 4.18.0-326.el8
|
|
|
f3328c |
|
|
|
23f7ee |
%global kernel_version 4.18.0-338.el8
|
|
|
f3328c |
|
|
|
f3328c |
%global _use_internal_dependency_generator 0
|
|
|
56fa8f |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
56fa8f |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
f3328c |
|
|
|
f3328c |
%global debug_package %{nil}
|
|
|
f3328c |
|
|
|
f3328c |
%global __spec_install_post \
|
|
|
f3328c |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
f3328c |
%{__arch_install_post} \
|
|
|
f3328c |
%{__os_install_post} \
|
|
|
f3328c |
%{__mod_compress_install_post}
|
|
|
f3328c |
|
|
|
f3328c |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
Name: kmod-%{pkg}
|
|
|
e6a0d7 |
Version: 4.18.0.326
|
|
|
23f7ee |
Release: 2%{?dist}
|
|
|
f3328c |
Summary: Broadcom MegaRAID SAS (%{pkg}) driver
|
|
|
f3328c |
|
|
|
f3328c |
License: GPLv2
|
|
|
f3328c |
URL: https://www.kernel.org/
|
|
|
f3328c |
|
|
|
8b966e |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
f3328c |
Patch1: 0001-add-deprecated-ids.patch
|
|
|
f3328c |
|
|
|
f3328c |
ExclusiveArch: x86_64 aarch64
|
|
|
f3328c |
|
|
|
f3328c |
BuildRequires: elfutils-libelf-devel
|
|
|
f3328c |
BuildRequires: gcc
|
|
|
56fa8f |
BuildRequires: kernel-rpm-macros
|
|
|
f3328c |
BuildRequires: kmod
|
|
|
f3328c |
BuildRequires: make
|
|
|
f3328c |
BuildRequires: redhat-rpm-config
|
|
|
f3328c |
BuildRequires: xz
|
|
|
f3328c |
|
|
|
56fa8f |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
f3328c |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
d4c797 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
f3328c |
|
|
|
56fa8f |
Requires: kernel >= %{kernel_version}
|
|
|
56fa8f |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
56fa8f |
Requires: kernel-modules >= %{kernel_version}
|
|
|
56fa8f |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
f3328c |
|
|
|
8015bc |
Provides: installonlypkg(kernel-module)
|
|
|
56fa8f |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
f3328c |
|
|
|
56fa8f |
Requires(post): %{_sbindir}/depmod
|
|
|
56fa8f |
Requires(postun): %{_sbindir}/depmod
|
|
|
f3328c |
|
|
|
56fa8f |
Requires(post): %{_sbindir}/weak-modules
|
|
|
56fa8f |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
53e9b1 |
|
|
|
f3328c |
|
|
|
f3328c |
%description
|
|
|
f3328c |
This package provides the Broadcom MegaRAID SAS (%{pkg}) driver. Compared to
|
|
|
f3328c |
the in-kernel driver this driver re-enables support for deprecated adapters:
|
|
|
f3328c |
|
|
|
f3328c |
- 0x1000:0x0060: LSI MegaRAID SAS1078R
|
|
|
f3328c |
- 0x1000:0x0078: LSI MegaRAID SAS1078 Gen2
|
|
|
f3328c |
- 0x1000:0x007C: LSI MegaRAID SAS1078DE
|
|
|
f3328c |
- 0x1000:0x0411: LSI MegaRAID SAS1064R
|
|
|
f3328c |
- 0x1000:0x0413: LSI MegaRAID SAS1068 Verde ZCR
|
|
|
f3328c |
- 0x1028:0x0015: Dell PERC5
|
|
|
f3328c |
|
|
|
f3328c |
The removal of the following adapters has been reverted in 4.18.0-290 [1761485]:
|
|
|
f3328c |
- 0x1000:0x0071: LSI MegaRAID SAS0071 Skinny
|
|
|
f3328c |
- 0x1000:0x0073: LSI MegaRAID SAS0073 Skinny
|
|
|
f3328c |
- 0x1000:0x0079: LSI MegaRAID SAS0079 Gen2
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%prep
|
|
|
8b966e |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%build
|
|
|
f3328c |
pushd src
|
|
|
f3328c |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
f3328c |
popd
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%install
|
|
|
f3328c |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/megaraid src/%{pkg}.ko
|
|
|
f3328c |
|
|
|
f3328c |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
f3328c |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
f3328c |
|
|
|
56fa8f |
# Generate depmod.conf
|
|
|
56fa8f |
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
|
|
|
56fa8f |
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
|
|
|
56fa8f |
do
|
|
|
56fa8f |
echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
56fa8f |
done
|
|
|
56fa8f |
|
|
|
f3328c |
|
|
|
f3328c |
%clean
|
|
|
f3328c |
%{__rm} -rf %{buildroot}
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%post
|
|
|
eccca9 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
56fa8f |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/megaraid/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
eccca9 |
|
|
|
eccca9 |
|
|
|
eccca9 |
%preun
|
|
|
eccca9 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
56fa8f |
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
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%postun
|
|
|
56fa8f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
eccca9 |
then
|
|
|
56fa8f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
56fa8f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
eccca9 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
56fa8f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
eccca9 |
fi
|
|
|
eccca9 |
|
|
|
eccca9 |
|
|
|
56fa8f |
%pretrans -p <lua>
|
|
|
56fa8f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
56fa8f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
56fa8f |
|
|
|
56fa8f |
|
|
|
eccca9 |
%posttrans
|
|
|
56fa8f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
eccca9 |
then
|
|
|
56fa8f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
56fa8f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
eccca9 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
56fa8f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
eccca9 |
fi
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%files
|
|
|
f3328c |
%defattr(644,root,root,755)
|
|
|
f3328c |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
f3328c |
%license COPYING
|
|
|
56fa8f |
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
|
|
|
f3328c |
|
|
|
f3328c |
|
|
|
f3328c |
%changelog
|
|
|
23f7ee |
* Thu Oct 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.326-2
|
|
|
23f7ee |
- Rebuild for 4.18.0-338.el8
|
|
|
23f7ee |
|
|
|
e6a0d7 |
* Thu Oct 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.326-1
|
|
|
e6a0d7 |
- Update to 4.18.0-326.el8
|
|
|
e6a0d7 |
|
|
|
798316 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.310-1
|
|
|
48bd0d |
- Add driver release number to version
|
|
|
48bd0d |
|
|
|
08b470 |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-350
|
|
|
08b470 |
- Use release number independent of kernel
|
|
|
08b470 |
- Build 4.18.0-310.el8 for 4.18.0-315.el8
|
|
|
08b470 |
|
|
|
56fa8f |
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-348
|
|
|
56fa8f |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|
|
|
56fa8f |
- Update to 4.18.0-348.el8
|
|
|
56fa8f |
|
|
|
682dfe |
* Mon Aug 30 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-338
|
|
|
682dfe |
- Set specific kernel version to use
|
|
|
682dfe |
- Rename kernel_version_min to driver_version
|
|
|
682dfe |
- Add Provides kernel-modules
|
|
|
682dfe |
- Rebuild for 4.18.0-338.el8
|
|
|
682dfe |
|
|
|
7955f7 |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-331
|
|
|
7955f7 |
- Rebuild for 4.18.0-331.el8
|
|
|
7955f7 |
|
|
|
efed5a |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-326
|
|
|
2d0a03 |
- Update to 4.18.0-326.el8
|
|
|
efed5a |
- Fix provides/requires
|
|
|
efed5a |
- Fix kernel dependencies
|
|
|
efed5a |
- Add convenient provides kmod-aacraid-`uname -r`
|
|
|
efed5a |
- Fix installonlypkg detection
|
|
|
efed5a |
- Recreate source tarballs
|
|
|
efed5a |
- Rebuild for dist = .el8s
|
|
|
efed5a |
|
|
|
efed5a |
* Fri Jul 23 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0-310
|
|
|
f3328c |
- Initial version
|