rpms/ruby/F-12 ruby-1.8.x-RHASH_SIZE-def.patch, NONE, 1.1 ruby-1.8.x-ext_tk-flatten-level-revert.patch, NONE, 1.1 ruby-1.8.x-null-class-must-be-Qnil.patch, NONE, 1.1 .cvsignore, 1.36, 1.37 ruby-1.8.6-p369-ri-gem_multipath.patch, 1.2, 1.3 ruby-1.8.6-rexml-CVE-2008-3790.patch, 1.2, 1.3 ruby.spec, 1.149, 1.150 sources, 1.35, 1.36

Mamoru Tasaka mtasaka at fedoraproject.org
Fri May 14 19:10:53 UTC 2010


Author: mtasaka

Update of /cvs/extras/rpms/ruby/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11164/F-12

Modified Files:
	.cvsignore ruby-1.8.6-p369-ri-gem_multipath.patch 
	ruby-1.8.6-rexml-CVE-2008-3790.patch ruby.spec sources 
Added Files:
	ruby-1.8.x-RHASH_SIZE-def.patch 
	ruby-1.8.x-ext_tk-flatten-level-revert.patch 
	ruby-1.8.x-null-class-must-be-Qnil.patch 
Log Message:
* Thu May 13 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-3
- ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407)
- Recreate some patches using upstream svn when available, and
  add some comments for patches

* Tue May 11 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-2
- tcltk: Give up using potentially unmaintained ruby_1_8_6 branch
  and instead completely replace with ruby_1_8 branch head
  (at this time, using rev 27738)
  (seems to fix 560053, 590503)
- Fix Japanese encoding strings under ruby-tcltk/ext/tk/sample/


ruby-1.8.x-RHASH_SIZE-def.patch:
 ruby.h |    5 +++++
 1 file changed, 5 insertions(+)

--- NEW FILE ruby-1.8.x-RHASH_SIZE-def.patch ---
Index: ruby_1_8/ruby.h
===================================================================
--- ruby_1_8/ruby.h	(revision 13310)
+++ ruby_1_8/ruby.h	(revision 13311)
@@ -374,6 +374,11 @@
     int iter_lev;
     VALUE ifnone;
 };
+#define RHASH_TBL(h) (RHASH(h)->tbl)
+#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
+#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
+#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries)
+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
 
 struct RFile {
     struct RBasic basic;

ruby-1.8.x-ext_tk-flatten-level-revert.patch:
 grid.rb |   18 +++++++++++++++++-
 pack.rb |   18 +++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)

--- NEW FILE ruby-1.8.x-ext_tk-flatten-level-revert.patch ---
Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb
===================================================================
--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb	(revision 27738)
+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb	(working copy)
@@ -39,7 +39,23 @@
     end
     fail ArgumentError, 'no widget is given' if args.empty?
     params = []
