Blame SPECS/kmod-ntfs3.spec

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