Blame SPECS/kmod-isci.spec

b1bdcf
%global pkg isci
b1bdcf
Kmods SIG 1c587a
%global driver_version 5.14.0-1.el9
Kmods SIG 1c587a
Kmods SIG 7e98f7
%global kernel_version 5.14.0-62.el9
b1bdcf
b1bdcf
%global debug_package %{nil}
b1bdcf
b1bdcf
%global __spec_install_post \
b1bdcf
  %{?__debug_package:%{__debug_install_post}} \
b1bdcf
  %{__arch_install_post} \
b1bdcf
  %{__os_install_post} \
b1bdcf
  %{__mod_compress_install_post}
b1bdcf
b1bdcf
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
b1bdcf
b1bdcf
b1bdcf
Name:             kmod-%{pkg}
Kmods SIG 1c587a
Version:          5.14.0.1
Kmods SIG 7e98f7
Release:          21%{?dist}
b1bdcf
Summary:          Intel(R) C600 Series Chipset SAS Controller (%{pkg}) driver
b1bdcf
b1bdcf
License:          GPLv2 and (BSD or GPLv2)
b1bdcf
URL:              https://www.kernel.org/
b1bdcf
Kmods SIG 1c587a
Source0:          %{pkg}-%{driver_version}.tar.xz
Kmods SIG 1c587a
Patch9999:        9999-enable-isci.patch
b1bdcf
b1bdcf
ExclusiveArch:    x86_64
b1bdcf
b1bdcf
BuildRequires:    elfutils-libelf-devel
b1bdcf
BuildRequires:    gcc
d7b5cd
BuildRequires:    kernel-rpm-macros
b1bdcf
BuildRequires:    kmod
b1bdcf
BuildRequires:    make
b1bdcf
BuildRequires:    redhat-rpm-config
b1bdcf
BuildRequires:    xz
b1bdcf
d7b5cd
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
b1bdcf
BuildRequires:    kernel-devel = %{kernel_version}
b1bdcf
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
b1bdcf
d7b5cd
Requires:         kernel >= %{kernel_version}
d7b5cd
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
d7b5cd
Requires:         kernel-modules >= %{kernel_version}
d7b5cd
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
b1bdcf
b1bdcf
Provides:         installonlypkg(kernel-module)
d7b5cd
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
b1bdcf
d7b5cd
Requires(post):   %{_sbindir}/depmod
d7b5cd
Requires(postun): %{_sbindir}/depmod
b1bdcf
d7b5cd
Requires(post):   %{_sbindir}/weak-modules
d7b5cd
Requires(postun): %{_sbindir}/weak-modules
b1bdcf
b1bdcf
305263
%if "%{version}" == "5.14.0.1" && "%{release}" == "11%{?dist}"
305263
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-10%{?dist}
305263
%endif
305263
305263
b1bdcf
%description
b1bdcf
This driver supports the 6Gb/s SAS capabilities of the storage control unit
b1bdcf
found in the Intel(R) C600 series chipset. Supported devices:
b1bdcf
b1bdcf
- 0x8086:0x1D60
b1bdcf
- 0x8086:0x1D61
b1bdcf
- 0x8086:0x1D62
b1bdcf
- 0x8086:0x1D63
b1bdcf
- 0x8086:0x1D64
b1bdcf
- 0x8086:0x1D65
b1bdcf
- 0x8086:0x1D66
b1bdcf
- 0x8086:0x1D67
b1bdcf
- 0x8086:0x1D68
b1bdcf
- 0x8086:0x1D69
b1bdcf
- 0x8086:0x1D6A
b1bdcf
- 0x8086:0x1D6B
b1bdcf
b1bdcf
b1bdcf
%prep
Kmods SIG 1c587a
%autosetup -p1 -n %{pkg}-%{driver_version}
b1bdcf
b1bdcf
b1bdcf
%build
b1bdcf
pushd src
b1bdcf
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
b1bdcf
popd
b1bdcf
b1bdcf
b1bdcf
%install
b1bdcf
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
b1bdcf
b1bdcf
# Make .ko objects temporarily executable for automatic stripping
b1bdcf
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
b1bdcf
b1bdcf
b1bdcf
%clean
b1bdcf
%{__rm} -rf %{buildroot}
b1bdcf
b1bdcf
b1bdcf
%post
b1bdcf
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
d7b5cd
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
b1bdcf
b1bdcf
b1bdcf
%preun
b1bdcf
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
d7b5cd
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
b1bdcf
b1bdcf
b1bdcf
%postun
d7b5cd
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
b1bdcf
then
d7b5cd
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
d7b5cd
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
b1bdcf
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
d7b5cd
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
b1bdcf
fi
b1bdcf
b1bdcf
d7b5cd
%pretrans -p <lua>
d7b5cd
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
d7b5cd
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
d7b5cd
d7b5cd
b1bdcf
%posttrans
d7b5cd
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
b1bdcf
then
d7b5cd
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
d7b5cd
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
b1bdcf
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
d7b5cd
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
b1bdcf
fi
b1bdcf
b1bdcf
b1bdcf
%files
b1bdcf
%defattr(644,root,root,755)
b1bdcf
/lib/modules/%{kernel_version}.%{_arch}
d83181
%license LICENSES
b1bdcf
b1bdcf
b1bdcf
%changelog
Kmods SIG 7e98f7
* Sun Feb 20 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-21
Kmods SIG 7e98f7
- Rebuild for 5.14.0-62.el9
Kmods SIG 7e98f7
Kmods SIG 5f51a7
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-20
Kmods SIG 5f51a7
- Rebuild for 5.14.0-60.el9
Kmods SIG 5f51a7
Kmods SIG 18d834
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-19
Kmods SIG 18d834
- Rebuild for 5.14.0-58.el9
Kmods SIG 18d834
Kmods SIG faa88b
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-18
Kmods SIG faa88b
- Rebuild for 5.14.0-57.el9
Kmods SIG faa88b
Kmods SIG cc78f5
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-17
Kmods SIG cc78f5
- Rebuild for 5.14.0-56.el9
Kmods SIG cc78f5
Kmods SIG 410bb0
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-16
Kmods SIG 410bb0
- Rebuild for 5.14.0-55.el9
Kmods SIG 410bb0
Kmods SIG dd25d3
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-15
Kmods SIG dd25d3
- Rebuild for 5.14.0-51.el9
Kmods SIG dd25d3
Kmods SIG 71a448
* Tue Feb 01 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-14
Kmods SIG 71a448
- Rebuild for 5.14.0-50.el9
Kmods SIG 71a448
Kmods SIG 8ae9e7
* Sat Jan 29 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-13
Kmods SIG 8ae9e7
- Rebuild for 5.14.0-49.el9
Kmods SIG 8ae9e7
Kmods SIG fa6976
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-12
Kmods SIG fa6976
- Rebuild for 5.14.0-48.el9
Kmods SIG fa6976
2553b8
* Wed Jan 26 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-11
2553b8
- Drop dracut conf
2553b8
Kmods SIG 9ab645
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-10
Kmods SIG 9ab645
- Rebuild for 5.14.0-47.el9
Kmods SIG 9ab645
Kmods SIG 781272
* Wed Jan 19 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-9
Kmods SIG 781272
- Rebuild for 5.14.0-44.el9
Kmods SIG 781272
Kmods SIG 029bda
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
Kmods SIG 029bda
- Rebuild for 5.14.0-43.el9
Kmods SIG 029bda
Kmods SIG 4b459e
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
Kmods SIG 4b459e
- Rebuild for 5.14.0-42.el9
Kmods SIG 4b459e
Kmods SIG c23813
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
Kmods SIG c23813
- Rebuild for 5.14.0-41.el9
Kmods SIG c23813
Kmods SIG 363157
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
Kmods SIG 363157
- Rebuild for 5.14.0-39.el9
Kmods SIG 363157
Kmods SIG ece54d
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
Kmods SIG ece54d
- Rebuild for 5.14.0-37.el9
Kmods SIG ece54d
Kmods SIG b76a79
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
Kmods SIG b76a79
- Rebuild for 5.14.0-36.el9
Kmods SIG b76a79
Kmods SIG c99775
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
Kmods SIG c99775
- Rebuild for 5.14.0-34.el9
Kmods SIG c99775
Kmods SIG 1c587a
* Thu Jan 13 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-1
Kmods SIG 1c587a
- Switch to EL kernel source and versioning
Kmods SIG 1c587a
- kABI tracking kmod package (kernel >= 5.14.0-31.el9)