|
|
9e111f |
%global pkg skge
|
|
|
9e111f |
|
|
Kmods SIG |
dbadc9 |
%global driver_version 4.18.0-358.el8
|
|
Kmods SIG |
5c37b1 |
|
|
Kmods SIG |
dbadc9 |
%global kernel_version 4.18.0-358.el8
|
|
|
9e111f |
|
|
|
9e111f |
%global _use_internal_dependency_generator 0
|
|
|
84c503 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
84c503 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
9e111f |
|
|
|
9e111f |
%global debug_package %{nil}
|
|
|
9e111f |
|
|
|
9e111f |
%global __spec_install_post \
|
|
|
9e111f |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
9e111f |
%{__arch_install_post} \
|
|
|
9e111f |
%{__os_install_post} \
|
|
|
9e111f |
%{__mod_compress_install_post}
|
|
|
9e111f |
|
|
|
9e111f |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
Name: kmod-%{pkg}
|
|
Kmods SIG |
dbadc9 |
Version: 4.18.0.358
|
|
Kmods SIG |
5c37b1 |
Release: 1%{?dist}
|
|
|
9e111f |
Summary: SysKonnect/Marvell Yukon Gigabit Ethernet (%{pkg}) driver
|
|
|
9e111f |
|
|
|
9e111f |
License: GPLv2
|
|
|
9e111f |
URL: https://www.kernel.org/
|
|
|
9e111f |
|
|
Kmods SIG |
5c37b1 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
Kmods SIG |
5c37b1 |
Patch1: 0001-skge-potential-memory-corruption-in-skge_get_regs.patch
|
|
Kmods SIG |
5c37b1 |
Patch2: 0002-skge-fix-checksum-byte-order.patch
|
|
|
9e111f |
|
|
|
9e111f |
ExclusiveArch: x86_64 aarch64
|
|
|
9e111f |
|
|
|
9e111f |
BuildRequires: elfutils-libelf-devel
|
|
|
9e111f |
BuildRequires: gcc
|
|
|
84c503 |
BuildRequires: kernel-rpm-macros
|
|
|
9e111f |
BuildRequires: kmod
|
|
|
9e111f |
BuildRequires: make
|
|
|
9e111f |
BuildRequires: redhat-rpm-config
|
|
|
9e111f |
BuildRequires: xz
|
|
|
9e111f |
|
|
|
84c503 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
9e111f |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
b06d32 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
9e111f |
|
|
|
84c503 |
Requires: kernel >= %{kernel_version}
|
|
|
84c503 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
84c503 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
84c503 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
9e111f |
|
|
|
2ace99 |
Provides: installonlypkg(kernel-module)
|
|
|
84c503 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
9e111f |
|
|
|
84c503 |
Requires(post): %{_sbindir}/depmod
|
|
|
84c503 |
Requires(postun): %{_sbindir}/depmod
|
|
|
9e111f |
|
|
|
84c503 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
84c503 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
ba6c5b |
|
|
|
9e111f |
|
|
|
9e111f |
%description
|
|
|
9e111f |
This driver supports Gigabit Ethernet adapters based on the Marvell Yukon
|
|
|
9e111f |
chipset:
|
|
|
9e111f |
|
|
|
9e111f |
- 0x10B7:0x1700: 3Com 3C940
|
|
|
9e111f |
- 0x10B7:0x80EB: 3Com 3C940B
|
|
|
9e111f |
- 0x1148:0x4300: SysKonnect SK-9xx
|
|
|
9e111f |
- 0x1148:0x4320: SysKonnect SK-98xx V2.0
|
|
|
9e111f |
- 0x1186:0x4302: D-Link DGE-530T Rev C1
|
|
|
9e111f |
- 0x1186:0x4B01: D-Link DGE-530T Rev B
|
|
|
9e111f |
- 0x1186:0x4C00: D-Link DGE-530T
|
|
|
9e111f |
- 0x11AB:0x4320: Marvell Yukon 88E8001/8003/8010
|
|
|
9e111f |
- 0x11AB:0x5005: Belkin
|
|
|
9e111f |
- 0x1371:0x434E: CNet PowerG-2000
|
|
|
9e111f |
- 0x1737:0x1032:*:0x0015: Linksys EG1032 v2
|
|
|
9e111f |
- 0x1737:0x1064: Linksys EG1064 v2
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%prep
|
|
Kmods SIG |
5c37b1 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%build
|
|
|
9e111f |
pushd src
|
|
|
9e111f |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
9e111f |
popd
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%install
|
|
|
9e111f |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/marvell src/%{pkg}.ko
|
|
|
9e111f |
|
|
|
9e111f |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
9e111f |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%clean
|
|
|
9e111f |
%{__rm} -rf %{buildroot}
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%post
|
|
|
3ee8b1 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
84c503 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/marvell/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
3ee8b1 |
|
|
|
3ee8b1 |
|
|
|
3ee8b1 |
%preun
|
|
|
3ee8b1 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
84c503 |
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
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%postun
|
|
|
84c503 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
3ee8b1 |
then
|
|
|
84c503 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
84c503 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
3ee8b1 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
84c503 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
3ee8b1 |
fi
|
|
|
3ee8b1 |
|
|
|
3ee8b1 |
|
|
|
84c503 |
%pretrans -p <lua>
|
|
|
84c503 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
84c503 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
84c503 |
|
|
|
84c503 |
|
|
|
3ee8b1 |
%posttrans
|
|
|
84c503 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
3ee8b1 |
then
|
|
|
84c503 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
84c503 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
3ee8b1 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
84c503 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
3ee8b1 |
fi
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%files
|
|
|
9e111f |
%defattr(644,root,root,755)
|
|
|
9e111f |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
9e111f |
%license COPYING
|
|
|
9e111f |
|
|
|
9e111f |
|
|
|
9e111f |
%changelog
|
|
Kmods SIG |
dbadc9 |
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.358-1
|
|
Kmods SIG |
dbadc9 |
- Update to 4.18.0-358.el8
|
|
Kmods SIG |
dbadc9 |
|
|
Kmods SIG |
5c37b1 |
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.211-1
|
|
Kmods SIG |
5c37b1 |
- Switch to EL kernel source and versioning
|
|
Kmods SIG |
5c37b1 |
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)
|