-    args.flatten(1).each{|win| params.push(_epath(win))}
+
+    #args.flatten(1).each{|win| params.push(_epath(win))}
+    #
+    # flatten(level) is ruby >=1.8.7 feature, substituting
+    #
+    args_flatten_one = []
+    args.each {|args1|
+      if args1.is_a? Array then
+        args1.each {|args2|
+          args_flatten_one << args2
+        }
+      else
+        args_flatten_one << args1
+      end
+    }
+    args_flatten_one.each{|win| params.push(_epath(win))}
+
     opts.each{|k, v|
       params.push("-#{k}")
       params.push(_epath(v))  # have to use 'epath' (hash_kv() is unavailable)
Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb
===================================================================
--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb	(revision 27738)
+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb	(working copy)
@@ -63,7 +63,23 @@
     end
     fail ArgumentError, 'no widget is given' if args.empty?
     params = []
-    args.flatten(1).each{|win|
+
+    #args.flatten(1).each{|win|
+    #
+    # flatten(level) is ruby >=1.8.7 feature, substituting
+    #
+
+    args_flatten_one = []
+    args.each {|args1|
+      if args1.is_a? Array then
+        args1.each {|args2|
+          args_flatten_one << args2
+        }
+      else
+        args_flatten_one << args1
+      end
+    }
+    args_flatten_one.each{|win|
       case win
       when '-', ?-              # RELATIVE PLACEMENT (increase columnspan)
         params.push('-')

ruby-1.8.x-null-class-must-be-Qnil.patch:
 class.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE ruby-1.8.x-null-class-must-be-Qnil.patch ---
Sun Mar  1 03:04:19 2009  Akinori MUSHA  <knu at iDaemons.org>

	* class.c (rb_singleton_class_clone): Qnil must be used for a null
	  class reference when we use NIL_P() to check class reference
	  validity.  The bug was exposed by the spec test of Sequel.

	* eval.c (ruby_init): Use NEW_CREF().

Index: ruby_1_8/class.c
===================================================================
--- ruby_1_8/class.c	(revision 22678)
+++ ruby_1_8/class.c	(revision 22679)
@@ -153,7 +153,7 @@
 		data.klass = obj;
 		break;
 	      default:
-		data.klass = 0;
+		data.klass = Qnil;
 		break;
 	    }
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ruby/F-12/.cvsignore,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- .cvsignore	26 Apr 2010 19:02:47 -0000	1.36
+++ .cvsignore	14 May 2010 19:10:52 -0000	1.37
@@ -3,3 +3,4 @@ ruby-refm-rdp-1.8.2-ja-html.tar.gz
 rubyfaq-990927.tar.gz
 rubyfaq-jp-990927.tar.gz
 ruby-1.8.6-p399.tar.bz2
+ruby-1.8-rev27738_trunk-ext_tk.tar.gz

ruby-1.8.6-p369-ri-gem_multipath.patch:
 ri_options.rb |   34 ++++++++++++++++++++--------------
 ri_paths.rb   |   27 ++++++++++++++++++++++++---
 2 files changed, 44 insertions(+), 17 deletions(-)

Index: ruby-1.8.6-p369-ri-gem_multipath.patch
===================================================================
RCS file: /cvs/extras/rpms/ruby/F-12/ruby-1.8.6-p369-ri-gem_multipath.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- ruby-1.8.6-p369-ri-gem_multipath.patch	14 Oct 2009 15:24:30 -0000	1.2
+++ ruby-1.8.6-p369-ri-gem_multipath.patch	14 May 2010 19:10:52 -0000	1.3
@@ -1,35 +1,130 @@
---- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
-+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb	2009-10-14 23:51:09.000000000 +0900
-@@ -63,7 +63,7 @@
+Mon Dec 24 16:18:57 2007  Eric Hodel  <drbrain at segment7.net>
+
+	* lib/rdoc/ri/ri_options.rb:  Fix ri --help listing of gem ri paths.
+	Merge of r14567 and r14569 from trunk.
+
+	* lib/rdoc/ri/ri_paths.rb:  Fix duplication of ri data for multiple
+	gems.  Merge of r14567 from trunk
+
+Index: ruby_1_8/lib/rdoc/ri/ri_options.rb
+===================================================================
+--- ruby_1_8/lib/rdoc/ri/ri_options.rb	(revision 14581)
++++ ruby_1_8/lib/rdoc/ri/ri_options.rb	(revision 14582)
+@@ -62,10 +62,11 @@
+           (RI::Paths::HOMEDIR || "No ~/.rdoc found") ],
  
          [ "--gems",         nil,    nil,
-           "Include documentation from Rubygems:\n  " +
+-          "Include documentation from Rubygems:\n  " +
 -          (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" :
-+          (RI::Paths::GEMDIRS ? Gem.path.map {|path| "#{path}/doc/*/ri" }.join(', ') :
-                                 "No Rubygems ri found.") ],
-                                                            
+-                                "No Rubygems ri found.") ],
+-                                                           
++          "Include documentation from RubyGems:\n" +
++          (RI::Paths::GEMDIRS ?
++           Gem.path.map { |dir| "  #{dir}/doc/*/ri" }.join("\n") :
++           "No Rubygems ri found.") ],
++
          [ "--format",       "-f",   "<name>",
-@@ -136,7 +136,11 @@
+           "Format to use when displaying output:\n" +
+           "   " + RI::TextFormatter.list + "\n" +
+@@ -116,7 +117,8 @@
+       def OptionList.error(msg)
+         $stderr.puts
+         $stderr.puts msg
+-        $stderr.puts "\nFor help on options, try 'ri --help'\n\n"
++        name = File.basename $PROGRAM_NAME
++        $stderr.puts "\nFor help on options, try '#{name} --help'\n\n"
+         exit 1
+       end
+       
+@@ -136,7 +138,11 @@
            RI::Paths::HOMEDIR
          ]
  
 -        directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS
