|
Kmods SIG |
d0f18f |
%global pkg 3w-xxxx
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global driver_version 4.18.0-240.el8
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global kernel_version 4.18.0-348.el8
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global _use_internal_dependency_generator 0
|
|
Kmods SIG |
d0f18f |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
Kmods SIG |
d0f18f |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global debug_package %{nil}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global __spec_install_post \
|
|
Kmods SIG |
d0f18f |
%{?__debug_package:%{__debug_install_post}} \
|
|
Kmods SIG |
d0f18f |
%{__arch_install_post} \
|
|
Kmods SIG |
d0f18f |
%{__os_install_post} \
|
|
Kmods SIG |
d0f18f |
%{__mod_compress_install_post}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Name: kmod-%{pkg}
|
|
Kmods SIG |
d0f18f |
Version: 4.18.0.240
|
|
|
6b9167 |
Release: 4%{?dist}
|
|
Kmods SIG |
d0f18f |
Summary: 3ware 5/6/7/8xxx ATA RAID Controller (%{pkg}) driver
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
License: GPLv2
|
|
Kmods SIG |
d0f18f |
URL: https://www.kernel.org/
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
Kmods SIG |
d0f18f |
Patch1: 0001-scsi-3ware-fix-return-0-on-the-error-path-of-probe.patch
|
|
Kmods SIG |
d0f18f |
|
|
|
a2f731 |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
BuildRequires: elfutils-libelf-devel
|
|
Kmods SIG |
d0f18f |
BuildRequires: gcc
|
|
Kmods SIG |
d0f18f |
BuildRequires: kernel-rpm-macros
|
|
Kmods SIG |
d0f18f |
BuildRequires: kmod
|
|
Kmods SIG |
d0f18f |
BuildRequires: make
|
|
Kmods SIG |
d0f18f |
BuildRequires: redhat-rpm-config
|
|
Kmods SIG |
d0f18f |
BuildRequires: xz
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
Kmods SIG |
d0f18f |
BuildRequires: kernel-devel = %{kernel_version}
|
|
Kmods SIG |
d0f18f |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Requires: kernel >= %{kernel_version}
|
|
Kmods SIG |
d0f18f |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
d0f18f |
Requires: kernel-modules >= %{kernel_version}
|
|
Kmods SIG |
d0f18f |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Provides: installonlypkg(kernel-module)
|
|
Kmods SIG |
d0f18f |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Requires(post): %{_sbindir}/depmod
|
|
Kmods SIG |
d0f18f |
Requires(postun): %{_sbindir}/depmod
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
Requires(post): %{_sbindir}/weak-modules
|
|
Kmods SIG |
d0f18f |
Requires(postun): %{_sbindir}/weak-modules
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
|
6b9167 |
%if "%{version}" == "4.18.0.240" && "%{release}" == "2%{?dist}"
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
|
|
|
6b9167 |
%endif
|
|
|
6b9167 |
|
|
|
6b9167 |
%if "%{version}" == "4.18.0.240" && "%{release}" == "3%{?dist}"
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
|
|
|
6b9167 |
%endif
|
|
|
6b9167 |
|
|
|
6b9167 |
%if "%{version}" == "4.18.0.240" && "%{release}" == "4%{?dist}"
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
|
|
|
6b9167 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-3%{?dist}
|
|
|
6b9167 |
%endif
|
|
|
6b9167 |
|
|
|
6b9167 |
|
|
Kmods SIG |
d0f18f |
%description
|
|
Kmods SIG |
d0f18f |
This driver supports 3ware's 5/6/7/8xxx series ATA RAID controller cards.
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%prep
|
|
Kmods SIG |
d0f18f |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%build
|
|
Kmods SIG |
d0f18f |
pushd src
|
|
Kmods SIG |
d0f18f |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
Kmods SIG |
d0f18f |
popd
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%install
|
|
Kmods SIG |
d0f18f |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi src/%{pkg}.ko
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
# Make .ko objects temporarily executable for automatic stripping
|
|
Kmods SIG |
d0f18f |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%clean
|
|
Kmods SIG |
d0f18f |
%{__rm} -rf %{buildroot}
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%post
|
|
Kmods SIG |
d0f18f |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
d0f18f |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/scsi/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%preun
|
|
Kmods SIG |
d0f18f |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
d0f18f |
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
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%postun
|
|
Kmods SIG |
d0f18f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
Kmods SIG |
d0f18f |
then
|
|
Kmods SIG |
d0f18f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
Kmods SIG |
d0f18f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
Kmods SIG |
d0f18f |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
d0f18f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
Kmods SIG |
d0f18f |
fi
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%pretrans -p <lua>
|
|
Kmods SIG |
d0f18f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
Kmods SIG |
d0f18f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%posttrans
|
|
Kmods SIG |
d0f18f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
Kmods SIG |
d0f18f |
then
|
|
Kmods SIG |
d0f18f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
Kmods SIG |
d0f18f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
Kmods SIG |
d0f18f |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
d0f18f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
Kmods SIG |
d0f18f |
fi
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%files
|
|
Kmods SIG |
d0f18f |
%defattr(644,root,root,755)
|
|
Kmods SIG |
d0f18f |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
90ae59 |
%license LICENSES
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
|
|
Kmods SIG |
d0f18f |
%changelog
|
|
|
6b9167 |
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.240-4
|
|
|
6b9167 |
- Add obsoletes for update path
|
|
|
6b9167 |
|
|
|
6e2406 |
* Wed Jan 26 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.240-3
|
|
|
6e2406 |
- Drop dracut conf
|
|
|
6e2406 |
|
|
|
a2f731 |
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.240-2
|
|
|
a2f731 |
- Enable ppc64le
|
|
|
a2f731 |
|
|
Kmods SIG |
d0f18f |
* Sat Jan 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.240-1
|
|
Kmods SIG |
d0f18f |
- Use EL kernel source and versioning
|
|
Kmods SIG |
d0f18f |
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|