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