[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 Breno changed: What|Removed |Added Status|NEW |CLOSED Resolution|--- |ERRATA Last Closed||2020-03-04 22:01:16 --- Comment #11 from Breno --- Thanks for pointing it out Vít. I am closing this ticket, rubygem-cane doesn't seem to be a runtime dependency for either puppet or puppetserver. -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #10 from Vít Ondruch --- (In reply to Breno from comment #9) > So, regarding the puppet 6 requirement, cane is required by > semantic_puppet[1] which is required by puppet. It seems it is just developement dependency. It will be required just for some test suite run or not even for that case. It can be very likely just ingored or removed as simply as I removed the simplecov dependency in the previous snippet. > Does it make sense? Do you think I could handwave it somehow? I am waiting > for cane to be included in fedora to ask for a review in a semantic_puppet > spec file. If you plan to introduce more than one package, it is better to submit them in parallel and make the BZ tickets blocking each other. That way, it is better to see what are your reasons. Since if we had this discussion earlier, may be you would save some time packaging rubygem-rspec-fire as well as this one ;) -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #9 from Breno --- Hi Vít, Thanks for your feedback regarding the testing. I will check that with the upstream. So, regarding the puppet 6 requirement, cane is required by semantic_puppet[1] which is required by puppet. Does it make sense? Do you think I could handwave it somehow? I am waiting for cane to be included in fedora to ask for a review in a semantic_puppet spec file. 1 https://rubygems.org/gems/semantic_puppet/versions/1.0.2 -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #8 from Vít Ondruch --- (In reply to Vít Ondruch from comment #7) > Also, last but not least, it seems Cane upstream suggest to use Rubocop > instead of Cane, therefore I wonder why are you trying to include Cane into > Fedora? Actually you have already mentioned that: > This package is a requirement for puppet 6. But anyway, this appears to be just some linter, is it really necessary? Can the dependency be dropped? It does not appear to be runtime dependency ... -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #7 from Vít Ondruch --- This is a way to execute the test suite: ~~~ --- a/rubygem-cane.spec +++ b/rubygem-cane.spec @@ -14,10 +14,7 @@ BuildRequires: ruby >= 1.9.0 # for the tests BuildRequires: rubygem(parallel) -# BuildRequires: rubygem(rspec) >= 2.0 -# BuildRequires: rubygem(rspec) < 3 -# BuildRequires: rubygem(simplecov) -# BuildRequires: rubygem(rspec-fire) +BuildRequires: rubygem(rspec) BuildArch: noarch %description @@ -59,6 +56,16 @@ pushd .%{gem_instdir} RUBYOPT="-Ilib/" bin/cane --gte "10,20" | grep "10 is 10.0, should be >= 20.0" RUBYOPT="-Ilib/" bin/cane --gte "10,10" + +# rspec-fire functionality is now provided by rspec-mocks and is no longer +# required. +sed -r -i "/[sS]pec.{1,2}[fF]ire/ s/^/#/" spec/spec_helper.rb + +# We don't care about code coverage. +sed -i "/simplecov/ s/^/#/" spec/spec_helper.rb +sed -i "/SimpleCov/,/^end/ s/^/#/" spec/spec_helper.rb + +rspec spec popd %files ~~~ However, there are two caveats you should solve with upstream: 1. There are two test failures: ~~~ Failures: 1) Cane::AbcCheck#file_names abc_glob is an array returns an array of relative file paths Failure/Error: expect(check.send(:file_names)).to eq([ 'spec/fixtures/a/1.rb', 'spec/fixtures/a/3.prawn', 'spec/fixtures/b/1.rb' ]) expected: ["spec/fixtures/a/1.rb", "spec/fixtures/a/3.prawn", "spec/fixtures/b/1.rb"] got: ["spec/fixtures/a/1.rb", "spec/fixtures/b/1.rb"] (compared using ==) # ./spec/abc_check_spec.rb:175:in `block (4 levels) in ' 2) Cane::StyleCheck#file_list style_glob is an array returns an array of relative file paths Failure/Error: expect(check.send(:file_list)).to eq([ 'spec/fixtures/a/1.rb', 'spec/fixtures/a/3.prawn', 'spec/fixtures/b/3/i.haml' ]) expected: ["spec/fixtures/a/1.rb", "spec/fixtures/a/3.prawn", "spec/fixtures/b/3/i.haml"] got: ["spec/fixtures/a/1.rb"] (compared using ==) # ./spec/style_check_spec.rb:66:in `block (4 levels) in ' Finished in 0.21902 seconds (files took 0.18891 seconds to load) 89 examples, 2 failures ~~~ Checking the content of the gem, I think the problem is that the test suite is not completely included in the .gem. This line [1] should probably be modified to `gem.test_files = Dir.glob("spec/**/*")` to include every file the test suite needs. 2. The test suite needlessly specified dependency on RSpec 2.x, while it apparently works just fine with the RSpec 3.x. Upstream should relax the dependency. This would also allow to drop the rspec-fire dependency as it is done in the snippet (and it should be done upstream also in the .gemspec file). And if you will be in contact with upstream, it would be also nice to swap the content of `gemspec.summary` with `gemspec.description`, because typically description is more verbose then summary. Also, last but not least, it seems Cane upstream suggest to use Rubocop instead of Cane, therefore I wonder why are you trying to include Cane into Fedora? [1]: https://github.com/square/cane/blob/master/cane.gemspec#L24 -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #6 from Breno --- Spec URL: https://raw.githubusercontent.com/skywalkerz0r/rubygem-cane/epel8/rubygem-cane.spec SRPM URL: https://download.copr.fedorainfracloud.org/results/brandfbb/rubygem-cane-testing/epel-8-x86_64/01252264-rubygem-cane/rubygem-cane-3.0.0-1.el8.src.rpm Description: Provides complexity and style checkers allowing integration with custom metrics Fedora Account System Username: brandfbb The issues should be fixed now. -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #5 from Vít Ondruch --- (In reply to Adam Borowski from comment #3) > I'm not sure about the testsuite issue. Yes, it would be nice to execute the test suite. Also, I would move the test suite into -doc subpackage, because it is not essential for runtime. And the Requires declarations should not be required, these are autogenerated. The HISTORY.md should be marked as a `%doc`, altouhg it is in -doc subpackage. I don't think the -doc subpackage needs the `BR/R: rubygems`. And it should be noarch. The `mv %{buildroot}/%{gem_instdir}/bin/* %{buildroot}/%{_bindir}` is definitely wrong. There should be already binary in `%{buildroot}%{_bindir}`. You don't properly unpack/rebuild/install the gem, as specified in guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/Ruby/#_building_gems All in all, I am not sure what is the source of this package, but I'd say that recent version of rubygem-gem2rpm would provide you better scaffold to polish. -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 Vít Ondruch changed: What|Removed |Added CC||vondr...@redhat.com --- Comment #4 from Vít Ondruch --- (In reply to Adam Borowski from comment #2) > Neither of the packages ship anything in /usr/share/licenses/ Just FTR, nothing demands to ship anything there. The review guidelines only demands following: ~~~ MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %license. SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. ~~~ -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 --- Comment #3 from Adam Borowski --- Issues: === - Package contains Requires: ruby(release). = MUST items = Generic: [✓]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [✓]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. No licenses found. Please check the source files for licenses manually. [!]: License file installed when any subpackage combination is installed. -- not in /usr/share/licenses/ [ ]: Package contains no bundled libraries without FPC exception. [✓]: Changelog in prescribed format. [ ]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [✓]: Package uses nothing in %doc for runtime. [✓]: Package consistently uses macros (instead of hard-coded directory names). [✓]: Package is named according to the Package Naming Guidelines. [✓]: Package does not generate any conflict. [✓]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [✓]: Requires correct, justified where necessary. [✓]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [✓]: Package is not known to require an ExcludeArch tag. [ ]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 0 bytes in 0 files. [x]: Packages must not store files under /srv, /opt or /usr/local Ruby: [✓]: Platform dependent files must all go under %{gem_extdir_mri}, platform independent under %{gem_dir}. [x]: Gem package must not define a non-gem subpackage [x]: Macro %{gem_extdir} is deprecated. [x]: Gem package is named rubygem-%{gem_name} [x]: Package contains BuildRequires: rubygems-devel. [x]: gems should require rubygems package [x]: Gem package must define %{gem_name} macro. [x]: Pure Ruby package must be built as noarch [x]: Package does not contain Requires: ruby(abi). = SHOULD items = Generic: [!]: Avoid bundling fonts in non-fonts packages. Note: Package contains font files [✓]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [✓]: Final provides and requires are sane (see attachments). [ ]: Package functions as described. [✓]: Latest version is packaged. [✓]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [ ]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [-]: Package should compile and build into binary rpms on all supported architectures. [ ]: %check is present and all tests pass. [!]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 Adam Borowski changed: What|Removed |Added CC||kilob...@angband.pl --- Comment #2 from Adam Borowski --- The -doc package shouldn't contain fonts. Here, you ship copies of Lato and SourceCodePro instead of requiring them. Neither of the packages ship anything in /usr/share/licenses/ -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org
[Bug 1803276] Review Request: rubygem-cane - Provides complexity and style checkers allowing integration with custom metrics
https://bugzilla.redhat.com/show_bug.cgi?id=1803276 Breno changed: What|Removed |Added Doc Type|--- |If docs needed, set a value --- Comment #1 from Breno --- Spec URL: https://raw.githubusercontent.com/skywalkerz0r/rubygem-cane/epel8/rubygem-cane.spec SRPM URL: https://download.copr.fedorainfracloud.org/results/brandfbb/not-yet-in-epel8/epel-8-x86_64/01240294-rubygem-cane/rubygem-cane-3.0.0-1.el8.src.rpm Description: Provides complexity and style checkers allowing integration with custom metrics Fedora Account System Username: brandfbb The package rubygem-redcarpet was pushed to stable. So the -L option previously mentioned is no longer required. A regular fedora-review will work. Thanks. - B -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component ___ package-review mailing list -- package-review@lists.fedoraproject.org To unsubscribe send an email to package-review-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@lists.fedoraproject.org