[DRE-commits] [test-kitchen] 04/39: Add patches
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Fri Aug 5 12:46:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository test-kitchen.
commit 2daecc897c18ee4a0e0ecae5df20f4d3f280fd6b
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Tue Jun 30 00:00:33 2015 +0300
Add patches
---
.../0001-Do-not-run-test-for-winrm-transport.patch | 26 ++++++++
...ove-useless-gem-minitest-from-spec_helper.patch | 21 +++++++
debian/patches/0003-Remove-CI-staff.patch | 36 +++++++++++
.../0004-Fix-monkey-patching-of-IO.read.patch | 35 +++++++++++
...rch-for-support-in-usr-share-test-kitchen.patch | 72 ++++++++++++++++++++++
...-test-failing-under-Gem2Deb-Rake-TestTask.patch | 23 +++++++
debian/patches/series | 7 +++
7 files changed, 220 insertions(+)
diff --git a/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch b/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch
new file mode 100644
index 0000000..7a16387
--- /dev/null
+++ b/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch
@@ -0,0 +1,26 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 29 Jun 2015 20:31:56 +0300
+Subject: Do not run test for winrm transport
+
+---
+ spec/kitchen/transport/winrm_spec.rb | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/spec/kitchen/transport/winrm_spec.rb b/spec/kitchen/transport/winrm_spec.rb
+index 6af55a3..cdbd601 100644
+--- a/spec/kitchen/transport/winrm_spec.rb
++++ b/spec/kitchen/transport/winrm_spec.rb
+@@ -15,7 +15,7 @@
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+-
++=begin
+ require_relative "../../spec_helper"
+
+ require "kitchen/transport/winrm"
+@@ -1147,3 +1147,4 @@ MSG
+ %r{^W, .* : #{Regexp.escape(msg)}}
+ end
+ end
++=end
diff --git a/debian/patches/0002-Remove-useless-gem-minitest-from-spec_helper.patch b/debian/patches/0002-Remove-useless-gem-minitest-from-spec_helper.patch
new file mode 100644
index 0000000..748d1c2
--- /dev/null
+++ b/debian/patches/0002-Remove-useless-gem-minitest-from-spec_helper.patch
@@ -0,0 +1,21 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 29 Jun 2015 20:32:58 +0300
+Subject: Remove useless 'gem "minitest"' from spec_helper
+
+---
+ spec/spec_helper.rb | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 08de316..c92f41d 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -16,8 +16,6 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+-gem "minitest"
+-
+ if ENV["CODECLIMATE_REPO_TOKEN"]
+ require "codeclimate-test-reporter"
+ CodeClimate::TestReporter.start
diff --git a/debian/patches/0003-Remove-CI-staff.patch b/debian/patches/0003-Remove-CI-staff.patch
new file mode 100644
index 0000000..f99a73d
--- /dev/null
+++ b/debian/patches/0003-Remove-CI-staff.patch
@@ -0,0 +1,36 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 29 Jun 2015 20:33:22 +0300
+Subject: Remove CI staff
+
+---
+ spec/spec_helper.rb | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index c92f41d..707680f 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -16,23 +16,6 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+-if ENV["CODECLIMATE_REPO_TOKEN"]
+- require "codeclimate-test-reporter"
+- CodeClimate::TestReporter.start
+-elsif ENV["COVERAGE"]
+- require "simplecov"
+- SimpleCov.profiles.define "gem" do
+- command_name "Specs"
+-
+- add_filter ".gem/"
+- add_filter "/spec/"
+- add_filter "/lib/vendor/"
+-
+- add_group "Libraries", "/lib/"
+- end
+- SimpleCov.start "gem"
+-end
+-
+ require "fakefs/safe"
+ require "minitest/autorun"
+ require "mocha/setup"
diff --git a/debian/patches/0004-Fix-monkey-patching-of-IO.read.patch b/debian/patches/0004-Fix-monkey-patching-of-IO.read.patch
new file mode 100644
index 0000000..06f99e3
--- /dev/null
+++ b/debian/patches/0004-Fix-monkey-patching-of-IO.read.patch
@@ -0,0 +1,35 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 29 Jun 2015 20:39:07 +0300
+Subject: Fix monkey patching of IO.read
+
+---
+ spec/spec_helper.rb | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 707680f..fb61306 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -24,7 +24,21 @@ require "tempfile"
+ # Nasty hack to redefine IO.read in terms of File#read for fakefs
+ class IO
+ def self.read(*args)
+- File.open(args[0], "rb") { |f| f.read(args[1]) }
++ length = args[1]
++ offset = args[2]
++ opt = args[3]
++ if length.kind_of? Hash
++ opt = length
++ length = nil
++ elsif offset.kind_of? Hash
++ opt = offset
++ offset = nil
++ end
++ if opt && opt.has_key?(:mode)
++ File.open(args[0], opt) { |f| f.read(length) }
++ else
++ File.open(args[0], "rb", opt) { |f| f.read(length) }
++ end
+ end
+ end
+
diff --git a/debian/patches/0006-Search-for-support-in-usr-share-test-kitchen.patch b/debian/patches/0006-Search-for-support-in-usr-share-test-kitchen.patch
new file mode 100644
index 0000000..6a38270
--- /dev/null
+++ b/debian/patches/0006-Search-for-support-in-usr-share-test-kitchen.patch
@@ -0,0 +1,72 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 30 Jun 2015 17:37:00 +0300
+Subject: Search for support/ in /usr/share/test-kitchen/
+
+---
+ lib/kitchen/provisioner/base.rb | 2 +-
+ lib/kitchen/provisioner/chef_zero.rb | 4 ++--
+ lib/kitchen/util.rb | 2 +-
+ lib/kitchen/verifier/base.rb | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/kitchen/provisioner/base.rb b/lib/kitchen/provisioner/base.rb
+index 4e16b3d..0c2d447 100644
+--- a/lib/kitchen/provisioner/base.rb
++++ b/lib/kitchen/provisioner/base.rb
+@@ -195,7 +195,7 @@ module Kitchen
+ def shell_code_from_file(vars, file)
+ src_file = File.join(
+ File.dirname(__FILE__),
+- %w[.. .. .. support],
++ %w[.. .. .. .. .. share test-kitchen support],
+ file + (powershell_shell? ? ".ps1" : ".sh")
+ )
+
+diff --git a/lib/kitchen/provisioner/chef_zero.rb b/lib/kitchen/provisioner/chef_zero.rb
+index e2f5c6e..4defece 100644
+--- a/lib/kitchen/provisioner/chef_zero.rb
++++ b/lib/kitchen/provisioner/chef_zero.rb
+@@ -185,7 +185,7 @@ module Kitchen
+ debug("Using a vendored chef-client-zero.rb")
+
+ source = File.join(File.dirname(__FILE__),
+- %w[.. .. .. support chef-client-zero.rb])
++ %w[.. .. .. .. .. share test-kitchen support chef-client-zero.rb])
+ FileUtils.cp(source, File.join(sandbox_path, "chef-client-zero.rb"))
+ end
+
+@@ -211,7 +211,7 @@ module Kitchen
+ debug("Using a dummy validation.pem")
+
+ source = File.join(File.dirname(__FILE__),
+- %w[.. .. .. support dummy-validation.pem])
++ %w[.. .. .. .. .. share test-kitchen support dummy-validation.pem])
+ FileUtils.cp(source, File.join(sandbox_path, "validation.pem"))
+ end
+
+diff --git a/lib/kitchen/util.rb b/lib/kitchen/util.rb
+index 19dada2..1de0204 100644
+--- a/lib/kitchen/util.rb
++++ b/lib/kitchen/util.rb
+@@ -140,7 +140,7 @@ module Kitchen
+ # @return [String] a string representation of useful helper functions
+ def self.shell_helpers
+ IO.read(File.join(
+- File.dirname(__FILE__), %w[.. .. support download_helpers.sh]
++ File.dirname(__FILE__), %w[.. .. .. .. share test-kitchen support download_helpers.sh]
+ ))
+ end
+ end
+diff --git a/lib/kitchen/verifier/base.rb b/lib/kitchen/verifier/base.rb
+index c6ba95d..22561b7 100644
+--- a/lib/kitchen/verifier/base.rb
++++ b/lib/kitchen/verifier/base.rb
+@@ -200,7 +200,7 @@ module Kitchen
+ def shell_code_from_file(vars, file)
+ src_file = File.join(
+ File.dirname(__FILE__),
+- %w[.. .. .. support],
++ %w[.. .. .. .. .. share test-kitchen support],
+ file + (powershell_shell? ? ".ps1" : ".sh")
+ )
+
diff --git a/debian/patches/0007-Disable-test-failing-under-Gem2Deb-Rake-TestTask.patch b/debian/patches/0007-Disable-test-failing-under-Gem2Deb-Rake-TestTask.patch
new file mode 100644
index 0000000..03cc76c
--- /dev/null
+++ b/debian/patches/0007-Disable-test-failing-under-Gem2Deb-Rake-TestTask.patch
@@ -0,0 +1,23 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 30 Jun 2015 20:38:47 +0300
+Subject: Disable test failing under Gem2Deb::Rake::TestTask
+
+ This test will fail if invoked using Gem2Deb::Rake::TestTask, but it
+ will succeed if invoked using Rake::TestTask.
+---
+ spec/kitchen_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/kitchen_spec.rb b/spec/kitchen_spec.rb
+index d21d8d9..5019d49 100644
+--- a/spec/kitchen_spec.rb
++++ b/spec/kitchen_spec.rb
+@@ -68,7 +68,7 @@ describe "Kitchen" do
+ it ".source_root returns the root path of the gem" do
+ Kitchen.source_root.
+ must_equal Pathname.new(File.expand_path("../..", __FILE__))
+- end
++ end if false
+
+ it ".default_logger is a Kitchen::Logger" do
+ Kitchen.default_logger.must_be_instance_of Kitchen::Logger
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8c277e3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+0001-Do-not-run-test-for-winrm-transport.patch
+0002-Remove-useless-gem-minitest-from-spec_helper.patch
+0003-Remove-CI-staff.patch
+0004-Fix-monkey-patching-of-IO.read.patch
+0005-Do-not-change-LOAD_PATH-and-do-not-use-rubygems-in-b.patch
+0006-Search-for-support-in-usr-share-test-kitchen.patch
+0007-Disable-test-failing-under-Gem2Deb-Rake-TestTask.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/test-kitchen.git
More information about the Pkg-ruby-extras-commits
mailing list