[DRE-commits] [SCM] ruby-kgio.git branch, master, updated. upstream/2.7.2-17-g04923a2

Hleb Valoshka 375GNU at Gmail.COM
Thu Mar 15 17:52:10 UTC 2012


The following commit has been merged in the master branch:
commit 166b721e8ab56bc3424f23c7b8c4318dc74f7925
Author: Hleb Valoshka <375GNU at Gmail.COM>
Date:   Thu Mar 15 20:43:23 2012 +0300

    remove unneeded patches

diff --git a/debian/patches/fix-autopush-on-nonlinux b/debian/patches/fix-autopush-on-nonlinux
deleted file mode 100644
index fc5b280..0000000
--- a/debian/patches/fix-autopush-on-nonlinux
+++ /dev/null
@@ -1,77 +0,0 @@
-From 1129029ab1bf886979a66a69b04d244dba8b63cf Mon Sep 17 00:00:00 2001
-From: Eric Wong <normalperson at yhbt.net>
-Date: Mon, 05 Mar 2012 23:19:29 +0000
-Subject: autopush: fix/enable under Debian GNU/kFreeBSD
-
-It seems autopush support in our autopush code has
-always been broken outside of Linux-based systems,
-as we never marked the socket as having pending data.
----
-diff --git a/ext/kgio/autopush.c b/ext/kgio/autopush.c
-index 7c5553f..74576e8 100644
---- a/ext/kgio/autopush.c
-+++ b/ext/kgio/autopush.c
-@@ -240,6 +240,7 @@ static void push_pending_data(VALUE io)
- }
- #else /* !KGIO_NOPUSH */
- void kgio_autopush_recv(VALUE io){}
-+void kgio_autopush_send(VALUE io){}
- void init_kgio_autopush(void)
- {
- }
-diff --git a/ext/kgio/read_write.c b/ext/kgio/read_write.c
-index 6f739a5..9c2440e 100644
---- a/ext/kgio/read_write.c
-+++ b/ext/kgio/read_write.c
-@@ -13,8 +13,18 @@ static ID id_set_backtrace;
- #if defined(__linux__) && ! defined(USE_MSG_DONTWAIT)
- #  define USE_MSG_DONTWAIT
- static const int peek_flags = MSG_DONTWAIT|MSG_PEEK;
-+
-+/* we don't need these variants, we call kgio_autopush_send/recv directly */
-+static inline void kgio_autopush_read(VALUE io) { }
-+static inline void kgio_autopush_write(VALUE io) { }
-+
- #else
- static const int peek_flags = MSG_PEEK;
-+#  include <netinet/tcp.h>
-+#  if defined(TCP_NOPUSH)
-+static inline void kgio_autopush_read(VALUE io) { kgio_autopush_recv(io); }
-+static inline void kgio_autopush_write(VALUE io) { kgio_autopush_send(io); }
-+#  endif
- #endif
- 
- NORETURN(static void raise_empty_bt(VALUE, const char *));
-@@ -112,6 +122,7 @@ static VALUE my_read(int io_wait, int argc, VALUE *argv, VALUE io)
- 	long n;
- 
- 	prepare_read(&a, argc, argv, io);
-+	kgio_autopush_read(io);
- 
- 	if (a.len > 0) {
- 		set_nonblocking(a.fd);
-@@ -357,6 +368,8 @@ retry:
- 	n = (long)write(a.fd, a.ptr, a.len);
- 	if (write_check(&a, n, "write", io_wait) != 0)
- 		goto retry;
-+	if (TYPE(a.buf) != T_SYMBOL)
-+		kgio_autopush_write(io);
- 	return a.buf;
- }
- 
-diff --git a/test/test_autopush.rb b/test/test_autopush.rb
-index 24b300f..57fbefa 100644
---- a/test/test_autopush.rb
-+++ b/test/test_autopush.rb
-@@ -38,7 +38,8 @@ class TestAutopush < Test::Unit::TestCase
-     assert_nothing_raised { s.kgio_write 'asdf' }
-     assert_equal :wait_readable, s.kgio_tryread(1)
-     assert s.kgio_autopush?
--    assert_equal 1, s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
-+    val = s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
-+    assert_operator val, :>, 0, "#{opt}=#{val} (#{RUBY_PLATFORM})"
-   end
- 
-   def test_autopush_true_unix
---
-cgit v0.9.0.2-54-g2d9a
diff --git a/debian/patches/fix-buildconfig-for-gnu-not-linux b/debian/patches/fix-buildconfig-for-gnu-not-linux
deleted file mode 100644
index ccbb49d..0000000
--- a/debian/patches/fix-buildconfig-for-gnu-not-linux
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: ruby-kgio/ext/kgio/extconf.rb
-===================================================================
---- ruby-kgio.orig/ext/kgio/extconf.rb	2012-02-18 16:52:13.000000000 +0300
-+++ ruby-kgio/ext/kgio/extconf.rb	2012-03-03 15:30:40.833523552 +0300
-@@ -20,7 +20,7 @@
-   abort "getnameinfo required"
- have_type("struct sockaddr_storage", %w(sys/types.h sys/socket.h)) or
-   abort "struct sockaddr_storage required"
--have_func('accept4', %w(sys/socket.h))
-+have_func('accept4', %w(sys/socket.h)) if RUBY_PLATFORM =~ /linux/
- have_header("sys/select.h")
- 
- if have_header('ruby/io.h')
diff --git a/debian/patches/fix-define-flags-for-accept4 b/debian/patches/fix-define-flags-for-accept4
deleted file mode 100644
index f25352e..0000000
--- a/debian/patches/fix-define-flags-for-accept4
+++ /dev/null
@@ -1,21 +0,0 @@
-From 56cce133d979c22bbef80fdba1881d8f40876e2f Mon Sep 17 00:00:00 2001
-From: Eric Wong <normalperson at yhbt.net>
-Date: Mon, 05 Mar 2012 22:37:20 +0000
-Subject: accept4: require SOCK_NONBLOCK/SOCK_CLOEXEC macros
-
-The check for the accept4() function actually succeeds on a
-stock installation of Debian GNU/kFreeBSD 6.0, but the
-eglibc headers fail to define the necessary flags.
----
-diff --git a/ext/kgio/missing_accept4.h b/ext/kgio/missing_accept4.h
-index 2801b5d..3e9ec67 100644
---- a/ext/kgio/missing_accept4.h
-+++ b/ext/kgio/missing_accept4.h
-@@ -1,4 +1,4 @@
--#ifndef HAVE_ACCEPT4
-+#if !defined(HAVE_ACCEPT4) || !defined(SOCK_CLOEXEC) || !defined(SOCK_NONBLOCK)
- #  ifndef _GNU_SOURCE
- #    define _GNU_SOURCE
- #  endif
---
-cgit v0.9.0.2-54-g2d9a
diff --git a/debian/patches/fix-increase-delta-range b/debian/patches/fix-increase-delta-range
deleted file mode 100644
index 9c2235c..0000000
--- a/debian/patches/fix-increase-delta-range
+++ /dev/null
@@ -1,31 +0,0 @@
-From 3a847e231d494829077a300912588f499c0bc2af Mon Sep 17 00:00:00 2001
-From: Eric Wong <normalperson at yhbt.net>
-Date: Mon, 05 Mar 2012 23:19:30 +0000
-Subject: test: increase delta range for timing-sensitive test
-
-This appears to be needed for Debian GNU/kFreeBSD under KVM.
----
-diff --git a/test/test_default_wait.rb b/test/test_default_wait.rb
-index 55631fd..7137d0c 100644
---- a/test/test_default_wait.rb
-+++ b/test/test_default_wait.rb
-@@ -24,7 +24,7 @@ class TestDefaultWait < Test::Unit::TestCase
-     t0 = Time.now
-     assert_nil a.kgio_wait_readable(1.1)
-     diff = Time.now - t0
--    assert_in_delta diff, 1.1, 0.05
-+    assert_in_delta diff, 1.1, 0.2
- 
-     b.kgio_write '.'
-     assert_equal a, a.kgio_wait_readable(1.1)
-@@ -37,7 +37,7 @@ class TestDefaultWait < Test::Unit::TestCase
-     t0 = Time.now
-     assert_nil b.kgio_wait_writable(1.1)
-     diff = Time.now - t0
--    assert_in_delta diff, 1.1, 0.05
-+    assert_in_delta diff, 1.1, 0.2
- 
-     a.kgio_read(16384)
-     assert_equal b, b.kgio_wait_writable(1.1)
---
-cgit v0.9.0.2-54-g2d9a
diff --git a/debian/patches/fix-potential-race-in-test-poll b/debian/patches/fix-potential-race-in-test-poll
deleted file mode 100644
index 3317d92..0000000
--- a/debian/patches/fix-potential-race-in-test-poll
+++ /dev/null
@@ -1,17 +0,0 @@
-Test test_close_signal has potential race condition, this patch will fix it.
-See http://permalink.gmane.org/gmane.comp.lang.ruby.kgio.general/91
-
---- a/test/test_poll.rb
-+++ b/test/test_poll.rb
-@@ -58,7 +58,10 @@
-     res = nil
-     thr = Thread.new { sleep 0.100; Process.kill(:USR1, $$) }
-     t0 = Time.now
--    assert_raises(IOError) { Kgio.poll({@rd => Kgio::POLLIN}) }
-+    assert_raises(IOError) do
-+      result = Kgio.poll({@rd => Kgio::POLLIN})
-+      result.each_key { |io| io.read_nonblock(1) }
-+    end
-     diff = Time.now - t0
-     thr.join
-     assert diff >= 0.010, "diff=#{diff}"
diff --git a/debian/patches/series b/debian/patches/series
index ad21062..0f80bbf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1 @@
 fix-test-under-fakeroot
-#fix-buildconfig-for-gnu-not-linux
-fix-potential-race-in-test-poll
-fix-autopush-on-nonlinux
-fix-increase-delta-range
-fix-define-flags-for-accept4

-- 
ruby-kgio.git



More information about the Pkg-ruby-extras-commits mailing list