-+        if RI::Paths::GEMDIRS
-+          Gem.path.each {|gempath|
-+            directories << "#{gempath}/doc/*/ri"
-+          }
++        if RI::Paths::GEMDIRS then
++          Gem.path.each do |dir|
++            directories << "#{dir}/doc/*/ri"
++          end
 +        end
  
          directories = directories.join("\n    ")
  
---- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti	2007-02-13 08:01:19.000000000 +0900
-+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb	2009-10-15 00:02:05.000000000 +0900
-@@ -44,7 +44,7 @@
+@@ -157,16 +163,16 @@
+ 
+           For example:
+ 
+-              ri  File
+-              ri  File.new
+-              ri  F.n
+-              ri  zip
++              #{name}  File
++              #{name}  File.new
++              #{name}  F.n
++              #{name}  zip
+ 
+           Note that shell quoting may be required for method names
+           containing punctuation:
+ 
+-              ri 'Array.[]'
+-              ri compact\\!
++              #{name} 'Array.[]'
++              #{name} compact\\!
+ 
+           By default ri searches for documentation in the following
+           directories:
+@@ -180,8 +186,8 @@
+         EOT
+ 
+         if short_form
+-          puts "For help on options, type 'ri -h'"
+-          puts "For a list of classes I know about, type 'ri -c'"
++          puts "For help on options, type '#{name} -h'"
++          puts "For a list of classes I know about, type '#{name} -c'"
+         else
+           puts "Options:\n\n"
+           OPTION_LIST.each do|long, short, arg, desc|
+Index: ruby_1_8/lib/rdoc/ri/ri_paths.rb
+===================================================================
+--- ruby_1_8/lib/rdoc/ri/ri_paths.rb	(revision 14581)
++++ ruby_1_8/lib/rdoc/ri/ri_paths.rb	(revision 14582)
+@@ -44,8 +44,29 @@
  
      begin
        require 'rubygems'
 -      GEMDIRS = Dir["#{Gem.path}/doc/*/ri"]
-+      GEMDIRS = Gem.path.map {|path| Dir["#{path}/doc/*/ri"]}.flatten
-       GEMDIRS.each { |path| RI::Paths::PATH << path }
+-      GEMDIRS.each { |path| RI::Paths::PATH << path }
++
++      # HACK dup'd from Gem.latest_partials and friends
++      all_paths = []
++
++      all_paths = Gem.path.map do |dir|
++        Dir[File.join(dir, 'doc', '*', 'ri')]
++      end.flatten
++
++      ri_paths = {}
++
++      all_paths.each do |dir|
++        base = File.basename File.dirname(dir)
++        if base =~ /(.*)-((\d+\.)*\d+)/ then
++          name, version = $1, $2
++          ver = Gem::Version.new version
++          if ri_paths[name].nil? or ver > ri_paths[name][0] then
++            ri_paths[name] = [ver, dir]
++          end
++        end
++      end
++
++      GEMDIRS = ri_paths.map { |k,v| v.last }.sort
++      GEMDIRS.each { |dir| RI::Paths::PATH << dir }
      rescue LoadError
        GEMDIRS = nil
+     end
+@@ -55,7 +76,7 @@
+ 
+     def self.path(use_system, use_site, use_home, use_gems, *extra_dirs)
+       path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs)
+-      return path.select { |path| File.directory? path }
++      return path.select { |directory| File.directory? directory }
+     end
+ 
+     # Returns the selected documentation directories including nonexistent

ruby-1.8.6-rexml-CVE-2008-3790.patch:
 lib/rexml/document.rb       |   22 ++++++++++++++
 lib/rexml/entity.rb         |    1 
 test/rexml/test_document.rb |   66 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 89 insertions(+)

