[88384] trunk/dports/lang/ruby

kimuraw at macports.org kimuraw at macports.org
Fri Dec 30 03:08:06 PST 2011


Revision: 88384
          http://trac.macports.org/changeset/88384
Author:   kimuraw at macports.org
Date:     2011-12-30 03:08:04 -0800 (Fri, 30 Dec 2011)
Log Message:
-----------
lang/ruby: upgrade to 1.8.7-p357, fix CVE-2011-4815.
    Denial of service attack was found for Ruby's Hash algorithm
    http://www.ruby-lang.org/en/news/2011/12/28/denial-of-service-attack-was-found-for-rubys-hash-algorithm/

Modified Paths:
--------------
    trunk/dports/lang/ruby/Portfile
    trunk/dports/lang/ruby/files/patch-apple-dtrace.diff

Modified: trunk/dports/lang/ruby/Portfile
===================================================================
--- trunk/dports/lang/ruby/Portfile	2011-12-30 10:52:58 UTC (rev 88383)
+++ trunk/dports/lang/ruby/Portfile	2011-12-30 11:08:04 UTC (rev 88384)
@@ -4,8 +4,8 @@
 PortGroup		muniversal 1.0
 
 name			ruby
-version			1.8.7-p352
-revision		2
+version			1.8.7-p357
+revision		0
 
 categories		lang ruby
 maintainers		kimuraw
@@ -21,9 +21,9 @@
 master_sites	ruby:1.8
 				
 dist_subdir		ruby
-checksums		md5 0c61ea41d1b1183b219b9afe97f18f52 \
-				rmd160 9a0ea7e7eb83c809d2890b08db2e78eeb93dee0d \
-				sha1 9f3d039e9bfeda54ea2c2175bbeace375a1ea1ae
+checksums		md5 3abd9e2a29f756a0d30c7bfca578cdeb \
+				rmd160 9034fb641f0260aed590856cd9400f186a3dd56a \
+				sha1 ba5ec0ab663976f00fb405be6cfef546bcf0e4e9
 
 use_bzip2		yes
 

Modified: trunk/dports/lang/ruby/files/patch-apple-dtrace.diff
===================================================================
--- trunk/dports/lang/ruby/files/patch-apple-dtrace.diff	2011-12-30 10:52:58 UTC (rev 88383)
+++ trunk/dports/lang/ruby/files/patch-apple-dtrace.diff	2011-12-30 11:08:04 UTC (rev 88384)
@@ -1,21 +1,7 @@
---- inits.c.old	2009-03-02 15:12:41.000000000 -0800
-+++ inits.c	2009-03-02 15:13:13.000000000 -0800
-@@ -46,6 +46,7 @@
- void Init_Time _((void));
- void Init_var_tables _((void));
- void Init_version _((void));
-+void Init_DTracer _((void));
- 
- void
- rb_call_inits()
-@@ -83,4 +84,5 @@
-     Init_Enumerator();
-     Init_marshal();
-     Init_version();
-+    Init_DTracer();
- }
---- object.c.old	2009-03-02 15:12:46.000000000 -0800
-+++ object.c	2009-03-02 15:13:13.000000000 -0800
+Index: object.c
+===================================================================
+--- object.c	(revision 34154)
++++ object.c	(working copy)
 @@ -20,6 +20,12 @@
  #include <ctype.h>
  #include <math.h>
@@ -58,7 +44,7 @@
 Index: tracer.c
 ===================================================================
 --- tracer.c	(revision 0)
-+++ tracer.c	(revision 77)
++++ tracer.c	(working copy)
 @@ -0,0 +1,47 @@
 +#include "ruby.h"
 +
@@ -107,8 +93,86 @@
 +  rb_define_module_function(rb_mDtrace, "enabled?", ruby_dtrace_enabled, 0);
 +}
 +
