[rubygems/f15/master] - Modify in-sync patch to keep the original behavior (for testsuite) - Patch to make testsuite succe
Mamoru Tasaka
mtasaka at fedoraproject.org
Thu Feb 10 21:49:17 UTC 2011
commit 33c12d8136f3af823487c774cc3ca5ba031bf7cb
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Fri Feb 11 06:49:13 2011 +0900
- Modify in-sync patch to keep the original behavior (for testsuite)
- Patch to make testsuite succeed, enabling testsuite
....5.0-show-extension-build-process-in-sync.patch | 20 +++++---
rubygems-1.5.0-test-under-umask.patch | 47 ++++++++++++++++++++
rubygems.spec | 24 ++++++++++-
3 files changed, 82 insertions(+), 9 deletions(-)
---
diff --git a/rubygems-1.5.0-show-extension-build-process-in-sync.patch b/rubygems-1.5.0-show-extension-build-process-in-sync.patch
index c0ba521..60eea1a 100644
--- a/rubygems-1.5.0-show-extension-build-process-in-sync.patch
+++ b/rubygems-1.5.0-show-extension-build-process-in-sync.patch
@@ -1,10 +1,16 @@
--- rubygems-1.5.0/lib/rubygems/ext/builder.rb.insync 2011-01-29 05:18:10.000000000 +0900
-+++ rubygems-1.5.0/lib/rubygems/ext/builder.rb 2011-02-10 02:12:39.000000000 +0900
-@@ -11,6 +11,52 @@
++++ rubygems-1.5.0/lib/rubygems/ext/builder.rb 2011-02-11 05:46:38.000000000 +0900
+@@ -11,6 +11,56 @@
$1.downcase
end
+ def self.get_status_of_forked_command(command, results)
++ read_size = 0
++
++ results << command
++ read_size += command.size
++ puts "#{command}" if Gem.configuration.really_verbose
++
+ iopipe_r, iopipe_w = IO.pipe
+
+ child_pid = fork{
@@ -15,7 +21,6 @@
+ # redirect
+ $stderr.reopen(iopipe_w)
+
-+ puts "#{command}"
+ exec "#{command}"
+
+ puts "Executing #{command} failed."
@@ -24,7 +29,6 @@
+
+ iopipe_w.close
+ output = ""
-+ read_size = 0
+
+ if (child_pid < 0) then
+ raise Gem::InstallError, "Forking process of #{command} failed\n"
@@ -36,7 +40,7 @@
+ puts "#{line}" if Gem.configuration.really_verbose
+ else
+ read_size += line.size
-+ if read_size >= 128 then
++ while read_size >= 128 do
+ print "."
+ $stdout.flush
+ read_size -= 128
@@ -53,7 +57,7 @@
def self.make(dest_path, results)
unless File.exist? 'Makefile' then
raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}"
-@@ -31,11 +77,10 @@
+@@ -31,11 +81,10 @@
['', ' install'].each do |target|
cmd = "#{make_program}#{target}"
@@ -67,7 +71,7 @@
end
end
-@@ -44,10 +89,8 @@
+@@ -44,10 +93,8 @@
end
def self.run(command, results)
@@ -81,7 +85,7 @@
end
end
--- rubygems-1.5.0/lib/rubygems/installer.rb.insync 2011-02-01 09:08:02.000000000 +0900
-+++ rubygems-1.5.0/lib/rubygems/installer.rb 2011-02-10 02:14:26.000000000 +0900
++++ rubygems-1.5.0/lib/rubygems/installer.rb 2011-02-10 23:13:20.000000000 +0900
@@ -508,7 +508,7 @@
Dir.chdir extension_dir do
results = builder.build(extension, @gem_dir, dest_path, results)
diff --git a/rubygems-1.5.0-test-under-umask.patch b/rubygems-1.5.0-test-under-umask.patch
new file mode 100644
index 0000000..d25d504
--- /dev/null
+++ b/rubygems-1.5.0-test-under-umask.patch
@@ -0,0 +1,47 @@
+--- rubygems-1.5.0/test/rubygems/test_gem_installer.rb.umask 2011-01-29 06:52:19.000000000 +0900
++++ rubygems-1.5.0/test/rubygems/test_gem_installer.rb 2011-02-11 04:30:12.000000000 +0900
+@@ -180,7 +180,7 @@
+ assert_equal true, File.directory?(util_inst_bindir)
+ installed_exec = File.join(util_inst_bindir, "my_exec")
+ assert_equal true, File.exist?(installed_exec)
+- assert_equal(0100755, File.stat(installed_exec).mode) unless win_platform?
++ assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+
+ wrapper = File.read installed_exec
+ assert_match %r|generated by RubyGems|, wrapper
+@@ -195,7 +195,7 @@
+ assert_equal true, File.directory?(util_inst_bindir)
+ installed_exec = File.join(util_inst_bindir, "my_exec")
+ assert_equal true, File.exist?(installed_exec)
+- assert_equal(0100755, File.stat(installed_exec).mode) unless win_platform?
++ assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+
+ wrapper = File.read installed_exec
+ assert_match %r|generated by RubyGems|, wrapper
+@@ -248,7 +248,7 @@
+
+ installed_exec = File.join("#{@gemhome}2", 'bin', 'my_exec')
+ assert_equal true, File.exist?(installed_exec)
+- assert_equal(0100755, File.stat(installed_exec).mode) unless win_platform?
++ assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+
+ wrapper = File.read installed_exec
+ assert_match %r|generated by RubyGems|, wrapper
+@@ -294,7 +294,7 @@
+
+ installed_exec = File.join @gemhome, 'bin', 'my_exec'
+ assert_equal true, File.exist?(installed_exec)
+- assert_equal 0100755, File.stat(installed_exec).mode unless win_platform?
++ assert_equal ( 0100755 & (~ File.umask)), File.stat(installed_exec).mode unless win_platform?
+
+ wrapper = File.read installed_exec
+ assert_match %r|generated by RubyGems|, wrapper
+@@ -319,7 +319,7 @@
+ @installer.generate_bin
+ assert_equal true, File.directory?(util_inst_bindir)
+ assert_equal true, File.exist?(installed_exec)
+- assert_equal(0100755, File.stat(installed_exec).mode) unless win_platform?
++ assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+
+ assert_match %r|generated by RubyGems|, File.read(installed_exec)
+
diff --git a/rubygems.spec b/rubygems.spec
index 891782c..2f322d0 100644
--- a/rubygems.spec
+++ b/rubygems.spec
@@ -5,10 +5,14 @@
%global repoid 74140
+# Executing testsuite (enabling %%check section) will cause dependency loop.
+# To avoid dependency loop when necessary, please set the following value to 0
+%global enable_check 1
+
Summary: The Ruby standard for packaging ruby libraries
Name: rubygems
Version: 1.5.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Libraries
# No GPL version is specified.
License: Ruby or GPL+
@@ -18,11 +22,19 @@ 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.5.0-show-extension-build-process-in-sync.patch
+Patch2: rubygems-1.5.0-test-under-umask.patch
Requires: ruby(abi) = 1.8
Requires: ruby-rdoc
BuildRequires: ruby
BuildRequires: ruby-rdoc
+%if %{enable_check}
+# For mkmf.rb
+BuildRequires: ruby-devel
+BuildRequires: rubygem(hoe)
+BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(rake)
+%endif
BuildArch: noarch
Provides: ruby(rubygems) = %{version}-%{release}
@@ -34,6 +46,7 @@ libraries.
%setup -q
%patch0 -p1 -b .noarch
%patch1 -p1 -b .insync
+%patch2 -p1 -b .umask
# Some of the library files start with #! which rpmlint doesn't like
# and doesn't make much sense
@@ -58,6 +71,11 @@ mv %{buildroot}/%{ruby_sitelib}/lib/* %{buildroot}/%{ruby_sitelib}/.
# FIXME!!
mkdir -p $RPM_BUILD_ROOT%{gem_home}/{cache,gems,specifications,doc}
+%if %{enable_check}
+%check
+rake test
+%endif
+
%files
%defattr(-, root, root, -)
%doc README* ChangeLog
@@ -80,6 +98,10 @@ mkdir -p $RPM_BUILD_ROOT%{gem_home}/{cache,gems,specifications,doc}
%{ruby_sitelib}/ubygems.rb
%changelog
+* Fri Feb 11 2011 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.0-2
+- Modify in-sync patch to keep the original behavior (for testsuite)
+- Patch to make testsuite succeed, enabling testsuite
+
* Thu Feb 10 2011 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.0-1
- Update to 1.5.0
More information about the scm-commits
mailing list