ruby/ruby.rpmlintrc

62 lines
3.3 KiB
Plaintext
Raw Normal View History

# Keep matching patterns enough not to hide unintended errors and warnings.
# There is no way to implement this with `%{SOURCE0}` without `%{_sourcedir}`.
# The order in the .spec file could be possibly different.
addFilter(r'ruby\.(spec|src):20: E: use-of-RPM_SOURCE_DIR$')
# The used version is not obvious.
addFilter(r'ruby\.(spec|src):\d+: W: unversioned-explicit-provides bundled\(ccan-build_assert\)$')
addFilter(r'ruby\.(spec|src):\d+: W: unversioned-explicit-provides bundled\(ccan-check_type\)$')
addFilter(r'ruby\.(spec|src):\d+: W: unversioned-explicit-provides bundled\(ccan-container_of\)$')
addFilter(r'ruby\.(spec|src):\d+: W: unversioned-explicit-provides bundled\(ccan-list\)$')
# The template files do not have to have executable bits.
addFilter(r'^rubygem-bundler\.noarch: E: non-executable-script /usr/share/gems/gems/bundler-[\d\.]+/lib/bundler/templates/[\w/\.]+ 644 /usr/bin/env ')
ruby.rpmlintrc: Ignore the non-executable-script errors in bundled gems. The bundled gem files permissions are overridden as 644 by `make install`. Ignore following errors in bundled gems. ``` rubygem-power_assert.noarch: E: non-executable-script /usr/share/gems/gems/power_assert-1.2.0/bin/console 644 /usr/bin/env ruby rubygem-power_assert.noarch: E: non-executable-script /usr/share/gems/gems/power_assert-1.2.0/bin/setup 644 /usr/bin/env bash rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/bundle 644 /usr/bin/env ruby rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/console 644 /usr/bin/env ruby rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/rake 644 /usr/bin/env ruby rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/rdoc 644 /usr/bin/env ruby rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/rubocop 644 /usr/bin/env ruby rubygem-rake.noarch: E: non-executable-script /usr/share/gems/gems/rake-13.0.3/bin/setup 644 /usr/bin/env bash rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/annotate-with-rdoc 644 /usr/bin/env ruby rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/console 644 /usr/bin/env ruby rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/query-rdoc 644 /usr/bin/env ruby rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/rbs-prof 644 /usr/bin/env ruby rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/setup 644 /usr/bin/env bash rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/sort 644 /usr/bin/env ruby rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/steep 644 /bin/sh rubygem-rbs.noarch: E: non-executable-script /usr/share/gems/gems/rbs-1.0.4/bin/test_runner.rb 644 /usr/bin/env ruby rubygem-test-unit.noarch: E: non-executable-script /usr/share/gems/gems/test-unit-3.3.7/test/run-test.rb 644 /usr/bin/env ruby ```
2021-04-28 18:53:04 +00:00
# The bundled gem files permissions are overridden as 644 by `make install`.
# https://bugs.ruby-lang.org/issues/17840
# https://github.com/rubygems/rubygems/issues/5255
# https://github.com/ruby/debug/pull/481
# https://github.com/ruby/net-ftp/pull/12
# https://github.com/ruby/net-imap/pull/53
# https://github.com/ruby/net-pop/pull/7
# https://github.com/ruby/prime/pull/16
addFilter(r'^.*: E: non-executable-script /usr/share/gems/gems/(debug|net-(ftp|imap|pop)|prime)-[\d\.]+/bin/\w+ 644 ')
# Ruby provides API to set the cipher list.
addFilter(r'^ruby-libs\.\w+: W: crypto-policy-non-compliance-openssl /usr/lib(64)?/ruby/openssl.so SSL_CTX_set_cipher_list$')
# `gethostbyname` is part of deprecated Ruby API. There is also request to drop the API altogether:
# https://bugs.ruby-lang.org/issues/13097
# https://bugs.ruby-lang.org/issues/17944
addFilter(r'^ruby-libs\.\w+: W: binary-or-shlib-calls-gethostbyname /usr/lib(64)?/ruby/socket.so$')
# 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$')
# Some executables don't have their manual pages. Is it worth of use help2man?
addFilter(r'^.+: W: no-manual-page-for-binary (bundler|gem|racc|rbs|rdbg|rdoc|ruby-mri|syntax_suggest|typeprof)$')
# Default gems does not come with any documentation.
addFilter(r'^rubygem-(bigdecimal|io-console|json|psych)\.\w+: W: no-documentation$')
# 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$')
# Ignore some spelling false positives.
# Ignore spelling of technical terms
addFilter(r'^ruby-default-gems.noarch: E: spelling-error \(\'gemspec\'')
addFilter(r'^ruby-libs.x86_64: E: spelling-error \(\'libruby\'')
addFilter(r'^rubygem-test-unit.noarch: E: spelling-error \(\'xUnit\'')
addFilter(r'^rubygem-psych.x86_64: E: spelling-error \(\'libyaml\'')
addFilter(r'^rubygem-io-console.x86_64: E: spelling-error \(\'readline\'')
# `pyaml` is part of URL
addFilter(r'^rubygem-psych.x86_64: E: spelling-error \(\'pyyaml\'')
# `de-` is actually prefix
addFilter(r'^rubygem-psych.x86_64: E: spelling-error \(\'de\'')
# It does not seemt to be worth of changing rubygems to archful package due to
# single directory, unless it causes some real troubles.
addFilter(r'^rubygems.noarch: E: noarch-with-lib64$')