Blame SPECS/kmod-hpsa.spec

b5727a
%global pkg hpsa
b5727a
Kmods SIG 2dbab2
%global driver_version 5.14.0-57.el9
b5727a
Kmods SIG ff8b4f
%global kernel_version 5.14.0-115.el9
b5727a
b5727a
%global debug_package %{nil}
b5727a
b5727a
%global __spec_install_post \
b5727a
  %{?__debug_package:%{__debug_install_post}} \
b5727a
  %{__arch_install_post} \
b5727a
  %{__os_install_post} \
b5727a
  %{__mod_compress_install_post}
b5727a
b5727a
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
b5727a
b5727a
b5727a
Name:             kmod-%{pkg}
Kmods SIG 2dbab2
Version:          5.14.0.57
Kmods SIG ff8b4f
Release:          18%{?dist}
b5727a
Summary:          HP Smart Array Controller (%{pkg}) driver
b5727a
b5727a
License:          GPLv2
b5727a
URL:              https://www.kernel.org/
b5727a
b5727a
Source0:          %{pkg}-%{driver_version}.tar.xz
b5727a
Patch1:           0001-add-deprecated-ids.patch
b5727a
2e9baa
ExclusiveArch:    x86_64 aarch64 ppc64le
b5727a
b5727a
BuildRequires:    elfutils-libelf-devel
b5727a
BuildRequires:    gcc
9df476
BuildRequires:    kernel-rpm-macros
b5727a
BuildRequires:    kmod
b5727a
BuildRequires:    make
b5727a
BuildRequires:    redhat-rpm-config
b5727a
BuildRequires:    xz
b5727a
9df476
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
b5727a
BuildRequires:    kernel-devel = %{kernel_version}
b5727a
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
b5727a
9df476
Requires:         kernel >= %{kernel_version}
9df476
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
9df476
Requires:         kernel-modules >= %{kernel_version}
9df476
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
b5727a
b5727a
Provides:         installonlypkg(kernel-module)
9df476
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
b5727a
9df476
Requires(post):   %{_sbindir}/depmod
9df476
Requires(postun): %{_sbindir}/depmod
b5727a
9df476
Requires(post):   %{_sbindir}/weak-modules
9df476
Requires(postun): %{_sbindir}/weak-modules
b5727a
b5727a
96caf9
%if "%{version}" == "5.14.0.1" && "%{release}" == "10%{?dist}"
96caf9
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-9%{?dist}
96caf9
%endif
96caf9
96caf9
b5727a
%description
b5727a
This package provides the HP Smart Array Controller (%{pkg}) driver.  Compared
b5727a
to the in-kernel driver this driver re-enables support for deprecated adapters
b5727a
originally used with the old cciss driver.
b5727a
b5727a
- 0x0E11:*:*:*:01:04: Compaq
b5727a
- 0x103C:*:*:*:01:04: HP
b5727a
b5727a
b5727a
%prep
b5727a
%autosetup -p1 -n %{pkg}-%{driver_version}
b5727a
b5727a
b5727a
%build
b5727a
pushd src
b5727a
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
b5727a
popd
b5727a
b5727a
b5727a
%install
b5727a
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi src/%{pkg}.ko
b5727a
b5727a
# Make .ko objects temporarily executable for automatic stripping
b5727a
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
b5727a
9df476
# Generate depmod.conf
9df476
%{__install} -d %{buildroot}/%{_sysconfdir}/depmod.d/
9df476
for kmod in $(find %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra -type f -name \*.ko -printf "%%P\n" | sort)
9df476
do
9df476
    echo "override $(basename $kmod .ko) * weak-updates/$(dirname $kmod)" >> %{buildroot}/%{_sysconfdir}/depmod.d/%{pkg}.conf
