Blame SPECS/kmod-ntfs3.spec

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