Index: ruby-1.8.6-rexml-CVE-2008-3790.patch
===================================================================
RCS file: /cvs/extras/rpms/ruby/F-12/ruby-1.8.6-rexml-CVE-2008-3790.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- ruby-1.8.6-rexml-CVE-2008-3790.patch	18 Mar 2009 04:50:29 -0000	1.2
+++ ruby-1.8.6-rexml-CVE-2008-3790.patch	14 May 2010 19:10:52 -0000	1.3
@@ -1,7 +1,27 @@
-diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/document.rb
---- ruby-1.8.6-p287.orig/lib/rexml/document.rb	2007-11-04 13:50:15.000000000 +0900
-+++ ruby-1.8.6-p287/lib/rexml/document.rb	2008-10-08 22:25:14.000000000 +0900
-@@ -32,6 +32,7 @@ module REXML
+Fri Nov  7 02:08:04 2008  Shugo Maeda  <shugo at ruby-lang.org>
+
+	* lib/rexml/entity.rb (unnormalized): do not call
+	  document.record_entity_expansion if document is nil.
+	  see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535>.
+	  Thanks, Naohisa Goto.  backported from trunk.
+
+	* test/rexml/test_document.rb: ditto.
+
+Sat Sep 13 11:05:38 2008  Shugo Maeda  <shugo at ruby-lang.org>
+
+	* lib/rexml/document.rb: limit entity expansion.  Thanks, Luka
+	  Treiber, Mitja Kolsek, and Michael Koziarski.  backported from
+	  trunk r19033, r19317, r19318.
+
+	* lib/rexml/entity.rb: ditto.
+
+	* test/rexml/test_document.rb: ditto.
+
+Index: ruby_1_8/lib/rexml/document.rb
+===================================================================
+--- ruby_1_8/lib/rexml/document.rb	(revision 19319)
++++ ruby_1_8/lib/rexml/document.rb	(revision 19320)
+@@ -32,6 +32,7 @@
  	  # @param context if supplied, contains the context of the document;
  	  # this should be a Hash.
  		def initialize( source = nil, context = {} )
@@ -9,10 +29,10 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexm
  			super()
  			@context = context
  			return if source.nil?
-@@ -200,6 +201,27 @@ module REXML
+@@ -200,6 +201,27 @@
  			Parsers::StreamParser.new( source, listener ).parse
  		end
-
+ 
 +    @@entity_expansion_limit = 10_000
 +
 +    # Set the entity expansion limit. By defualt the limit is set to 10000.
@@ -26,7 +46,7 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexm
 +    end
 +
 +    attr_reader :entity_expansion_count
-+
++    
 +    def record_entity_expansion
 +      @entity_expansion_count += 1
 +      if @entity_expansion_count > @@entity_expansion_limit
@@ -37,21 +57,22 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexm
  		private
  		def build( source )
        Parsers::TreeParser.new( source, self ).parse
-diff -pruN ruby-1.8.6-p287.orig/lib/rexml/entity.rb ruby-1.8.6-p287/lib/rexml/entity.rb
---- ruby-1.8.6-p287.orig/lib/rexml/entity.rb	2007-07-28 11:46:08.000000000 +0900
-+++ ruby-1.8.6-p287/lib/rexml/entity.rb	2008-10-08 22:25:14.000000000 +0900
-@@ -73,6 +73,7 @@ module REXML
+Index: ruby_1_8/lib/rexml/entity.rb
+===================================================================
+--- ruby_1_8/lib/rexml/entity.rb	(revision 19319)
++++ ruby_1_8/lib/rexml/entity.rb	(revision 20121)
+@@ -73,6 +73,7 @@
  		# all entities -- both %ent; and &ent; entities.  This differs from
  		# +value()+ in that +value+ only replaces %ent; entities.
  		def unnormalized
-+      document.record_entity_expansion unless document.nil?
++                        document.record_entity_expansion unless document.nil?
  			v = value()
  			return nil if v.nil?
  			@unnormalized = Text::unnormalize(v, parent)
-diff -pruN ruby-1.8.6-p287.orig/test/rexml/test_document.rb ruby-1.8.6-p287/test/rexml/test_document.rb
---- ruby-1.8.6-p287.orig/test/rexml/test_document.rb	1970-01-01 09:00:00.000000000 +0900
-+++ ruby-1.8.6-p287/test/rexml/test_document.rb	2008-10-08 22:25:14.000000000 +0900
-@@ -0,0 +1,42 @@
+===================================================================
+--- ruby_1_8/test/rexml/test_document.rb	(revision 0)
++++ ruby_1_8/test/rexml/test_document.rb	(revision 20121)
+@@ -0,0 +1,66 @@
 +require "rexml/document"
 +require "test/unit"
 +
@@ -80,6 +101,19 @@ diff -pruN ruby-1.8.6-p287.orig/test/rex
 +</member>
 +EOF
 +
++  XML_WITH_4_ENTITY_EXPANSION = <<EOF
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE member [
++  <!ENTITY a "a">
++  <!ENTITY a2 "&a; &a;">
++]>
++<member>
++&a;
++&a2;
++&lt;
++</member>
++EOF
++
 +  def test_entity_expansion_limit
 +    doc = REXML::Document.new(XML_WITH_NESTED_ENTITY)
 +    assert_raise(RuntimeError) do
