jer 14/10/15 14:28:25 Modified: lftp-4.6.0-gnutls-2-compat.patch Added: lftp-4.6.0-no-ssl.patch Log: Fix building with USE=-ssl. Replace net-libs/gnutls-2 compatibility patch with upstream patch. Remove patch that no longer applies -9999. (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Revision Changes Path 1.2 net-ftp/lftp/files/lftp-4.6.0-gnutls-2-compat.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-gnutls-2-compat.patch?rev=1.2&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-gnutls-2-compat.patch?rev=1.2&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-gnutls-2-compat.patch?r1=1.1&r2=1.2 Index: lftp-4.6.0-gnutls-2-compat.patch =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-gnutls-2-compat.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- lftp-4.6.0-gnutls-2-compat.patch 14 Oct 2014 08:56:58 -0000 1.1 +++ lftp-4.6.0-gnutls-2-compat.patch 15 Oct 2014 14:28:25 -0000 1.2 @@ -1,15 +1,25 @@ +From 21823aa2b496509a7bc9bed2141d06df35d25b63 Mon Sep 17 00:00:00 2001 +From: "Alexander V. Lukyanov" <[email protected]> +Date: Wed, 15 Oct 2014 08:50:19 +0400 +Subject: [PATCH] lftp_ssl.cc: fixed compilation with gnutls version < 3.0 + +--- + src/lftp_ssl.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc +index 100b90b..8ef8a8d 100644 --- a/src/lftp_ssl.cc +++ b/src/lftp_ssl.cc -@@ -560,7 +560,11 @@ - { - if(res==GNUTLS_E_AGAIN || res==GNUTLS_E_INTERRUPTED) - return RETRY; -- else if(res==GNUTLS_E_UNEXPECTED_PACKET_LENGTH || res==GNUTLS_E_PREMATURE_TERMINATION) -+ else if(res==GNUTLS_E_UNEXPECTED_PACKET_LENGTH -+#if LFTP_LIBGNUTLS_VERSION_CODE >= 0x030000 -+ || res==GNUTLS_E_PREMATURE_TERMINATION -+#endif /* LFTP_LIBGNUTLS_VERSION_CODE */ -+ ) - { - Log::global->Format(7,"gnutls_record_recv: %s Assuming EOF.\n",gnutls_strerror(res)); - return 0; +@@ -547,6 +547,11 @@ int lftp_ssl_gnutls::do_handshake() + + return DONE; + } ++ ++#ifndef GNUTLS_E_PREMATURE_TERMINATION // for gnutls < 3.0 ++# define GNUTLS_E_PREMATURE_TERMINATION GNUTLS_E_UNEXPECTED_PACKET_LENGTH ++#endif ++ + int lftp_ssl_gnutls::read(char *buf,int size) + { + if(error) 1.1 net-ftp/lftp/files/lftp-4.6.0-no-ssl.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-no-ssl.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/lftp/files/lftp-4.6.0-no-ssl.patch?rev=1.1&content-type=text/plain Index: lftp-4.6.0-no-ssl.patch =================================================================== >From db25961b46c591aecaa18e824e57a2af3d379d08 Mon Sep 17 00:00:00 2001 From: "Alexander V. Lukyanov" <[email protected]> Date: Wed, 15 Oct 2014 08:46:09 +0400 Subject: [PATCH] ftpclass.cc: fixed compilation without SSL (again). --- src/ftpclass.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ftpclass.cc b/src/ftpclass.cc index 130704d..bc148bc 100644 --- a/src/ftpclass.cc +++ b/src/ftpclass.cc @@ -1610,12 +1610,12 @@ int Ftp::Do() if(expect->Has(Expect::FEAT) || expect->Has(Expect::OPTS_UTF8) - || expect->Has(Expect::LANG) - || expect->Has(Expect::PROT)) + || expect->Has(Expect::LANG)) goto usual_return; #if USE_SSL - if(expect->Has(Expect::CCC)) + if(expect->Has(Expect::CCC) + || expect->Has(Expect::PROT)) goto usual_return; #endif // USE_SSL
