Blame SPECS/kmod-aacraid.spec

b37448
%global pkg aacraid
b37448
Kmods SIG adba78
%global driver_version 4.18.0-373.el8
b37448
Kmods SIG adba78
%global kernel_version 4.18.0-373.el8
b37448
b37448
%global _use_internal_dependency_generator 0
a70a84
%global __find_requires /usr/lib/rpm/redhat/find-requires
a70a84
%global __find_provides /usr/lib/rpm/redhat/find-provides
b37448
b37448
%global debug_package %{nil}
b37448
b37448
%global __spec_install_post \
b37448
  %{?__debug_package:%{__debug_install_post}} \
b37448
  %{__arch_install_post} \
b37448
  %{__os_install_post} \
b37448
  %{__mod_compress_install_post}
b37448
b37448
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
b37448
b37448
b37448
Name:             kmod-%{pkg}
Kmods SIG adba78
Version:          4.18.0.373
Kmods SIG adba78
Release:          1%{?dist}
b37448
Summary:          Dell PERC2, 2/Si, 3/Si, 3/Di, Adaptec Advanced Raid Products, HP NetRAID-4M, IBM ServeRAID & ICP SCSI (%{pkg}) driver
b37448
41b892
License:          GPLv2 and GPLv2+
b37448
URL:              https://www.kernel.org/
b37448
e115da
Source0:          %{pkg}-%{driver_version}.tar.xz
b37448
Patch1:           0001-add-deprecated-ids.patch
b37448
2ca6c9
ExclusiveArch:    x86_64 ppc64le
b37448
b37448
BuildRequires:    elfutils-libelf-devel
b37448
BuildRequires:    gcc
a70a84
BuildRequires:    kernel-rpm-macros
b37448
BuildRequires:    kmod
b37448
BuildRequires:    make
b37448
BuildRequires:    redhat-rpm-config
b37448
BuildRequires:    xz
b37448
a70a84
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
b37448
BuildRequires:    kernel-devel = %{kernel_version}
f1fc93
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
b37448
a70a84
Requires:         kernel >= %{kernel_version}
a70a84
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
a70a84
Requires:         kernel-modules >= %{kernel_version}
a70a84
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
b37448
cfc726
Provides:         installonlypkg(kernel-module)
a70a84
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
b37448
a70a84
Requires(post):   %{_sbindir}/depmod
a70a84
Requires(postun): %{_sbindir}/depmod
b37448
a70a84
Requires(post):   %{_sbindir}/weak-modules
a70a84
Requires(postun): %{_sbindir}/weak-modules
8a0a5f
b37448
849717
%if "%{version}" == "4.18.0.257" && "%{release}" == "4%{?dist}"
849717
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-3%{?dist}
849717
%endif
849717
849717
%if "%{version}" == "4.18.0.257" && "%{release}" == "5%{?dist}"
849717
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-3%{?dist}
849717
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-4%{?dist}
849717
%endif
849717
849717
b37448
%description
b37448
This package provides the Dell PERC2, 2/Si, 3/Si, 3/Di, Adaptec Advanced Raid
b37448
Products, HP NetRAID-4M, IBM ServeRAID & ICP SCSI driver (%{pkg}) driver.
b37448
Compared to the in-kernel driver this driver re-enables support for deprecated
b37448
adapters:
b37448
b37448
- 0x1011:0x0046:0x103C:0x10C2: HP NetRAID-4M
b37448
- 0x1011:0x0046:0x9005:0x0364: Adaptec 5400S (Mustang)
b37448
- 0x1011:0x0046:0x9005:0x0365: Adaptec 5400S (Mustang)
b37448
- 0x1011:0x0046:0x9005:0x1364: Dell PERC 2/QC
b37448
- 0x1028:0x0001:0x1028:0x0001: DELL PERC 2/Si (Iguana)
b37448
- 0x1028:0x0002:0x1028:0x0002: DELL PERC 3/Di (Opal)
b37448
- 0x1028:0x0002:0x1028:0x00D1: DELL PERC 3/Di (Viper)
b37448
- 0x1028:0x0002:0x1028:0x00D9: DELL PERC 3/Di (Lexus)
b37448
- 0x1028:0x0003:0x1028:0x0003: DELL PERC 3/Si (SlimFast)
b37448
- 0x1028:0x0004:0x1028:0x00D0: DELL PERC 3/Di (Iguana FlipChip)
b37448
- 0x1028:0x000A:0x1028:0x0106: DELL PERC 3/Di (Jaguar)
b37448
- 0x1028:0x000A:0x1028:0x011B: DELL PERC 3/Di (Dagger)
b37448
- 0x1028:0x000A:0x1028:0x0121: DELL PERC 3/Di (Boxster)
b37448
- 0x9005:0x0200:0x9005:0x0200: Themisto Jupiter Platform
b37448
- 0x9005:0x0283:0x9005:0x0283: Catapult
b37448
- 0x9005:0x0284:0x9005:0x0284: Tomcat
b37448
- 0x9005:0x0285: Adaptec Catch All
b37448
- 0x9005:0x0285:0x1014:0x02F2: IBM 8i (AvonPark)
b37448
- 0x9005:0x0285:0x1014:0x0312: IBM 8i (AvonPark Lite)
b37448
- 0x9005:0x0285:0x1028: Dell Catchall
b37448
- 0x9005:0x0285:0x1028:0x0287: Perc 320/DC
b37448
- 0x9005:0x0285:0x1028:0x0291: CERC SATA RAID 2 PCI SATA 6ch (DellCorsair)
b37448
- 0x9005:0x0285:0x103C:0x3227: AAR-2610SA PCI SATA 6ch
b37448
- 0x9005:0x0285:0x17AA: Legend Catchall
b37448
- 0x9005:0x0285:0x17AA:0x0286: Legend S220 (Legend Crusader)
b37448
- 0x9005:0x0285:0x17AA:0x0287: Legend S230 (Legend Vulcan)
b37448
- 0x9005:0x0285:0x9005:0x0285: Adaptec 2200S (Vulcan)
b37448
- 0x9005:0x0285:0x9005:0x0286: Adaptec 2120S (Crusader)
b37448
- 0x9005:0x0285:0x9005:0x0287: Adaptec 2200S (Vulcan-2m)
b37448
- 0x9005:0x0285:0x9005:0x0288: Adaptec 3230S (Harrier)
b37448
- 0x9005:0x0285:0x9005:0x0289: Adaptec 3240S (Tornado)
b37448
- 0x9005:0x0285:0x9005:0x028A: ASR-2020ZCR SCSI PCI-X ZCR (Skyhawk)
b37448
- 0x9005:0x0285:0x9005:0x028B: ASR-2025ZCR SCSI SO-DIMM PCI-X ZCR (Terminator)
b37448
- 0x9005:0x0285:0x9005:0x028E: ASR-2020SA SATA PCI-X ZCR (Skyhawk)
b37448
- 0x9005:0x0285:0x9005:0x028F: ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator)
b37448
- 0x9005:0x0285:0x9005:0x0290: AAR-2410SA PCI SATA 4ch (Jaguar II)
b37448
- 0x9005:0x0285:0x9005:0x0292: AAR-2810SA PCI SATA 8ch (Corsair-8)
b37448
- 0x9005:0x0285:0x9005:0x0293: AAR-21610SA PCI SATA 16ch (Corsair-16)
b37448
- 0x9005:0x0285:0x9005:0x0294: ESD SO-DIMM PCI-X SATA ZCR (Prowler)
b37448
- 0x9005:0x0285:0x9005:0x0296: ASR-2240S (SabreExpress)
b37448
- 0x9005:0x0285:0x9005:0x0297: ASR-4005
b37448
- 0x9005:0x0285:0x9005:0x0298: ASR-4000 (BlackBird)
b37448
- 0x9005:0x0285:0x9005:0x0299: ASR-4800SAS (Marauder-X)
b37448
- 0x9005:0x0285:0x9005:0x029A: ASR-4805SAS (Marauder-E)
b37448
- 0x9005:0x0285:0x9005:0x02A4: ICP9085LI (Marauder-X)
b37448
- 0x9005:0x0285:0x9005:0x02A5: ICP5085BR (Marauder-E)
b37448
- 0x9005:0x0286: Adaptec Rocket Catch All
b37448
- 0x9005:0x0286:0x1014:0x9540: IBM 8k/8k-l4 (Aurora Lite)
b37448
- 0x9005:0x0286:0x1014:0x9580: IBM 8k/8k-l8 (Aurora)
b37448
- 0x9005:0x0286:0x9005:0x028C: ASR-2230S/ASR-2230SLP PCI-X (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x028D: ASR-2130S (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x029B: AAR-2820SA (Intruder)
b37448
- 0x9005:0x0286:0x9005:0x029C: AAR-2620SA (Intruder)
b37448
- 0x9005:0x0286:0x9005:0x029D: AAR-2420SA (Intruder)
b37448
- 0x9005:0x0286:0x9005:0x029E: ICP9024RO (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x029F: ICP9014RO (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x02A0: ICP9047MA (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x02A1: ICP9087MA (Lancer)
b37448
- 0x9005:0x0286:0x9005:0x02A2: ASR-3800 (Hurricane44)
b37448
- 0x9005:0x0286:0x9005:0x02A3: ICP5445AU (Hurricane44)
b37448
- 0x9005:0x0286:0x9005:0x02A6: ICP9067MA (Intruder-6)
b37448
- 0x9005:0x0286:0x9005:0x0800: Callisto Jupiter Platform
b37448
- 0x9005:0x0287:0x9005:0x0800: Themisto Jupiter Platform
b37448
- 0x9005:0x0288: Adaptec NEMER/ARK Catch All
b37448
b37448
b37448
%prep
e115da
%autosetup -p1 -n %{pkg}-%{driver_version}
b37448
b37448
b37448
%build
b37448
pushd src
b37448
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
b37448
popd
b37448
b37448
b37448
%install
b37448
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
b37448
b37448
# Make .ko objects temporarily executable for automatic stripping
b37448
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
b37448
a70a84
# Generate depmod.conf
a70a84
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
a70a84
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
a70a84
do
a70a84
    echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
a70a84
done
a70a84
b37448
b37448
%clean
b37448
%{__rm} -rf %{buildroot}
b37448
b37448
b37448
%post
f6d9e1
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
a70a84
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
f6d9e1
f6d9e1
f6d9e1
%preun
f6d9e1
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
a70a84
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
b37448
b37448
b37448
%postun
a70a84
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
f6d9e1
then
a70a84
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
a70a84
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
f6d9e1
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
a70a84
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
f6d9e1
fi
f6d9e1
f6d9e1
a70a84
%pretrans -p <lua>
a70a84
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
a70a84
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
a70a84
a70a84
f6d9e1
%posttrans
a70a84
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
f6d9e1
then
a70a84
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
a70a84
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
f6d9e1
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
a70a84
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
f6d9e1
fi
b37448
b37448
b37448
%files
b37448
%defattr(644,root,root,755)
b37448
/lib/modules/%{kernel_version}.%{_arch}
883f56
%license LICENSES
a70a84
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
b37448
b37448
b37448
%changelog
Kmods SIG adba78
* Tue Mar 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.373-1
Kmods SIG adba78
- Update to 4.18.0-373.el8
Kmods SIG adba78
849717
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-5
849717
- Add obsoletes for update path
849717
2ca6c9
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-4
2ca6c9
- Enable ppc64le
2ca6c9
Kmods SIG d7a2a8
* Mon Jan 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.257-3
Kmods SIG d7a2a8
- Rebuild for 4.18.0-358.el8
Kmods SIG d7a2a8
e75179
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-2
e75179
- Rebuild for 4.18.0-326.el8
e75179
0c4c34
* Wed Oct 27 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.257-1
1d52b0
- Convert to kABI tracking kmod package (kernel >= 4.18.0-315.el8)
25d04b
- Build 4.18.0-257.el8 for 4.18.0-315.el8
1d52b0
- Use release number independent of kernel
1d52b0
- Add driver release number to version