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