summaryrefslogtreecommitdiff
path: root/freefilesync/ffs_sftp.patch
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-09-17 15:43:20 -0400
committerB Stack <bgstack15@gmail.com>2019-09-17 15:43:20 -0400
commitf168b7324e7312ed78fe0a4c349390185ff10a2d (patch)
tree99a785795391b813b44bc523a0c79d5d3a055db2 /freefilesync/ffs_sftp.patch
parentfreefilesync 10.16-1 dpkg rc1 (diff)
downloadstackrpms-f168b7324e7312ed78fe0a4c349390185ff10a2d.tar.gz
stackrpms-f168b7324e7312ed78fe0a4c349390185ff10a2d.tar.bz2
stackrpms-f168b7324e7312ed78fe0a4c349390185ff10a2d.zip
freefilesync 10.16-1 rpm rc1 el and fc
Diffstat (limited to 'freefilesync/ffs_sftp.patch')
-rw-r--r--freefilesync/ffs_sftp.patch67
1 files changed, 66 insertions, 1 deletions
diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch
index c526a22..afc8f07 100644
--- a/freefilesync/ffs_sftp.patch
+++ b/freefilesync/ffs_sftp.patch
@@ -1,5 +1,70 @@
-The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile.
+Source: <none>
+Author: B Stack
+Message: In FreeFileSync 10.16, upstream uses a higher version of libcurl than what is available for most distros. This change will probably break ftp usage and any such breakage should be reported to this patch author so that he can actually go package the latest version of libcurl for the affected distro instead of being lazy and basically breaking stuff just to compile.
+Date: 2019-09-17T13:46:28Z
+
+Source: <none>
+Author: B Stack
+Message: The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile.
+Date: 2019-02-11T12:15:59Z
https://github.com/libssh2/libssh2/issues/90
+diff -x '*.swp' -x '.git*' -Naur 10.16-0/FreeFileSync/Source/afs/ftp.cpp 10.16-1/FreeFileSync/Source/afs/ftp.cpp
+--- 10.16-0/FreeFileSync/Source/afs/ftp.cpp 2019-09-17 07:56:37.351051558 -0400
++++ 10.16-1/FreeFileSync/Source/afs/ftp.cpp 2019-09-17 09:07:42.581456870 -0400
+@@ -543,7 +543,7 @@
+ ZEN_ON_SCOPE_EXIT(::curl_slist_free_all(quote));
+ quote = ::curl_slist_append(quote, ftpCmd.c_str());
+
+- return perform(AfsPath(), true /*isDir*/, CURLFTPMETHOD_FULLPATH, //really avoid needless CWDs unlike buggy(!) CURLFTPMETHOD_NOCWD
++ return perform(AfsPath(), true /*isDir*/, CURLFTPMETHOD_LAST, //really avoid needless CWDs unlike buggy(!) CURLFTPMETHOD_NOCWD
+ {
+ { CURLOPT_NOBODY, 1L },
+ { CURLOPT_QUOTE, quote },
+@@ -665,7 +665,7 @@
+ }
+
+ /* 1. FFS CURLFTPMETHOD_NOCWD is buggy (see comment FtpSession::perform()) => must use absolute, not home-relative paths!
+- 2. Support CURLFTPMETHOD_FULLPATH => must use absolute, not home-relative paths!
++ 2. Support CURLFTPMETHOD_LAST => must use absolute, not home-relative paths!
+ 3. Some FTP servers distinguish between user-home- and root-relative paths! e.g. FreeNAS: https://freefilesync.org/forum/viewtopic.php?t=6129
+ => use root-relative paths (= same as expected by CURLOPT_QUOTE) https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an
+ => use // because /%2f had bugs (but they should be fixed: https://github.com/curl/curl/pull/4348)
+@@ -1021,7 +1021,7 @@
+ }();
+
+ if (!pathHasWildcards)
+- pathMethod = CURLFTPMETHOD_FULLPATH; //16% faster traversal compared to CURLFTPMETHOD_SINGLECWD (35% faster than CURLFTPMETHOD_MULTICWD)
++ pathMethod = CURLFTPMETHOD_LAST; //16% faster traversal compared to CURLFTPMETHOD_SINGLECWD (35% faster than CURLFTPMETHOD_MULTICWD)
+ }
+ //else: use "LIST" + CURLFTPMETHOD_SINGLECWD
+ //caveat: let's better not use LIST parameters: https://cr.yp.to/ftp/list.html
+@@ -1591,7 +1591,7 @@
+ {
+ accessFtpSession(login, [&](FtpSession& session) //throw SysError
+ {
+- session.perform(afsFilePath, false /*isDir*/, CURLFTPMETHOD_FULLPATH, //are there any servers that require CURLFTPMETHOD_SINGLECWD? let's find out
++ session.perform(afsFilePath, false /*isDir*/, CURLFTPMETHOD_LAST, //are there any servers that require CURLFTPMETHOD_SINGLECWD? let's find out
+ {
+ { CURLOPT_WRITEDATA, &onBytesReceived },
+ { CURLOPT_WRITEFUNCTION, onBytesReceivedWrapper },
+@@ -1657,7 +1657,7 @@
+
+ //optimize fail-safe copy with RNFR/RNTO as CURLOPT_POSTQUOTE? -> even slightly *slower* than RNFR/RNTO as additional curl_easy_perform()
+ */
+- session.perform(afsFilePath, false /*isDir*/, CURLFTPMETHOD_FULLPATH, //are there any servers that require CURLFTPMETHOD_SINGLECWD? let's find out
++ session.perform(afsFilePath, false /*isDir*/, CURLFTPMETHOD_LAST, //are there any servers that require CURLFTPMETHOD_SINGLECWD? let's find out
+ {
+ { CURLOPT_UPLOAD, 1L },
+ { CURLOPT_READDATA, &getBytesToSend },
+@@ -2126,7 +2126,7 @@
+ quote = ::curl_slist_append(quote, ("RNFR " + session.getServerRelPathInternal(pathFrom, login_.timeoutSec)).c_str()); //throw SysError
+ quote = ::curl_slist_append(quote, ("RNTO " + session.getServerRelPathInternal(pathTo.afsPath, login_.timeoutSec)).c_str()); //
+
+- session.perform(AfsPath(), true /*isDir*/, CURLFTPMETHOD_FULLPATH, //really avoid needless CWDs unlike buggy(!) CURLFTPMETHOD_NOCWD
++ session.perform(AfsPath(), true /*isDir*/, CURLFTPMETHOD_LAST, //really avoid needless CWDs unlike buggy(!) CURLFTPMETHOD_NOCWD
+ {
+ { CURLOPT_NOBODY, 1L },
+ { CURLOPT_QUOTE, quote },
diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/afs/sftp.cpp 10.9-1/FreeFileSync/Source/afs/sftp.cpp
--- 10.9-0/FreeFileSync/Source/afs/sftp.cpp 2019-02-10 16:42:29.139040980 -0500
+++ 10.9-1/FreeFileSync/Source/afs/sftp.cpp 2019-02-10 21:28:00.030732089 -0500
bgstack15