Re: [lftp] LFTP 4.4.15 Installation problem

2014-03-06 Thread Lars Viklund
On Thu, Feb 27, 2014 at 01:22:59PM -0500, Edwin Leung - SENES Consultants wrote:
 Hi,
 Our system is running SUSE Linux Enterprise Server 11.1 SP2 with lftp
 version 3.6 installed.
 
 I was trying to install latest version lftp-4.4.15 and it shows the
 following error at the end.
 
 checking for LIBGNUTLS... no
 configure: error: Package requirements (gnutls = 1.0.0) were not met:
 
 I checked and LIBGNUTLS libraries are already installed.

It's common in Linux distributions to have different packages for
runtime libraries needed to use a library and for the things you need
for develop against a library like headers, pkg-config .pc files, etc.

In the RPM world, it's commonly split into 'foobar' and 'foobar-devel'.

Check your package repositories for -devel packages if you intend to
use a library at build time.

Some distributions have ways to get all the build-dependencies for a
particular package which might get you somewhat on the way, but I'd
recommend that you verify that you've actually got -devel packages for
the things you think you do.

-- 
Lars Viklund | z...@acc.umu.se
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] WebDAV delete

2014-12-02 Thread Lars Viklund
On Wed, Dec 03, 2014 at 04:30:53PM +1000, Paul Rankin wrote:
 When attempting to delete a file on a WebDAV connection to a server I
 get:
 
 Operation not supported: 400 Bad Request (DELETE)
 
 The delete operation works if I use FTP instead.
 
 Is this a limitation of the current WebDAV implementation, or something
 going wrong with the server?

What lftp version is this?
What kind of WebDAV backend are you using, and are you authorized to
perform this action?

On my site we use Jetty and Milton, and lftp 4.3.3 can DELETE fine.

lftp example.com:/ops/zao rm foo.s
 dns cache hit
 Connecting to example.com (10.0.0.1) port 443
 Sending request...