---- common.mk.old	2009-03-02 15:12:09.000000000 -0800
-+++ common.mk	2009-03-02 15:19:53.000000000 -0800
+Index: gc.c
+===================================================================
+--- gc.c	(revision 34154)
++++ gc.c	(working copy)
+@@ -30,6 +30,12 @@
+ #include <sys/resource.h>
+ #endif
+ 
++#ifdef ENABLE_DTRACE
++#include <sys/sdt.h>
++#include "dtrace.h"
++#endif
++
++
+ #if defined _WIN32 || defined __CYGWIN__
+ #include <windows.h>
+ #endif
+@@ -1264,6 +1270,15 @@
+ 	break;
+     }
+ 
++    #ifdef ENABLE_DTRACE
++    if (RUBY_OBJECT_FREE_ENABLED())
++    { 
++        char *classname = rb_obj_classname(obj);
++        if (classname)
++            RUBY_OBJECT_FREE(classname);
++    }
++    #endif
++
+     if (FL_TEST(obj, FL_EXIVAR)) {
+ 	rb_free_generic_ivar((VALUE)obj);
+     }
+@@ -1430,6 +1445,12 @@
+ {
+     struct gc_list *list;
+     struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug??  */
++
++    #ifdef ENABLE_DTRACE
++    if (RUBY_GC_BEGIN_ENABLED())
++       RUBY_GC_BEGIN();
++    #endif
++
+     jmp_buf save_regs_gc_mark;
+     SET_STACK_END;
+ 
+@@ -1522,6 +1543,11 @@
+     } while (!MARK_STACK_EMPTY);
+ 
+     gc_sweep();
++
++    #ifdef ENABLE_DTRACE
++    if (RUBY_GC_END_ENABLED())
++	      RUBY_GC_END();
++    #endif
+ }
+ 
+ void
+Index: inits.c
+===================================================================
+--- inits.c	(revision 34154)
++++ inits.c	(working copy)
+@@ -48,6 +48,7 @@
+ void Init_var_tables _((void));
+ void Init_version _((void));
+ void Init_st _((void));
++void Init_DTracer _((void));
+ 
+ void
+ rb_call_inits()
+@@ -87,4 +88,5 @@
+     Init_Enumerator();
+     Init_marshal();
+     Init_version();
++    Init_DTracer();
+ }
+Index: common.mk
+===================================================================
+--- common.mk	(revision 34154)
++++ common.mk	(working copy)
 @@ -55,6 +55,7 @@
  		string.$(OBJEXT) \
  		struct.$(OBJEXT) \
@@ -117,7 +181,7 @@
  		util.$(OBJEXT) \
  		variable.$(OBJEXT) \
  		version.$(OBJEXT) \
-@@ -84,9 +85,9 @@
+@@ -85,9 +86,9 @@
  
  miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(DMYEXT)
  
@@ -129,7 +193,7 @@
  
  $(LIBRUBY_SO):	$(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE)
  
-@@ -279,7 +280,7 @@
+@@ -280,7 +281,7 @@
  
  clean: clean-ext clean-local
  clean-local::
@@ -138,9 +202,11 @@
  	@$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
  	@$(RM) y.tab.c y.output
  clean-ext:
---- eval.c.old	2009-03-02 15:12:55.000000000 -0800
-+++ eval.c	2009-03-02 15:21:04.000000000 -0800
-@@ -215,6 +215,10 @@
+Index: eval.c
+===================================================================
+--- eval.c	(revision 34154)
++++ eval.c	(working copy)
+@@ -226,6 +226,10 @@
  
  #include <sys/stat.h>
  
@@ -151,7 +217,7 @@
  VALUE rb_cProc;
  VALUE rb_cBinding;
  static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
-@@ -3045,12 +3049,22 @@
+@@ -3059,12 +3063,22 @@
  
        case NODE_IF:
  	if (RTEST(rb_eval(self, node->nd_cond))) {
@@ -174,7 +240,7 @@
  	    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
  			    ruby_frame->last_func,
  			    ruby_frame->last_class);
-@@ -3065,6 +3079,11 @@
+@@ -3079,6 +3093,11 @@
  	    if (nd_type(node) != NODE_WHEN) goto again;
  	    tag = node->nd_head;
  	    while (tag) {
@@ -186,7 +252,7 @@
  		EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
  				ruby_frame->last_func,
  				ruby_frame->last_class);
-@@ -3106,6 +3125,11 @@
+@@ -3120,6 +3139,11 @@
  		}
  		tag = node->nd_head;
  		while (tag) {
@@ -198,7 +264,7 @@
  		    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
  				    ruby_frame->last_func,
  				    ruby_frame->last_class);
-@@ -3326,6 +3350,11 @@
+@@ -3340,6 +3364,11 @@
  		rescuing = -1;
  		while (resq) {
  		    ruby_current_node = resq;
@@ -210,7 +276,7 @@
  		    if (handle_rescue(self, resq)) {
  			state = 0;
  			rescuing = 1;
-@@ -4144,6 +4173,11 @@
+@@ -4160,6 +4189,11 @@
  	break;
  
        case NODE_NEWLINE:
@@ -222,7 +288,7 @@
  	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self, 
  			ruby_frame->last_func,
  			ruby_frame->last_class);
-@@ -4622,6 +4656,10 @@
+@@ -4638,6 +4672,10 @@
  
      rb_trap_restore_mask();
      if (tag != TAG_FATAL) {
@@ -233,7 +299,7 @@
  	EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,
  			ruby_frame->self,
  			ruby_frame->last_func,
-@@ -5885,6 +5923,13 @@
+@@ -5909,6 +5947,13 @@
  		rb_bug("bad argc (%d) specified for `%s(%s)'",
  		       len, rb_class2name(klass), rb_id2name(id));
  	    }
@@ -247,7 +313,7 @@
  	    if (event_hooks) {
  		int state;
  
-@@ -5903,6 +5948,13 @@
+@@ -5927,6 +5972,13 @@
  	    else {
  		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
  	    }
@@ -261,7 +327,7 @@
  	}
  	break;
  
-@@ -5930,12 +5982,26 @@
+@@ -5954,12 +6006,26 @@
  
        case NODE_BMETHOD:
  	ruby_frame->flags |= FRAME_DMETH;
@@ -288,7 +354,7 @@
  	if (event_hooks) {
  	    EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, ruby_current_node, recv, id, klass);
  	}
-@@ -6049,6 +6115,13 @@
+@@ -6073,6 +6139,13 @@
  		    }
  		    ruby_frame->argc = i;
  		}
@@ -302,7 +368,7 @@
  		if (event_hooks) {
  		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
  		}
-@@ -6059,6 +6132,13 @@
+@@ -6083,6 +6156,13 @@
  		state = 0;
  	    }
  	    POP_TAG();
@@ -316,59 +382,3 @@
  	    if (event_hooks) {
  		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, ruby_current_node, recv, id, klass);
  	    }
---- gc.c.old	2009-03-02 15:13:00.000000000 -0800
-+++ gc.c	2009-03-02 15:13:13.000000000 -0800
-@@ -30,6 +30,12 @@
- #include <sys/resource.h>
- #endif
- 
-+#ifdef ENABLE_DTRACE
-+#include <sys/sdt.h>
-+#include "dtrace.h"
-+#endif
-+
-+
- #if defined _WIN32 || defined __CYGWIN__
- #include <windows.h>
- #endif
-@@ -1214,6 +1220,15 @@
- 	break;
-     }
- 
-+    #ifdef ENABLE_DTRACE
-+    if (RUBY_OBJECT_FREE_ENABLED())
-+    { 
-+        char *classname = rb_obj_classname(obj);
-+        if (classname)
-+            RUBY_OBJECT_FREE(classname);
-+    }
-+    #endif
-+
-     if (FL_TEST(obj, FL_EXIVAR)) {
- 	rb_free_generic_ivar((VALUE)obj);
-     }
-@@ -1374,6 +1389,12 @@
- {
-     struct gc_list *list;
-     struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug??  */
-+
-+    #ifdef ENABLE_DTRACE
-+    if (RUBY_GC_BEGIN_ENABLED())
-+       RUBY_GC_BEGIN();
-+    #endif
-+
-     jmp_buf save_regs_gc_mark;
-     SET_STACK_END;
- 
-@@ -1466,6 +1487,11 @@
-     } while (!MARK_STACK_EMPTY);
- 
-     gc_sweep();
-+
-+    #ifdef ENABLE_DTRACE
-+    if (RUBY_GC_END_ENABLED())
-+	      RUBY_GC_END();
-+    #endif
- }
- 
- void
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111230/343248f8/attachment.html>


More information about the macports-changes mailing list