summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnit 193 <unit193@ubuntu.com>2017-08-07 09:17:08 (GMT)
committerUnit 193 <unit193@ubuntu.com>2017-08-07 09:17:08 (GMT)
commit77407a336ef78b8d8e31af6c183e49dd6be3eae8 (patch)
tree7bc19b8413f2562a99b9a59419b00a5828cd3b39
parent873b5f16fde4d4fe305b3131ded3be89cc62b89a (diff)
d/p/0004-Use-newer-net-ssh.patch: Relax dependency on ruby-net-ssh (Closes: #869179)
-rw-r--r--debian/patches/0004-Use-newer-net-ssh.patch42
-rw-r--r--debian/patches/series1
2 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/0004-Use-newer-net-ssh.patch b/debian/patches/0004-Use-newer-net-ssh.patch
new file mode 100644
index 0000000..924d32e
--- /dev/null
+++ b/debian/patches/0004-Use-newer-net-ssh.patch
@@ -0,0 +1,42 @@
+Description: Allow newer versions of net-ssh, use a commit from upstream to fix tests.
+
+
+diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
+index f827aca280..53801afffd 100644
+--- a/lib/chef/knife/ssh.rb
++++ b/lib/chef/knife/ssh.rb
+@@ -232,7 +232,7 @@ def search_nodes
+ # @param user [String] Optional username for this session.
+ # @return [Hash<Symbol, Object>]
+ def session_options(host, port, user = nil)
+- ssh_config = Net::SSH.configuration_for(host)
++ ssh_config = Net::SSH.configuration_for(host, true)
+ {}.tap do |opts|
+ # Chef::Config[:knife][:ssh_user] is parsed in #configure_user and written to config[:ssh_user]
+ opts[:user] = user || config[:ssh_user] || ssh_config[:user]
+diff --git a/spec/unit/knife/ssh_spec.rb b/spec/unit/knife/ssh_spec.rb
+index 44a133d858..9263a0b8e5 100644
+--- a/spec/unit/knife/ssh_spec.rb
++++ b/spec/unit/knife/ssh_spec.rb
+@@ -190,7 +190,7 @@ def self.should_return_specified_attributes
+ before :each do
+ @knife.instance_variable_set(:@longest, 0)
+ ssh_config = { :timeout => 50, :user => "locutus", :port => 23 }
+- allow(Net::SSH).to receive(:configuration_for).with("the.b.org").and_return(ssh_config)
++ allow(Net::SSH).to receive(:configuration_for).with("the.b.org", true).and_return(ssh_config)
+ end
+
+ it "uses the port from an ssh config file" do
+diff --git a/chef.gemspec b/chef.gemspec
+index 367761f..2d5544a 100644
+--- a/chef.gemspec
++++ b/chef.gemspec
+@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
+ s.add_dependency "ohai", ">= 8.6.0.alpha.1", "< 9"
+
+ s.add_dependency "ffi-yajl", "~> 2.2"
+- s.add_dependency "net-ssh", ">= 2.9", "< 4.0"
++ s.add_dependency "net-ssh", ">= 2.9", "< 5.0"
+ s.add_dependency "net-ssh-multi", "~> 1.1"
+ s.add_dependency "net-sftp", "~> 2.1", ">= 2.1.2"
+ s.add_dependency "highline", "~> 1.6", ">= 1.6.9"
diff --git a/debian/patches/series b/debian/patches/series
index a22557d..7ead295 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
0001-Update-gemspec-file.patch
0002-spec-work-against-source-checkout-and-installed-pack.patch
0003-Accept-rspec-3.4.patch
+0004-Use-newer-net-ssh.patch
svn-proxies