Blame SPECS/kmod-ecryptfs.spec

6521d1
%global pkg ecryptfs
6521d1
Kmods SIG 1bd144
%global driver_version 4.18.0-305.el8
Kmods SIG 1bd144
6521d1
%global kernel_version 4.18.0-348.el8
6521d1
6521d1
%global _use_internal_dependency_generator 0
6521d1
%global __find_requires /usr/lib/rpm/redhat/find-requires
6521d1
%global __find_provides /usr/lib/rpm/redhat/find-provides
6521d1
6521d1
%global debug_package %{nil}
6521d1
6521d1
%global __spec_install_post \
6521d1
  %{?__debug_package:%{__debug_install_post}} \
6521d1
  %{__arch_install_post} \
6521d1
  %{__os_install_post} \
6521d1
  %{__mod_compress_install_post}
6521d1
6521d1
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
6521d1
6521d1
6521d1
Name:             kmod-%{pkg}
Kmods SIG 1bd144
Version:          4.18.0.305
aca081
Release:          3%{?dist}
6521d1
Summary:          Encrypted filesystem that operates on the VFS layer
6521d1
6fe3ac
License:          GPLv2 and GPLv2+
6521d1
URL:              https://www.kernel.org/
6521d1
Kmods SIG 1bd144
Source0:          %{pkg}-%{driver_version}.tar.xz
Kmods SIG 1bd144
Patch1:           0001-ecryptfs_rename-verify-that-lower-dentries-are-still.patch
Kmods SIG 1bd144
Patch2:           0002-crypto-shash-remove-shash_desc-flags.patch
Kmods SIG 1bd144
Patch3:           0003-eCryptfs-fix-a-couple-type-promotion-bugs.patch
Kmods SIG 1bd144
Patch4:           0004-eCryptfs-fix-permission-denied-with-ecryptfs_xattr-m.patch
Kmods SIG 1bd144
Patch5:           0005-ecryptfs-fix-unlink-and-rmdir-in-face-of-underlying-.patch
Kmods SIG 1bd144
Patch6:           0006-ecryptfs_lookup_interpose-lower_dentry-d_inode-is-no.patch
Kmods SIG 1bd144
Patch7:           0007-ecryptfs_lookup_interpose-lower_dentry-d_parent-is-n.patch
Kmods SIG 1bd144
Patch8:           0008-ecryptfs-fix-a-memory-leak-bug-in-parse_tag_1_packet.patch
Kmods SIG 1bd144
Patch9:           0009-ecryptfs-fix-a-memory-leak-bug-in-ecryptfs_init_mess.patch
Kmods SIG 1bd144
Patch10:          0010-ecryptfs-fix-kernel-panic-with-null-dev_name.patch
Kmods SIG 1bd144
Patch11:          0011-fs-ecryptfs-remove-BUG_ON-from-crypt_scatterlist.patch
Kmods SIG 1bd144
Patch9999:        9999-enable-ecryptfs.patch
6521d1
4cbc89
ExclusiveArch:    x86_64 aarch64 ppc64le
6521d1
6521d1
BuildRequires:    elfutils-libelf-devel
6521d1
BuildRequires:    gcc
6521d1
BuildRequires:    kernel-rpm-macros
6521d1
BuildRequires:    kmod
6521d1
BuildRequires:    make
6521d1
BuildRequires:    redhat-rpm-config
6521d1
BuildRequires:    xz
6521d1
6521d1
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
6521d1
BuildRequires:    kernel-devel = %{kernel_version}
6521d1
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
6521d1
6521d1
Requires:         kernel >= %{kernel_version}
6521d1
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
6521d1
Requires:         kernel-modules >= %{kernel_version}
6521d1
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
6521d1
6521d1
Provides:         installonlypkg(kernel-module)
6521d1
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
6521d1
6521d1
Requires(post):   %{_sbindir}/depmod
6521d1
Requires(postun): %{_sbindir}/depmod
6521d1
6521d1
Requires(post):   %{_sbindir}/weak-modules
6521d1
Requires(postun): %{_sbindir}/weak-modules
6521d1
6521d1
Supplements:      ecryptfs-utils
6521d1
Recommends:       ecryptfs-utils
6521d1
6521d1
aca081
%if "%{version}" == "4.18.0.305" && "%{release}" == "2%{?dist}"
aca081
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
aca081
%endif
aca081
aca081
%if "%{version}" == "4.18.0.305" && "%{release}" == "3%{?dist}"
aca081
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-1%{?dist}
aca081
Obsoletes:        kmod-%{pkg} = %{?epoch:%{epoch}:}%{version}-2%{?dist}
aca081
%endif
aca081
aca081
6521d1
%description
6521d1
This package provides the required kernel module (ecryptfs) to mount devices
6521d1
formatted with the Encrypted filesystem that operates on the VFS layer.
6521d1
6521d1
6521d1
%prep
Kmods SIG 1bd144
%autosetup -p1 -n %{pkg}-%{driver_version}
6521d1
6521d1
6521d1
%build
6521d1
pushd src
6521d1
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
6521d1
popd
6521d1
6521d1
6521d1
%install
dca4ab
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg} src/%{pkg}.ko
6521d1
6521d1
# Make .ko objects temporarily executable for automatic stripping
6521d1
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
6521d1
6521d1
6521d1
%clean
6521d1
%{__rm} -rf %{buildroot}
6521d1
6521d1
6521d1
%post
6521d1
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
dca4ab
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
6521d1
6521d1
6521d1
%preun
6521d1
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
6521d1
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
6521d1
6521d1
6521d1
%postun
6521d1
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
6521d1
then
6521d1
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
6521d1
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
6521d1
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
6521d1
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
6521d1
fi
6521d1
6521d1
6521d1
%pretrans -p <lua>
6521d1
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
6521d1
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
6521d1
6521d1
6521d1
%posttrans
6521d1
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
6521d1
then
6521d1
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
6521d1
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
6521d1
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
6521d1
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
6521d1
fi
6521d1
6521d1
6521d1
%files
6521d1
%defattr(644,root,root,755)
6521d1
/lib/modules/%{kernel_version}.%{_arch}
16cfb4
%license LICENSES
6521d1
6521d1
6521d1
%changelog
aca081
* Thu Jan 27 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.305-3
aca081
- Add obsoletes for update path
aca081
4cbc89
* Sat Jan 22 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 4.18.0.305-2
4cbc89
- Enable ppc64le
4cbc89
Kmods SIG 1bd144
* Wed Jan 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.305-1
Kmods SIG 1bd144
- Switch to EL kernel source and versioning
Kmods SIG 1bd144
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)