|
|
459d90 |
%global pkg skge
|
|
|
459d90 |
|
|
|
b46994 |
%global kernel_version 4.18.0-305.7.1.el8_4
|
|
|
459d90 |
|
|
|
459d90 |
%global _use_internal_dependency_generator 0
|
|
|
b46994 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
b46994 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
459d90 |
|
|
|
459d90 |
%global debug_package %{nil}
|
|
|
459d90 |
|
|
|
459d90 |
%global __spec_install_post \
|
|
|
459d90 |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
459d90 |
%{__arch_install_post} \
|
|
|
459d90 |
%{__os_install_post} \
|
|
|
459d90 |
%{__mod_compress_install_post}
|
|
|
459d90 |
|
|
|
459d90 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
Name: kmod-%{pkg}
|
|
|
459d90 |
Version: 5.7
|
|
|
b46994 |
Release: 6%{?dist}
|
|
|
459d90 |
Summary: SysKonnect/Marvell Yukon Gigabit Ethernet (%{pkg}) driver
|
|
|
459d90 |
|
|
|
459d90 |
License: GPLv2
|
|
|
459d90 |
URL: https://www.kernel.org/
|
|
|
459d90 |
|
|
|
459d90 |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
459d90 |
|
|
|
459d90 |
ExclusiveArch: x86_64 aarch64
|
|
|
459d90 |
|
|
|
459d90 |
BuildRequires: elfutils-libelf-devel
|
|
|
459d90 |
BuildRequires: gcc
|
|
|
b46994 |
BuildRequires: kernel-rpm-macros
|
|
|
459d90 |
BuildRequires: kmod
|
|
|
459d90 |
BuildRequires: make
|
|
|
459d90 |
BuildRequires: redhat-rpm-config
|
|
|
459d90 |
BuildRequires: xz
|
|
|
459d90 |
|
|
|
b46994 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
459d90 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
459d90 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
459d90 |
|
|
|
b46994 |
Requires: kernel >= %{kernel_version}
|
|
|
b46994 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
b46994 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
b46994 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
459d90 |
|
|
|
459d90 |
Provides: installonlypkg(kernel-module)
|
|
|
b46994 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
459d90 |
|
|
|
b46994 |
Requires(post): %{_sbindir}/depmod
|
|
|
b46994 |
Requires(postun): %{_sbindir}/depmod
|
|
|
459d90 |
|
|
|
b46994 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
b46994 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%description
|
|
|
459d90 |
This driver supports Gigabit Ethernet adapters based on the Marvell Yukon
|
|
|
459d90 |
chipset:
|
|
|
459d90 |
|
|
|
459d90 |
- 0x10B7:0x1700: 3Com 3C940
|
|
|
459d90 |
- 0x10B7:0x80EB: 3Com 3C940B
|
|
|
459d90 |
- 0x1148:0x4300: SysKonnect SK-9xx
|
|
|
459d90 |
- 0x1148:0x4320: SysKonnect SK-98xx V2.0
|
|
|
459d90 |
- 0x1186:0x4302: D-Link DGE-530T Rev C1
|
|
|
459d90 |
- 0x1186:0x4B01: D-Link DGE-530T Rev B
|
|
|
459d90 |
- 0x1186:0x4C00: D-Link DGE-530T
|
|
|
459d90 |
- 0x11AB:0x4320: Marvell Yukon 88E8001/8003/8010
|
|
|
459d90 |
- 0x11AB:0x5005: Belkin
|
|
|
459d90 |
- 0x1371:0x434E: CNet PowerG-2000
|
|
|
459d90 |
- 0x1737:0x1032:*:0x0015: Linksys EG1032 v2
|
|
|
459d90 |
- 0x1737:0x1064: Linksys EG1064 v2
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%prep
|
|
|
459d90 |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%build
|
|
|
459d90 |
pushd src
|
|
|
459d90 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
459d90 |
popd
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%install
|
|
|
459d90 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/marvell src/%{pkg}.ko
|
|
|
459d90 |
|
|
|
459d90 |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
459d90 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%clean
|
|
|
459d90 |
%{__rm} -rf %{buildroot}
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%post
|
|
|
459d90 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b46994 |
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
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%preun
|
|
|
459d90 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b46994 |
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
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%postun
|
|
|
b46994 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
459d90 |
then
|
|
|
b46994 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
b46994 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
459d90 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b46994 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
459d90 |
fi
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
b46994 |
%pretrans -p <lua>
|
|
|
b46994 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
b46994 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
b46994 |
|
|
|
b46994 |
|
|
|
459d90 |
%posttrans
|
|
|
b46994 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
459d90 |
then
|
|
|
b46994 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
b46994 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
459d90 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
b46994 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
459d90 |
fi
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%files
|
|
|
459d90 |
%defattr(644,root,root,755)
|
|
|
459d90 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
459d90 |
%license COPYING
|
|
|
459d90 |
|
|
|
459d90 |
|
|
|
459d90 |
%changelog
|
|
|
b46994 |
* Tue Sep 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.7-6
|
|
|
b46994 |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-305.7.1.el8_4)
|
|
|
b46994 |
|
|
|
9fa3b1 |
* Wed Sep 15 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.7-5
|
|
|
9fa3b1 |
- Rebuild for 4.18.0-305.19.1.el8_4
|
|
|
9fa3b1 |
|
|
|
51969d |
* Thu Sep 9 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.7-4
|
|
|
51969d |
- Set specific kernel version to use
|
|
|
51969d |
- Add Provides kernel-modules
|
|
|
51969d |
- Add .%{_arch} to kernel-modules provides version
|
|
|
51969d |
- Rebuild for 4.18.0-305.17.1.el8_4
|
|
|
51969d |
|
|
|
e7adce |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.7-3
|
|
|
e7adce |
- Rebuild for 4.18.0-305.12.1.el8_4
|
|
|
e7adce |
|
|
|
459d90 |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.7-2
|
|
|
459d90 |
- Initial version
|