<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Applied.&nbsp; Thanks Greg, for the original
      contribution and for taking the time to work through the details.<br>
      <br>
      On 12/31/2012 03:53 PM, Greg Hellings wrote:<br>
    </div>
    <blockquote
cite="mid:CAHxvOVJOa34G0ta4Q0Z_6Ne37fjj_7C+eRWeaskLtFW2c5Uvpw@mail.gmail.com"
      type="cite">
      <pre wrap="">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 class="moz-txt-link-rfc2396E" href="mailto:scribe@crosswire.org">&lt;scribe@crosswire.org&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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 wrap="">
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 class="moz-txt-link-rfc2396E" href="mailto:greg.hellings@gmail.com">&lt;greg.hellings@gmail.com&gt;</a>
wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">
Troy,

On Sun, Dec 23, 2012 at 10:39 PM, Troy A. Griffitts
<a class="moz-txt-link-rfc2396E" href="mailto:scribe@crosswire.org">&lt;scribe@crosswire.org&gt;</a> wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="">
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 wrap="">
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 wrap="">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 class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page



_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
            </blockquote>
          </blockquote>
          <pre wrap="">
_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
        </blockquote>
        <pre wrap="">


_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/sword-devel">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>