42c61b3
# KNOWN BUGS:
42c61b3
# https://bugzilla.redhat.com/show_bug.cgi?id=1489816
42c61b3
addFilter(r'crypto-policy-non-compliance-openssl')
42c61b3
42c61b3
42c61b3
# TESTS:
a092844
addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/python3\.\d+/test')
42c61b3
42c61b3
42c61b3
# OTHER DELIBERATES:
42c61b3
# chroot function
42c61b3
addFilter(r'missing-call-to-chdir-with-chroot')
42c61b3
94ba907
# intentionally unversioned and selfobsoleted
42c61b3
addFilter(r'unversioned-explicit-obsoletes python')
786b31e
addFilter(r'unversioned Obsoletes: Obsoletes: python3\.\d+$')
97711d6
addFilter(r'self-obsoletion python3\.\d+ obsoletes python3\.\d+')
42c61b3
42c61b3
# intentionally hardcoded
42c61b3
addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})')
42c61b3
94ba907
# we have non binary stuff, python files
94ba907
addFilter(r'only-non-binary-in-usr-lib')
94ba907
94ba907
# some devel files that are deliberately needed
91b58b7
addFilter(r'devel-file-in-non-devel-package /usr/include/python3\.\d+m?/pyconfig-(32|64)\.h')
91b58b7
addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/python3\.\d+/distutils/tests/xxmodule\.c')
94ba907
9ceb5be
# some bytecode is shipped without sources on purpose, as a space optimization
9ceb5be
# if this regex needs to be relaxed in the future, make sure it **does not** match pyc files in __pycache__
9ceb5be
addFilter(r'python-bytecode-without-source /usr/lib(64)?/python3\.\d+/(encodings|pydoc_data)/[^/]+.pyc')
42c61b3
42c61b3
# SORRY, NOT SORRY:
42c61b3
# manual pages
91b58b7
addFilter(r'no-manual-page-for-binary (idle|pydoc|pyvenv|2to3|python3?-debug|pathfix|msgfmt|pygettext)')
91b58b7
addFilter(r'no-manual-page-for-binary python3?.*-config$')
91b58b7
addFilter(r'no-manual-page-for-binary python3\.\d+dm?$')
94ba907
94ba907
# missing documentation from subpackages
91b58b7
addFilter(r'^python3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation')
94ba907
94ba907
# platform python is obsoleted, but not provided
94ba907
addFilter(r'obsolete-not-provided platform-python')
42c61b3
d11fccf
# we have extra tokens at the end of %endif/%else directives, we consider them useful
d11fccf
addFilter(r'extra tokens at the end of %(endif|else) directive')
d11fccf
42c61b3
42c61b3
# RPMLINT IMPERFECTIONS
42c61b3
# https://github.com/rpm-software-management/rpmlint/issues/123
42c61b3
addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393')
ceff4b8
# https://github.com/rpm-software-management/rpmlint/pull/133
ceff4b8
addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394')
42c61b3
42c61b3
# https://bugzilla.redhat.com/show_bug.cgi?id=1550562
42c61b3
# https://github.com/rpm-software-management/rpmlint/issues/128
42c61b3
addFilter(r'python-bytecode-inconsistent-mtime .* 1970')
42c61b3
91b58b7
# we provide python(abi) manually to be sure. createrepo will merge this with the automatic
91b58b7
addFilter(r'python3(\.\d+)?\.[^:-]+: (E|W): useless-provides python\(abi\)')
91b58b7
42c61b3
# debugsource
91b58b7
addFilter(r'^python3(\.\d+)?-debugsource\.[^:]+: (E|W): no-documentation')
42c61b3
42c61b3
# debuginfo
91b58b7
addFilter(r'^python3(\.\d+)?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)')
42c61b3
42c61b3
# this is OK for F28+
42c61b3
addFilter(r'library-without-ldconfig-post')
94ba907
94ba907
# debug package contains devel and non-devel files
a092844
addFilter(r'python3(\.\d+)?-debug\.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package')
94ba907
94ba907
# this goes to other subpackage, hence not actually dangling, the read error is bogus
91b58b7
addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\d+dm?(-embed)?\.pc python-3\.\d+(-embed)?\.pc')
91b58b7
addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\d+dm?(-embed)?\.pc \[Errno 2\]')
91b58b7
91b58b7
# the python-unversioned-command package contains dangling symlinks by design
91b58b7
addFilter(r'^python-unversioned-command\.[^:]+: (E|W): dangling-relative-symlink '
91b58b7
          r'(/usr/bin/python \./python3|/usr/share/man/man1/python\.1\S* ./python3\.1\S*)$')
94ba907
34f9f5e
# we need this macro to evaluate, even if the line starts with #
34f9f5e
addFilter(r'macro-in-comment %\{_pyconfig(32|64)_h\}')
94ba907
553fd27
# Python modules don't need to be linked against libc
9fbe2ee
# Since 3.8 they are no longer linked against libpython3.8.so.1.0
a17e946
addFilter(r'(E|W): library-not-linked-against-libc /usr/lib(64)?/python3\.\d+/lib-dynload/')
a17e946
addFilter(r'(E|W): shared-lib-without-dependency-information /usr/lib(64)?/python3\.\d+/lib-dynload/')
553fd27
d11fccf
# specfile-errors are listed twice, once with reason and once without
d11fccf
# we filter out the empty ones
d11fccf
addFilter(r'\bpython3(\.\d+)?\.(src|spec): (E|W): specfile-error\s+$')
d11fccf
94ba907
# SPELLING ERRORS
94ba907
addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ')