[arch-commits] Commit in subversion/trunk (3 files)

Felix Yan fyan at archlinux.org
Fri May 27 05:16:35 UTC 2016


    Date: Friday, May 27, 2016 @ 07:16:34
  Author: fyan
Revision: 268628

upgpkg: subversion 1.9.4-1

Perl 5.24 rebuild

Added:
  subversion/trunk/ruby-frozen-nil.patch
Modified:
  subversion/trunk/PKGBUILD
Deleted:
  subversion/trunk/fix_ruby22_tests.patch

------------------------+
 PKGBUILD               |    6 -
 fix_ruby22_tests.patch |  174 -----------------------------------------------
 ruby-frozen-nil.patch  |   42 +++++++++++
 3 files changed, 45 insertions(+), 177 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-05-26 21:21:03 UTC (rev 268627)
+++ PKGBUILD	2016-05-27 05:16:34 UTC (rev 268628)
@@ -31,7 +31,7 @@
         svnserve.tmpfiles
         svnserve.service
         subversion.rpath.fix.patch
-        fix_ruby22_tests.patch)
+        ruby-frozen-nil.patch)
 md5sums=('29121a038f87641055a8183f49e9739f'
          'SKIP'
          'a0db6dd43af33952739b6ec089852630'
@@ -39,7 +39,7 @@
          'bb2857eceafcfac35dde39dcffad2314'
          '733011145b8a8e74baf4c9fc9197b3e8'
          '31c0f079a0b0815d6af5673ab7be96af'
-         'e5a59f43af24c103477e09bc1120831d')
+         '6b1e5abe57edcc662582bcf05fee34bb')
 validpgpkeys=('19BBCAEF7B19B280A0E2175E62D48FAD16A0DE01'
               '8BC4DAE0C5A4D65F404401074F7DBAA99A59B973'
               'BA3C15B1337CF0FB222BD41A1BCA6586A347943F'
@@ -49,7 +49,7 @@
 prepare() {
    cd ${pkgname}-${pkgver}
    patch -Np0 -i ../subversion.rpath.fix.patch
-   patch -p1 -i ../fix_ruby22_tests.patch
+   patch -p1 -i ../ruby-frozen-nil.patch
    sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/hook-scripts/{,mailer/{,tests/}}*.py subversion/tests/cmdline/*.py
 }
 

Deleted: fix_ruby22_tests.patch
===================================================================
--- fix_ruby22_tests.patch	2016-05-26 21:21:03 UTC (rev 268627)
+++ fix_ruby22_tests.patch	2016-05-27 05:16:34 UTC (rev 268628)
@@ -1,174 +0,0 @@
-commit 1bf46d7f134b24a8f594a0e108056aed67759590
-Author: Anatol Pomozov <anatol.pomozov at gmail.com>
-Date:   Tue Dec 30 04:50:55 2014 -0800
-
-    Fix test for ruby 2.2
-    
-    The main source of problems with ruby 2.2 is that it uses new test-unit framework
-    that changes some API.
-    
-    In partcular all assert_* functions are void, but our tests expect bool. Change tests and do
-    not check output of assert_* functions.
-    
-    Do not override TestCase::inherit function as it is used by the framework itself.
-    
-    In ruby 2.2 bool is frozen object so we cannot modify it.
-
-diff --git a/subversion/bindings/swig/ruby/test/my-assertions.rb b/subversion/bindings/swig/ruby/test/my-assertions.rb
-index 77c42e7..91f7ad8 100644
---- a/subversion/bindings/swig/ruby/test/my-assertions.rb
-+++ b/subversion/bindings/swig/ruby/test/my-assertions.rb
-@@ -24,41 +24,13 @@ module Test
-   module Unit
-     module Assertions
- 
--      # make an intermediary assertion block handler
--      def _my_assert_block(&block)
--       if RUBY_VERSION > '1.9'
--         assert_block do
--           yield
--         end
--       else
--         _wrap_assertion do
--           yield
--         end
--       end
--      end
--
--      def assert_true(boolean, message=nil)
--        _my_assert_block do
--          assert_equal(true, boolean, message)
--        end
--      end
--
--      def assert_false(boolean, message=nil)
--        _my_assert_block do
--          assert_equal(false, boolean, message)
--        end
--      end
--
-       def assert_nested_sorted_array(expected, actual, message=nil)
--        _my_assert_block do
-           assert_equal(expected.collect {|elem| elem.sort},
-                        actual.collect {|elem| elem.sort},
-                        message)
--        end
-       end
- 
-       def assert_equal_log_entries(expected, actual, message=nil)
--        _my_assert_block do
-           actual = actual.collect do |entry|
-             changed_paths = entry.changed_paths
-             changed_paths.each_key do |path|
-@@ -73,7 +45,6 @@ module Test
-              entry.has_children?]
-           end
-           assert_equal(expected, actual, message)
--        end
-       end
-     end
-   end
-diff --git a/subversion/bindings/swig/ruby/test/test-unit-ext.rb b/subversion/bindings/swig/ruby/test/test-unit-ext.rb
-index ce88d75..62a1508 100644
---- a/subversion/bindings/swig/ruby/test/test-unit-ext.rb
-+++ b/subversion/bindings/swig/ruby/test/test-unit-ext.rb
-@@ -18,6 +18,6 @@
- # ====================================================================
- 
- require "test-unit-ext/always-show-result" if RUBY_VERSION < '1.9.3'
--require "test-unit-ext/priority"
-+#require "test-unit-ext/priority"
- require "test-unit-ext/backtrace-filter" if RUBY_VERSION < '1.9.3'
- require "test-unit-ext/long-display-for-emacs" if RUBY_VERSION < '1.9.3'
-diff --git a/subversion/bindings/swig/ruby/test/test_delta.rb b/subversion/bindings/swig/ruby/test/test_delta.rb
-index 541a4fe..90c1e3b 100644
---- a/subversion/bindings/swig/ruby/test/test_delta.rb
-+++ b/subversion/bindings/swig/ruby/test/test_delta.rb
-@@ -48,7 +48,6 @@ class SvnDeltaTest < Test::Unit::TestCase
-     target = StringIO.new(t)
-     stream = Svn::Delta::TextDeltaStream.new(source, target)
-     assert_nil(stream.md5_digest)
--    _my_assert_block do
-       ret = stream.each do |window|
-         window.ops.each do |op|
-           op_size = op.offset + op.length
-@@ -64,8 +63,6 @@ class SvnDeltaTest < Test::Unit::TestCase
-           end
-         end
-       end
--      true if RUBY_VERSION > '1.9' # this block returns nil in > ruby '1.9'
--    end
-     assert_equal(Digest::MD5.hexdigest(t), stream.md5_digest)
-   end
- 
-@@ -84,7 +81,6 @@ class SvnDeltaTest < Test::Unit::TestCase
-       end
-     end
- 
--    _my_assert_block do
-       composed_window.ops.each do |op|
-         op_size = op.offset + op.length
-         case op.action_code
-@@ -98,7 +94,6 @@ class SvnDeltaTest < Test::Unit::TestCase
-           flunk
-         end
-       end
--    end
-   end
- 
-   def test_txdelta_apply_instructions
-diff --git a/subversion/bindings/swig/ruby/test/test_repos.rb b/subversion/bindings/swig/ruby/test/test_repos.rb
-index 89ca8c1..6745200 100644
---- a/subversion/bindings/swig/ruby/test/test_repos.rb
-+++ b/subversion/bindings/swig/ruby/test/test_repos.rb
-@@ -678,7 +678,8 @@ class SvnReposTest < Test::Unit::TestCase
- 
-       dest_path = File.join(@tmp_path, "dest")
-       Svn::Repos.create(dest_path) do |repos|
--        assert_raises(NoMethodError) do
-+        assert_raises(RuntimeError) do
-+          # Can't modify frozen object
-           repos.load_fs(nil)
-         end
-       end
-diff --git a/subversion/bindings/swig/ruby/test/test_wc.rb b/subversion/bindings/swig/ruby/test/test_wc.rb
-index 3a2aa65..2313e60 100644
---- a/subversion/bindings/swig/ruby/test/test_wc.rb
-+++ b/subversion/bindings/swig/ruby/test/test_wc.rb
-@@ -411,7 +411,7 @@ EOE
-     end
-   end
- 
--  def test_status
-+  def test_status2
-     source = "source"
-     file1 = "file1"
-     file2 = "file2"
-@@ -534,7 +534,6 @@ EOE
-       ctx.ci(lf_path)
- 
-       Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
--        _my_assert_block do
-           File.open(src_path, "wb") {|f| f.print(source)}
-           args = [method_name, src_path, crlf_path, Svn::Wc::TRANSLATE_FROM_NF]
-           result = yield(access.send(*args), source)
-@@ -553,7 +552,6 @@ EOE
-           result ||= File.open(src_path, "rb") {|f| f.read}
-           assert_equal(lf_source, result)
-         end
--      end
-     end
-   end
- 
-@@ -1072,11 +1070,6 @@ EOE
-         assert_not_nil context
-         assert_kind_of Svn::Wc::Context, context
-       end
--      if RUBY_VERSION > '1.9'
--        assert_equal(result,true)
--      else
--        assert_nil result
--      end
-     end
-   end
- 

Added: ruby-frozen-nil.patch
===================================================================
--- ruby-frozen-nil.patch	                        (rev 0)
+++ ruby-frozen-nil.patch	2016-05-27 05:16:34 UTC (rev 268628)
@@ -0,0 +1,42 @@
+commit 6c69127693e9e395c026d982f871253548037a4d
+Author: James McCoy <jamessan at debian.org>
+Date:   Sun Nov 8 23:06:45 2015 -0500
+
+    Create a new Ruby Object instead of attempting to modify nil.
+    
+    Starting in Ruby 2.2, the nil, true, and false objects are frozen.  This
+    was causing test_repos.rb's test_load to fail due to calling
+    "repos.load_fs(nil)".  This results in svn_swig_rb_make_stream trying to
+    attributes on nil, which isn't allowed.
+    
+    * subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:
+      (svn_swig_rb_make_stream): Create a new Object if the given io is nil.
+       Also call svn_swig_rb_get_pool in order to deduplicate some
+       pool-handling code.
+
+diff --git a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
+index a25ec5a..2210853 100644
+--- a/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
++++ b/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
+@@ -3230,14 +3230,16 @@ svn_swig_rb_make_stream(VALUE io)
+     stream_p = &stream;
+     r2c_swig_type2(io, "svn_stream_t *", (void **)stream_p);
+   } else {
++    if (NIL_P(io)) {
++      io = rb_class_new_instance(0, NULL, rb_cObject);
++    }
+     VALUE rb_pool = rb_pool_new(Qnil);
+-    apr_pool_wrapper_t *pool_wrapper;
+-    apr_pool_wrapper_t **pool_wrapper_p;
++    apr_pool_t *pool;
++
++    svn_swig_rb_get_pool(0, NULL, io, &rb_pool, &pool);
+ 
+     rb_set_pool(io, rb_pool);
+-    pool_wrapper_p = &pool_wrapper;
+-    r2c_swig_type2(rb_pool, "apr_pool_wrapper_t *", (void **)pool_wrapper_p);
+-    stream = svn_stream_create((void *)io, pool_wrapper->pool);
++    stream = svn_stream_create((void *)io, pool);
+     svn_stream_set_read2(stream, NULL /* only full read support */,
+                          read_handler_rbio);
+     svn_stream_set_write(stream, write_handler_rbio);



More information about the arch-commits mailing list