#10 Add rpmlintrc file
Merged 2 years ago by ishcherb. Opened 2 years ago by churchyard.
rpms/ churchyard/python37 rpmlint  into  master

file added
+71

@@ -0,0 +1,71 @@ 

+ # KNOWN BUGS:

+ # https://bugzilla.redhat.com/show_bug.cgi?id=1489816

+ addFilter(r'crypto-policy-non-compliance-openssl')

+ 

+ 

+ # TESTS:

+ addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/python3.\d/test')

+ 

+ 

+ # OTHER DELIBERATES:

+ # chroot function

+ addFilter(r'missing-call-to-chdir-with-chroot')

+ 

+ # intentionally unversioned and selfobsoleted

+ addFilter(r'unversioned-explicit-obsoletes python')

+ addFilter(r'self-obsoletion python3\d obsoletes python3\d')

+ 

+ # intentionally hardcoded

+ addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})')

+ 

+ # intentional for our pythonXY package

+ addFilter(r'python3\d\.[^:]+: (E|W): devel-file-in-non-devel-package')

+ 

+ # we have non binary stuff, python files

+ addFilter(r'only-non-binary-in-usr-lib')

+ 

+ # some devel files that are deliberately needed

+ addFilter(r'devel-file-in-non-devel-package /usr/include/python3\.\dm/pyconfig-(32|64)\.h')

+ addFilter(r'devel-file-in-non-devel-package /usr/lib64/python3\.\d/distutils/tests/xxmodule\.c')

+ 

+ 

+ # SORRY, NOT SORRY:

+ # manual pages

+ addFilter(r'no-manual-page-for-binary (idle|pydoc|pyvenv|2to3|python3-debug|pathfix\.py)')

+ addFilter(r'no-manual-page-for-binary python3.*-config$')

+ addFilter(r'no-manual-page-for-binary python3.\dd?m$')

+ 

+ # missing documentation from subpackages

+ addFilter(r'^python3\d?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation')

+ 

+ # platform python is obsoleted, but not provided

+ addFilter(r'obsolete-not-provided platform-python')

+ 

+ 

+ # RPMLINT IMPERFECTIONS

+ # https://github.com/rpm-software-management/rpmlint/issues/123

+ addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393')

+ 

+ # https://bugzilla.redhat.com/show_bug.cgi?id=1550562

+ # https://github.com/rpm-software-management/rpmlint/issues/128

+ addFilter(r'python-bytecode-inconsistent-mtime .* 1970')

+ 

+ # debugsource

+ addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W): no-documentation')

+ 

+ # debuginfo

+ addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)')

+ 

+ # this is OK for F28+

+ addFilter(r'library-without-ldconfig-post')

+ 

+ # debug package contains devel and non-devel files

+ addFilter(r'python3\d?-debug.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package')

+ 

+ # this goes to other subpackage, hence not actually dangling, the read error is bogus

+ addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc python-3\.\d\.pc')

+ addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]')

+ 

+ 

+ # SPELLING ERRORS

+ addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ')

file modified
+2 -2

@@ -853,9 +853,9 @@ 

  #include <bits/wordsize.h>

  

  #if __WORDSIZE == 32

- #include "%{_pyconfig32_h}"

+ #include "%%{_pyconfig32_h}"

I believe those are not comments. See also https://bugzilla.redhat.com/show_bug.cgi?id=1535596#c2

Should those really be changed?

I've tried to explain it in the commit message. They are not comments, yet %% should be used.

I missed the commit message, sorry. Thanks for explanation.

  #elif __WORDSIZE == 64

- #include "%{_pyconfig64_h}"

+ #include "%%{_pyconfig64_h}"

  #else

  #error "Unknown word size"

  #endif

2 new commits added

  • Add rpmlintrc file
  • Use %% for actual % in spec
2 years ago

2 new commits added

  • Add rpmlintrc file
  • Use %% for actual % in spec
2 years ago

2 new commits added

  • Add rpmlintrc file
  • Use %% for actual % in spec
2 years ago

I believe those are not comments. See also https://bugzilla.redhat.com/show_bug.cgi?id=1535596#c2

Should those really be changed?

1 new commit added

  • rpmlintrc: Add stuff from the nonflat package
2 years ago

I've tried to explain it in the commit message. They are not comments, yet %% should be used.

I missed the commit message, sorry. Thanks for explanation.

3 new commits added

  • rpmlintrc: Add stuff from the nonflat package
  • Add rpmlintrc file
  • Use %% for actual % in spec
2 years ago

What's the reason rpmlint thinks this shouldn't be done? FWIW, I don't see any archy patches left, unless %patch102 is counted (but that's rather a known bug)

Honestly, no idea. Maybe so you can fedpkg prep on different arch? This is from python3.spec (patch264 ifarch aarch64), so i can remove it here. On the other hand, yes, we do apply patch102 based on arch, but rpmlint doesn't recognize it :)

https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Support

"The second best strategy is to use spec file conditionals only when utilizing the value of a Source or Patch tag"

Permitted, called second best strategy. Let's don't worry about it and filter it out.

Some checks

Non-flat build:

$ rpmlint --file python37.rpmlintrc <mock-dir-output>
python37-test.x86_64: W: spelling-error %description -l en_US pytest -> testes
10 packages and 0 specfiles checked; 0 errors, 1 warnings.

Can we also add pytest to spelling errors?

Flat build:

$ rpmlint --file python37.rpmlintrc <mock-dir-output>
4 packages and 0 specfiles checked; 0 errors, 0 warnings.

OK.

I would also rather if addFilter(r'%ifarch-applied-patch') is added only for python3 and removed from here.

Nitpicks:
intentionaly -> intentionally
mising -> missing
subpackges -> subpackages

Looks good to me otherwise. Also not sure why the simple-koji-ci failure, I could build it just fine.

3 new commits added

  • rpmlintrc: Add stuff from the nonflat package
  • Add rpmlintrc file
  • Use %% for actual % in spec
2 years ago

And the build is green. Merging

Pull-Request has been merged by ishcherb

2 years ago