Blame SPECS/kmod-ecryptfs.spec

e54940
%global pkg ecryptfs
e54940
Kmods SIG 331c39
%global driver_version 5.14.0-1.el9
Kmods SIG 331c39
Kmods SIG 316c7c
%global kernel_version 5.14.0-43.el9
e54940
e54940
%global debug_package %{nil}
e54940
e54940
%global __spec_install_post \
e54940
  %{?__debug_package:%{__debug_install_post}} \
e54940
  %{__arch_install_post} \
e54940
  %{__os_install_post} \
e54940
  %{__mod_compress_install_post}
e54940
e54940
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
e54940
e54940
e54940
Name:             kmod-%{pkg}
Kmods SIG 331c39
Version:          5.14.0.1
Kmods SIG 316c7c
Release:          8%{?dist}
e54940
Summary:          Encrypted filesystem that operates on the VFS layer
e54940
e54940
License:          GPLv2
e54940
URL:              https://www.kernel.org/
e54940
Kmods SIG 331c39
Source0:          %{pkg}-%{driver_version}.tar.xz
Kmods SIG 331c39
Patch9999:        9999-enable-ecryptfs.patch
e54940
e54940
ExclusiveArch:    x86_64 aarch64
e54940
e54940
BuildRequires:    elfutils-libelf-devel
e54940
BuildRequires:    gcc
e54940
BuildRequires:    kernel-rpm-macros
e54940
BuildRequires:    kmod
e54940
BuildRequires:    make
e54940
BuildRequires:    redhat-rpm-config
e54940
BuildRequires:    xz
e54940
e54940
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
e54940
BuildRequires:    kernel-devel = %{kernel_version}
e54940
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
e54940
e54940
Requires:         kernel >= %{kernel_version}
e54940
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
e54940
Requires:         kernel-modules >= %{kernel_version}
e54940
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
e54940
e54940
Provides:         installonlypkg(kernel-module)
e54940
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
e54940
e54940
Requires(post):   %{_sbindir}/depmod
e54940
Requires(postun): %{_sbindir}/depmod
e54940
e54940
Requires(post):   %{_sbindir}/weak-modules
e54940
Requires(postun): %{_sbindir}/weak-modules
e54940
e54940
Supplements:      ecryptfs-utils
e54940
Recommends:       ecryptfs-utils
e54940
e54940
e54940
%description
e54940
This package provides the required kernel module (ecryptfs) to mount devices
e54940
formatted with the Encrypted filesystem that operates on the VFS layer.
e54940
e54940
e54940
%prep
Kmods SIG 331c39
%autosetup -p1 -n %{pkg}-%{driver_version}
e54940
e54940
e54940
%build
e54940
pushd src
e54940
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
e54940
popd
e54940
e54940
e54940
%install
e54940
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/fs src/%{pkg}.ko
e54940
e54940
# Make .ko objects temporarily executable for automatic stripping
e54940
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
e54940
e54940
e54940
%clean
e54940
%{__rm} -rf %{buildroot}
e54940
e54940
e54940
%post
e54940
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
e54940
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
e54940
e54940
e54940
%preun
e54940
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
e54940
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
e54940
e54940
e54940
%postun
e54940
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
e54940
then
e54940
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
e54940
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
e54940
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
e54940
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
e54940
fi
e54940
e54940
e54940
%pretrans -p <lua>
e54940
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
e54940
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
e54940
e54940
e54940
%posttrans
e54940
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
e54940
then
e54940
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
e54940
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
e54940
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
e54940
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
e54940
fi
e54940
e54940
e54940
%files
e54940
%defattr(644,root,root,755)
e54940
/lib/modules/%{kernel_version}.%{_arch}
e54940
%license COPYING
e54940
e54940
e54940
%changelog
Kmods SIG 316c7c
* Tue Jan 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
Kmods SIG 316c7c
- Rebuild for 5.14.0-43.el9
Kmods SIG 316c7c
Kmods SIG 2880db
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
Kmods SIG 2880db
- Rebuild for 5.14.0-42.el9
Kmods SIG 2880db
Kmods SIG a79676
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
Kmods SIG a79676
- Rebuild for 5.14.0-41.el9
Kmods SIG a79676
Kmods SIG 6bd783
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
Kmods SIG 6bd783
- Rebuild for 5.14.0-39.el9
Kmods SIG 6bd783
Kmods SIG 68ad51
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
Kmods SIG 68ad51
- Rebuild for 5.14.0-37.el9
Kmods SIG 68ad51
Kmods SIG 9a7e8b
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
Kmods SIG 9a7e8b
- Rebuild for 5.14.0-36.el9
Kmods SIG 9a7e8b
Kmods SIG fd9feb
* Mon Jan 17 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
Kmods SIG fd9feb
- Rebuild for 5.14.0-34.el9
Kmods SIG fd9feb
Kmods SIG 331c39
* Thu Jan 13 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-1
Kmods SIG 331c39
- Switch to EL kernel source and versioning
Kmods SIG 331c39
- kABI tracking kmod package (kernel >= 5.14.0-31.el9)