[52164] trunk/dports/lang/ruby186

kimuraw at macports.org kimuraw at macports.org
Thu Jun 11 07:52:00 PDT 2009


Revision: 52164
          http://trac.macports.org/changeset/52164
Author:   kimuraw at macports.org
Date:     2009-06-11 07:52:00 -0700 (Thu, 11 Jun 2009)
Log Message:
-----------
lang/ruby: upgrade to 1.8.6-p368, security fix
	http://www.ruby-lang.org/en/news/2009/06/09/dos-vulnerability-in-bigdecimal/

Modified Paths:
--------------
    trunk/dports/lang/ruby186/Portfile
    trunk/dports/lang/ruby186/files/patch-thread-hooks

Modified: trunk/dports/lang/ruby186/Portfile
===================================================================
--- trunk/dports/lang/ruby186/Portfile	2009-06-11 14:51:47 UTC (rev 52163)
+++ trunk/dports/lang/ruby186/Portfile	2009-06-11 14:52:00 UTC (rev 52164)
@@ -3,10 +3,10 @@
 PortSystem 1.0
 
 name			ruby186
-version			1.8.6-p287
+version			1.8.6-p368
 
 categories		lang ruby
-maintainers		nomaintainer
+maintainers		kimuraw openmaintainer
 
 description		Powerful and clean object-oriented scripting language
 long_description	Ruby is the interpreted scripting language for quick \
@@ -22,9 +22,9 @@
 
 dist_subdir		ruby
 distname		ruby-${version}
-checksums		md5     80b5f3db12531d36e6c81fac6d05dda9 \
-				sha1    29b02ccab3c1d6b4a71148ad960e65b5f892fe17 \
-				rmd160  df0950f1cdf9ea26b6d2f04756d9db89ae295de4
+checksums		md5     623447c6d8c973193aae565a5538ccfc \
+				sha1    7a2cfb9f0803d21221e7d066837037bbbc50b6ad \
+				rmd160  fba1ef4f6b2b069f4fcd4734b09fc36197138929
 
 platforms		darwin
 
@@ -39,9 +39,7 @@
 				patch-instruby.rb \
 				patch-mkconfig.rb \
 				patch-mkmf.rb \
-				patch-ruby.c \
-				patch-lib-rexml-document.rb.diff \
-				patch-ext_openssl_openssl_missing.h.diff
+				patch-ruby.c
 
 use_autoconf	yes
 
@@ -64,6 +62,13 @@
 			destroot.keepdirs-append ${subdir}
 		}
 	}
