<div dir="ltr"><div>Is there a URL that oultines what this patch does? I agree this is going to be very useful change, but confess - I don't yet understand what this patch is doing .</div><div> </div><div>(Also, thanks indeed Greg for your efforts)</div>
<div> </div><div>~A</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jan 6, 2013 at 2:29 PM, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Applied. Thanks Greg, for the original
contribution and for taking the time to work through the details.<div><div class="h5"><br>
<br>
On 12/31/2012 03:53 PM, Greg Hellings wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<pre>Here is the updated patch adding CURLSFTPAVAILABLE support to CMake as
well as to the library code. It defaults to assuming no SFTP support
if either the curl-config executable cannot be found or if it returns
a value other than "1" from the quick detection process we have
settled on.
Users of Windows builds through either VisualStudio or Borland will
need to figure out if curl-config is available on their systems and,
if not, come up with another way to detect and support SFTP for
clients using those builds. On Linux it is a Bash script, so it might
be adaptable to Manfred's XCode system in some way also.
For those in the JSword world, I am sure there are SFTP Java clients
available which could be leveraged if they wanted to add support for
the same functionality to JSword applications.
--Greg
On Sun, Dec 30, 2012 at 9:11 PM, Troy A. Griffitts <a href="mailto:scribe@crosswire.org" target="_blank"><scribe@crosswire.org></a> wrote:
</pre>
<blockquote type="cite">
<pre>OK Greg,
I've hacked detection of CURL SFTP into the autotools build (hopefully-- it
works for me).
I've added a new compile time define with -DCURLSFTPAVAILABLE to go along
with the existing -DCURLAVAILABLE
If you'd like to update the sftp patch to conditionally compile support in
based on this define, that would be cool. I'll do it myself soon if you
don't have time.
Troy
On 12/28/2012 11:42 AM, Greg Hellings wrote:
</pre>
<blockquote type="cite">
<pre>Further digging with help from our friends has revealed this nugget:
$ curl-config --protocols
produces a newline-delimited list of protocols that the particular
build of libcurl supports. curl-config is a shell script which can be
run on the build system and should satisfy both the requirements of
native builds and cross-compiling support. We could use this to set a
compiler macro indicating support (or not) for SFTP in the target
libcurl library.
If someone wants to tackle that in the autotools world, I can add
detection to CMake as well. A simple command such as
$ curl-config --protocols | grep SFTP | wc -l
1
in Fedora will result in a value of 1 or greater if SFTP is supported
while it should produce 0 if SFTP support is left out. An Ubuntu
system produce this output:
$ curl-config --protocols | grep SFTP | wc -l
0
And it even works for cross-compiling:
$ /usr/i686-w64-mingw32/sys-root/mingw/bin/curl-config --protocols |
grep SFTP | wc -l
1
This appears to be our best way forward if we want to enable
compile-time enabling or disabling of this option.
--Greg
On Mon, Dec 24, 2012 at 8:43 AM, Greg Hellings <a href="mailto:greg.hellings@gmail.com" target="_blank"><greg.hellings@gmail.com></a>
wrote:
</pre>
<blockquote type="cite">
<pre>Troy,
On Sun, Dec 23, 2012 at 10:39 PM, Troy A. Griffitts
<a href="mailto:scribe@crosswire.org" target="_blank"><scribe@crosswire.org></a> wrote:
</pre>
<blockquote type="cite">
<pre>Dear Greg,
Looking to apply this SFTP patch, could you give me some background as
to
why the check to ignore across all transports for '.' and '..'?
</pre>
</blockquote>
<pre>Our downloading method runs recursively from the given directory until
it runs out of directory depth. FTP servers don't usually seem to
return . and .. as valid paths, and the HTTP(S) transport attempts to
parse the returned HTML page to avoid the link to the parent
directory. But whatever options are passed by cURL to the SFTP
transport resulted in it returning . and .. as paths within the
current directory. Because '.' came first in the list, the installmgr
was running through an infinite loop whenever it tried to pull data
from the server.
I added it at the level of all transports because we don't want to
either loop infinitely on '.' or accidentally pull a whole server
recursively by following '..' to the root of the server. It might be a
server config option that permits it, but I wanted to avoid the
possibility of the InlstallMgr class getting choked up on it.
--Greg
</pre>
<blockquote type="cite">
<pre>Thanks,
Troy
On 12/03/2012 04:06 PM, Greg Hellings wrote:
The attached patch will introduce support for SFTPSource transports in
the SWORD engine, allowing a user to access remote repositories over
SFTP (which is enabled by default when a user enables SSH).
--Greg
_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
</blockquote>
</blockquote>
<pre>_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
</blockquote>
<pre>
_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</blockquote>
<br>
</div></div></div>
<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></blockquote></div><br></div>