ktdreyer pushed to rubygem-posix-spawn (master). "Update to 0.3.11 (RHBZ #1193734) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 11 21:09:21 UTC 2015


>From 2d1f6d04c43a495690b96da3956d7518a89294b4 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer at ktdreyer.com>
Date: Sat, 11 Apr 2015 15:08:11 -0600
Subject: Update to 0.3.11 (RHBZ #1193734)

- Drop Minitest 5 patch; this is now upstream
- Drop Fedora 19 support

diff --git a/.gitignore b/.gitignore
index c5784e7..ea42c9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /posix-spawn-0.3.8.gem
 /posix-spawn-0.3.9.gem
+/posix-spawn-0.3.11.gem
diff --git a/rubygem-posix-spawn-0.3.11-skip-tests.patch b/rubygem-posix-spawn-0.3.11-skip-tests.patch
new file mode 100644
index 0000000..41658e4
--- /dev/null
+++ b/rubygem-posix-spawn-0.3.11-skip-tests.patch
@@ -0,0 +1,40 @@
+From ba2aca29b69584e7337b41c23ead0e48724aef6c Mon Sep 17 00:00:00 2001
+From: Ken Dreyer <ktdreyer at ktdreyer.com>
+Date: Fri, 27 Dec 2013 10:42:17 -0700
+Subject: [PATCH] Fedora only: skip failing tests
+
+---
+ test/test_spawn.rb | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/test/test_spawn.rb b/test/test_spawn.rb
+index 486554f..4623da5 100644
+--- a/test/test_spawn.rb
++++ b/test/test_spawn.rb
+@@ -66,6 +66,7 @@ module SpawnImplementationTests
+   # FD => :close options
+ 
+   def test_sanity_of_checking_clone_with_sh
++    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
+     rd, wr = IO.pipe
+     pid = _spawn("exec 2>/dev/null 9<&#{rd.posix_fileno} || exit 1", rd => rd)
+     assert_process_exit_status pid, 0
+@@ -114,6 +115,7 @@ module SpawnImplementationTests
+   end
+ 
+   def test_spawn_close_invalid_fd_raises_exception
++    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
+     pid = _spawn("echo", "hiya", 250 => :close)
+     assert_process_exit_status pid, 127
+   rescue Errno::EBADF
+@@ -187,6 +189,7 @@ module SpawnImplementationTests
+   # Ruby 1.9 Process::spawn closes all fds by default. To keep an fd open, you
+   # have to pass it explicitly as fd => fd.
+   def test_explicitly_passing_an_fd_as_open
++    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
+     rd, wr = IO.pipe
+     pid = _spawn("exec 9>&#{wr.posix_fileno} || exit 1", wr => wr)
+     assert_process_exit_ok pid
+-- 
+2.3.4
+
diff --git a/rubygem-posix-spawn-0.3.9-minitest.patch b/rubygem-posix-spawn-0.3.9-minitest.patch
deleted file mode 100644
index b3c1bcd..0000000
--- a/rubygem-posix-spawn-0.3.9-minitest.patch
+++ /dev/null
@@ -1,238 +0,0 @@
-From 64a96526893c9dc0b6a150240e4c85aa30b4cce1 Mon Sep 17 00:00:00 2001
-From: Ken Dreyer <ktdreyer at ktdreyer.com>
-Date: Fri, 11 Apr 2014 10:40:52 -0600
-Subject: [PATCH 2/2] Fedora: tests: switch to minitest
-
-Ruby 1.9+ uses Minitest as the backend for Test::Unit. As of Minitest 5,
-the shim no longer supports Test::Unit::TestCase.
-
-Adjust the posix-spawn test suite to support Minitest 5's syntax.
-
-Move the duplicated "requires" lines into a test_helper script.
-
-Minitest versions 4 and below do not support the newer Minitest::Test
-class that arrived in version 5. For that case, use the
-MiniTest::Unit::TestCase class as a fallback.
-
-(This is a squashed patchset for Fedora, rebased onto v0.3.9. It does
-not have the gemspec adjustment since the gemspec is dynamically
-regenerated during a Fedora RPM build, nor the Rakefile adjustment,
-since that is not necessary to ship in the RPM. The upstream fix is
-available at https://github.com/rtomayko/posix-spawn/pull/65)
----
- test/test_backtick.rb |  5 ++---
- test/test_child.rb    | 21 ++++++++++-----------
- test/test_helper.rb   |  9 +++++++++
- test/test_popen.rb    |  5 ++---
- test/test_spawn.rb    | 15 +++++++--------
- test/test_system.rb   |  5 ++---
- 6 files changed, 32 insertions(+), 28 deletions(-)
- create mode 100644 test/test_helper.rb
-
-diff --git a/test/test_backtick.rb b/test/test_backtick.rb
-index 708b73d..015f359 100644
---- a/test/test_backtick.rb
-+++ b/test/test_backtick.rb
-@@ -1,7 +1,6 @@
--require 'test/unit'
--require 'posix-spawn'
-+require 'test_helper'
- 
--class BacktickTest < Test::Unit::TestCase
-+class BacktickTest < Minitest::Test
-   include POSIX::Spawn
- 
-   def test_backtick_simple
-diff --git a/test/test_child.rb b/test/test_child.rb
-index f96b1a4..1f4a3c5 100644
---- a/test/test_child.rb
-+++ b/test/test_child.rb
-@@ -1,9 +1,8 @@
- # coding: UTF-8
- 
--require 'test/unit'
--require 'posix-spawn'
-+require 'test_helper'
- 
--class ChildTest < Test::Unit::TestCase
-+class ChildTest < Minitest::Test
-   include POSIX::Spawn
- 
-   def test_sanity
-@@ -57,19 +56,19 @@ class ChildTest < Test::Unit::TestCase
-   end
- 
-   def test_max
--    assert_raise MaximumOutputExceeded do
-+    assert_raises MaximumOutputExceeded do
-       Child.new('yes', :max => 100_000)
-     end
-   end
- 
-   def test_max_with_child_hierarchy
--    assert_raise MaximumOutputExceeded do
-+    assert_raises MaximumOutputExceeded do
-       Child.new('/bin/sh', '-c', 'yes', :max => 100_000)
-     end
-   end
- 
-   def test_max_with_stubborn_child
--    assert_raise MaximumOutputExceeded do
-+    assert_raises MaximumOutputExceeded do
-       Child.new("trap '' TERM; yes", :max => 100_000)
-     end
-   end
-@@ -77,7 +76,7 @@ class ChildTest < Test::Unit::TestCase
-   def test_max_with_partial_output
-     p = Child.build('yes', :max => 100_000)
-     assert_nil p.out
--    assert_raise MaximumOutputExceeded do
-+    assert_raises MaximumOutputExceeded do
-       p.exec!
-     end
-     assert_output_exceeds_repeated_string("y\n", 100_000, p.out)
-@@ -85,7 +84,7 @@ class ChildTest < Test::Unit::TestCase
- 
-   def test_max_with_partial_output_long_lines
-     p = Child.build('yes', "nice to meet you", :max => 10_000)
--    assert_raise MaximumOutputExceeded do
-+    assert_raises MaximumOutputExceeded do
-       p.exec!
-     end
-     assert_output_exceeds_repeated_string("nice to meet you\n", 10_000, p.out)
-@@ -93,14 +92,14 @@ class ChildTest < Test::Unit::TestCase
- 
-   def test_timeout
-     start = Time.now
--    assert_raise TimeoutExceeded do
-+    assert_raises TimeoutExceeded do
-       Child.new('sleep', '1', :timeout => 0.05)
-     end
-     assert (Time.now-start) <= 0.2
-   end
- 
-   def test_timeout_with_child_hierarchy
--    assert_raise TimeoutExceeded do
-+    assert_raises TimeoutExceeded do
-       Child.new('/bin/sh', '-c', 'sleep 1', :timeout => 0.05)
-     end
-   end
-@@ -108,7 +107,7 @@ class ChildTest < Test::Unit::TestCase
-   def test_timeout_with_partial_output
-     start = Time.now
-     p = Child.build('echo Hello; sleep 1', :timeout => 0.05)
--    assert_raise TimeoutExceeded do
-+    assert_raises TimeoutExceeded do
-       p.exec!
-     end
-     assert (Time.now-start) <= 0.2
-diff --git a/test/test_helper.rb b/test/test_helper.rb
-new file mode 100644
-index 0000000..158ddab
---- /dev/null
-+++ b/test/test_helper.rb
-@@ -0,0 +1,9 @@
-+require 'minitest/autorun'
-+require 'posix-spawn'
-+
-+if Minitest.const_defined?('Test')
-+  # We're on Minitest 5+. Nothing to do here.
-+else
-+  # Minitest 4 doesn't have Minitest::Test yet.
-+  Minitest::Test = MiniTest::Unit::TestCase
-+end
-diff --git a/test/test_popen.rb b/test/test_popen.rb
-index 5970550..8c7f85e 100644
---- a/test/test_popen.rb
-+++ b/test/test_popen.rb
-@@ -1,7 +1,6 @@
--require 'test/unit'
--require 'posix-spawn'
-+require 'test_helper'
- 
--class PopenTest < Test::Unit::TestCase
-+class PopenTest < Minitest::Test
-   include POSIX::Spawn
- 
-   def test_popen4
-diff --git a/test/test_spawn.rb b/test/test_spawn.rb
-index 43a6ea8..4623da5 100644
---- a/test/test_spawn.rb
-+++ b/test/test_spawn.rb
-@@ -1,5 +1,4 @@
--require 'test/unit'
--require 'posix-spawn'
-+require 'test_helper'
- 
- module SpawnImplementationTests
-   def test_spawn_simple
-@@ -23,7 +22,7 @@ module SpawnImplementationTests
-   end
- 
-   def test_spawn_with_invalid_argv
--    assert_raise ArgumentError do
-+    assert_raises ArgumentError do
-       _spawn(['echo','b','c','d'])
-     end
-   end
-@@ -317,7 +316,7 @@ module SpawnImplementationTests
-   def test_spawn_raises_exception_on_unsupported_options
-     exception = nil
- 
--    assert_raise ArgumentError do
-+    assert_raises ArgumentError do
-       begin
-         _spawn('echo howdy', :out => '/dev/null', :oops => 'blaahh')
-       rescue Exception => e
-@@ -344,7 +343,7 @@ module SpawnImplementationTests
-   end
- end
- 
--class SpawnTest < Test::Unit::TestCase
-+class SpawnTest < Minitest::Test
-   include POSIX::Spawn
- 
-   def test_spawn_methods_exposed_at_module_level
-@@ -378,14 +377,14 @@ class SpawnTest < Test::Unit::TestCase
-   end
- end
- 
--class PosixSpawnTest < Test::Unit::TestCase
-+class PosixSpawnTest < Minitest::Test
-   include SpawnImplementationTests
-   def _spawn(*argv)
-     POSIX::Spawn.pspawn(*argv)
-   end
- end
- 
--class ForkSpawnTest < Test::Unit::TestCase
-+class ForkSpawnTest < Minitest::Test
-   include SpawnImplementationTests
-   def _spawn(*argv)
-     POSIX::Spawn.fspawn(*argv)
-@@ -393,7 +392,7 @@ class ForkSpawnTest < Test::Unit::TestCase
- end
- 
- if ::Process::respond_to?(:spawn)
--  class NativeSpawnTest < Test::Unit::TestCase
-+  class NativeSpawnTest < Minitest::Test
-     include SpawnImplementationTests
-     def _spawn(*argv)
-       ::Process.spawn(*argv)
-diff --git a/test/test_system.rb b/test/test_system.rb
-index 7d28474..9bbefaa 100644
---- a/test/test_system.rb
-+++ b/test/test_system.rb
-@@ -1,7 +1,6 @@
--require 'test/unit'
--require 'posix-spawn'
-+require 'test_helper'
- 
--class SystemTest < Test::Unit::TestCase
-+class SystemTest < Minitest::Test
-   include POSIX::Spawn
- 
-   def test_system
--- 
-1.9.3
-
diff --git a/rubygem-posix-spawn-0.3.9-skip-tests.patch b/rubygem-posix-spawn-0.3.9-skip-tests.patch
deleted file mode 100644
index a0b72f3..0000000
--- a/rubygem-posix-spawn-0.3.9-skip-tests.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 53b61ed47190e4d58e6b4a089e42761111b05db0 Mon Sep 17 00:00:00 2001
-From: Ken Dreyer <ktdreyer at ktdreyer.com>
-Date: Fri, 27 Dec 2013 10:42:17 -0700
-Subject: [PATCH 1/2] Fedora only: skip failing tests
-
----
- test/test_spawn.rb | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/test/test_spawn.rb b/test/test_spawn.rb
-index 38bfb3d..43a6ea8 100644
---- a/test/test_spawn.rb
-+++ b/test/test_spawn.rb
-@@ -67,6 +67,7 @@ module SpawnImplementationTests
-   # FD => :close options
- 
-   def test_sanity_of_checking_clone_with_sh
-+    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
-     rd, wr = IO.pipe
-     pid = _spawn("exec 2>/dev/null 9<&#{rd.posix_fileno} || exit 1", rd => rd)
-     assert_process_exit_status pid, 0
-@@ -115,6 +116,7 @@ module SpawnImplementationTests
-   end
- 
-   def test_spawn_close_invalid_fd_raises_exception
-+    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
-     pid = _spawn("echo", "hiya", 250 => :close)
-     assert_process_exit_status pid, 127
-   rescue Errno::EBADF
-@@ -188,6 +190,7 @@ module SpawnImplementationTests
-   # Ruby 1.9 Process::spawn closes all fds by default. To keep an fd open, you
-   # have to pass it explicitly as fd => fd.
-   def test_explicitly_passing_an_fd_as_open
-+    skip 'https://github.com/rtomayko/posix-spawn/issues/43'
-     rd, wr = IO.pipe
-     pid = _spawn("exec 9>&#{wr.posix_fileno} || exit 1", wr => wr)
-     assert_process_exit_ok pid
--- 
-1.9.3
-
diff --git a/rubygem-posix-spawn.spec b/rubygem-posix-spawn.spec
index f97d20f..3a940c5 100644
--- a/rubygem-posix-spawn.spec
+++ b/rubygem-posix-spawn.spec
@@ -1,28 +1,25 @@
 %global gem_name posix-spawn
 
 Name: rubygem-%{gem_name}
-Version: 0.3.9
-Release: 2%{?dist}
+Version: 0.3.11
+Release: 1%{?dist}
 Summary: posix_spawnp(2) for Ruby
 Group: Development/Languages
 License: MIT and LGPLv2+
 URL: https://github.com/rtomayko/posix-spawn
 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
-%if 0%{?fedora} && 0%{?fedora} < 21
+%if 0%{?fc20} || 0%{?el7}
 Requires: ruby(release)
 Requires: ruby(rubygems)
 BuildRequires: ruby(release)
 %endif
 # Skip tests that fail.
 # https://github.com/rtomayko/posix-spawn/issues/43
-Patch0: rubygem-posix-spawn-0.3.9-skip-tests.patch
-# Minitest 5 support
-# https://github.com/rtomayko/posix-spawn/pull/65
-Patch1: rubygem-posix-spawn-0.3.9-minitest.patch
+Patch0: rubygem-posix-spawn-0.3.11-skip-tests.patch
 BuildRequires: rubygems-devel
 BuildRequires: ruby-devel
 BuildRequires: rubygem(minitest)
-%if 0%{?fedora} && 0%{?fedora} < 21
+%if 0%{?fc20} || 0%{?el7}
 Provides: rubygem(%{gem_name}) = %{version}
 %endif
 
@@ -55,15 +52,6 @@ done
 # Skip tests that fail.
 # https://github.com/rtomayko/posix-spawn/issues/43
 %patch0 -p1
-# Minitest 5 support
-%patch1 -p1
-# Patch1 creates a new test/test_helper.rb file, but we have to add this file
-# to the files list using sed, rather than the more exact method of doing this
-# inside Patch1. The reason is that Fedora's packaging generates
-# posix-spawn.gemspec dynamically during each RPM build (see the "gem spec"
-# line above), so the gemspec file from the RPM can look slightly different
-# each time, and a static patch may or may not apply cleanly.
-sed -i posix-spawn.gemspec -e '/s.files/s/]/, "test\/test_helper.rb"]/'
 
 %build
 # Create the gem as gem install only works on a gem file
@@ -128,6 +116,11 @@ popd
 %exclude %{gem_instdir}/test
 
 %changelog
+* Sat Apr 11 2015 Ken Dreyer <ktdreyer at ktdreyer.com> - 0.3.11-1
+- Update to 0.3.11 (RHBZ #1193734)
+- Drop Minitest 5 patch; this is now upstream
+- Drop Fedora 19 support
+
 * Fri Jan 16 2015 Vít Ondruch <vondruch at redhat.com> - 0.3.9-2
 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2
 
diff --git a/sources b/sources
index 77ef32e..2b52cb1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c558518092a9d5628db72d5daecbd692  posix-spawn-0.3.9.gem
+83ec826a6728d39dbb421f5b0b4d1569  posix-spawn-0.3.11.gem
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/rubygem-posix-spawn.git/commit/?h=master&id=2d1f6d04c43a495690b96da3956d7518a89294b4


More information about the scm-commits mailing list