--- DELETE /ops/zao/foo.s HTTP/1.1
--- Host: example.com
--- User-Agent: lftp/4.3.3
--- Accept: */*
--- Depth: 0
--- Connection: keep-alive
---
***snip certificates***
--- HTTP/1.1 204 No Content
--- Server: milton.io-2.0.0
--- Date: Wed, 03 Dec 2014 07:43:17 GMT
--- Accept-Ranges: bytes
--- ETag: A73292177EA5491A981A6C6C6E7AA862_253383220
---
 Receiving body...
rm ok, `foo.s' removed
lftp example.com:/ops/zao

-- 
Lars Viklund | z...@acc.umu.se
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] WebDAV delete

2014-12-03 Thread Lars Viklund
On Wed, Dec 03, 2014 at 06:41:40PM +1000, Paul Rankin wrote:
 How do you get this level of verbosity within interactive mode? Maybe
 that could help me troubleshoot.

lftp has a 'debug' command taking a numeric parameter indicating how
spammy it should be. The results listed was from 'debug 10'.

You may want to tcpdump/wireshark the traffic and see the actual
request, see if it looks truly malformed, or if it's just the server
being picky?

-- 
Lars Viklund | z...@acc.umu.se
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Spam]Update on BusyBox

2015-02-25 Thread Lars Viklund
On Mon, Feb 23, 2015 at 12:02:04AM +, Ray wrote:
 I have LFTP Installed on my Thecus NAS which I got from:
 
 http://forum.thecus.com/viewtopic.php?f=36t=5846
 
 Based on the following I believe there is a bug where the process does not 
 finish:
 ‘lftp 4.4.7 has a bug that causes an endless loop when using the mirror 
 command with sftp. Make sure your version of lftp is higher than 4.4.7.’
 
 https://whatbox.ca/wiki/lftp
 
 I would like to upgrade to your latest version but can’t find a way to do 
 it on the Thecus NAS stripped down Linux Version.
 The uname command gives:
 
 Linux 3.10.47 and BusyBox v1.16.1

BusyBox is just the monolithic binary providing most of userspace tools
like ls, cp, mv, etc. It has nothing to do with the toolchain or platform.

Taking a quick glance at the website for your vendor, it seems possible
to download a cross compilation toolchain for your platform.

Find a machine that's ancient enough to run the cross-compiler, and
compile the libraries that lftp depends on, and then compile lftp.

From my experience, it's possible to get a rather self-contained static
linked lftp binary without too much pain.

As for packaging software for easy installation, you could probably look
at the example modules found on the vendor website.

 I don’t seem to have a package manager is it possible to just replace some 
 binary files, and if not can you help make a ‘.mod’ file for installation, 
 not sure how?
 ___
 lftp mailing list
 lftp@uniyar.ac.ru
 http://univ.uniyar.ac.ru/mailman/listinfo/lftp

-- 
Lars Viklund | z...@acc.umu.se
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp-4.7.6 compilation error - lftp_ssl.cc:1069:17: error: aggregate 'X509_OBJECT obj' has incomplete type and cannot be defined

2017-02-16 Thread Lars Viklund

Hi,

Among other things, OpenSSL 1.1 apparently turns all previously 
inspectable structs opaque.
They now require you to hold them by pointer, use accessor functions to 
access their fields, and use the new/free functions to make/destroy them.


A quick Bing search revealed this wiki page: 
https://wiki.openssl.org/index.php/1.1_API_Changes


On 02/16/2017 10:52 AM, Justin Piszcz wrote:

Hello,

lftp-4.7.6 on Debian x86-64-


make[2]: Entering directory '/home/user/lftp-4.7.6/src'
/bin/bash ../libtool --silent  --tag=CXX   --mode=link g++  -O2 -Wall
-Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti
-fno-implement-inlines -avoid-version -rpath
/app/lftp-4.7.6-x86_64/lib/lftp/4.7.6 -s -o liblftp-pty.la  PtyShell.lo
lftp_pty.lo SSH_Access.lo  -lutil -ltinfo -ldl
ar: `u' modifier ignored since `D' is the default (see `U')
/bin/bash ../libtool --silent  --tag=CXX   --mode=compile g++
-DHAVE_CONFIG_H -I. -I../lib  -I../lib -I../trio  -I/usr/include-O2
-Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti
-fno-implement-inlines -MT liblftp_network_la-lftp_ssl.lo -MD -MP -MF
.deps/liblftp_network_la-lftp_ssl.Tpo -c -o liblftp_network_la-lftp_ssl.lo
`test -f 'lftp_ssl.cc' || echo './'`lftp_ssl.cc
lftp_ssl.cc: In static member function 'static int
lftp_ssl_openssl::verify_crl(X509_STORE_CTX*)':
lftp_ssl.cc:1069:17: error: aggregate 'X509_OBJECT obj' has incomplete type
and cannot be defined
  X509_OBJECT obj;
  ^~~
lftp_ssl.cc:1075:20: error: aggregate 'X509_STORE_CTX store_ctx' has
incomplete type and cannot be defined
  X509_STORE_CTX store_ctx;
 ^
lftp_ssl.cc:1141:43: error: 'X509_OBJECT_free_contents' was not declared in
this scope
  X509_OBJECT_free_contents();
^
lftp_ssl.cc:1148:35: warning: 'ASN1_TIME*
X509_CRL_get_nextUpdate(X509_CRL*)' is deprecated
[-Wdeprecated-declarations]
  i = X509_cmp_current_time(X509_CRL_get_nextUpdate(crl));
^~~
In file included from /usr/include/openssl/x509_vfy.h:20:0,
  from /usr/include/openssl/x509.h:309,
  from /usr/include/openssl/ssl.h:50,
  from lftp_ssl.h:27,
  from lftp_ssl.cc:30:
/usr/include/openssl/x509.h:709:1: note: declared here
  DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl))
  ^
lftp_ssl.cc:1148:62: warning: 'ASN1_TIME*
X509_CRL_get_nextUpdate(X509_CRL*)' is deprecated
[-Wdeprecated-declarations]
  i = X509_cmp_current_time(X509_CRL_get_nextUpdate(crl));
   ^
In file included from /usr/include/openssl/x509_vfy.h:20:0,
  from /usr/include/openssl/x509.h:309,
  from /usr/include/openssl/ssl.h:50,
  from lftp_ssl.h:27,
  from lftp_ssl.cc:30:
/usr/include/openssl/x509.h:709:1: note: declared here
  DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl))
  ^
lftp_ssl.cc:1152:43: error: 'X509_OBJECT_free_contents' was not declared in
this scope
  X509_OBJECT_free_contents();
^
lftp_ssl.cc:1158:43: error: 'X509_OBJECT_free_contents' was not declared in
this scope
  X509_OBJECT_free_contents();
^
lftp_ssl.cc:1161:39: error: 'X509_OBJECT_free_contents' was not declared in
this scope
  X509_OBJECT_free_contents();
^
lftp_ssl.cc:1180:41: error: invalid use of incomplete type 'X509_REVOKED
{aka struct x509_revoked_st}'
  if (ASN1_INTEGER_cmp(revoked->serialNumber,
X509_get_serialNumber(xs)) == 0) {
  ^~
In file included from /usr/include/openssl/crypto.h:31:0,
  from /usr/include/openssl/comp.h:16,
  from /usr/include/openssl/ssl.h:47,
  from lftp_ssl.h:27,
  from lftp_ssl.cc:30:
/usr/include/openssl/ossl_typ.h:123:16: note: forward declaration of
'X509_REVOKED {aka struct x509_revoked_st}'
  typedef struct x509_revoked_st X509_REVOKED;
 ^~~
lftp_ssl.cc:1181:50: error: invalid use of incomplete type 'X509_REVOKED
{aka struct x509_revoked_st}'
  serial = ASN1_INTEGER_get(revoked->serialNumber);
   ^~
In file included from /usr/include/openssl/crypto.h:31:0,
  from /usr/include/openssl/comp.h:16,
  from /usr/include/openssl/ssl.h:47,
  from lftp_ssl.h:27,
  from lftp_ssl.cc:30:
/usr/include/openssl/ossl_typ.h:123:16: note: forward declaration of
'X509_REVOKED {aka struct x509_revoked_st}'
  typedef struct x509_revoked_st X509_REVOKED;
 ^~~
lftp_ssl.cc:1189:47: error: 

[lftp-devel] [feature] HTTP/1.1 100-continue for PUT

2012-11-26 Thread Lars Viklund
Hello.

HTTP/1.1 has a rarely implemented but very useful feature that lets the
server interject with a redirect or acknowledgement before any data is
sent in a PUT, something that I would quite like to see implemented in
lftp.

This feature is described in RFC 2616 section 8.2.3.

The rough outline of how it works is that the client sends an Expect:
100-continue header to indicate that it's letting the server respond to
the headers, and delays sending the payload until the server responds
with a 100 Continue or some other header like 307 Temporary Redirect
to indicate a more suitable location.

If the server doesn't respond to the expectation within a short
timespan, the client may send the data anyway, thus assuming that the
server doesn't understand the expectation.

The reason I'd like to see the inclusion of this feature in lftp is
because we have a storage system which offers a WebDAV entrypoint which
redirects capable clients to dedicated download/upload servers instead
of routing all traffic through the control node.

To make things more fun, in this system this involves a downgrade from
HTTPS to HTTP as well.

I would be perfectly happy if this was hidden behind a setting to avoid
it from breaking existing use cases.

I took a look at how to implement this but got very lost in the
implementation of the Http state machine. If I force-add a Expect:
100-continue header, I end up with this and no further progress.

put: File moved: 307 Temporary Redirect (100M -
http://localhost.localdomain:21656/public/100M?dcache-http-uuid=4c8250e9-62c0-47e0-baaf-71249db526ab)

-- 
Lars Viklund | z...@acc.umu.se
___
lftp-devel mailing list
lftp-devel@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel


Re: [lftp-devel] lftp-pre4.5.0-20131206

2013-12-06 Thread Lars Viklund
On Fri, Dec 06, 2013 at 04:19:22PM +0400, Alexander V. Lukyanov wrote:
 A new development snapshot is available from
   http://lftp.yar.ru/ftp/devel/lftp-pre4.5.0-20131206.tar.gz
 
 * optimized cpu usage.
 * fixed file info fetching from http server.
 
 Please test.

I grabbed this version to see if it reintroduced a problem I had with
one of my servers (server does not support HEAD when redirected), but
ran into a more severe problem.

Whenever I've connected to a https server, lftp segfaults at shutdown,
built with: Readline 6.2, GnuTLS 2.12.23, zlib 1.2.8

It is not reproducible with 4.4.13 built with the same set of libraries.

Stack trace:
8
lftp :~ open https://www.acc.umu.se/
cd ok, cwd=/
lftp www.acc.umu.se:/ exit

Program received signal SIGSEGV, Segmentation fault.
0x0047f447 in Log::WillOutput (this=0x0, l=13) at log.cc:47
47 if(!enabled || llevel || output==-1)
(gdb) bt
#0  0x0047f447 in Log::WillOutput (this=0x0, l=13) at log.cc:47
#1  0x0047f7d9 in Log::Format (this=0x0, l=13, f=0x512054
GNUTLS: %s) at log.cc:108
#2  0x004e56f3 in lftp_ssl_gnutls_log_func (level=4,
msg=0x775fd0 REC[0xb73e10]: Epoch #1 freed\n)
at lftp_ssl.cc:222
#3  0x77923d7f in _gnutls_log () from
/usr/lib/x86_64-linux-gnu/libgnutls.so.26
#4  0x7793387e in ?? () from
/usr/lib/x86_64-linux-gnu/libgnutls.so.26
#5  0x7793b8e4 in gnutls_deinit () from
/usr/lib/x86_64-linux-gnu/libgnutls.so.26
#6  0x004e5ba5 in lftp_ssl_gnutls::~lftp_ssl_gnutls
(this=0x7a3760, __in_chrg=optimized out)
at lftp_ssl.cc:324
#7  0x004b6d23 in Reflftp_ssl_gnutls::~Ref (this=0x76dff0,
__in_chrg=optimized out) at Ref.h:34
#8  0x004bd2de in Http::Connection::~Connection (this=0x76dfd0,
__in_chrg=optimized out) at Http.cc:125
#9  0x004c7875 in RefHttp::Connection::operator=
(this=0x78ff08, p=0x0) at Ref.h:35
#10 0x004bd956 in Http::Disconnect (this=0x78fb20) at
Http.cc:219
#11 0x004bd71f in Http::~Http (this=0x78fb20,
__in_chrg=optimized out) at Http.cc:198
#12 0x004c6c63 in Https::~Https (this=0x78fb20,
__in_chrg=optimized out) at Http.cc:2365
#13 0x004c6c98 in Https::~Https (this=0x78fb20,
__in_chrg=optimized out) at Http.cc:2367
#14 0x0046316b in SMTask::CollectGarbage () at SMTask.cc:187
#15 0x0046350d in SMTask::Cleanup () at SMTask.cc:273
#16 0x0040836e in main (argc=1, argv=0x7fffe4f8) at
lftp.cc:597
8

-- 
Lars Viklund | z...@acc.umu.se
___
lftp-devel mailing list
lftp-devel@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel


Re: [lftp-devel] Compile error: RedHat 9 LFTP 4.6.0

2014-12-29 Thread Lars Viklund
On Fri, Dec 19, 2014 at 07:32:24PM -0600, Andrew Reis wrote:
 Has anyone received this?

Everyone subscribed to the list has, as well as this followup.

 From: lftp-devel [mailto:lftp-devel-boun...@uniyar.ac.ru] On Behalf Of
 Andrew Reis
 Sent: Saturday, December 6, 2014 21:56
 To: lftp-devel@uniyar.ac.ru
 Subject: [lftp-devel] Compile error: RedHat 9 LFTP 4.6.0
 Importance: High

Cute header.

 make[1]: Entering directory `/root/lftp-4.6.0/src'

[snip truncated output]

 make[1]: *** [Torrent.lo] Error 1

There are no errors mentioned in the output above and there is no
-Werror parameter to the compiler, so you're likely missing some
relevant output.

 gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

You may want to consider finding/building a compiler that's not eleven
years old, particularly as you're trying to build C++ source code.

It's possible to build and link lftp statically against most libraries
it depends on, including the C and C++ runtime. This is handy if you
don't want to pollute a production system with newfangled compilers and
libraries.

-- 
Lars Viklund | z...@acc.umu.se
___
lftp-devel mailing list
lftp-devel@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel


Re: [lftp-devel] Compile error: RedHat 9 LFTP 4.6.0

2014-12-29 Thread Lars Viklund
On Sat, Dec 06, 2014 at 09:56:02PM -0600, Andrew Reis wrote:
 make[1]: Entering directory `/root/lftp-4.6.0/src'

[snip]

 In file included from Torrent.cc:34:
 
 Torrent.h: In member function `void TorrentPiece::set_downloader(unsigned
 int,
 
const TorrentPeer*, const TorrentPeer*, unsigned int)':
 
 Torrent.h:116: variable-sized object of type `const TorrentPeer*[blk_count]'
 
may not be initialized

This is apparently an error, I chalk the lack of 'error:' qualifier up
to this being a horribly ancient compiler.

It appears that the compiler does not implement C++03
value-initialization of newed arrays, which the lftp source code does
with the trailing empty parentheses on line 116. They should mean that
the elements of the array are value-initialized, which for pointer types
is initializing to a null pointer.

The solution is simple, explicitly clear the storage. As for whether
upstream wants to have such filthy hacks in their codebase, that's up to
them. The patch below should get your build to finish, it did on my
newly set up RH9 virtual machine.

[zao@localhost zao]$ diff -u {orig,reis}/lftp-4.6.0/src/Torrent.h
--- orig/lftp-4.6.0/src/Torrent.h   2014-09-26 10:07:36.0 +0200
+++ reis/lftp-4.6.0/src/Torrent.h   2014-12-30 04:16:37.0 +0100
@@ -113,7 +113,8 @@
   if(!downloader) {
 if(o || !n)
return;
-downloader=new const TorrentPeer*[blk_count]();
+downloader=new const TorrentPeer*[blk_count];
+memset(downloader.get_non_const(),0,blk_count*sizeof(const 
TorrentPeer*));
   }
   const TorrentPeer* d=downloader[block];
   if(d==o) {
[zao@localhost zao]$

 ___
 lftp-devel mailing list
 lftp-devel@uniyar.ac.ru
 http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel


-- 
Lars Viklund | z...@acc.umu.se
___
lftp-devel mailing list
lftp-devel@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel


Re: [lftp-devel] direct download url from official site

2016-11-29 Thread Lars Viklund

Hi,
For me, both curl 7.47.1 and wget 1.18 retrieve the indicated link, curl 
needs -L to follow the redirects.

Using a browser sends user to download page.

On 29/11/2016 18:33, Arkadiusz Miśkiewicz wrote:

Hi.

I see download got hidden behing some kind of paywall. Unfortunately that
break tools like wget/lftp (html page is fetched instead of tarball) that are
used in our automated fetching system.

Example url:

http://lftp.yar.ru/ftp/lftp-4.7.4.tar.xz

Is there direct url from official site that could be used in automated
fetching environments ? Or maybe wget/lftp clients could be whitelisted at
least.

Thanks,


___
lftp-devel mailing list
lftp-devel@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp-devel