Hello community,

here is the log from the commit of package rubygem-sshkit for openSUSE:Factory 
checked in at 2016-10-10 16:23:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sshkit (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-sshkit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-sshkit"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sshkit/rubygem-sshkit.changes    
2016-08-25 09:55:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sshkit.new/rubygem-sshkit.changes       
2016-10-10 16:23:12.000000000 +0200
@@ -1,0 +2,11 @@
+Sat Sep 17 04:47:58 UTC 2016 - [email protected]
+
+- updated to version 1.11.3
+ see installed CHANGELOG.md
+
+  ## [1.11.3][] (2016-09-16)
+  
+    * Fix known_hosts caching to match on the entire hostlist
+      [PR #364](https://github.com/capistrano/sshkit/pull/364) @byroot
+
+-------------------------------------------------------------------

Old:
----
  sshkit-1.11.2.gem

New:
----
  sshkit-1.11.3.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-sshkit.spec ++++++
--- /var/tmp/diff_new_pack.5pq6Oj/_old  2016-10-10 16:23:16.000000000 +0200
+++ /var/tmp/diff_new_pack.5pq6Oj/_new  2016-10-10 16:23:16.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-sshkit
-Version:        1.11.2
+Version:        1.11.3
 Release:        0
 %define mod_name sshkit
 %define mod_full_name %{mod_name}-%{version}

++++++ sshkit-1.11.2.gem -> sshkit-1.11.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2016-07-30 02:57:10.000000000 +0200
+++ new/CHANGELOG.md    2016-09-16 22:45:29.000000000 +0200
@@ -8,6 +8,11 @@
   * Add your entries below here, remember to credit yourself however you want
     to be credited!
 
+## [1.11.3][] (2016-09-16)
+
+  * Fix known_hosts caching to match on the entire hostlist
+    [PR #364](https://github.com/capistrano/sshkit/pull/364) @byroot
+
 ## [1.11.2][] (2016-07-29)
 
 ### Bug fixes
@@ -644,7 +649,8 @@
 
 First release.
 
-[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.11.2...HEAD
+[Unreleased]: https://github.com/capistrano/sshkit/compare/v1.11.3...HEAD
+[1.11.3]: https://github.com/capistrano/sshkit/compare/v1.11.2...v1.11.3
 [1.11.2]: https://github.com/capistrano/sshkit/compare/v1.11.1...v1.11.2
 [1.11.1]: https://github.com/capistrano/sshkit/compare/v1.11.0...v1.11.1
 [1.11.0]: https://github.com/capistrano/sshkit/compare/v1.10.0...v1.11.0
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sshkit/backends/netssh/known_hosts.rb 
new/lib/sshkit/backends/netssh/known_hosts.rb
--- old/lib/sshkit/backends/netssh/known_hosts.rb       2016-07-30 
02:57:10.000000000 +0200
+++ new/lib/sshkit/backends/netssh/known_hosts.rb       2016-09-16 
22:45:29.000000000 +0200
@@ -18,10 +18,12 @@
           parse_file unless keys && hashes
           keys, hashes = hosts_keys, hosts_hashes
 
-          hostlist.split(',').each do |host|
-            key_list = keys[host]
-            return key_list if key_list
+          host_names = hostlist.split(',')
 
+          keys_found = host_names.map { |h| keys[h] || [] }.compact.inject(:&)
+          return keys_found unless keys_found.empty?
+
+          host_names.each do |host|
             hashes.each do |(hmac, salt), hash_keys|
               if OpenSSL::HMAC.digest(sha1, salt, host) == hmac
                 return hash_keys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/sshkit/version.rb new/lib/sshkit/version.rb
--- old/lib/sshkit/version.rb   2016-07-30 02:57:10.000000000 +0200
+++ new/lib/sshkit/version.rb   2016-09-16 22:45:29.000000000 +0200
@@ -1,3 +1,3 @@
 module SSHKit
-  VERSION = "1.11.2".freeze
+  VERSION = "1.11.3".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-07-30 02:57:10.000000000 +0200
+++ new/metadata        2016-09-16 22:45:29.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: sshkit
 version: !ruby/object:Gem::Version
-  version: 1.11.2
+  version: 1.11.3
 platform: ruby
 authors:
 - Lee Hambley
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-07-30 00:00:00.000000000 Z
+date: 2016-09-16 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: net-ssh
@@ -178,6 +178,7 @@
 - test/helper.rb
 - test/known_hosts/github
 - test/known_hosts/github_hash
+- test/known_hosts/github_ip
 - test/support/vagrant_wrapper.rb
 - test/unit/backends/test_abstract.rb
 - test/unit/backends/test_connection_pool.rb
@@ -230,6 +231,7 @@
 - test/helper.rb
 - test/known_hosts/github
 - test/known_hosts/github_hash
+- test/known_hosts/github_ip
 - test/support/vagrant_wrapper.rb
 - test/unit/backends/test_abstract.rb
 - test/unit/backends/test_connection_pool.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/known_hosts/github_ip 
new/test/known_hosts/github_ip
--- old/test/known_hosts/github_ip      1970-01-01 01:00:00.000000000 +0100
+++ new/test/known_hosts/github_ip      2016-09-16 22:45:29.000000000 +0200
@@ -0,0 +1 @@
+github.com,192.30.252.123 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/unit/backends/test_netssh.rb 
new/test/unit/backends/test_netssh.rb
--- old/test/unit/backends/test_netssh.rb       2016-07-30 02:57:10.000000000 
+0200
+++ new/test/unit/backends/test_netssh.rb       2016-09-16 22:45:29.000000000 
+0200
@@ -56,23 +56,28 @@
 
       if Net::SSH::Version::CURRENT >= Net::SSH::Version[3, 1, 0]
         def test_known_hosts_for_when_all_hosts_are_recognized
-          perform_known_hosts_test("github")
+          perform_known_hosts_test('github', 'github.com')
         end
 
         def test_known_hosts_for_when_an_host_hash_is_recognized
-          perform_known_hosts_test("github_hash")
+          perform_known_hosts_test('github_hash', 'github.com')
+        end
+
+        def test_known_hosts_for_with_multiple_hosts
+          perform_known_hosts_test('github', '192.30.252.123,github.com', 0)
+          perform_known_hosts_test('github_ip', '192.30.252.123,github.com', 1)
         end
       end
 
       private
 
-      def perform_known_hosts_test(hostfile)
+      def perform_known_hosts_test(hostfile, hostlist, keys_count = 1)
         source = File.join(File.dirname(__FILE__), '../../known_hosts', 
hostfile)
         kh = Netssh::KnownHosts.new
-        keys = kh.search_for('github.com', user_known_hosts_file: source, 
global_known_hosts_file: Tempfile.new('sshkit-test').path)
+        keys = kh.search_for(hostlist, user_known_hosts_file: source, 
global_known_hosts_file: Tempfile.new('sshkit-test').path)
 
         assert_instance_of ::Net::SSH::HostKeys, keys
-        assert_equal(1, keys.count)
+        assert_equal(keys_count, keys.count)
         keys.each do |key|
           assert_equal("ssh-rsa", key.ssh_type)
         end


Reply via email to