|
Kmods SIG |
2ad684 |
%global pkg btrfs
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%global driver_version 5.14.0-34.el9
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%global kernel_version 5.14.0-44.el9
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%global debug_package %{nil}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%global __spec_install_post \
|
|
Kmods SIG |
2ad684 |
%{?__debug_package:%{__debug_install_post}} \
|
|
Kmods SIG |
2ad684 |
%{__arch_install_post} \
|
|
Kmods SIG |
2ad684 |
%{__os_install_post} \
|
|
Kmods SIG |
2ad684 |
%{__mod_compress_install_post}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Name: kmod-%{pkg}
|
|
Kmods SIG |
2ad684 |
Version: 5.14.0.34
|
|
Kmods SIG |
2ad684 |
Release: 1%{?dist}
|
|
Kmods SIG |
2ad684 |
Summary: Btrfs filesystem support
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
License: GPLv2
|
|
Kmods SIG |
2ad684 |
URL: https://www.kernel.org/
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Source0: %{pkg}-%{driver_version}.tar.xz
|
|
Kmods SIG |
2ad684 |
Patch9999: 9999-enable-btrfs.patch
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
ExclusiveArch: x86_64 aarch64 ppc64le
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
BuildRequires: elfutils-libelf-devel
|
|
Kmods SIG |
2ad684 |
BuildRequires: gcc
|
|
Kmods SIG |
2ad684 |
BuildRequires: kernel-rpm-macros
|
|
Kmods SIG |
2ad684 |
BuildRequires: kmod
|
|
Kmods SIG |
2ad684 |
BuildRequires: make
|
|
Kmods SIG |
2ad684 |
BuildRequires: redhat-rpm-config
|
|
Kmods SIG |
2ad684 |
BuildRequires: xz
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
Kmods SIG |
2ad684 |
BuildRequires: kernel-devel = %{kernel_version}
|
|
Kmods SIG |
2ad684 |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Requires: kernel >= %{kernel_version}
|
|
Kmods SIG |
2ad684 |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
2ad684 |
Requires: kernel-modules >= %{kernel_version}
|
|
Kmods SIG |
2ad684 |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Provides: installonlypkg(kernel-module)
|
|
Kmods SIG |
2ad684 |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Requires(post): %{_sbindir}/depmod
|
|
Kmods SIG |
2ad684 |
Requires(postun): %{_sbindir}/depmod
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Requires(post): %{_sbindir}/weak-modules
|
|
Kmods SIG |
2ad684 |
Requires(postun): %{_sbindir}/weak-modules
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
Supplements: btrfs-progs
|
|
Kmods SIG |
2ad684 |
Recommends: btrfs-progs
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%description
|
|
Kmods SIG |
2ad684 |
Btrfs is a general purpose copy-on-write filesystem with extents, writable
|
|
Kmods SIG |
2ad684 |
snapshotting, support for multiple devices and many more features focused on
|
|
Kmods SIG |
2ad684 |
fault tolerance, repair and easy administration.
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%prep
|
|
Kmods SIG |
2ad684 |
%autosetup -p1 -n %{pkg}-%{driver_version}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%build
|
|
Kmods SIG |
2ad684 |
pushd src
|
|
Kmods SIG |
2ad684 |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
Kmods SIG |
2ad684 |
popd
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%install
|
|
Kmods SIG |
2ad684 |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/fs src/%{pkg}.ko
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
# Make .ko objects temporarily executable for automatic stripping
|
|
Kmods SIG |
2ad684 |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%clean
|
|
Kmods SIG |
2ad684 |
%{__rm} -rf %{buildroot}
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%post
|
|
Kmods SIG |
2ad684 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
2ad684 |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%preun
|
|
Kmods SIG |
2ad684 |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
2ad684 |
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
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%postun
|
|
Kmods SIG |
2ad684 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
Kmods SIG |
2ad684 |
then
|
|
Kmods SIG |
2ad684 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
Kmods SIG |
2ad684 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
Kmods SIG |
2ad684 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
2ad684 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
Kmods SIG |
2ad684 |
fi
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%pretrans -p <lua>
|
|
Kmods SIG |
2ad684 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
Kmods SIG |
2ad684 |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%posttrans
|
|
Kmods SIG |
2ad684 |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
Kmods SIG |
2ad684 |
then
|
|
Kmods SIG |
2ad684 |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
Kmods SIG |
2ad684 |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
Kmods SIG |
2ad684 |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
Kmods SIG |
2ad684 |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
Kmods SIG |
2ad684 |
fi
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%files
|
|
Kmods SIG |
2ad684 |
%defattr(644,root,root,755)
|
|
Kmods SIG |
2ad684 |
/lib/modules/%{kernel_version}.%{_arch}
|
|
Kmods SIG |
2ad684 |
%license COPYING
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
|
|
Kmods SIG |
2ad684 |
%changelog
|
|
|
7f8f55 |
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.34-1
|
|
Kmods SIG |
2ad684 |
- Switch to EL kernel source and versioning
|
|
Kmods SIG |
2ad684 |
- kABI tracking kmod package (kernel >= 5.14.0-44.el9)
|