<div dir="ltr"><div>Some versions of Ubuntu don't come with SFTP support included in CURL (because of --without-libssh2 being set). If this is the case, instructions to ensure SFTP is available in curl and libcurl can be found here:<br>
<br><a href="https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029">https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029</a><br><br></div>~A <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 28, 2012 at 1:42 PM, Greg Hellings <span dir="ltr"><<a href="mailto:greg.hellings@gmail.com" target="_blank">greg.hellings@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Further digging with help from our friends has revealed this nugget:<br>
<br>
$ curl-config --protocols<br>
<br>
produces a newline-delimited list of protocols that the particular<br>
build of libcurl supports. curl-config is a shell script which can be<br>
run on the build system and should satisfy both the requirements of<br>
native builds and cross-compiling support. We could use this to set a<br>
compiler macro indicating support (or not) for SFTP in the target<br>
libcurl library.<br>
<br>
If someone wants to tackle that in the autotools world, I can add<br>
detection to CMake as well. A simple command such as<br>
$ curl-config --protocols | grep SFTP | wc -l<br>
1<br>
<br>
in Fedora will result in a value of 1 or greater if SFTP is supported<br>
while it should produce 0 if SFTP support is left out. An Ubuntu<br>
system produce this output:<br>
$ curl-config --protocols | grep SFTP | wc -l<br>
0<br>
<br>
And it even works for cross-compiling:<br>
$ /usr/i686-w64-mingw32/sys-root/mingw/bin/curl-config --protocols |<br>
grep SFTP | wc -l<br>
1<br>
<br>
<br>
This appears to be our best way forward if we want to enable<br>
compile-time enabling or disabling of this option.<br>
<span class="HOEnZb"><font color="#888888"><br>
--Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 24, 2012 at 8:43 AM, Greg Hellings <<a href="mailto:greg.hellings@gmail.com">greg.hellings@gmail.com</a>> wrote:<br>
> Troy,<br>
><br>
> On Sun, Dec 23, 2012 at 10:39 PM, Troy A. Griffitts<br>
> <<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>> wrote:<br>
>> Dear Greg,<br>
>><br>
>> Looking to apply this SFTP patch, could you give me some background as to<br>
>> why the check to ignore across all transports for '.' and '..'?<br>
><br>
> Our downloading method runs recursively from the given directory until<br>
> it runs out of directory depth. FTP servers don't usually seem to<br>
> return . and .. as valid paths, and the HTTP(S) transport attempts to<br>
> parse the returned HTML page to avoid the link to the parent<br>
> directory. But whatever options are passed by cURL to the SFTP<br>
> transport resulted in it returning . and .. as paths within the<br>
> current directory. Because '.' came first in the list, the installmgr<br>
> was running through an infinite loop whenever it tried to pull data<br>
> from the server.<br>
><br>
> I added it at the level of all transports because we don't want to<br>
> either loop infinitely on '.' or accidentally pull a whole server<br>
> recursively by following '..' to the root of the server. It might be a<br>
> server config option that permits it, but I wanted to avoid the<br>
> possibility of the InlstallMgr class getting choked up on it.<br>
><br>
> --Greg<br>
><br>
>><br>
>> Thanks,<br>
>><br>
>> Troy<br>
>><br>
>><br>
>><br>
>><br>
>> On 12/03/2012 04:06 PM, Greg Hellings wrote:<br>
>><br>
>> The attached patch will introduce support for SFTPSource transports in<br>
>> the SWORD engine, allowing a user to access remote repositories over<br>
>> SFTP (which is enabled by default when a user enables SSH).<br>
>><br>
>> --Greg<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
>> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
>> Instructions to unsubscribe/change your settings at above page<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
>> <a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
>> Instructions to unsubscribe/change your settings at above page<br>
<br>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</div></div></blockquote></div><br></div>