|
|
0f2a7e |
%global pkg pata_via
|
|
|
0f2a7e |
|
|
|
c119e5 |
%global kernel_version 4.18.0-305.7.1.el8_4
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%global _use_internal_dependency_generator 0
|
|
|
c119e5 |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
c119e5 |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%global debug_package %{nil}
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%global __spec_install_post \
|
|
|
0f2a7e |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
0f2a7e |
%{__arch_install_post} \
|
|
|
0f2a7e |
%{__os_install_post} \
|
|
|
0f2a7e |
%{__mod_compress_install_post}
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
Name: kmod-%{pkg}
|
|
|
0f2a7e |
Version: 4.19
|
|
|
c119e5 |
Release: 5%{?dist}
|
|
|
0f2a7e |
Summary: VIA PATA Controller (%{pkg}) driver
|
|
|
0f2a7e |
|
|
|
0f2a7e |
License: GPLv2
|
|
|
0f2a7e |
URL: https://www.kernel.org/
|
|
|
0f2a7e |
|
|
|
0f2a7e |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
0f2a7e |
|
|
|
0f2a7e |
ExclusiveArch: x86_64
|
|
|
0f2a7e |
|
|
|
0f2a7e |
BuildRequires: elfutils-libelf-devel
|
|
|
0f2a7e |
BuildRequires: gcc
|
|
|
c119e5 |
BuildRequires: kernel-rpm-macros
|
|
|
0f2a7e |
BuildRequires: kmod
|
|
|
0f2a7e |
BuildRequires: make
|
|
|
0f2a7e |
BuildRequires: redhat-rpm-config
|
|
|
0f2a7e |
BuildRequires: xz
|
|
|
0f2a7e |
|
|
|
c119e5 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
0f2a7e |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
0f2a7e |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
0f2a7e |
|
|
|
c119e5 |
Requires: kernel >= %{kernel_version}
|
|
|
c119e5 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
c119e5 |
Requires: kernel-modules >= %{kernel_version}
|
|
|
c119e5 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
0f2a7e |
|
|
|
0f2a7e |
Provides: installonlypkg(kernel-module)
|
|
|
c119e5 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
0f2a7e |
|
|
|
c119e5 |
Requires(post): %{_sbindir}/depmod
|
|
|
c119e5 |
Requires(postun): %{_sbindir}/depmod
|
|
|
0f2a7e |
|
|
|
c119e5 |
Requires(post): %{_sbindir}/weak-modules
|
|
|
c119e5 |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%description
|
|
|
0f2a7e |
This driver supports VIA PATA interfaces found on many VIA chipsets.
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%prep
|
|
|
0f2a7e |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%build
|
|
|
0f2a7e |
pushd src
|
|
|
0f2a7e |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
0f2a7e |
popd
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%install
|
|
|
0f2a7e |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/ata src/%{pkg}.ko
|
|
|
0f2a7e |
%{__install} -d %{buildroot}/%{_sysconfdir}/dracut.conf.d/
|
|
|
0f2a7e |
echo "add_drivers+=\" %{pkg} \"" > %{buildroot}/%{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
0f2a7e |
|
|
|
0f2a7e |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
0f2a7e |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%clean
|
|
|
0f2a7e |
%{__rm} -rf %{buildroot}
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%post
|
|
|
0f2a7e |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
c119e5 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/ata/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%preun
|
|
|
0f2a7e |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
c119e5 |
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
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%postun
|
|
|
c119e5 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
0f2a7e |
then
|
|
|
c119e5 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
c119e5 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
0f2a7e |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
c119e5 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
0f2a7e |
fi
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
c119e5 |
%pretrans -p <lua>
|
|
|
c119e5 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
c119e5 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
c119e5 |
|
|
|
c119e5 |
|
|
|
0f2a7e |
%posttrans
|
|
|
c119e5 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
0f2a7e |
then
|
|
|
c119e5 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
c119e5 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
0f2a7e |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
c119e5 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
0f2a7e |
fi
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%files
|
|
|
0f2a7e |
%defattr(644,root,root,755)
|
|
|
0f2a7e |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
0f2a7e |
%license COPYING
|
|
|
0f2a7e |
%config(noreplace) %{_sysconfdir}/dracut.conf.d/%{pkg}.conf
|
|
|
0f2a7e |
|
|
|
0f2a7e |
|
|
|
0f2a7e |
%changelog
|
|
|
c119e5 |
* Tue Sep 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-5
|
|
|
c119e5 |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-305.7.1.el8_4)
|
|
|
c119e5 |
|
|
|
4fab97 |
* Wed Sep 15 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-4
|
|
|
4fab97 |
- Rebuild for 4.18.0-305.19.1.el8_4
|
|
|
4fab97 |
|
|
|
5ad682 |
* Thu Sep 9 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-3
|
|
|
5ad682 |
- Set specific kernel version to use
|
|
|
5ad682 |
- Add Provides kernel-modules
|
|
|
5ad682 |
- Add .%{_arch} to kernel-modules provides version
|
|
|
5ad682 |
- Rebuild for 4.18.0-305.17.1.el8_4
|
|
|
5ad682 |
|
|
|
6569f2 |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-2
|
|
|
6569f2 |
- Rebuild for 4.18.0-305.12.1.el8_4
|
|
|
6569f2 |
|
|
|
0f2a7e |
* Wed Aug 11 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.19-1
|
|
|
0f2a7e |
- Initial version
|