Add patch to build with newer jsch.

This commit is contained in:
Matt Wringe 2008-10-03 21:18:18 +00:00
parent 362acffa4d
commit 5aef45576c
2 changed files with 33 additions and 1 deletions

27
maven-wagon-jsch.patch Normal file
View File

@ -0,0 +1,27 @@
--- ./wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/knownhost/SingleKnownHostProvider.java.sav 2005-10-12 10:16:36.000000000 -0400
+++ ./wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/knownhost/SingleKnownHostProvider.java 2008-10-03 17:10:56.000000000 -0400
@@ -17,6 +17,7 @@
*/
import com.jcraft.jsch.HostKeyRepository;
+import com.jcraft.jsch.HostKey;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.UserInfo;
import org.codehaus.plexus.util.Base64;
@@ -59,6 +60,15 @@
public void addKnownHosts( JSch sch, UserInfo userInfo )
{
HostKeyRepository hkr = sch.getHostKeyRepository();
- hkr.add( host, Base64.decodeBase64( key.getBytes() ), userInfo );
+ //hkr.add( host, Base64.decodeBase64( key.getBytes() ), userInfo );
+ try
+ {
+ HostKey hostkey = new HostKey(host, Base64.decodeBase64(key.getBytes()));
+ hkr.add(hostkey, userInfo);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
}
}

View File

@ -16,7 +16,7 @@
Name: maven-%{bname}
Version: 1.0
Release: 0.1.a5.3.3%{?dist}
Release: 0.1.a5.3.4%{?dist}
Epoch: 0
Summary: Tools to manage artifacts and deployment
License: ASL 2.0
@ -53,6 +53,7 @@ Patch10: wagon-1.0-alpha5-providers-scm-build_xml.patch
Patch11: wagon-1.0-alpha5-providers-ssh-build_xml.patch
Patch12: wagon-1.0-alpha5-providers-ssh-external-build_xml.patch
Patch13: wagon-1.0-alpha5-provider-test-build_xml.patch
Patch14: maven-wagon-jsch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -146,6 +147,7 @@ cp %{SOURCE17} wagon-providers/wagon-ssh-external/build.xml
%patch11 -b .sav
%patch12 -b .sav
%patch13 -b .sav
%patch14 -b .sav
%build
pushd wagon-provider-api
@ -395,6 +397,9 @@ rm -rf $RPM_BUILD_ROOT
#%endif
%changelog
* Fri Oct 03 2008 Matt Wringe <mwringe@redhat.com> - 0:1.0-0.1.a5.3.4
- added patch to make it compatible with the newer version of jsch
* Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0:1.0-0.1.a5.3.3
- drop repotag
- fix license tag