|
|
e38a59 |
%global pkg arcmsr
|
|
|
e38a59 |
|
|
Kmods SIG |
dc7c06 |
%global driver_version 4.18.0-305.el8
|
|
Kmods SIG |
dc7c06 |
|
|
|
66f715 |
%global kernel_version 4.18.0-348.el8
|
|
|
e38a59 |
|
|
|
e38a59 |
%global _use_internal_dependency_generator 0
|
|
|
872193 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
872193 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
e38a59 |
|
|
|
e38a59 |
%global debug_package %{nil}
|
|
|
e38a59 |
|
|
|
e38a59 |
%global __spec_install_post \
|
|
|
e38a59 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
e38a59 |
%{__arch_install_post} \
|
|
|
e38a59 |
%{__os_install_post} \
|
|
|
e38a59 |
%{__mod_compress_install_post}
|
|
|
e38a59 |
|
|
|
e38a59 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
Name: kmod-%{pkg}
|
|
Kmods SIG |
dc7c06 |
Version: 4.18.0.305
|
|
|
1aaf13 |
Release: 2%{?dist}
|
|
|
e38a59 |
Summary: ARECA ARC11xx/12xx/13xx/16xx SATA/SAS RAID Controller (%{pkg}) driver
|
|
|
e38a59 |
|
|
|
e38a59 |
License: GPLv2
|
|
|
e38a59 |
URL: https://www.kernel.org/
|
|
|
e38a59 |
|
|
Kmods SIG |
dc7c06 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
Kmods SIG |
dc7c06 |
Patch1: 0001-scsi-arcmsr-Fix-error-of-resuming-from-hibernation-f.patch
|
|
Kmods SIG |
dc7c06 |
Patch9999: 9999-enable-arcmsr.patch
|
|
|
e38a59 |
|
|
|
1aaf13 |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
|
e38a59 |
|
|
|
e38a59 |
BuildRequires: elfutils-libelf-devel
|
|
|
e38a59 |
BuildRequires: gcc
|
|
|
872193 |
BuildRequires: kernel-rpm-macros
|
|
|
e38a59 |
BuildRequires: kmod
|
|
|
e38a59 |
BuildRequires: make
|
|
|
e38a59 |
BuildRequires: redhat-rpm-config
|
|
|
e38a59 |
BuildRequires: xz
|
|
|
e38a59 |
|
|
|
872193 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
e38a59 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
e38a59 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
e38a59 |
|
|
|
872193 |
Requires: kernel >= %{kernel_version}
|
|
|
872193 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
872193 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
872193 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
e38a59 |
|
|
|
e38a59 |
Provides: installonlypkg(kernel-module)
|
|
|
872193 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
e38a59 |
|
|
|
872193 |
Requires(post): %{_sbindir}/depmod
|
|
|
872193 |
Requires(postun): %{_sbindir}/depmod
|
|
|
e38a59 |
|
|
|
872193 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
872193 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%description
|
|
|
e38a59 |
This driver supports ARECA's SATA/SAS RAID controller cards.
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%prep
|
|
Kmods SIG |
dc7c06 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%build
|
|
|
e38a59 |
pushd src
|
|
|
e38a59 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
e38a59 |
popd
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%install
|
|
|
e38a59 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
e38a59 |
%{__install} -d %{buildroot}/%{_sysconfdir}/dracut.conf.d/
|
|
|
e38a59 |
echo "add_drivers+=\" %{pkg} \"" > %{buildroot}/%{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
e38a59 |
|
|
|
e38a59 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
e38a59 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%clean
|
|
|
e38a59 |
%{__rm} -rf %{buildroot}
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%post
|
|
|
e38a59 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
872193 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%preun
|
|
|
e38a59 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
872193 |
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
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%postun
|
|
|
872193 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
e38a59 |
then
|
|
|
872193 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
872193 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
e38a59 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
872193 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
e38a59 |
fi
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
872193 |
%pretrans -p <lua>
|
|
|
872193 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
872193 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
872193 |
|
|
|
872193 |
|
|
|
e38a59 |
%posttrans
|
|
|
872193 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
e38a59 |
then
|
|
|
872193 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
872193 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
e38a59 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
872193 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
e38a59 |
fi
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%files
|
|
|
e38a59 |
%defattr(644,root,root,755)
|
|
|
e38a59 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
32586b |
%license LICENSES
|
|
|
e38a59 |
%config(noreplace) %{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
e38a59 |
|
|
|
e38a59 |
|
|
|
e38a59 |
%changelog
|
|
|
1aaf13 |
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.305-2
|
|
|
1aaf13 |
- Enable ppc64le
|
|
|
1aaf13 |
|
|
Kmods SIG |
dc7c06 |
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.305-1
|
|
Kmods SIG |
dc7c06 |
- Switch to EL kernel source and versioning
|
|
Kmods SIG |
dc7c06 |
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|