diff --git a/rubygems-1.3.7-show-extension-build-process-in-sync.patch b/rubygems-1.3.7-show-extension-build-process-in-sync.patch new file mode 100644 index 0000000..77a7932 --- /dev/null +++ b/rubygems-1.3.7-show-extension-build-process-in-sync.patch @@ -0,0 +1,93 @@ +--- rubygems-1.3.7/lib/rubygems/ext/builder.rb.debug 2010-10-08 02:18:49.000000000 +0900 ++++ rubygems-1.3.7/lib/rubygems/ext/builder.rb 2010-10-08 04:58:02.000000000 +0900 +@@ -11,6 +11,52 @@ + $1.downcase + end + ++ def self.get_status_of_forked_command(command, results) ++ iopipe_r, iopipe_w = IO.pipe ++ ++ child_pid = fork{ ++ # Child ++ $stdin.close ++ iopipe_r.close ++ $stdout.reopen(iopipe_w) ++ # redirect ++ $stderr.reopen(iopipe_w) ++ ++ puts "#{command}" ++ exec "#{command}" ++ ++ puts "Executing #{command} failed." ++ exit 127 ++ } ++ ++ iopipe_w.close ++ output = "" ++ read_size = 0 ++ ++ if (child_pid < 0) then ++ raise Gem::InstallError, "Forking process of #{command} failed\n" ++ end ++ ++ iopipe_r.each{|line| ++ output += line ++ if Gem.configuration.really_verbose then ++ puts "#{line}" if Gem.configuration.really_verbose ++ else ++ read_size += line.size ++ if read_size >= 128 then ++ print "." ++ $stdout.flush ++ read_size -= 128 ++ end ++ end ++ } ++ results << output ++ print "\n" if not Gem.configuration.really_verbose ++ ++ child_pid, status = Process.waitpid2(child_pid) ++ return status ++ end ++ + def self.make(dest_path, results) + unless File.exist? 'Makefile' then + raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}" +@@ -29,11 +75,10 @@ + + ['', ' install'].each do |target| + cmd = "#{make_program}#{target}" +- results << cmd +- results << `#{cmd} #{redirector}` ++ status = self.get_status_of_forked_command(cmd, results) + + raise Gem::InstallError, "make#{target} failed:\n\n#{results}" unless +- $?.success? ++ status.success? + end + end + +@@ -42,10 +87,8 @@ + end + + def self.run(command, results) +- results << command +- results << `#{command} #{redirector}` +- +- unless $?.success? then ++ status = self.get_status_of_forked_command(command, results) ++ unless status.success? then + raise Gem::InstallError, "#{class_name} failed:\n\n#{results.join "\n"}" + end + end +--- rubygems-1.3.7/lib/rubygems/installer.rb.debug 2010-10-08 02:18:49.000000000 +0900 ++++ rubygems-1.3.7/lib/rubygems/installer.rb 2010-10-08 04:58:11.000000000 +0900 +@@ -464,8 +464,6 @@ + Dir.chdir File.join(@gem_dir, File.dirname(extension)) + results = builder.build(extension, @gem_dir, dest_path, results) + +- say results.join("\n") if Gem.configuration.really_verbose +- + rescue => ex + results = results.join "\n" + diff --git a/rubygems.spec b/rubygems.spec index d308574..75eed39 100644 --- a/rubygems.spec +++ b/rubygems.spec @@ -8,13 +8,15 @@ Summary: The Ruby standard for packaging ruby libraries Name: rubygems Version: 1.3.7 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Libraries # No GPL version is specified. License: Ruby or GPL+ URL: http://rubyforge.org/projects/rubygems/ Source0: http://rubyforge.org/frs/download.php/%{repoid}/rubygems-%{version}.tgz Patch0: rubygems-1.3.7-noarch-gemdir.patch +# Will discuss upstream +Patch1: rubygems-1.3.7-show-extension-build-process-in-sync.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Requires: ruby(abi) = 1.8 ruby-rdoc BuildRequires: ruby ruby-rdoc @@ -28,6 +30,7 @@ libraries. %prep %setup -q %patch0 -p1 -b .noarch +%patch1 -p1 -b .insync # Some of the library files start with #! which rpmlint doesn't like # and doesn't make much sense @@ -72,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT %{ruby_sitelib}/* %changelog +* Fri Oct 8 2010 Mamoru Tasaka - 1.3.7-2 +- Show build process of extension library in sync + * Mon May 17 2010 Mamoru Tasaka - 1.3.7-1 - Update to 1.3.7, dropping upstreamed patch