From 6800f8ba32129fe6d6b83958b919bc3aa5d69cb4 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Mon, 7 Apr 2008 17:34:57 +0000 Subject: [PATCH] Fix bz# 441071: Add backward compatibility patch from mwringe at redhat --- jsch-0.1.31-backwards-compat.patch | 36 ++++++++++++++++++++++++++++++ jsch.spec | 9 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 jsch-0.1.31-backwards-compat.patch diff --git a/jsch-0.1.31-backwards-compat.patch b/jsch-0.1.31-backwards-compat.patch new file mode 100644 index 0000000..d9f2a10 --- /dev/null +++ b/jsch-0.1.31-backwards-compat.patch @@ -0,0 +1,36 @@ +diff -ru src/com/jcraft/jsch/HostKeyRepository.java.orig src/com/jcraft/jsch/HostKeyRepository.java +--- src/com/jcraft/jsch/HostKeyRepository.java.orig 2006-10-15 13:14:46.000000000 -0400 ++++ src/com/jcraft/jsch/HostKeyRepository.java 2008-04-04 16:44:31.000000000 -0400 +@@ -36,6 +36,7 @@ + + int check(String host, byte[] key); + void add(HostKey hostkey, UserInfo ui); ++ void add(String host, byte[] key, UserInfo ui); + void remove(String host, String type); + void remove(String host, String type, byte[] key); + String getKnownHostsRepositoryID(); +diff -ru src/com/jcraft/jsch/KnownHosts.java.orig src/com/jcraft/jsch/KnownHosts.java +--- src/com/jcraft/jsch/KnownHosts.java.orig 2006-10-15 14:02:31.000000000 -0400 ++++ src/com/jcraft/jsch/KnownHosts.java 2008-04-04 16:46:41.000000000 -0400 +@@ -205,6 +205,20 @@ + //System.err.println("fail!!"); + return result; + } ++ ++ public void add(String host, byte[] key, UserInfo userinfo) ++ { ++ try ++ { ++ HostKey hostkey = new HostKey(host,key); ++ add(hostkey, userinfo); ++ } ++ catch (Exception e) ++ { ++ // this should't get called ++ } ++ } ++ + public void add(HostKey hostkey, UserInfo userinfo){ + int type=hostkey.type; + String host=hostkey.getHost(); + diff --git a/jsch.spec b/jsch.spec index b0a234d..0ff0f92 100644 --- a/jsch.spec +++ b/jsch.spec @@ -36,7 +36,7 @@ Name: jsch Version: 0.1.31 -Release: 2jpp.2%{?dist} +Release: 2jpp.3%{?dist} Epoch: 0 Summary: Pure Java implementation of SSH2 Group: Development/Libraries/Java @@ -48,6 +48,8 @@ Source0: http://download.sourceforge.net/sourceforge/jsch/jsch-%{version} # mv META-INF/MANIFEST.MF # rmdir META-INF Source1: MANIFEST.MF +Patch0: %{name}-%{version}-backwards-compat.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: jpackage-utils >= 0:1.5 @@ -93,6 +95,8 @@ Requires(postun): /bin/rm %prep %setup -q +%patch0 + %build export CLASSPATH=$(build-classpath jzlib) ant dist javadoc @@ -178,6 +182,9 @@ fi %changelog +* Mon Apr 07 2008 Deepak Bhole - 0:0.1.31-2jpp.3 +- Fix bz# 441071: Add backward compatibility patch from mwringe at redhat + * Mon Feb 18 2008 Fedora Release Engineering - 0:0.1.31-2jpp.2 - Autorebuild for GCC 4.3