Blame SPECS/kmod-mptspi.spec

246924
%global pkg mptspi
246924
Kmods SIG d96508
%global driver_version 5.14.0-79.el9
246924
Kmods SIG 58ffcd
%global kernel_version 5.14.0-105.el9
246924
246924
%global debug_package %{nil}
246924
246924
%global __spec_install_post \
246924
  %{?__debug_package:%{__debug_install_post}} \
246924
  %{__arch_install_post} \
246924
  %{__os_install_post} \
246924
  %{__mod_compress_install_post}
246924
246924
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
246924
246924
246924
Name:             kmod-%{pkg}
Kmods SIG d96508
Version:          5.14.0.79
Kmods SIG 58ffcd
Release:          8%{?dist}
246924
Summary:          Fusion MPT SPI Host (%{pkg}) driver
246924
246924
License:          GPLv2
246924
URL:              https://www.kernel.org/
246924
246924
Source0:          %{pkg}-%{driver_version}.tar.xz
246924
Patch1:           0001-add-deprecated-ids.patch
246924
Patch2:           0002-remove-unsupported-warning.patch
246924
4d60a3
ExclusiveArch:    x86_64 aarch64 ppc64le
246924
246924
BuildRequires:    elfutils-libelf-devel
246924
BuildRequires:    gcc
a01306
BuildRequires:    kernel-rpm-macros
246924
BuildRequires:    kmod
246924
BuildRequires:    make
246924
BuildRequires:    redhat-rpm-config
246924
BuildRequires:    xz
246924
a01306
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
246924
BuildRequires:    kernel-devel = %{kernel_version}
246924
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
246924
a01306
Requires:         kernel >= %{kernel_version}
a01306
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
a01306
Requires:         kernel-modules >= %{kernel_version}
a01306
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
246924
246924
Provides:         installonlypkg(kernel-module)
a01306
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
246924
a01306
Requires(post):   %{_sbindir}/depmod
a01306
Requires(postun): %{_sbindir}/depmod
246924
a01306
Requires(post):   %{_sbindir}/weak-modules
a01306
Requires(postun): %{_sbindir}/weak-modules
246924
246924
fd78c5
%if "%{version}" == "5.14.0.1" && "%{release}" == "10%{?dist}"
fd78c5
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-9%{?dist}
fd78c5
%endif
fd78c5
fd78c5
246924
%description
246924
This package provides the Fusion MPT SPI Host (%{pkg}) driver.  Compared to the
246924
in-kernel driver this driver is not restricted to the virtualization use case.
246924
It supports the following adapters:
246924
246924
- 0x1000:0x0030: LSI 53C1020/53C1020A/53C1030
246924
- 0x1000:0x0040: LSI 53C1035
246924
- 0x117C:0x0030: ATTO UL4D
246924
246924
246924
%prep
246924
%autosetup -p1 -n %{pkg}-%{driver_version}
246924
246924
246924
%build
246924
pushd src
246924
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
246924
popd
246924
246924
246924
%install
246924
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/message/fusion src/%{pkg}.ko
246924
246924
# Make .ko objects temporarily executable for automatic stripping
246924
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
246924
a01306
# Generate depmod.conf
a01306
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
a01306
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
a01306
do
a01306
    echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
