|
|
eaa0ab |
%global pkg arcmsr
|
|
|
eaa0ab |
|
|
|
43dd52 |
%global kernel_version 4.18.0-331.el8
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%global _use_internal_dependency_generator 0
|
|
|
eaa0ab |
%global __find_requires %{nil}
|
|
|
eaa0ab |
%global __find_provides /usr/lib/rpm/find-provides
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%global debug_package %{nil}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%global __spec_install_post \
|
|
|
eaa0ab |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
eaa0ab |
%{__arch_install_post} \
|
|
|
eaa0ab |
%{__os_install_post} \
|
|
|
eaa0ab |
%{__mod_compress_install_post}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Name: kmod-%{pkg}
|
|
|
eaa0ab |
Version: 4.19
|
|
|
e65cff |
Release: 3%{?dist}
|
|
|
eaa0ab |
Summary: ARECA ARC11xx/12xx/13xx/16xx SATA/SAS RAID Controller (%{pkg}) driver
|
|
|
eaa0ab |
|
|
|
eaa0ab |
License: GPLv2
|
|
|
eaa0ab |
URL: https://www.kernel.org/
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
eaa0ab |
|
|
|
eaa0ab |
ExclusiveArch: x86_64 aarch64
|
|
|
eaa0ab |
|
|
|
eaa0ab |
BuildRequires: elfutils-libelf-devel
|
|
|
eaa0ab |
BuildRequires: gcc
|
|
|
eaa0ab |
BuildRequires: kmod
|
|
|
eaa0ab |
BuildRequires: make
|
|
|
eaa0ab |
BuildRequires: redhat-rpm-config
|
|
|
eaa0ab |
BuildRequires: xz
|
|
|
eaa0ab |
|
|
|
eaa0ab |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
eaa0ab |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Requires: kernel-core = %{kernel_version}
|
|
|
eaa0ab |
Requires: kernel-core-uname-r = %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
Requires: kernel-modules = %{kernel_version}
|
|
|
eaa0ab |
Requires: kernel-modules-uname-r = %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Provides: installonlypkg(kernel-module)
|
|
|
bf03cc |
Provides: kernel-modules = %{kernel_version}
|
|
|
eaa0ab |
Provides: %{name}-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Requires(post): /usr/sbin/depmod
|
|
|
eaa0ab |
Requires(postun): /usr/sbin/depmod
|
|
|
eaa0ab |
|
|
|
eaa0ab |
Requires(post): /usr/bin/dracut
|
|
|
eaa0ab |
Requires(postun): /usr/bin/dracut
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%description
|
|
|
eaa0ab |
This driver supports ARECA's SATA/SAS RAID controller cards.
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%prep
|
|
|
eaa0ab |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%build
|
|
|
eaa0ab |
pushd src
|
|
|
eaa0ab |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
eaa0ab |
popd
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%install
|
|
|
eaa0ab |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg} src/%{pkg}.ko
|
|
|
eaa0ab |
%{__install} -d %{buildroot}/%{_sysconfdir}/dracut.conf.d/
|
|
|
eaa0ab |
echo "add_drivers+=\" %{pkg} \"" > %{buildroot}/%{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
eaa0ab |
|
|
|
eaa0ab |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
eaa0ab |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%clean
|
|
|
eaa0ab |
%{__rm} -rf %{buildroot}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%post
|
|
|
eaa0ab |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
eaa0ab |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%preun
|
|
|
eaa0ab |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
eaa0ab |
touch %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%postun
|
|
|
eaa0ab |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
eaa0ab |
else
|
|
|
eaa0ab |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
eaa0ab |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%posttrans
|
|
|
eaa0ab |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch} ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if [ -f /lib/modules/%{kernel_version}.%{_arch}/System.map ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
/usr/sbin/depmod -aeF /lib/modules/%{kernel_version}.%{_arch}/System.map %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
if [ -f /boot/initramfs-%{kernel_version}.%{_arch}.img ]
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if /usr/bin/dracut -f --rebuild /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew %{kernel_version}.%{_arch}
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
if ! cmp -s /boot/initramfs-%{kernel_version}.%{_arch}.img /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
eaa0ab |
then
|
|
|
eaa0ab |
mv /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew /boot/initramfs-%{kernel_version}.%{_arch}.img
|
|
|
eaa0ab |
else
|
|
|
eaa0ab |
rm -f /boot/initramfs-%{kernel_version}.%{_arch}.img.rpmnew
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/%{kernel_version}.%{_arch}
|
|
|
eaa0ab |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
eaa0ab |
fi
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%files
|
|
|
eaa0ab |
%defattr(644,root,root,755)
|
|
|
eaa0ab |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
eaa0ab |
%license COPYING
|
|
|
eaa0ab |
%config(noreplace) %{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
eaa0ab |
|
|
|
eaa0ab |
|
|
|
eaa0ab |
%changelog
|
|
|
e65cff |
* Thu Aug 19 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-3
|
|
|
e65cff |
- Rebuild for 4.18.0-331.el8
|
|
|
e65cff |
|
|
|
c5fe30 |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-2
|
|
|
c5fe30 |
- Rebuild for 4.18.0-326.el8
|
|
|
c5fe30 |
|
|
|
eaa0ab |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-1
|
|
|
eaa0ab |
- Initial version
|