+    # error at activate, for these cace sencitive files
+	foreach rdoc {Exception2MessageMapper/fail-i.yaml \
+				  REXML/Parsers/XPathParser/predicate-i.yaml} {
+		if {[file exists ${destroot}${prefix}/share/ri/1.8/system/${rdoc}]} {
+			delete ${destroot}${prefix}/share/ri/1.8/system/${rdoc}
+		}
+	}
 }
 
 platform darwin {

Modified: trunk/dports/lang/ruby186/files/patch-thread-hooks
===================================================================
--- trunk/dports/lang/ruby186/files/patch-thread-hooks	2009-06-11 14:51:47 UTC (rev 52163)
+++ trunk/dports/lang/ruby186/files/patch-thread-hooks	2009-06-11 14:52:00 UTC (rev 52164)
@@ -1,33 +1,8 @@
-=== ruby.h
-==================================================================
---- ruby.h	(/trunk)	(revision 16)
-+++ ruby.h	(/branches/thread-hooks)	(revision 16)
-@@ -749,6 +749,19 @@
- void ruby_native_thread_kill _((int));
- #endif
+diff -ur ../ruby-1.8.6-p368.org/eval.c ./eval.c
+--- ../ruby-1.8.6-p368.org/eval.c	2009-03-23 18:26:03.000000000 +0900
++++ ./eval.c	2009-06-11 23:08:09.000000000 +0900
+@@ -220,6 +220,25 @@
  
-+
-+typedef unsigned int rb_threadswitch_event_t;
-+
-+#define RUBY_THREADSWITCH_INIT 0x01
-+#define RUBY_THREADSWITCH_FREE 0x02
-+#define RUBY_THREADSWITCH_SAVE 0x04
-+#define RUBY_THREADSWITCH_RESTORE 0x08
-+
-+typedef void (*rb_threadswitch_hook_func_t) _((rb_threadswitch_event_t,VALUE));
-+
-+void *rb_add_threadswitch_hook _((rb_threadswitch_hook_func_t func));
-+void rb_remove_threadswitch_hook _((void *handle));
-+
- #if defined(__cplusplus)
- #if 0
- { /* satisfy cc-mode */
-=== eval.c
-==================================================================
---- eval.c	(/trunk)	(revision 16)
-+++ eval.c	(/branches/thread-hooks)	(revision 16)
-@@ -218,6 +218,25 @@
- 
  #include <sys/stat.h>
  
 +
@@ -52,34 +27,34 @@
  VALUE rb_cProc;
  VALUE rb_cBinding;
  static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
-@@ -10167,6 +10186,8 @@
- thread_free(th)
+@@ -10232,6 +10251,8 @@
+ stack_free(th)
      rb_thread_t th;
  {
 +    EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_FREE,th->thread);
 +
      if (th->stk_ptr) free(th->stk_ptr);
      th->stk_ptr = 0;
- #ifdef __ia64__
-@@ -10219,6 +10240,8 @@
+ #ifdef __ia64
+@@ -10291,6 +10312,8 @@
      VALUE *pos;
-     int len;
+     size_t len;
      static VALUE tval;
 +    
 +    EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_SAVE,th->thread);
  
      len = ruby_stack_length(&pos);
      th->stk_len = 0;
-@@ -10418,6 +10441,8 @@
+@@ -10485,6 +10508,8 @@
+ #define STACK_PAD_SIZE 1024
+     volatile VALUE space[STACK_PAD_SIZE], *sp = space;
  
-     if (!th->stk_ptr) rb_bug("unsaved context");
- 
 +    EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_RESTORE,th->thread);
 +
- #if STACK_GROW_DIRECTION < 0
-     if (&v > th->stk_pos) stack_extend(th, exit);
- #elif STACK_GROW_DIRECTION > 0
-@@ -10534,6 +10559,41 @@
+ #if !STACK_GROW_DIRECTION
+     if (space < rb_gc_stack_start) {
+         /* Stack grows downward */
+@@ -10614,6 +10639,41 @@
      rb_thread_main_jump(e, RESTORE_RAISE);
  }
  
@@ -121,7 +96,7 @@
  static void
  copy_fds(dst, src, max)
      fd_set *dst, *src;
-@@ -11770,6 +11830,8 @@
+@@ -11869,6 +11929,8 @@
      THREAD_ALLOC(th);
      th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
  
@@ -130,3 +105,28 @@
      for (vars = th->dyna_vars; vars; vars = vars->next) {
  	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
  	FL_SET(vars, DVAR_DONT_RECYCLE);
+Only in .: eval.c.orig
+diff -ur ../ruby-1.8.6-p368.org/ruby.h ./ruby.h
+--- ../ruby-1.8.6-p368.org/ruby.h	2008-07-10 13:52:35.000000000 +0900
++++ ./ruby.h	2009-06-11 23:08:09.000000000 +0900
+@@ -749,6 +749,19 @@
+ void ruby_native_thread_kill _((int));
+ #endif
+ 
++
++typedef unsigned int rb_threadswitch_event_t;
++
++#define RUBY_THREADSWITCH_INIT 0x01
++#define RUBY_THREADSWITCH_FREE 0x02
++#define RUBY_THREADSWITCH_SAVE 0x04
++#define RUBY_THREADSWITCH_RESTORE 0x08
++
++typedef void (*rb_threadswitch_hook_func_t) _((rb_threadswitch_event_t,VALUE));
++
++void *rb_add_threadswitch_hook _((rb_threadswitch_hook_func_t func));
++void rb_remove_threadswitch_hook _((void *handle));
++
+ #if defined(__cplusplus)
+ #if 0
+ { /* satisfy cc-mode */
+Only in .: ruby.h.orig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090611/8a985509/attachment.html>


More information about the macports-changes mailing list