Blame SPECS/kmod-ntfs3.spec

28df9f
%global pkg ntfs3
28df9f
Kmods SIG d83023
%global driver_version 4.18.0-0.el8
Kmods SIG d83023
6a313e
%global kernel_version 4.18.0-348.el8
28df9f
28df9f
%global _use_internal_dependency_generator 0
28df9f
%global __find_requires /usr/lib/rpm/redhat/find-requires
28df9f
%global __find_provides /usr/lib/rpm/redhat/find-provides
28df9f
28df9f
%global debug_package %{nil}
28df9f
28df9f
%global __spec_install_post \
28df9f
  %{?__debug_package:%{__debug_install_post}} \
28df9f
  %{__arch_install_post} \
28df9f
  %{__os_install_post} \
28df9f
  %{__mod_compress_install_post}
28df9f
28df9f
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
28df9f
28df9f
28df9f
Name:             kmod-%{pkg}
Kmods SIG d83023
Version:          4.18.0.0
Kmods SIG d83023
Release:          1%{?dist}
28df9f
Summary:          NTFS filesystem support
28df9f
a71fa2
License:          GPLv2 and GPLv2+
28df9f
URL:              https://www.kernel.org/
28df9f
Kmods SIG d83023
Source0:          %{pkg}-%{driver_version}.tar.xz
Kmods SIG d83023
Patch1:           0001-fs-ntfs3-Add-headers-and-misc-files.patch
Kmods SIG d83023
Patch2:           0002-fs-ntfs3-Add-initialization-of-super-block.patch
Kmods SIG d83023
Patch3:           0003-fs-ntfs3-Add-bitmap.patch
Kmods SIG d83023
Patch4:           0004-fs-ntfs3-Add-file-operations-and-implementation.patch
Kmods SIG d83023
Patch5:           0005-fs-ntfs3-Add-attrib-operations.patch
Kmods SIG d83023
Patch6:           0006-fs-ntfs3-Add-compression.patch
Kmods SIG d83023
Patch7:           0007-fs-ntfs3-Add-NTFS-journal.patch
Kmods SIG d83023
Patch8:           0008-fs-ntfs3-Add-Kconfig-Makefile-and-doc.patch
Kmods SIG d83023
Patch9:           0009-fs-ntfs3-Fix-various-spelling-mistakes.patch
Kmods SIG d83023
Patch10:          0010-fs-ntfs3-Use-linux-log2-is_power_of_2-function.patch
Kmods SIG d83023
Patch11:          0011-fs-ntfs3-Add-ifndef-define-to-all-header-files.patch
Kmods SIG d83023
Patch12:          0012-fs-ntfs3-Fix-integer-overflow-in-multiplication.patch
Kmods SIG d83023
Patch13:          0013-fs-ntfs3-Remove-unused-variable-cnt-in-ntfs_security.patch
Kmods SIG d83023
Patch14:          0014-fs-ntfs3-Fix-one-none-utf8-char-in-source-file.patch
Kmods SIG d83023
Patch15:          0015-fs-ntfs3-Fix-fall-through-warnings-for-Clang.patch
Kmods SIG d83023
Patch16:          0016-fs-ntfs3-Remove-unused-including-linux-version.h.patch
Kmods SIG d83023
Patch17:          0017-fs-ntfs3-Restyle-comment-block-in-ni_parse_reparse.patch
Kmods SIG d83023
Patch18:          0018-fs-ntfs3-Use-kernel-ALIGN-macros-over-driver-specifi.patch
Kmods SIG d83023
Patch19:          0019-fs-ntfs3-Do-not-use-driver-own-alloc-wrappers.patch
Kmods SIG d83023
Patch20:          0020-fs-ntfs3-Use-kcalloc-kmalloc_array-over-kzalloc-kmal.patch
Kmods SIG d83023
Patch21:          0021-fs-ntfs3-add-checks-for-allocation-failure.patch
Kmods SIG d83023
Patch22:          0022-fs-ntfs3-fix-an-error-code-in-ntfs_get_acl_ex.patch
Kmods SIG d83023
Patch23:          0023-fs-ntfs3-Fix-error-code-in-indx_add_allocate.patch
Kmods SIG d83023
Patch24:          0024-fs-ntfs3-Potential-NULL-dereference-in-hdr_find_spli.patch
Kmods SIG d83023
Patch25:          0025-fs-ntfs3-Fix-error-handling-in-indx_insert_into_root.patch
Kmods SIG d83023
Patch26:          0026-fs-ntfs3-Restyle-comments-to-better-align-with-kerne.patch
Kmods SIG d83023
Patch27:          0027-fs-ntfs3-Remove-fat-ioctl-s-from-ntfs3-driver-for-no.patch
Kmods SIG d83023
Patch28:          0028-fs-ntfs3-Rework-file-operations.patch
Kmods SIG d83023
Patch29:          0029-fs-ntfs3-Restyle-comments-to-better-align-with-kerne.patch
Kmods SIG d83023
Patch30:          0030-fs-ntfs3-Fix-integer-overflow-in-ni_fiemap-with-fiem.patch
Kmods SIG d83023
Patch31:          0031-fs-ntfs3-Remove-unnecessary-condition-checking-from-.patch
Kmods SIG d83023
Patch32:          0032-fs-ntfs3-Remove-GPL-boilerplates-from-decompress-lib.patch
Kmods SIG d83023
Patch33:          0033-fs-ntfs3-Change-how-module-init-info-messages-are-di.patch
Kmods SIG d83023
Patch34:          0034-fs-ntfs3-Remove-unnecesarry-mount-option-noatime.patch
Kmods SIG d83023
Patch35:          0035-fs-ntfs3-Remove-unnecesarry-remount-flag-handling.patch
Kmods SIG d83023
Patch36:          0036-fs-ntfs3-Convert-mount-options-to-pointer-in-sbi.patch
Kmods SIG d83023
Patch37:          0037-fs-ntfs3-Use-new-api-for-mounting.patch
Kmods SIG d83023
Patch38:          0038-fs-ntfs3-Init-spi-more-in-init_fs_context-than-fill_.patch
Kmods SIG d83023
Patch39:          0039-fs-ntfs3-Make-mount-option-nohidden-more-universal.patch
Kmods SIG d83023
Patch40:          0040-fs-ntfs3-Add-iocharset-mount-option-as-alias-for-nls.patch
Kmods SIG d83023
Patch41:          0041-fs-ntfs3-Rename-mount-option-no_acs_rules-no-acsrule.patch
Kmods SIG d83023
Patch42:          0042-fs-ntfs3-Show-uid-gid-always-in-show_options.patch
Kmods SIG d83023
Patch43:          0043-fs-ntfs3-Remove-redundant-initialization-of-variable.patch
Kmods SIG d83023
Patch44:          0044-fs-ntfs3.-Add-forward-declarations-for-structs-to-de.patch
Kmods SIG d83023
Patch45:          0045-fs-ntfs3-Add-missing-header-files-to-ntfs.h.patch
Kmods SIG d83023
Patch46:          0046-fs-ntfs3-Add-missing-headers-and-forward-declaration.patch
Kmods SIG d83023
Patch47:          0047-fs-ntfs3-Add-missing-header-and-guards-to-lib-header.patch
Kmods SIG d83023
Patch48:          0048-fs-ntfs3-Change-right-headers-to-bitfunc.c.patch
Kmods SIG d83023
Patch49:          0049-fs-ntfs3-Change-right-headers-to-upcase.c.patch
Kmods SIG d83023
Patch50:          0050-fs-ntfs3-Change-right-headers-to-lznt.c.patch
Kmods SIG d83023
Patch51:          0051-fs-ntfs3-Remove-unneeded-header-files-from-c-files.patch
Kmods SIG d83023
Patch52:          0052-fs-ntfs3-Limit-binary-search-table-size.patch
Kmods SIG d83023
Patch53:          0053-fs-ntfs3-Make-binary-search-to-search-smaller-chunks.patch
Kmods SIG d83023
Patch54:          0054-fs-ntfs3-Always-use-binary-search-with-entry-search.patch
Kmods SIG d83023
Patch55:          0055-fs-ntfs3-Remove-before-constant-in-ni_insert_residen.patch
Kmods SIG d83023
Patch56:          0056-fs-ntfs3-Place-Comparisons-constant-right-side-of-th.patch
Kmods SIG d83023
Patch57:          0057-fs-ntfs3-Remove-braces-from-single-statment-block.patch
Kmods SIG d83023
Patch58:          0058-fs-ntfs3-Remove-tabs-before-spaces-from-comment.patch
Kmods SIG d83023
Patch59:          0059-fs-ntfs3-Fix-ntfs_look_for_free_space-does-only-repo.patch
Kmods SIG d83023
Patch60:          0060-fs-ntfs3-Remove-always-false-condition-check.patch
Kmods SIG d83023
Patch61:          0061-fs-ntfs3-Use-clamp-max-macros-instead-of-comparisons.patch
Kmods SIG d83023
Patch62:          0062-fs-ntfs3-Use-min-max-macros-instated-of-ternary-oper.patch
Kmods SIG d83023
Patch63:          0063-fs-ntfs3-Fix-wrong-error-message-Logfile-UpCase.patch
Kmods SIG d83023
Patch64:          0064-fs-ntfs3-Change-EINVAL-to-ENOMEM-when-d_make_root-fa.patch
Kmods SIG d83023
Patch65:          0065-fs-ntfs3-Remove-impossible-fault-condition-in-fill_s.patch
Kmods SIG d83023
Patch66:          0066-fs-ntfs3-Return-straight-without-goto-in-fill_super.patch
Kmods SIG d83023
Patch67:          0067-fs-ntfs3-Remove-unnecessary-variable-loading-in-fill.patch
Kmods SIG d83023
Patch68:          0068-fs-ntfs3-Use-sb-instead-of-sbi-sb-in-fill_super.patch
Kmods SIG d83023
Patch69:          0069-fs-ntfs3-Remove-tmp-var-is_ro-in-ntfs_fill_super.patch
Kmods SIG d83023
Patch70:          0070-fs-ntfs3-Remove-tmp-pointer-bd_inode-in-fill_super.patch
Kmods SIG d83023
Patch71:          0071-fs-ntfs3-Remove-tmp-pointer-upcase-in-fill_super.patch
Kmods SIG d83023
Patch72:          0072-fs-ntfs3-Initialize-pointer-before-use-place-in-fill.patch
Kmods SIG d83023
Patch73:          0073-fs-ntfs3-Initiliaze-sb-blocksize-only-in-one-place-r.patch
Kmods SIG d83023
Patch74:          0074-fs-ntfs3-Fix-a-memory-leak-on-object-opts.patch
Kmods SIG d83023
Patch75:          0075-fs-ntfs3-Fix-insertion-of-attr-in-ni_ins_attr_ext.patch
Kmods SIG d83023
Patch76:          0076-fs-ntfs3-Change-max-hardlinks-limit-to-4000.patch
Kmods SIG d83023
Patch77:          0077-fs-ntfs3-Add-sync-flag-to-ntfs_sb_write_run-and-al_u.patch
Kmods SIG d83023
Patch78:          0078-fs-ntfs3-Remove-a-useless-test-in-indx_find.patch
Kmods SIG d83023
Patch79:          0079-fs-ntfs3-Remove-a-useless-shadowing-variable.patch
Kmods SIG d83023
Patch80:          0080-fs-ntfs3-Remove-deprecated-mount-options-nls.patch
Kmods SIG d83023
Patch81:          0081-fs-ntfs3-Fix-logical-error-in-ntfs_create_inode.patch
Kmods SIG d83023
Patch82:          0082-fs-ntfs3-Move-ni_lock_dir-and-ni_unlock-into-ntfs_cr.patch
Kmods SIG d83023
Patch83:          0083-fs-ntfs3-Refactor-ntfs_get_acl_ex-for-better-readabi.patch
Kmods SIG d83023
Patch84:          0084-fs-ntfs3-Pass-flags-to-ntfs_set_ea-in-ntfs_set_acl_e.patch
Kmods SIG d83023
Patch85:          0085-fs-ntfs3-Change-posix_acl_equiv_mode-to-posix_acl_up.patch
Kmods SIG d83023
Patch86:          0086-fs-ntfs3-Refactoring-lock-in-ntfs_init_acl.patch
Kmods SIG d83023
Patch87:          0087-fs-ntfs3-Reject-mount-if-boot-s-cluster-size-media-s.patch
Kmods SIG d83023
Patch88:          0088-fs-ntfs3-Refactoring-of-ntfs_init_from_boot.patch
Kmods SIG d83023
Patch89:          0089-fs-ntfs3-Check-for-NULL-if-ATTR_EA_INFO-is-incorrect.patch
Kmods SIG d83023
Patch90:          0090-fs-ntfs3-Use-available-posix_acl_release-instead-of-.patch
Kmods SIG d83023
Patch91:          0091-fs-ntfs3-Remove-locked-argument-in-ntfs_set_ea.patch
Kmods SIG d83023
Patch92:          0092-fs-ntfs3-Refactoring-of-ntfs_set_ea.patch
Kmods SIG d83023
Patch93:          0093-fs-ntfs3-Forbid-FALLOC_FL_PUNCH_HOLE-for-normal-file.patch
Kmods SIG d83023
Patch94:          0094-fs-ntfs3-Remove-unnecessary-functions.patch
Kmods SIG d83023
Patch95:          0095-fs-ntfs3-Keep-prealloc-for-all-types-of-files.patch
Kmods SIG d83023
Patch96:          0096-fs-ntfs3-Fix-memory-leak-if-fill_super-failed.patch
Kmods SIG d83023
Patch97:          0097-fs-ntfs3-Rework-ntfs_utf16_to_nls.patch
Kmods SIG d83023
Patch98:          0098-fs-ntfs3-Refactor-ntfs_readlink_hlp.patch
Kmods SIG d83023
Patch99:          0099-fs-ntfs3-Refactor-ntfs_create_inode.patch
Kmods SIG d83023
Patch100:         0100-fs-ntfs3-Refactor-ni_parse_reparse.patch
Kmods SIG d83023
Patch101:         0101-fs-ntfs3-Refactor-ntfs_read_mft.patch
Kmods SIG d83023
Patch102:         0102-fs-ntfs3-Check-for-NULL-pointers-in-ni_try_remove_at.patch
Kmods SIG d83023
Patch103:         0103-merge.patch
Kmods SIG d83023
Patch9001:        9001-Remove-idmap-mount-support.patch
Kmods SIG d83023
Patch9002:        9002-Compat-Replace-copy_page_from_iter_atomic-by-iov_ite.patch
Kmods SIG d83023
Patch9003:        9003-Compat-Replace-BIO_MAX_VECS-by-BIO_MAX_PAGES.patch
Kmods SIG d83023
Patch9004:        9004-Compat-Replace-readahead-by-readpages.patch
Kmods SIG d83023
Patch9005:        9005-Compat-Add-fiemap_prep-function.patch
Kmods SIG d83023
Patch9999:        9999-enable-ntfs3.patch
28df9f
28df9f
ExclusiveArch:    x86_64 aarch64
28df9f
28df9f
BuildRequires:    elfutils-libelf-devel
28df9f
BuildRequires:    gcc
28df9f
BuildRequires:    kernel-rpm-macros
28df9f
BuildRequires:    kmod
28df9f
BuildRequires:    make
28df9f
BuildRequires:    redhat-rpm-config
28df9f
BuildRequires:    xz
28df9f
28df9f
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
28df9f
BuildRequires:    kernel-devel = %{kernel_version}
28df9f
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
28df9f
28df9f
Requires:         kernel >= %{kernel_version}
28df9f
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
28df9f
Requires:         kernel-modules >= %{kernel_version}
28df9f
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
28df9f
28df9f
Provides:         installonlypkg(kernel-module)
28df9f
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
28df9f
28df9f
Requires(post):   %{_sbindir}/depmod
28df9f
Requires(postun): %{_sbindir}/depmod
28df9f
28df9f
Requires(post):   %{_sbindir}/weak-modules
28df9f
Requires(postun): %{_sbindir}/weak-modules
28df9f
28df9f
28df9f
%description
28df9f
This package provides the required kernel module (ntfs3) to mount devices
28df9f
formatted with the Windows OS native file system (NTFS) up to version 3.1.
28df9f
28df9f
28df9f
%prep
Kmods SIG d83023
%autosetup -p1 -n %{pkg}-%{driver_version}
28df9f
28df9f
28df9f
%build
28df9f
pushd src
28df9f
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
28df9f
popd
28df9f
28df9f
28df9f
%install
94cc51
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg} src/%{pkg}.ko
28df9f
28df9f
# Make .ko objects temporarily executable for automatic stripping
28df9f
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
28df9f
28df9f
28df9f
%clean
28df9f
%{__rm} -rf %{buildroot}
28df9f
28df9f
28df9f
%post
28df9f
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
94cc51
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/fs/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
28df9f
28df9f
28df9f
%preun
28df9f
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
28df9f
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
28df9f
28df9f
28df9f
%postun
28df9f
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
28df9f
then
28df9f
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
28df9f
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
28df9f
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
28df9f
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
28df9f
fi
28df9f
28df9f
28df9f
%pretrans -p <lua>
28df9f
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
28df9f
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
28df9f
28df9f
28df9f
%posttrans
28df9f
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
28df9f
then
28df9f
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
28df9f
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
28df9f
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
28df9f
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
28df9f
fi
28df9f
28df9f
28df9f
%files
28df9f
%defattr(644,root,root,755)
28df9f
/lib/modules/%{kernel_version}.%{_arch}
93dc9d
%license LICENSES
28df9f
28df9f
28df9f
%changelog
Kmods SIG d83023
* Thu Jan 13 2022 Kmods SIG <sig-kmods@centosproject.org> - 4.18.0.0-1
Kmods SIG d83023
- Switch to EL kernel source and versioning
Kmods SIG d83023
- kABI tracking kmod package (kernel >= 4.18.0-348.el8)