Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
Summary: Review Request: rubygem-rspec-puppet - RSpec tests for your Puppet manifests
https://bugzilla.redhat.com/show_bug.cgi?id=787350
Summary: Review Request: rubygem-rspec-puppet - RSpec tests for your Puppet manifests Product: Fedora Version: rawhide Platform: All OS/Version: Linux Status: NEW Severity: medium Priority: medium Component: Package Review AssignedTo: nobody@fedoraproject.org ReportedBy: misc@zarb.org QAContact: extras-qa@fedoraproject.org CC: notting@redhat.com, package-review@lists.fedoraproject.org Classification: Fedora Story Points: --- Type: --- Regression: --- Mount Type: --- Documentation: ---
Spec URL: http://www.ephaone.org/~misc/specs/rubygem-rspec-puppet.spec SRPM URL: http://www.ephaone.org/~misc/specs/rubygem-rspec-puppet-0.1.1-1.fc16.src.rpm Description: RSpec tests for your Puppet manifests
This package add various modules used to create non regression tests based on RSpec for puppet manifests.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=787350
Bohuslav "Slavek" Kabrda bkabrda@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |bkabrda@redhat.com AssignedTo|nobody@fedoraproject.org |bkabrda@redhat.com Flag| |fedora-review?
--- Comment #1 from Bohuslav "Slavek" Kabrda bkabrda@redhat.com 2012-05-07 04:03:07 EDT --- Taking this one.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #2 from Bohuslav "Slavek" Kabrda bkabrda@redhat.com 2012-05-07 04:13:06 EDT --- Ok, so first of all, you should use the macros from rubygem-devel package, which is available from F17 above. [1] Also, please note, that ruby(abi) is 1.9.1 for these. - If you want to use the package in F16 and below or EPEL, you will need to define the all the macros (gem_name, gem_dir, ...) conditionally. - You should mark the LICENSE file as %doc (but leave it in the main package). - You should also mark the README file as %doc, but probably move it to the -doc subpackage.
- Otherwise, it would be good to proceed once you convert the specfile to the F17 way (you can use the newest gem2rpm for that).
[1] https://fedoraproject.org/wiki/Packaging:Ruby#Macros
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #3 from Michael Scherer misc@zarb.org --- Ok, i first need to review the new ruby policy, I have put aside this package until the release of fedora 17 ( waiting until the policy got a little bit more stable and having more time ).
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #4 from Greg Swift gregswift@gmail.com --- Spec URL: http://nytefyre.net/rpms/rubygem-rspec-puppet.spec SRPM URL: http://http://nytefyre.net/rpms/rubygem-rspec-puppet-0.1.5-1.fc17.src.rpm
So I checked this out and think I've got a revised version working. I've tested the build on f17 and centos6 (centos5 blew up.. gem had a buffer overflow )
I'm willing to go forward with this package, if you aren't available to continue reviewing this can you let me know so that I can look for a reviewer. thanks!
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #5 from Bohuslav "Slavek" Kabrda bkabrda@redhat.com --- Looks much better now, but still some comments: - License is MIT (see the LICENSE file) - Please run specs in %check section, it's always good to make sure that the tests provided with package work on Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=787350
Vít Ondruch vondruch@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vondruch@redhat.com
--- Comment #6 from Vít Ondruch vondruch@redhat.com --- * puppet dependency - It seems that there should be Require: puppet, otherwise I get these errors:
$ rspec-puppet-init /usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot load such file -- puppet (LoadError) from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/lib/rspec-puppet.rb:1:in `<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/bin/rspec-puppet-init:5:in `<top (required)>' from /usr/bin/rspec-puppet-init:23:in `load' from /usr/bin/rspec-puppet-init:23:in `<main>'
$ irb irb(main):001:0> require 'rspec-puppet' LoadError: cannot load such file -- puppet from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/lib/rspec-puppet.rb:1:in `<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:60:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:60:in `rescue in require' from /usr/share/rubygems/rubygems/custom_require.rb:35:in `require' from (irb):2 from /usr/bin/irb:12:in `<main>'
* Missing puppetlabs_spec_helper dependency - After installing puppet, I got another error (show bellow). So it seems there is missing another prerequisite in Fedora. However it looks like to be circular dependency and bootstrap might be required :/
$ irb irb(main):001:0> require 'rspec-puppet' /usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. LoadError: cannot load such file -- puppetlabs_spec_helper/puppetlabs_spec/puppet_internals from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/lib/rspec-puppet/example/function_example_group.rb:1:in `<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/lib/rspec-puppet/example.rb:4:in `<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require' from /usr/share/gems/gems/rspec-puppet-0.1.5/lib/rspec-puppet.rb:6:in `<top (required)>' from /usr/share/rubygems/rubygems/custom_require.rb:60:in `require' from /usr/share/rubygems/rubygems/custom_require.rb:60:in `rescue in require' from /usr/share/rubygems/rubygems/custom_require.rb:35:in `require' from (irb):1 from /usr/bin/irb:12:in `<main>'
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #7 from Greg Swift gregswift@gmail.com --- So from the original spec file:
%check # disabled because this segfault in mock # requires to have a working setup of puppet # see # https://github.com/rodjek/rspec-puppet/issues/15 # https://projects.puppetlabs.com/issues/11191 #mkdir -p ~/.puppet/manifests/ #touch ~/.puppet/manifests/site.pp #cd %{buildroot}%{geminstdir} #rake spec --trace
I can add it in commented, and I should have since I saw it in the original, but it doesn't seem to be a 'good' idea to enable based on this.
Thoughts?
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #8 from Vít Ondruch vondruch@redhat.com --- The test suite pases for me:
$ rspec /usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. Mocha deprecation warning: Test::Unit or MiniTest must be loaded *before* Mocha. Mocha deprecation warning: If you're integrating with another test library, you should probably require 'mocha_standalone' instead of 'mocha' .......................
Finished in 0.69772 seconds 23 examples, 0 failures
However, I had to install the puppet_labs_helper which pulled in other dependencies:
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.1.0) diff-lcs (1.1.3) io-console (0.3) json (1.6.5) metaclass (0.0.1) mocha (0.12.6) puppetlabs_spec_helper (0.3.0) rake (0.9.2.2) rdoc (3.12) rspec (2.11.0, 2.8.0) rspec-core (2.11.1, 2.8.0) rspec-expectations (2.11.3, 2.8.0) rspec-mocks (2.11.3, 2.8.0) rspec-puppet (0.1.5)
So there is a chance that the test suite will run as soon as the dependencies will be available.
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #9 from Vít Ondruch vondruch@redhat.com --- Please note that I did not need to create the site.pp file or anything else.
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #10 from Bohuslav "Slavek" Kabrda bkabrda@redhat.com --- As Vit points out, the specs are runnable with the puppetlabs_spec_helper Gem, so I would advise to first package that one. As mentioned in Comment 6, it is also needed to do "require 'rspec-puppet'", e.g. this Gem won't work without it. So please first package puppetlabs_spec_helper.
Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=787350
Russell Harrison fedora@russellharrison.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fedora@russellharrison.com
--- Comment #11 from Russell Harrison fedora@russellharrison.com --- (In reply to comment #10)
As Vit points out, the specs are runnable with the puppetlabs_spec_helper Gem, so I would advise to first package that one. As mentioned in Comment 6, it is also needed to do "require 'rspec-puppet'", e.g. this Gem won't work without it. So please first package puppetlabs_spec_helper.
This is where things get entertaining. From puppetlabs_spec_helper.gemspec :
s.add_dependency(%q<rspec-puppet>, [">= 0.1.1"])
So in order to install puppetlabs_spec_helper rspec-puppet needs to already be there. However to actually run rspec-puppet you need puppetlabs_spec_helper...
https://github.com/rodjek/rspec-puppet/issues/56
Is this a full stop issue until upstream sorts things out?
Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #12 from Russell Harrison fedora@russellharrison.com --- I've filed an upstream bug against puppetlabs_spec_helper to refactor the gem to no longer require rspec-puppet but it's gotten no response. https://projects.puppetlabs.com/issues/18913
Thankfully the maintainer of rspec-puppet has committed to refactoring his gem so that it will no longer require puppetlabs_spec_helper in order to resolve the circular dependency issue. https://github.com/rodjek/rspec-puppet/issues/56#issuecomment-12667834
https://bugzilla.redhat.com/show_bug.cgi?id=787350
--- Comment #13 from Vladimir Rusinov vladimir@greenmice.info --- Looks like rspec-puppet folks submitted a workaround: https://github.com/rodjek/rspec-puppet/issues/56
It's not ideal but as far as I can see there should be no dependency cycle anymore.
https://bugzilla.redhat.com/show_bug.cgi?id=787350
Bohuslav "Slavek" Kabrda bkabrda@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |WONTFIX Last Closed| |2015-07-02 05:47:34
--- Comment #14 from Bohuslav "Slavek" Kabrda bkabrda@redhat.com --- Since there seems to be no progress here, I'm closing this bug. Feel free to reopen if you wish to restart the review.
package-review@lists.fedoraproject.org