|
|
ca3bb5 |
%global pkg megaraid_mbox
|
|
|
ca3bb5 |
|
|
Kmods SIG |
7bcc60 |
%global driver_version 4.18.0-80.el8
|
|
Kmods SIG |
7bcc60 |
|
|
|
a276b7 |
%global kernel_version 4.18.0-348.el8
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%global _use_internal_dependency_generator 0
|
|
|
fc5836 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
fc5836 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%global debug_package %{nil}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%global __spec_install_post \
|
|
|
ca3bb5 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
ca3bb5 |
%{__arch_install_post} \
|
|
|
ca3bb5 |
%{__os_install_post} \
|
|
|
ca3bb5 |
%{__mod_compress_install_post}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
Name: kmod-%{pkg}
|
|
Kmods SIG |
7bcc60 |
Version: 4.18.0.80
|
|
Kmods SIG |
7bcc60 |
Release: 1%{?dist}
|
|
|
ca3bb5 |
Summary: LSI Logic MegaRAID (%{pkg}) driver
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
License: GPLv2
|
|
|
ca3bb5 |
URL: https://www.kernel.org/
|
|
|
ca3bb5 |
|
|
Kmods SIG |
7bcc60 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
ExclusiveArch: x86_64 aarch64
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
BuildRequires: elfutils-libelf-devel
|
|
|
ca3bb5 |
BuildRequires: gcc
|
|
|
fc5836 |
BuildRequires: kernel-rpm-macros
|
|
|
ca3bb5 |
BuildRequires: kmod
|
|
|
ca3bb5 |
BuildRequires: make
|
|
|
ca3bb5 |
BuildRequires: redhat-rpm-config
|
|
|
ca3bb5 |
BuildRequires: xz
|
|
|
ca3bb5 |
|
|
|
fc5836 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
ca3bb5 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
ca3bb5 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
ca3bb5 |
|
|
|
fc5836 |
Requires: kernel >= %{kernel_version}
|
|
|
fc5836 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
fc5836 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
fc5836 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
Provides: installonlypkg(kernel-module)
|
|
|
fc5836 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
ca3bb5 |
|
|
|
fc5836 |
Requires(post): %{_sbindir}/depmod
|
|
|
fc5836 |
Requires(postun): %{_sbindir}/depmod
|
|
|
ca3bb5 |
|
|
|
fc5836 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
fc5836 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
Provides: kmod-megaraid_mm = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%description
|
|
|
ca3bb5 |
This package provides the LSI Logic MegaRAID (%{pkg}) driver including the
|
|
|
ca3bb5 |
required LSI Logic Management Module (megaraid_mm) driver. Supported devices:
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
- 0x1000:0407:1000:0530: LSI MegaRAID SCSI 320-0X
|
|
|
ca3bb5 |
- 0x1000:0407:1000:0531: LSI MegaRAID SCSI 320-4X
|
|
|
ca3bb5 |
- 0x1000:0407:1000:0532: LSI MegaRAID SCSI 320-2X
|
|
|
ca3bb5 |
- 0x1000:0407:1028:0531: Dell PERC4/QC
|
|
|
ca3bb5 |
- 0x1000:0407:8086:0530: Intel RAID Controller SRCZCRX
|
|
|
ca3bb5 |
- 0x1000:0407:8086:0532: Intel RAID Controller SRCU42X
|
|
|
ca3bb5 |
- 0x1000:0408:1000:0001: LSI MegaRAID SCSI 320-1E
|
|
|
ca3bb5 |
- 0x1000:0408:1000:0002: LSI MegaRAID SCSI 320-2E
|
|
|
ca3bb5 |
- 0x1000:0408:1025:004D: ACER MegaRAID ROMB-2E
|
|
|
ca3bb5 |
- 0x1000:0408:1028:0001: Dell PERC 4e/SC
|
|
|
ca3bb5 |
- 0x1000:0408:1028:0002: Dell PERC 4e/DC
|
|
|
ca3bb5 |
- 0x1000:0408:1033:8287: NEC MegaRAID PCI Express ROMB
|
|
|
ca3bb5 |
- 0x1000:0408:1734:1065: FSC MegaRAID PCI Express ROMB
|
|
|
ca3bb5 |
- 0x1000:0408:8086:0002: Intel RAID Controller SRCU42E
|
|
|
ca3bb5 |
- 0x1000:0408:8086:3431: Intel RAID Controller SROMBU42E
|
|
|
ca3bb5 |
- 0x1000:0408:8086:3499: Intel RAID Controller SROMBU42E
|
|
|
ca3bb5 |
- 0x1000:0409:1000:3004: LSI MegaRAID SATA 300-4X
|
|
|
ca3bb5 |
- 0x1000:0409:1000:3008: LSI MegaRAID SATA 300-8X
|
|
|
ca3bb5 |
- 0x1000:0409:8086:3008: Intel RAID Controller SRCS28X
|
|
|
ca3bb5 |
- 0x1000:1960:1000:0518: LSI MegaRAID SCSI 320-2
|
|
|
ca3bb5 |
- 0x1000:1960:1000:0520: LSI MegaRAID SCSI 320-1
|
|
|
ca3bb5 |
- 0x1000:1960:1000:0523: LSI MegaRAID SATA 150-6
|
|
|
ca3bb5 |
- 0x1000:1960:1000:4523: LSI MegaRAID SATA 150-4
|
|
|
ca3bb5 |
- 0x1000:1960:1000:A520: LSI MegaRAID SCSI 320-0
|
|
|
ca3bb5 |
- 0x1000:1960:1028:0518: Dell PERC4/DC
|
|
|
ca3bb5 |
- 0x1000:1960:1028:0520: Dell PERC4/SC
|
|
|
ca3bb5 |
- 0x1000:1960:8086:0520: Intel RAID Controller SRCU51L
|
|
|
ca3bb5 |
- 0x1000:1960:8086:0523: Intel RAID Controller SRCS16
|
|
|
ca3bb5 |
- 0x101E:1960:1028:0471: Dell PERC3/QC
|
|
|
ca3bb5 |
- 0x101E:1960:1028:0475: Dell PERC3/SC
|
|
|
ca3bb5 |
- 0x101E:1960:1028:0493: Dell PERC3/DC
|
|
|
ca3bb5 |
- 0x1028:000E:1028:0123: Dell PERC3/Di
|
|
|
ca3bb5 |
- 0x1028:000F:1028:014A: Dell PERC4/Di
|
|
|
ca3bb5 |
- 0x1028:0013:1028:016C: Dell PERC 4e/Si
|
|
|
ca3bb5 |
- 0x1028:0013:1028:016D: Dell PERC 4e/Di
|
|
|
ca3bb5 |
- 0x1028:0013:1028:016E: Dell PERC 4e/Di
|
|
|
ca3bb5 |
- 0x1028:0013:1028:016F: Dell PERC 4e/Di
|
|
|
ca3bb5 |
- 0x1028:0013:1028:0170: Dell PERC 4e/Di
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%prep
|
|
Kmods SIG |
7bcc60 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%build
|
|
|
ca3bb5 |
pushd src
|
|
|
ca3bb5 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
ca3bb5 |
popd
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%install
|
|
|
ca3bb5 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/megaraid src/%{pkg}.ko src/megaraid_mm.ko
|
|
|
ca3bb5 |
%{__install} -d %{buildroot}/%{_sysconfdir}/dracut.conf.d/
|
|
|
ca3bb5 |
echo "add_drivers+=\" %{pkg} \"" > %{buildroot}/%{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
ca3bb5 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%clean
|
|
|
ca3bb5 |
%{__rm} -rf %{buildroot}
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%post
|
|
|
ca3bb5 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
fc5836 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/megaraid/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
fc5836 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/megaraid/megaraid_mm.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%preun
|
|
|
ca3bb5 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
fc5836 |
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
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%postun
|
|
|
fc5836 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
ca3bb5 |
then
|
|
|
fc5836 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
fc5836 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
ca3bb5 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
fc5836 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
ca3bb5 |
fi
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
fc5836 |
%pretrans -p <lua>
|
|
|
fc5836 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
fc5836 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
fc5836 |
|
|
|
fc5836 |
|
|
|
ca3bb5 |
%posttrans
|
|
|
fc5836 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
ca3bb5 |
then
|
|
|
fc5836 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
fc5836 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
ca3bb5 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
fc5836 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
ca3bb5 |
fi
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%files
|
|
|
ca3bb5 |
%defattr(644,root,root,755)
|
|
|
ca3bb5 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
ac5708 |
%license LICENSES
|
|
|
ca3bb5 |
%config(noreplace) %{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
|
|
|
ca3bb5 |
%changelog
|
|
Kmods SIG |
7bcc60 |
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.80-1
|
|
Kmods SIG |
7bcc60 |
- Switch to EL kernel source and versioning
|
|
Kmods SIG |
7bcc60 |
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|