@@ -92,5 +126,24 @@ diff -pruN ruby-1.8.6-p287.orig/test/rex
 +      doc.root.children.first.value
 +    end
 +    assert_equal(101, doc.entity_expansion_count)
++
++    REXML::Document.entity_expansion_limit = 4
++    doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION)
++    assert_equal("\na\na a\n<\n", doc.root.children.first.value)
++    REXML::Document.entity_expansion_limit = 3
++    doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION)
++    assert_raise(RuntimeError) do
++      doc.root.children.first.value
++    end
++  ensure
++    REXML::Document.entity_expansion_limit = 10000
 +  end
 +end
+
+Property changes on: ruby_1_8/test/rexml/test_document.rb
+___________________________________________________________________
+Added: svn:keywords
+   + Author Id Revision
+Added: svn:eol-style
+   + LF
+


Index: ruby.spec
===================================================================
RCS file: /cvs/extras/rpms/ruby/F-12/ruby.spec,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -p -r1.149 -r1.150
--- ruby.spec	26 Apr 2010 19:02:48 -0000	1.149
+++ ruby.spec	14 May 2010 19:10:53 -0000	1.150
@@ -10,13 +10,15 @@
 %define	sitedir2	%{_prefix}/lib/ruby/site_ruby
 %define	_normalized_cpu	%(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/' | sed -e 's|i.86|i386|'`)
 
+%define       tk_using_svn_number  27738
+
 # emacs sitelisp directory
 %{!?_emacs_sitelispdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp}
 %{!?_emacs_sitestartdir: %global _emacs_sitestartdir %{_datadir}/emacs/site-lisp/site-start.d}
 
 Name:		ruby
 Version:	%{rubyver}%{?dotpatchlevel}
-Release:	1%{?dist}
+Release:	3%{?dist}
 License:	Ruby or GPLv2
 URL:		http://www.ruby-lang.org/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -39,7 +41,14 @@ Source2:	ftp://ftp.ruby-lang.org/pub/%{n
 Source3:	ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz
 Source4:	irb.1
 Source10:	ruby-mode-init.el
+#
+# Source100: contains ext/tk directory of the head of ruby_1_8 branch
+# i.e. http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8
+# see bug 560053, 590503, and
+# http://lists.fedoraproject.org/pipermail/ruby-sig/2010-May/000096.html
+Source100:      ruby-1.8-rev%{tk_using_svn_number}_trunk-ext_tk.tar.gz
 
+# Patch1 - Patch23 are Fedora specific
 Patch1:		ruby-deadcode.patch
 Patch20:	ruby-1.8.6-p383-rubyprefix.patch
 Patch21:	ruby-deprecated-sitelib-search-path.patch
@@ -47,20 +56,40 @@ Patch22:	ruby-deprecated-search-path.pat
 Patch23:	ruby-multilib.patch
 # Needed in 1.8.6-p287, no longer needed in 1.8.6-p368?
 #Patch25:	ruby-1.8.6.111-gcc43.patch
+# ruby_1_8 branch rev 19320, 20121, bug 460134
 Patch26:        ruby-1.8.6-rexml-CVE-2008-3790.patch
+# Patch27, 28 could not be found in the upstream VCS
+# Need checking??
 Patch27:        ruby-1.8.6-p287-CVE-2008-5189.patch
 Patch28:        ruby-1.8.6-p287-remove-ssl-rand-range.patch
+# Fedora specific
+# Change the directory of sitearchdir from i?86 to i386 for upgrade path
 Patch29:	ruby-always-use-i386.patch
+# By Tomas Mraz, "seems" already in ruby_1_8 branch head
+# (but have not checked yet in detail)
 Patch30:	ruby-openssl-1.0.patch
+# bug 528787, patch from in ruby_1_8 branch
 Patch31:	ruby-1.8.6-p369-ri-gem_multipath.patch
-# Patch32 from ruby_1_8 branch
+# bug 518584, ruby issue 1556, patch from ruby_1_8??? branch
 Patch32:	ruby-1.8head-irb-save-history.patch
+# bug 428384, Fedora specific, however needed for Fedora's static
+# archive policy
 Patch33:	ruby-1.8.6-p383-mkmf-use-shared.patch
-# Testing
-# Patch34 disabled for now
+# Testing (bug 559158)
+# Patch34 disabled for now as this breaks rubygem-actionpack rake test,
+# need investigating
 Patch34:	ruby-1.8.6-simplify-openssl-digest.patch
-# bz 580993
+# bug 580993, patch from ruby_1_8_7 branch
 Patch35:	ruby_1_8_7-gc-open4_096segv.patch
+#
+# Patch36, 37: needed to use the head of ext/tk directory of ruby_1_8 branch head
+# Patch36: taken from ruby_1_8 branch
+Patch36:        ruby-1.8.x-RHASH_SIZE-def.patch
+# Patch37: flatten(level) feature is in >= 1.8.7, reverting
+Patch37:        ruby-1.8.x-ext_tk-flatten-level-revert.patch
+# From ruby_1_8 branch: bz 530407
+# bz 530407 reproducible with 1.8.7p174, not with 1.8.7p249
+Patch38:        ruby-1.8.x-null-class-must-be-Qnil.patch
 
 Summary:	An interpreter of object-oriented scripting language
 Group:		Development/Languages
@@ -180,12 +209,19 @@ along with a list of the methods the cla
 
 
 %prep
-%setup -q -c -a 2 -a 3
+%setup -q -c -a 2 -a 3 -a 100
 mkdir -p ruby-refm-ja
 pushd ruby-refm-ja
 tar fxz %{SOURCE1}
 popd
 pushd %{name}-%{arcver}
+
+( cd ext
+  mv tk .tk.old
+  cp -a ../../ruby-1.8-rev*/ext/tk tk
+  find tk -type d -name \.svn | sort -r | xargs rm -rf
+)
+
 %patch1 -p1
 %patch20 -p1
 %patch21 -p1
@@ -205,6 +241,9 @@ pushd %{name}-%{arcver}
 # Once kill patch34 due to build failure on actionpack
 #%%patch34 -p1
 %patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
 popd
 
 %build
@@ -216,7 +255,10 @@ autoconf
 
 rb_cv_func_strtod=no
 export rb_cv_func_strtod
+
+# bug 489990
 CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
+
 export CFLAGS
 %configure \
   --with-sitedir='%{sitedir}' \
@@ -353,6 +395,18 @@ for i in `find -type f ! -name "*.gif"`;
     fi
 done
 
+# fix Japanese encoding strings for ruby-tcltk/ext/tk/sample/
+pushd ruby-tcltk/ext/tk/
+cd sample
+find . -path ./demos-jp/\*.rb -or -path ./tkoptdb\*.rb -or -path ./msgs_rb2/ja.msg | \
+    xargs sed -i -e 's|euc-jp|utf-8|'
+sed -i \
+    -e '/KCODE =/s|euc|utf-8|' -e 's|EUC-JP|UTF-8|' \
+    demos-jp/widget
+cd ..
+sed -i -e 's|EUC-JP|UTF-8|' README.1st
+popd
+
 # done
 cd ..
 
@@ -580,6 +634,18 @@ rm -rf $RPM_BUILD_ROOT
 %{_emacs_sitestartdir}/ruby-mode-init.el
 
 %changelog
+* Thu May 13 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-3
+- ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407)
+- Recreate some patches using upstream svn when available, and
+  add some comments for patches
+
+* Tue May 11 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-2
+- tcltk: Give up using potentially unmaintained ruby_1_8_6 branch
+  and instead completely replace with ruby_1_8 branch head
+  (at this time, using rev 27738)
+  (seems to fix 560053, 590503)
+- Fix Japanese encoding strings under ruby-tcltk/ext/tk/sample/
+
 * Tue Apr 27 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.8.6.399-1
 - Update to 1.8.6 p 399 (bug 579675)
 - Patch to fix gc bug causing open4 crash (bug 580993)


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ruby/F-12/sources,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- sources	26 Apr 2010 19:02:48 -0000	1.35
+++ sources	14 May 2010 19:10:53 -0000	1.36
@@ -3,3 +3,4 @@ b6dd396f513efeb7864685c840f9643a  ruby-r
 634c25b14e19925d10af3720d72e8741  rubyfaq-990927.tar.gz
 4fcec898f51d8371cc42d0a013940469  rubyfaq-jp-990927.tar.gz
 f77c307cb72fb8808b0e85af5d05cefc  ruby-1.8.6-p399.tar.bz2
+6a8313c73087513f24e52d8cee5b3804  ruby-1.8-rev27738_trunk-ext_tk.tar.gz



More information about the scm-commits mailing list