#115 ruby.rpmlintrc: Fix errors
Merged 2 years ago by jaruga. Opened 2 years ago by jaruga.
rpms/ jaruga/ruby wip/rpmlint  into  rawhide

file modified
+17
@@ -34,10 +34,23 @@ 

  # Nothing referred and no dependency information should be no problem.

  # https://bugs.ruby-lang.org/issues/16558#note-2

  addFilter(r'^ruby-libs\.\w+: E: shared-library-without-dependency-information /usr/lib(64)?/ruby/enc/gb2312.so$')

+ # Compatibility for rpmlint 1.11.

+ addFilter(r'^ruby-libs\.\w+: E: shared-lib-without-dependency-information /usr/lib(64)?/ruby/enc/gb2312.so$')

  

  # These are Ruby plugins, where Ruby always load glibc prior the library.

  addFilter(r'^ruby-libs\.\w+: W: library-not-linked-against-libc /usr/lib(64)?/ruby/.*.so$')

  

+ # The function `chroot` without using `chdir` is detected by rpmlint with the

+ # following message. However it looks a false positive as the `chroot` in the

+ # `dir.c` is just used as a Ruby binding `Dir.chroot` for the function.

+ #

+ # ruby-libs.x86_64: E: missing-call-to-chdir-with-chroot /usr/lib64/libruby.so.N.N.N

+ # This executable appears to call chroot without using chdir to change the

+ # current directory. This is likely an error and permits an attacker to break

+ # out of the chroot by using fchdir. While that's not always a security issue,

+ # this has to be checked.

+ addFilter(r'^ruby-libs\.\w+: E: missing-call-to-chdir-with-chroot /usr/lib(64)?/libruby.so.[\d/.]+$')

+ 

  # Rake ships some examples.

  addFilter(r'^rubygem-rake.noarch: W: devel-file-in-non-devel-package /usr/share/gems/gems/rake-[\d\.]+/doc/example/\w+.c$')

  
@@ -50,3 +63,7 @@ 

  # rubygems-devel ships only RPM macros and generators. Their placement is given

  # by RPM and can't be modified.

  addFilter(r'rubygems-devel.noarch: W: only-non-binary-in-usr-lib$')

+ 

+ # The empty gem.build_complete file is false positive. This error is gone in rpmlint 2.0+.

+ # https://github.com/rpm-software-management/rpmlint/commit/e34ce874f27d733628f51c9884ac951af072bed2

+ addFilter(r'^ruby(gem)?-(bigdecimal|bundled-gems|io-console|json|psych|rbs)\.\w+: E: zero-length /usr/lib(64)?/gems/ruby/.*/gem.build_complete')

This PR is to fix errors by rpmlint version 1 on Zuul CI running in Fedora 34 container.
I will add a commit one by one for each checking error or warning on this PR. The errors could be gone in rpmlint 2.0+.

After Zuul CI is upgraded to Fedora 35+ container, and uses the rpmlint 2, we can notice
some filters not used by "E: unused-rpmlintrc-filter" error, and remove those safely.

It likely the time is coming for Zuul CI to upgrade the used container from f34 to f35 to change the rpmlint to the version 2.
https://pagure.io/fedora-ci/general/issue/330#comment-785686

So, I want to make the Zuul CI pass before Zuul CI to upgrade to the f35 container, as we need to modify ruby.rpmlint again for the rpmlint 2 specific changes after that.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 63e02ed75a127bea7bf1e914712b53502a52e1f1

2 years ago

Total 3 commits for 3 filters.

I see 2 filters are deleted or modified maybe to adapt rpmlint 2. But rpmlint 1.11 is used in Zuul CI right now. It's still premature to delete the items to always pass Zuul CI.
https://src.fedoraproject.org/rpms/ruby/c/b0ce095f6d6e74a40b571143eba52c14ce04c074?branch=rawhide

For someone who wants to run rpmlint version 1.11 on local, I prepare the container.
https://github.com/junaruga/rpmlint1-container

3 new commits added

  • ruby.rpmlintrc: Add a filter for "E: shared-lib-without-dependency-information".
  • ruby.rpmlintrc: Recover the filter to ignore a false positive missing-call-to-chdir-with-chroot error.
  • ruby.rpmlintrc: Ignore zero-length error for gem.build_complete file.
2 years ago

Build succeeded.

rebased onto 9e774fb

2 years ago

Pull-Request has been merged by jaruga

2 years ago

Build succeeded.

Metadata