Blame SPECS/kmod-sky2.spec

8d225d
%global pkg sky2
8d225d
Kmods SIG 51b9e5
%global driver_version 4.18.0-372.9.1.el8
Kmods SIG 9c492e
Kmods SIG 51b9e5
%global kernel_version 4.18.0-372.9.1.el8
8d225d
8d225d
%global _use_internal_dependency_generator 0
07d42d
%global __find_requires /usr/lib/rpm/redhat/find-requires
07d42d
%global __find_provides /usr/lib/rpm/redhat/find-provides
8d225d
8d225d
%global debug_package %{nil}
8d225d
8d225d
%global __spec_install_post \
8d225d
  %{?__debug_package:%{__debug_install_post}} \
8d225d
  %{__arch_install_post} \
8d225d
  %{__os_install_post} \
8d225d
  %{__mod_compress_install_post}
8d225d
8d225d
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
8d225d
8d225d
8d225d
Name:             kmod-%{pkg}
Kmods SIG 51b9e5
Version:          4.18.0.372.9.1
Kmods SIG 51b9e5
Release:          1%{?dist}
8d225d
Summary:          Marvell Yukon 2 Gigabit Ethernet (%{pkg}) driver
8d225d
8d225d
License:          GPLv2
8d225d
URL:              https://www.kernel.org/
8d225d
Kmods SIG 9c492e
Source0:          %{pkg}-%{driver_version}.tar.xz
Kmods SIG 9c492e
Patch1:           0001-sky2-Increase-D3-delay-again.patch
Kmods SIG 9c492e
Patch2:           0002-sky2-Disable-MSI-on-Dell-Inspiron-1545-and-Gateway-P.patch
Kmods SIG 9c492e
Patch3:           0003-sky2-Disable-MSI-on-P5W-DH-Deluxe.patch
Kmods SIG 9c492e
Patch4:           0004-sky2-Disable-MSI-on-ASUS-P6T.patch
Kmods SIG 9c492e
Patch5:           0005-sky2-Disable-MSI-on-yet-another-ASUS-boards-P6Xxxx.patch
Kmods SIG 9c492e
Patch6:           0006-net-sky2-reject-unsupported-coalescing-params.patch
Kmods SIG 9c492e
Patch7:           0007-Marvell-Sky2-Ethernet-adapter-fix-warning-messages.patch
8d225d
6a964a
ExclusiveArch:    x86_64 aarch64 ppc64le
8d225d
8d225d
BuildRequires:    elfutils-libelf-devel
8d225d
BuildRequires:    gcc
07d42d
BuildRequires:    kernel-rpm-macros
8d225d
BuildRequires:    kmod
8d225d
BuildRequires:    make
8d225d
BuildRequires:    redhat-rpm-config
8d225d
BuildRequires:    xz
8d225d
07d42d
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
8d225d
BuildRequires:    kernel-devel = %{kernel_version}
8d225d
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
8d225d
07d42d
Requires:         kernel >= %{kernel_version}
07d42d
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
07d42d
Requires:         kernel-modules >= %{kernel_version}
07d42d
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
8d225d
8d225d
Provides:         installonlypkg(kernel-module)
07d42d
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
8d225d
07d42d
Requires(post):   %{_sbindir}/depmod
07d42d
Requires(postun): %{_sbindir}/depmod
8d225d
07d42d
Requires(post):   %{_sbindir}/weak-modules
07d42d
Requires(postun): %{_sbindir}/weak-modules
8d225d
8d225d
c133c0
%if "%{version}" == "4.18.0.240" && "%{release}" == "2%{?dist}"
c133c0
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
c133c0
%endif
c133c0
c133c0
%if "%{version}" == "4.18.0.240" && "%{release}" == "3%{?dist}"
c133c0
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
c133c0
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
c133c0
%endif
c133c0
c133c0
8d225d
%description
8d225d
This driver supports Gigabit Ethernet adapters based on the Marvell Yukon 2
8d225d
chipset:
8d225d
8d225d
- 0x1148:0x9000: SysKonnect SK-9Sxx
8d225d
- 0x1148:0x9E00: SysKonnect SK-9Exx
8d225d
- 0x1148:0x9E01: SysKonnect SK-9E21M
8d225d
- 0x1186:0x4001: D-Link DGE-550SX
8d225d
- 0x1186:0x4B00: D-Link DGE-560T
8d225d
- 0x1186:0x4B02: D-Link DGE-560SX
8d225d
- 0x1186:0x4B03: D-Link DGE-550T
8d225d
- 0x11AB:0x4340: Marvell 88E8021
8d225d
- 0x11AB:0x4341: Marvell 88E8022
8d225d
- 0x11AB:0x4342: Marvell 88E8061
8d225d
- 0x11AB:0x4343: Marvell 88E8062
8d225d
- 0x11AB:0x4344: Marvell 88E8021
8d225d
- 0x11AB:0x4345: Marvell 88E8022
8d225d
- 0x11AB:0x4346: Marvell 88E8061
8d225d
- 0x11AB:0x4347: Marvell 88E8062
8d225d
- 0x11AB:0x4350: Marvell 88E8035
8d225d
- 0x11AB:0x4351: Marvell 88E8036
8d225d
- 0x11AB:0x4352: Marvell 88E8038
8d225d
- 0x11AB:0x4353: Marvell 88E8039
8d225d
- 0x11AB:0x4354: Marvell 88E8040
8d225d
- 0x11AB:0x4355: Marvell 88E8040T
8d225d
- 0x11AB:0x4356: Marvell 88EC033
8d225d
- 0x11AB:0x4357: Marvell 88E8042
8d225d
- 0x11AB:0x435A: Marvell 88E8048
8d225d
- 0x11AB:0x4360: Marvell 88E8052
8d225d
- 0x11AB:0x4361: Marvell 88E8050
8d225d
- 0x11AB:0x4362: Marvell 88E8053
8d225d
- 0x11AB:0x4363: Marvell 88E8055
8d225d
- 0x11AB:0x4364: Marvell 88E8056
8d225d
- 0x11AB:0x4365: Marvell 88E8070
8d225d
- 0x11AB:0x4366: Marvell 88EC036
8d225d
- 0x11AB:0x4367: Marvell 88EC032
8d225d
- 0x11AB:0x4368: Marvell 88EC034
8d225d
- 0x11AB:0x4369: Marvell 88EC042
8d225d
- 0x11AB:0x436A: Marvell 88E8058
8d225d
- 0x11AB:0x436B: Marvell 88E8071
8d225d
- 0x11AB:0x436C: Marvell 88E8072
8d225d
- 0x11AB:0x436D: Marvell 88E8055
8d225d
- 0x11AB:0x4370: Marvell 88E8075
8d225d
- 0x11AB:0x4380: Marvell 88E8057
8d225d
- 0x11AB:0x4381: Marvell 88E8059
8d225d
- 0x11AB:0x4382: Marvell 88E8079
8d225d
8d225d
8d225d
%prep
Kmods SIG 9c492e
%autosetup -p1 -n %{pkg}-%{driver_version}
8d225d
8d225d
8d225d
%build
8d225d
pushd src
8d225d
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
8d225d
popd
8d225d
8d225d
8d225d
%install
8d225d
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/ethernet/marvell src/%{pkg}.ko
8d225d
8d225d
# Make .ko objects temporarily executable for automatic stripping
8d225d
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
8d225d
8d225d
8d225d
%clean
8d225d
%{__rm} -rf %{buildroot}
8d225d
8d225d
8d225d
%post
8d225d
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
07d42d
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
8d225d
8d225d
8d225d
%preun
8d225d
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
07d42d
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
8d225d
8d225d
8d225d
%postun
07d42d
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
8d225d
then
07d42d
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
07d42d
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
8d225d
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
07d42d
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
8d225d
fi
8d225d
8d225d
07d42d
%pretrans -p <lua>
07d42d
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
07d42d
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
07d42d
07d42d
8d225d
%posttrans
07d42d
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
8d225d
then
07d42d
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
07d42d
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
8d225d
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
07d42d
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
8d225d
fi
8d225d
8d225d
8d225d
%files
8d225d
%defattr(644,root,root,755)
8d225d
/lib/modules/%{kernel_version}.%{_arch}
acf01b
%license LICENSES
8d225d
8d225d
8d225d
%changelog
Kmods SIG 51b9e5
* Tue May 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.372.9.1-1
Kmods SIG 51b9e5
- Update to 4.18.0-372.9.1.el8
Kmods SIG 51b9e5
c133c0
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.240-3
c133c0
- Add obsoletes for update path
c133c0
6a964a
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.240-2
6a964a
- Enable ppc64le
6a964a
Kmods SIG 9c492e
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.240-1
Kmods SIG 9c492e
- Switch to EL kernel source and versioning
Kmods SIG 9c492e
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)