Description of problem: tried to compile the f19 ruby on an f19 machine and it fails with an error. Version-Release number of selected component (if applicable): tested in fedora 19 (rc3), ruby-2.0.0.195-8.fc19.src.rpm How reproducible: 100% Steps to Reproduce: 1. get the srpm 2. rpmbuild -bb --target x86_64 --nodeps ruby.spec Actual results: ... XpathTestCase#test_parentage = 0.00 s = . XpathTestCase#test_text_as_element = 0.00 s = . XpathTestCase#test_text_in_xpath_query = 0.00 s = . Finished tests in 289.255285s, 45.0121 tests/s, 8858.8494 assertions/s. 1) Skipped: test_input_metachar_multibyte(TestReadline) [/home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/readline/test_readline.rb:420]: this test needs UTF-8 locale 2) Skipped: test_completion_encoding(TestReadline) [/home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/readline/test_readline.rb:294]: missing test for locale US-ASCII 3) Skipped: test_capture_subprocess_io(TestMiniTestUnitTestCase) [/home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/minitest/test_minitest_unit.rb:1339]: Dunno why but the parallel run of this fails 4) Failure: test_uninstall_default_gem(TestGemUninstaller) [/home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/rubygems/test_gem_uninstaller.rb:186]: --- expected +++ actual @@ -1 +1 @@ -"gem \"default\" cannot be uninstalled because it is a default gem" +"gem \"default\" is not installed" 5) Failure: test_execute_ignore_default_gem_verbose(TestGemCommandsCleanupCommand) [/home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/rubygems/test_gem_commands_cleanup_command.rb:148]: Expected /^Skipped default gems: b-2/ to match "Cleaning up installed gems...\nAttempting to uninstall b-1\nSuccessfully uninstalled b-1\nAttempting to uninstall b-2\nUnable to uninstall b-2:\n\tGem::InstallError: gem \"b\" is not installed\nAttempting to uninstall a-1\nSuccessfully uninstalled a-1\nClean Up Complete\nSkipped default gems: \n". 6) Error: test_execute_default_gem(TestGemCommandsPristineCommand): Gem::InstallError: invalid gem: No such file or directory - /tmp/test_rubygems_4316/default/specifications/cache/default-2.0.0.0.gem /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/installer.rb:192:in `rescue in spec' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/installer.rb:190:in `spec' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/installer.rb:493:in `ensure_loadable_spec' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/installer.rb:756:in `pre_install_checks' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/installer.rb:207:in `install' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/commands/pristine_command.rb:119:in `block in execute' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/commands/pristine_command.rb:85:in `each' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/commands/pristine_command.rb:85:in `execute' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/rubygems/test_gem_commands_pristine_command.rb:283:in `block in test_execute_default_gem' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/user_interaction.rb:40:in `use_ui' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/lib/rubygems/user_interaction.rb:63:in `use_ui' /home/cpg/rpmbuild/BUILD/ruby-2.0.0-p195/test/rubygems/test_gem_commands_pristine_command.rb:282:in `test_execute_default_gem' 13020 tests, 2562469 assertions, 2 failures, 1 errors, 31 skips ... Expected results: build the rpm successfully. Additional info: i tried ruby 2.0.0 p247 too (with a minor patch in the spec), and it has the same results. i also tried to i also unsuccessfully tried to skip the failing tests with this somewhat clueless/hopeful change in the spec: %check DISABLE_TESTS="-x test_execute_default_gem.rb -x test_gem_specification.rb -x test_gem_installer.rb -x test_gem_commands_contents_command.rb"
You have probably already installed Ruby on your system. If you uninstall them, the test suite should pass. BTW, it is always better to use Mock [1] for rebuilds etc. [1] https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds
I will try it with mock later. When compiling it with ruby uninstalled, it still fails. Similar error: 6) Error: test_execute_default_gem(TestGemCommandsPristineCommand): Gem::InstallError: invalid gem: No such file or directory - /tmp/test_rubygems_4136/default/specifications/cache/default-2.0.0.0.gem
Sorry, the ruby package is not designed nor can be designed to build without mock. The build fails either because you build it as privileged user or because you have already installed version of Ruby. If some particular test case does not work for you, you can execute it using "make test-all TESTS=test_foo" from Ruby's build directory and add some debug prints into test case to understand the problem.