|
|
2bda55 |
%global pkg iwlegacy
|
|
|
2bda55 |
|
|
Kmods SIG |
9a70cc |
%global driver_version 4.18.0-315.el8
|
|
Kmods SIG |
9a70cc |
|
|
Kmods SIG |
05d39b |
%global kernel_version 4.18.0-358.el8
|
|
|
2bda55 |
|
|
|
2bda55 |
%global _use_internal_dependency_generator 0
|
|
|
ce0a8f |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
ce0a8f |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
2bda55 |
|
|
|
2bda55 |
%global debug_package %{nil}
|
|
|
2bda55 |
|
|
|
2bda55 |
%global __spec_install_post \
|
|
|
2bda55 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
2bda55 |
%{__arch_install_post} \
|
|
|
2bda55 |
%{__os_install_post} \
|
|
|
2bda55 |
%{__mod_compress_install_post}
|
|
|
2bda55 |
|
|
|
2bda55 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
Name: kmod-%{pkg}
|
|
Kmods SIG |
9a70cc |
Version: 4.18.0.315
|
|
|
d48f32 |
Release: 4%{?dist}
|
|
|
2bda55 |
Summary: Intel WiFi 3945ABG/BG (iwl3945) and 4965AGN (iwl4965) driver
|
|
|
2bda55 |
|
|
|
a45e84 |
License: GPLv2 and (BSD or GPLv2)
|
|
|
2bda55 |
URL: https://www.kernel.org/
|
|
|
2bda55 |
|
|
Kmods SIG |
9a70cc |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
Kmods SIG |
9a70cc |
Patch1: 0001-iwlegacy-Add-a-lock-assertion-in-il4965_send_rxon_as.patch
|
|
Kmods SIG |
9a70cc |
Patch2: 0002-iwlegacy-3945-no-need-to-check-return-value-of-debug.patch
|
|
Kmods SIG |
9a70cc |
Patch3: 0003-iwlegacy-4965-no-need-to-check-return-value-of-debug.patch
|
|
Kmods SIG |
9a70cc |
Patch4: 0004-iwlegacy-ensure-loop-counter-addr-does-not-wrap-and-.patch
|
|
Kmods SIG |
9a70cc |
Patch5: 0005-iwlegacy-Check-the-return-value-of-pcie_capability_r.patch
|
|
Kmods SIG |
9a70cc |
Patch9999: 9999-enable-iwlegacy.patch
|
|
|
2bda55 |
|
|
|
5db4be |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
|
2bda55 |
|
|
|
2bda55 |
BuildRequires: elfutils-libelf-devel
|
|
|
2bda55 |
BuildRequires: gcc
|
|
|
ce0a8f |
BuildRequires: kernel-rpm-macros
|
|
|
2bda55 |
BuildRequires: kmod
|
|
|
2bda55 |
BuildRequires: make
|
|
|
2bda55 |
BuildRequires: redhat-rpm-config
|
|
|
2bda55 |
BuildRequires: xz
|
|
|
2bda55 |
|
|
|
ce0a8f |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
2bda55 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
2bda55 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
2bda55 |
|
|
|
ce0a8f |
Requires: kernel >= %{kernel_version}
|
|
|
ce0a8f |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
ce0a8f |
Requires: kernel-modules >= %{kernel_version}
|
|
|
ce0a8f |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
2bda55 |
|
|
|
2bda55 |
Provides: installonlypkg(kernel-module)
|
|
|
ce0a8f |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
2bda55 |
|
|
|
ce0a8f |
Requires(post): %{_sbindir}/depmod
|
|
|
ce0a8f |
Requires(postun): %{_sbindir}/depmod
|
|
|
2bda55 |
|
|
|
ce0a8f |
Requires(post): %{_sbindir}/weak-modules
|
|
|
ce0a8f |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
2bda55 |
|
|
|
2bda55 |
Provides: kmod-iwl3945 = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
2bda55 |
|
|
|
2bda55 |
Supplements: iwl3945-firmware
|
|
|
2bda55 |
Recommends: iwl3945-firmware
|
|
|
2bda55 |
|
|
|
2bda55 |
Provides: kmod-iwl4965 = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
2bda55 |
|
|
|
2bda55 |
Supplements: iwl4965-firmware
|
|
|
2bda55 |
Recommends: iwl4965-firmware
|
|
|
2bda55 |
|
|
|
d48f32 |
|
|
|
d48f32 |
%if "%{version}" == "4.18.0.315" && "%{release}" == "3%{?dist}"
|
|
|
d48f32 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
|
|
|
d48f32 |
%endif
|
|
|
d48f32 |
|
|
|
d48f32 |
%if "%{version}" == "4.18.0.315" && "%{release}" == "4%{?dist}"
|
|
|
d48f32 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
|
|
|
d48f32 |
Obsoletes: kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-3%{?dist}
|
|
|
d48f32 |
%endif
|
|
|
d48f32 |
|
|
|
d48f32 |
|
|
|
2bda55 |
%description
|
|
|
2bda55 |
This package provides drivers for Intel's WiFi adapter 3945ABG/BG (iwl3945) and
|
|
|
2bda55 |
4965AGN (iwl4965) including the required Intel WiFi legacy driver (iwlegacy).
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%prep
|
|
Kmods SIG |
9a70cc |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%build
|
|
|
2bda55 |
pushd src
|
|
|
2bda55 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
2bda55 |
popd
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%install
|
|
|
2bda55 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg} src/%{pkg}.ko src/iwl3945.ko src/iwl4965.ko
|
|
|
2bda55 |
|
|
|
2bda55 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
2bda55 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%clean
|
|
|
2bda55 |
%{__rm} -rf %{buildroot}
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%post
|
|
|
2bda55 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ce0a8f |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
ce0a8f |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/iwl3945.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
ce0a8f |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/iwl4965.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%preun
|
|
|
2bda55 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ce0a8f |
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
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%postun
|
|
|
ce0a8f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
2bda55 |
then
|
|
|
ce0a8f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
ce0a8f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
2bda55 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ce0a8f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
2bda55 |
fi
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
ce0a8f |
%pretrans -p <lua>
|
|
|
ce0a8f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
ce0a8f |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
ce0a8f |
|
|
|
ce0a8f |
|
|
|
2bda55 |
%posttrans
|
|
|
ce0a8f |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
2bda55 |
then
|
|
|
ce0a8f |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
ce0a8f |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
2bda55 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
ce0a8f |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
2bda55 |
fi
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%files
|
|
|
2bda55 |
%defattr(644,root,root,755)
|
|
|
2bda55 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
b58034 |
%license LICENSES
|
|
|
2bda55 |
|
|
|
2bda55 |
|
|
|
2bda55 |
%changelog
|
|
|
d48f32 |
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.315-4
|
|
|
d48f32 |
- Add obsoletes for update path
|
|
|
d48f32 |
|
|
|
5db4be |
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.315-3
|
|
|
5db4be |
- Enable aarch64 and ppc64le
|
|
|
5db4be |
|
|
Kmods SIG |
05d39b |
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.315-2
|
|
Kmods SIG |
05d39b |
- Rebuild for 4.18.0-358.el8
|
|
Kmods SIG |
05d39b |
|
|
Kmods SIG |
9a70cc |
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.315-1
|
|
Kmods SIG |
9a70cc |
- Switch to EL kernel source and versioning
|
|
Kmods SIG |
9a70cc |
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|