9df476
done
9df476
b5727a
b5727a
%clean
b5727a
%{__rm} -rf %{buildroot}
b5727a
b5727a
b5727a
%post
b5727a
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
9df476
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
b5727a
b5727a
b5727a
%preun
b5727a
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
9df476
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
b5727a
b5727a
b5727a
%postun
9df476
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
b5727a
then
9df476
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
9df476
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
b5727a
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
9df476
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
b5727a
fi
b5727a
b5727a
9df476
%pretrans -p <lua>
9df476
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
9df476
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
9df476
9df476
b5727a
%posttrans
9df476
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
b5727a
then
9df476
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
9df476
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
b5727a
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
9df476
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
b5727a
fi
b5727a
b5727a
b5727a
%files
b5727a
%defattr(644,root,root,755)
b5727a
/lib/modules/%{kernel_version}.%{_arch}
e419cf
%license LICENSES
9df476
%config(noreplace) %{_sysconfdir}/depmod.d/%{pkg}.conf
b5727a
b5727a
b5727a
%changelog
Kmods SIG ff8b4f
* Tue Jun 21 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-18
Kmods SIG ff8b4f
- Rebuild for 5.14.0-115.el9
Kmods SIG ff8b4f
Kmods SIG 4ce89e
* Tue Jun 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-17
Kmods SIG 4ce89e
- Rebuild for 5.14.0-105.el9
Kmods SIG 4ce89e
Kmods SIG 09bcb9
* Wed Jun 01 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-16
Kmods SIG 09bcb9
- Rebuild for 5.14.0-101.el9
Kmods SIG 09bcb9
Kmods SIG 74897e
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-15
Kmods SIG 74897e
- Rebuild for 5.14.0-96.el9
Kmods SIG 74897e
Kmods SIG cefd71
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-14
Kmods SIG cefd71
- Rebuild for 5.14.0-92.el9
Kmods SIG cefd71
Kmods SIG 2a9f13
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-13
Kmods SIG 2a9f13
- Rebuild for 5.14.0-86.el9
Kmods SIG 2a9f13
Kmods SIG 0072ba
* Fri May 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-12
Kmods SIG 0072ba
- Rebuild for 5.14.0-85.el9
Kmods SIG 0072ba
Kmods SIG 6b66b9
* Thu May 26 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-11
Kmods SIG 6b66b9
- Rebuild for 5.14.0-83.el9
Kmods SIG 6b66b9
Kmods SIG 0c1542
* Fri Apr 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-10
Kmods SIG 0c1542
- Rebuild for 5.14.0-79.el9
Kmods SIG 0c1542
Kmods SIG 9a2ac7
* Wed Apr 13 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-9
Kmods SIG 9a2ac7
- Rebuild for 5.14.0-78.el9
Kmods SIG 9a2ac7
Kmods SIG cdaa62
* Tue Apr 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-8
Kmods SIG cdaa62
- Rebuild for 5.14.0-77.el9
Kmods SIG cdaa62
Kmods SIG 282a20
* Mon Mar 28 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-7
Kmods SIG 282a20
- Rebuild for 5.14.0-75.el9
Kmods SIG 282a20
Kmods SIG 2cf804
* Tue Mar 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-6
Kmods SIG 2cf804
- Rebuild for 5.14.0-73.el9
Kmods SIG 2cf804
Kmods SIG 57832b
* Thu Feb 24 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-5
Kmods SIG 57832b
- Rebuild for 5.14.0-65.el9
Kmods SIG 57832b
Kmods SIG 6d6798
* Sun Feb 20 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-4
Kmods SIG 6d6798
- Rebuild for 5.14.0-62.el9
Kmods SIG 6d6798
Kmods SIG 05b5e0
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-3
Kmods SIG 05b5e0
- Rebuild for 5.14.0-60.el9
Kmods SIG 05b5e0
Kmods SIG 348911
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-2
Kmods SIG 348911
- Rebuild for 5.14.0-58.el9
Kmods SIG 348911
Kmods SIG 2dbab2
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.57-1
Kmods SIG 2dbab2
- Update to 5.14.0-57.el9
Kmods SIG 2dbab2
Kmods SIG 8618e7
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-17
Kmods SIG 8618e7
- Rebuild for 5.14.0-56.el9
Kmods SIG 8618e7
Kmods SIG 5d9f15
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-16
Kmods SIG 5d9f15
- Rebuild for 5.14.0-55.el9
Kmods SIG 5d9f15
Kmods SIG 5a80a5
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-15
Kmods SIG 5a80a5
- Rebuild for 5.14.0-51.el9
Kmods SIG 5a80a5
Kmods SIG 4b0d51
* Tue Feb 01 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-14
Kmods SIG 4b0d51
- Rebuild for 5.14.0-50.el9
Kmods SIG 4b0d51
Kmods SIG e11c46
* Sat Jan 29 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-13
Kmods SIG e11c46
- Rebuild for 5.14.0-49.el9
Kmods SIG e11c46
Kmods SIG 529d92
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-12
Kmods SIG 529d92
- Rebuild for 5.14.0-48.el9
Kmods SIG 529d92
Kmods SIG 0d5cf5
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-11
Kmods SIG 0d5cf5
- Rebuild for 5.14.0-47.el9
Kmods SIG 0d5cf5
2e9baa
* Wed Jan 19 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-10
2e9baa
- Enable ppc64le
2e9baa
Kmods SIG 4bd193
* Wed Jan 19 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-9
Kmods SIG 4bd193
- Rebuild for 5.14.0-44.el9
Kmods SIG 4bd193
Kmods SIG 162ac6
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
Kmods SIG 162ac6
- Rebuild for 5.14.0-43.el9
Kmods SIG 162ac6
Kmods SIG 1ef7a4
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
Kmods SIG 1ef7a4
- Rebuild for 5.14.0-42.el9
Kmods SIG 1ef7a4
Kmods SIG 997acd
* Fri Jan 14 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
Kmods SIG 997acd
- Rebuild for 5.14.0-41.el9
Kmods SIG 997acd
9d8cde
* Sat Dec 25 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
9d8cde
- Rebuild for 5.14.0-39.el9
9d8cde
- Skip unreleased kernel -38
Kmods SIG 93ee22
Kmods SIG 419cc8
* Thu Dec 23 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
Kmods SIG 419cc8
- Rebuild for 5.14.0-37.el9
Kmods SIG 419cc8
Kmods SIG e9bfa2
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
Kmods SIG e9bfa2
- Rebuild for 5.14.0-36.el9
Kmods SIG e9bfa2
1b9a1e
* Wed Dec 22 2021 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
1b9a1e
- Rebuild for 5.14.0-34.el9
1b9a1e
- Skip unreleased kernel -32 and -33
Kmods SIG ff3cc5
9df476
* Thu Dec 16 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-1
9df476
- Convert to kABI tracking kmod package (kernel >= 5.14.0-31.el9)