a01306
done
a01306
246924
246924
%clean
246924
%{__rm} -rf %{buildroot}
246924
246924
246924
%post
246924
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
a01306
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/message/fusion/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
246924
246924
246924
%preun
246924
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
a01306
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
246924
246924
246924
%postun
a01306
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
246924
then
a01306
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
a01306
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
246924
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
a01306
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
246924
fi
246924
246924
a01306
%pretrans -p <lua>
a01306
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
a01306
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
a01306
a01306
246924
%posttrans
a01306
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
246924
then
a01306
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
a01306
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
246924
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
a01306
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
246924
fi
246924
246924
246924
%files
246924
%defattr(644,root,root,755)
246924
/lib/modules/%{kernel_version}.%{_arch}
9c4fc4
%license LICENSES
a01306
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
246924
246924
246924
%changelog
Kmods SIG 58ffcd
* Tue Jun 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-8
Kmods SIG 58ffcd
- Rebuild for 5.14.0-105.el9
Kmods SIG 58ffcd
Kmods SIG 6b17f5
* Wed Jun 01 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-7
Kmods SIG 6b17f5
- Rebuild for 5.14.0-101.el9
Kmods SIG 6b17f5
Kmods SIG e623e5
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-6
Kmods SIG e623e5
- Rebuild for 5.14.0-96.el9
Kmods SIG e623e5
Kmods SIG 5b14f8
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-5
Kmods SIG 5b14f8
- Rebuild for 5.14.0-92.el9
Kmods SIG 5b14f8
Kmods SIG 818f69
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-4
Kmods SIG 818f69
- Rebuild for 5.14.0-86.el9
Kmods SIG 818f69
Kmods SIG a79d3d
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-3
Kmods SIG a79d3d
- Rebuild for 5.14.0-85.el9
Kmods SIG a79d3d
Kmods SIG 6bbd70
* Thu May 26 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-2
Kmods SIG 6bbd70
- Rebuild for 5.14.0-83.el9
Kmods SIG 6bbd70
Kmods SIG d96508
* Fri Apr 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.79-1
Kmods SIG d96508
- Update to 5.14.0-79.el9
Kmods SIG d96508
Kmods SIG 84a5c4
* Wed Apr 13 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-24
Kmods SIG 84a5c4
- Rebuild for 5.14.0-78.el9
Kmods SIG 84a5c4
Kmods SIG 95c08e
* Tue Apr 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-23
Kmods SIG 95c08e
- Rebuild for 5.14.0-77.el9
Kmods SIG 95c08e
Kmods SIG 432347
* Mon Mar 28 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-22
Kmods SIG 432347
- Rebuild for 5.14.0-75.el9
Kmods SIG 432347
Kmods SIG 94039f
* Tue Mar 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-21
Kmods SIG 94039f
- Rebuild for 5.14.0-73.el9
Kmods SIG 94039f
Kmods SIG c838d6
* Thu Feb 24 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-20
Kmods SIG c838d6
- Rebuild for 5.14.0-65.el9
Kmods SIG c838d6
Kmods SIG 44188d
* Sun Feb 20 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-19
Kmods SIG 44188d
- Rebuild for 5.14.0-62.el9
Kmods SIG 44188d
Kmods SIG 8bf275
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-18
Kmods SIG 8bf275
- Rebuild for 5.14.0-60.el9
Kmods SIG 8bf275
Kmods SIG 976c7f
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-17
Kmods SIG 976c7f
- Rebuild for 5.14.0-58.el9
Kmods SIG 976c7f
Kmods SIG 7de2be
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-16
Kmods SIG 7de2be
- Rebuild for 5.14.0-57.el9
Kmods SIG 7de2be
Kmods SIG 0977d0
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-15
Kmods SIG 0977d0
- Rebuild for 5.14.0-56.el9
Kmods SIG 0977d0
Kmods SIG 5f78f5
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-14
Kmods SIG 5f78f5
- Rebuild for 5.14.0-55.el9
Kmods SIG 5f78f5
Kmods SIG 2b8bec
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-13
Kmods SIG 2b8bec
- Rebuild for 5.14.0-51.el9
Kmods SIG 2b8bec
Kmods SIG 352631
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-12
Kmods SIG 352631
- Rebuild for 5.14.0-48.el9
Kmods SIG 352631
Kmods SIG a8ca79
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-11
Kmods SIG a8ca79
- Rebuild for 5.14.0-47.el9
Kmods SIG a8ca79
4d60a3
* Wed Jan 19 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-10
4d60a3
- Enable ppc64le
4d60a3
Kmods SIG 599cdb
* Wed Jan 19 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-9
Kmods SIG 599cdb
- Rebuild for 5.14.0-44.el9
Kmods SIG 599cdb
Kmods SIG af4f18
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
Kmods SIG af4f18
- Rebuild for 5.14.0-43.el9
Kmods SIG af4f18
Kmods SIG ad9c95
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
Kmods SIG ad9c95
- Rebuild for 5.14.0-42.el9
Kmods SIG ad9c95
Kmods SIG 48a5eb
* Fri Jan 14 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
Kmods SIG 48a5eb
- Rebuild for 5.14.0-41.el9
Kmods SIG 48a5eb
553341
* Sat Dec 25 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
553341
- Rebuild for 5.14.0-39.el9
553341
- Skip unreleased kernel -38
Kmods SIG 4a9f1f
Kmods SIG 3376e4
* Thu Dec 23 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
Kmods SIG 3376e4
- Rebuild for 5.14.0-37.el9
Kmods SIG 3376e4
Kmods SIG e3eb45
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
Kmods SIG e3eb45
- Rebuild for 5.14.0-36.el9
Kmods SIG e3eb45
a54ce2
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
a54ce2
- Rebuild for 5.14.0-34.el9
a54ce2
- Skip unreleased kernel -32 and -33
Kmods SIG 3f1f74
a01306
* Thu Dec 16 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-1
a01306
- Convert to kABI tracking kmod package (kernel >= 5.14.0-31.el9)