summaryrefslogtreecommitdiff
path: root/freefilesync
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync')
-rw-r--r--freefilesync/ffs_curl.patch50
-rw-r--r--freefilesync/ffs_el.patch14
-rw-r--r--freefilesync/ffs_fedora.patch20
-rw-r--r--freefilesync/ffs_libssh2.patch33
-rw-r--r--freefilesync/ffs_sftp.patch62
-rw-r--r--freefilesync/freefilesync.spec9
6 files changed, 109 insertions, 79 deletions
diff --git a/freefilesync/ffs_curl.patch b/freefilesync/ffs_curl.patch
new file mode 100644
index 0000000..25ad6a6
--- /dev/null
+++ b/freefilesync/ffs_curl.patch
@@ -0,0 +1,50 @@
+Source: AUR
+Author: Simon Brulhart
+Date: 2019-10-20 21:33:47 +0200
+Message:
+remove assertion for libcurl version >1.67 (1.66 should be safe but slower)
+The upstream release uses the curl git master branch instead of release versions. The AUR guy thinks it's acceptable to use the older version of libcurl, that is actually already released.
+Version: FreeFileSync 10.17
+
+# ffs_curl.patch is different between the rpm and dpkg
+diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp
+--- 10.17-0/FreeFileSync/Source/afs/ftp.cpp 2019-10-17 18:37:03.000000000 +0200
++++ 10.17-1/FreeFileSync/Source/afs/ftp.cpp 2019-10-20 20:18:07.221692533 +0200
+@@ -632,7 +632,7 @@
+ curlRelPath += compFmt;
+ }
+
+- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67));
++ // static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67));
+ /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382
+ 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332
+ => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an
+
+Message: For Fedora <= 30 that has curl < 7.66.0 you need this patch.
+diff -x '*.swp' -Naur 10.17-0/FreeFileSync/Source/afs/libcurl/curl_wrap.h 10.17-1/FreeFileSync/Source/afs/libcurl/curl_wrap.h
+--- 10.17-0/FreeFileSync/Source/afs/libcurl/curl_wrap.h 2019-10-21 11:23:51.238139296 -0400
++++ 10.17-1/FreeFileSync/Source/afs/libcurl/curl_wrap.h 2019-10-21 11:37:17.175140528 -0400
+@@ -16,7 +16,8 @@
+ //-------------------------------------------------
+
+ #ifndef CURLINC_CURL_H
+- #error curl.h header guard changed
++ // disable for Fedora <= 30
++ //#error curl.h header guard changed
+ #endif
+
+ namespace zen
+@@ -121,10 +122,10 @@
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RECURSIVE_API_CALL);
+- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR);
+- ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST);
++ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR);
++ //ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST);
+ }
+- static_assert(CURL_LAST == CURLE_AUTH_ERROR + 1);
++ //static_assert(CURL_LAST == CURLE_AUTH_ERROR + 1);
+
+ return replaceCpy<std::wstring>(L"Curl status %x.", L"%x", numberTo<std::wstring>(static_cast<int>(sc)));
+ }
diff --git a/freefilesync/ffs_el.patch b/freefilesync/ffs_el.patch
index 1e75f1c..05d8dd6 100644
--- a/freefilesync/ffs_el.patch
+++ b/freefilesync/ffs_el.patch
@@ -10,7 +10,7 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S
Zstring fff::getResourceDirPf()
{
- return getProcessParentFolderPath() + FILE_NAME_SEPARATOR + Zstr("Resources") + FILE_NAME_SEPARATOR;
-+ // For Fedora/EL, install to /usr/share/freefilesync specificly
++ // For Fedora, EL and Devuan, install to /usr/share/freefilesync specificly
+ return Zstr("/usr/share/freefilesync/");
}
@@ -22,8 +22,8 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefil
-EXENAME = FreeFileSync_$(shell arch)
+EXENAME = FreeFileSync
--CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-+CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+-CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
++CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
+ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread
@@ -75,6 +75,14 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTim
#treat as system headers so that warnings are hidden:
CXXFLAGS += -isystem/usr/include/gtk-2.0
+@@ -56,7 +56,6 @@
+ CPP_FILES+=afs/init_curl_libssh2.cpp
+ CPP_FILES+=afs/native.cpp
+ CPP_FILES+=afs/sftp.cpp
+-CPP_FILES+=afs/libssh2/init_libssh2.cpp
+ CPP_FILES+=ui/batch_config.cpp
+ CPP_FILES+=ui/abstract_folder_picker.cpp
+ CPP_FILES+=ui/batch_status_handler.cpp
diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.11-1/FreeFileSync/Source/ui/small_dlgs.cpp
--- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-04-12 07:59:45.318160616 -0400
+++ 10.11-1/FreeFileSync/Source/ui/small_dlgs.cpp 2019-04-12 10:19:57.228913439 -0400
diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch
index 3355299..5c5e3b7 100644
--- a/freefilesync/ffs_fedora.patch
+++ b/freefilesync/ffs_fedora.patch
@@ -1,4 +1,8 @@
-Upstream uses a libcurl more current than Fedora 29.
+Author: Simon Brulhart
+Source: AUR
+Date: 2019-10-21
+Message: Do not try to compile inexistant file
+Files affected: FreeFileSync/Source/Makefile
diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp
--- 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400
+++ 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400
@@ -7,11 +11,13 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S
Zstring fff::getResourceDirPf()
{
- return getProcessParentFolderPath() + FILE_NAME_SEPARATOR + Zstr("Resources") + FILE_NAME_SEPARATOR;
-+ // For Fedora/EL, install to /usr/share/freefilesync specificly
++ // For Fedora, EL and Devuan, install to /usr/share/freefilesync specificly
+ return Zstr("/usr/share/freefilesync/");
}
+Author: B Stack <bgstack15@gmail.com>
+Message: Fedora 29 does not yet use curl 7.66
diff -Naur 10.11-0/FreeFileSync/Source/afs/libcurl/curl_wrap.h 10.11-1/FreeFileSync/Source/afs/libcurl/curl_wrap.h
--- 10.11-0/FreeFileSync/Source/afs/libcurl/curl_wrap.h 2019-04-12 07:59:45.130151956 -0400
+++ 10.11-1/FreeFileSync/Source/afs/libcurl/curl_wrap.h 2019-04-12 08:27:24.423735854 -0400
@@ -31,7 +37,7 @@ diff -Naur 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Make
-EXENAME = FreeFileSync_$(shell arch)
+EXENAME = FreeFileSync
- CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+ CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
-O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
@@ -48,6 +54,14 @@ diff -Naur 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Make
#treat as system headers so that warnings are hidden:
CXXFLAGS += -isystem/usr/include/gtk-2.0
+@@ -56,7 +56,6 @@
+ CPP_FILES+=afs/init_curl_libssh2.cpp
+ CPP_FILES+=afs/native.cpp
+ CPP_FILES+=afs/sftp.cpp
+-CPP_FILES+=afs/libssh2/init_libssh2.cpp
+ CPP_FILES+=ui/batch_config.cpp
+ CPP_FILES+=ui/abstract_folder_picker.cpp
+ CPP_FILES+=ui/batch_status_handler.cpp
diff -Naur 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile
--- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -0400
+++ 10.15-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-08-15 13:59:53.934551753 -0400
diff --git a/freefilesync/ffs_libssh2.patch b/freefilesync/ffs_libssh2.patch
index 4fc1497..0abd660 100644
--- a/freefilesync/ffs_libssh2.patch
+++ b/freefilesync/ffs_libssh2.patch
@@ -5,17 +5,32 @@ Method:
sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp'
+Source: <none>
+Author: B Stack
+Message: libssh2 v1.8.0 does not yet implement these two error messages. I do not know why distros are not serving libssh2 v1.9.0 which wa released June 20, 2019.
+Date: 2019-09-17T13:41:23Z
+--- 10.17-0/FreeFileSync/Source/afs/libssh2/libssh2_wrap.h 2019-10-17 15:59:11.681641905 -0400
++++ 10.17-1/FreeFileSync/Source/afs/libssh2/libssh2_wrap.h 2019-10-21 08:32:59.666149954 -0400
+@@ -172,8 +172,8 @@
+ ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT);
+ ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET);
+ ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS);
+- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL);
+- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED);
++ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL);
++ //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED);
+ }
+ return replaceCpy<std::wstring>(L"SSH status %x.", L"%x", numberTo<std::wstring>(sc));
+ }
diff -x '*.swp' -x .git -Naur 10.10-0/FreeFileSync/Source/afs/sftp.cpp 10.10-1/FreeFileSync/Source/afs/sftp.cpp
--- 10.10-0/FreeFileSync/Source/afs/sftp.cpp 2019-03-12 08:09:58.465098982 -0400
-+++ 10.10-1/FreeFileSync/Source/afs/sftp.cpp 2019-03-12 08:27:05.718963710 -0400
-@@ -1657,8 +1657,8 @@
++++ 10.17-1/FreeFileSync/Source/afs/sftp.cpp 2019-10-21 08:46:07.562161269 -0400
+@@ -1588,7 +1588,7 @@
runSftpCommand(login_, L"libssh2_sftp_mkdir", //throw SysError
[&](const SshSession::Details& sd) //noexcept!
{
--#if 1 //let's see how LIBSSH2_SFTP_DEFAULT_MODE works out:
-- return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_DEFAULT_MODE);
-+#if 1 //let's see how LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO works out:
-+ return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
- #else //default for newly created directories: 0777
- return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath).c_str(), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
- #endif
+- return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath), LIBSSH2_SFTP_DEFAULT_MODE);
++ return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
+ //default for newly created directories: 0777 (LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO)
+ });
+ }
diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch
index afc8f07..c30b09c 100644
--- a/freefilesync/ffs_sftp.patch
+++ b/freefilesync/ffs_sftp.patch
@@ -1,70 +1,8 @@
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
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
index 7b7cc80..157c66b 100644
--- a/freefilesync/freefilesync.spec
+++ b/freefilesync/freefilesync.spec
@@ -18,8 +18,8 @@
%define libssh2_name libssh2-%{name}
%endif
Name: freefilesync
-Version: 10.16
-Release: 2%{?dist}
+Version: 10.17
+Release: 1%{?dist}
Summary: A file synchronization utility
Group: Applications/File
@@ -38,6 +38,7 @@ Patch3: ffs_sftp.patch
Patch4: ffs_fedora.patch
Patch5: ffs_el.patch
Patch6: ffs_libssh2.patch
+Patch7: ffs_curl.patch
Packager: B Stack <bgstack15@gmail.com>
# WARNING: the build will FAIL if you have wxGTK3-devel installed. Only wxGTK2-devel should be on the build system.
@@ -92,6 +93,7 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
%patch4 -p1
%endif
%patch6 -p1
+%patch7 -p1
# custom build parameters for packaging application in rpm
# fedora provides build_cxxflags, which is really just optflags
@@ -194,6 +196,9 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml
%changelog
+* Mon Oct 21 2019 B Stack <bgstack15@gmail.com> - 10.17-1
+- version bump
+
* Wed Oct 09 2019 B Stack <bgstack15@gmail.com> - 10.16-2
- include support for el8
bgstack15