diff options
Diffstat (limited to 'freefilesync')
43 files changed, 2002 insertions, 441 deletions
diff --git a/freefilesync/FreeFileSync.desktop b/freefilesync/FreeFileSync.desktop index d7b508d..6bb4d24 100644 --- a/freefilesync/FreeFileSync.desktop +++ b/freefilesync/FreeFileSync.desktop @@ -2,7 +2,7 @@ Categories=GTK;Utility;FileTools; Comment=Backup software to synchronize files and folders Comment[pt_BR]=Aplicação de backup para sincronizar arquivos e diretórios -Exec=FreeFileSync +Exec=FreeFileSync %f GenericName=File synchronization GenericName[pt_BR]=Sincronização de arquivos Icon=FreeFileSync diff --git a/freefilesync/README.md b/freefilesync/README.md index 1c47327..c09acd5 100644 --- a/freefilesync/README.md +++ b/freefilesync/README.md @@ -7,15 +7,18 @@ https://gitlab.com/opensource-tracking/FreeFileSync Fedora, CentOS, and Devuan do not package FreeFileSync. I maintained a separate spec file for this application, but rebased to a fork from PhantomX. # Reverse dependency matrix -Distro | FreeFileSync version --------------- | -------------------- -CentOS 7 | 10.16 -CentOS 8 | 10.17 -Fedora 29 | 10.17 -Fedora 30 | 10.17 -Fedora 31 | 10.17 -Fedora Rawhide | 10.17 -Devuan Ceres | 10.17 +Distro | FreeFileSync version | gtk version +-------------- | -------------------- | ---------------- +CentOS 7 | 10.19 | 2 +CentOS 8 | 10.19 | 2 +Fedora 29 | 10.19 | 2 +Fedora 30 | 10.19 | 2 +Fedora 31 | 10.19 | 2 +Fedora Rawhide | 10.19 | 2 +Devuan Ceres | 10.19 | 2 (stable), 3 (unstable) + +# Additional info +Devuan upstream recently dropped gtk2 packages required for building FreeFileSync. This means that OBS can only build the gtk3 version, which has some serious stability problems. My local gtk2 build is much more stable but depends on my local devuan-archive repo. # Differences from upstream None diff --git a/freefilesync/debian/.debhelper/generated/freefilesync/installed-by-dh_installdocs b/freefilesync/debian/.debhelper/generated/freefilesync/installed-by-dh_installdocs deleted file mode 100644 index e69de29..0000000 --- a/freefilesync/debian/.debhelper/generated/freefilesync/installed-by-dh_installdocs +++ /dev/null diff --git a/freefilesync/debian/FreeFileSync.desktop b/freefilesync/debian/FreeFileSync.desktop index d7b508d..6bb4d24 100644 --- a/freefilesync/debian/FreeFileSync.desktop +++ b/freefilesync/debian/FreeFileSync.desktop @@ -2,7 +2,7 @@ Categories=GTK;Utility;FileTools; Comment=Backup software to synchronize files and folders Comment[pt_BR]=Aplicação de backup para sincronizar arquivos e diretórios -Exec=FreeFileSync +Exec=FreeFileSync %f GenericName=File synchronization GenericName[pt_BR]=Sincronização de arquivos Icon=FreeFileSync diff --git a/freefilesync/debian/README.Debian b/freefilesync/debian/README.Debian index b370841..a5a1f01 100644 --- a/freefilesync/debian/README.Debian +++ b/freefilesync/debian/README.Debian @@ -1,8 +1,84 @@ +freefilesync (10.25-1+devuan) + +Now requires g++-10. Previously, the maintainer was reverting the logic only available to gcc-10, but this is becoming unmaintainable. + +freefilesync (10.21-2+devuan) + + * gtk2 build for albion + * gtk3 build is broken: +``` +g++ -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 `pkg-config --cflags openssl` `pkg-config --cflags libcurl` `pkg-config --cflags libssh2` `pkg-config --cflags gtk+-3.0` -isystem/usr/include/gtk-3.0 `pkg-config --cflags libselinux` -DHAVE_SELINUX -c ui/command_box.cpp -o /tmp/FreeFileSync_Make/ffs/src/ui/command_box.cpp.o +In file included from ui/command_box.cpp:7: +ui/command_box.h:22:1: error: expected class-name before '{' token + 22 | { + | ^ +compilation terminated due to -Wfatal-errors. +make: *** [Makefile:121: /tmp/FreeFileSync_Make/ffs/src/ui/command_box.cpp.o] Error 1 +``` + This is probably a wxWidgets 3.0-gtk3 or gtk3 issue. Upstream does make it sound like they will move to gtk3 eventually, and will come across this and try to fix it I'm sure. + + * how the gtk2 build fails if libgtk-3-dev is installed: +``` +/usr/include/gtk-3.0/gdk/gdktypes.h:143:39: error: conflicting declaration 'typedef struct _GdkWindow GdkWindow' + 143 | typedef struct _GdkWindow GdkWindow; +``` + +freefilesync (10.20-1+devuan) + + * gtk3 build for obs + * For changing gtk2 to gtk3, see control and patches/series files + +In case the sound is not working on a Devuan system for FreeFileSync, +check file `/etc/modprobe.d/oss-compat.conf` + + $ cat /etc/modprobe.d/oss-compat.conf + softdep snd-pcm post: snd-pcm-oss + softdep snd-mixer post: snd-mixer-oss + softdep snd-seq post: snd-seq-midi snd-seq-oss + +Setting this, so that /dev/dsp exists, allows freefilesync to play +audio. Additionally, nothing else should be playing audio, because if +something else is playing audio, a stack trace of FreeFileSync will +show error "device or resource busy." + + -- B Stack <bgstack15@gmail.com> Sat, 15 Feb 2020 16:30:36 -0500 + +freefilesync (10.19-2+devuan) + + * gtk2 build + + -- B Stack <bgstack15@gmail.com> Fri, 27 Dec 2019 09:52:13 -0500 + +freefilesync (10.19-1+devuan) + + * Upgrade application + + -- B Stack <bgstack15@gmail.com> Fri, 27 Dec 2019 09:32:55 -0500 + +freefilesync (10.18-2+devuan) + + * Revert to libwxgtk3.0 (gtk2) instead of libwxgtk3.0-gtk3 + * This involves using the local devuan-archive repo because libwxgtk3.0 + was dropped in Devuan upstream + + -- B Stack <bgstack15@gmail.com> Thu, 26 Dec 2019 09:46:15 -0500 + +freefilesync (10.18-1+devuan) + + * Switch to gtk3 so OBS can build it + - Debian dropped libwxgtk3.0-dev in favor of libwxgtk3.0-gtk3-dev, but gtk3 has some perceived performance issues back from FreeFileSync 8.7 days. + - https://dev1galaxy.org/viewtopic.php?pid=18625#p18625 + - https://freefilesync.org/forum/viewtopic.php?t=4918&p=16608&hilit=proxy_pixbuf_destroy#p16608 + + -- B Stack <bgstack15@gmail.com> Thu, 21 Oct 2019 08:18:00 -0500 + freefilesync (10.17-1+devuan) * Disable libcurl version check, to match AUR release. * Minor cleanup of Makefile that upstream failed to notice when he refactored + -- B Stack <bgstack15@gmail.com> Tue, 22 Oct 2019 10:06:00 -0400 + freefilesync (10.16-1+devuan) * Revert some sftp and libssh2 newer-version functionality. Upstream apparently patches their upstream libs. diff --git a/freefilesync/debian/RealTimeSync.desktop b/freefilesync/debian/RealTimeSync.desktop index fa2b1d4..d7d2670 100644 --- a/freefilesync/debian/RealTimeSync.desktop +++ b/freefilesync/debian/RealTimeSync.desktop @@ -2,7 +2,7 @@ Categories=GTK;Utility;FileTools; Comment=Real time synchronization Comment[pt_BR]=Sincronização em tempo real -Exec=RealTimeSync +Exec=RealTimeSync %f GenericName=Automated Synchronization GenericName[pt_BR]=Sincronização Automatizada Icon=RealTimeSync diff --git a/freefilesync/debian/changelog b/freefilesync/debian/changelog index 524371a..fbdcbf7 100644 --- a/freefilesync/debian/changelog +++ b/freefilesync/debian/changelog @@ -1,3 +1,248 @@ +freefilesync (11.1-2+devuan) obs; urgency=low + + * add traditional option to main grid view + + -- Ben Stack <bgstack15@gmail.com> Sun, 06 Sep 2020 20:59:36 -0400 + +freefilesync (11.1-1+devuan) obs; urgency=low + + * [bgstack15] still has the broken file tree layout + * New file group layout on main grid (reloaded) + * Alternate colors for main grid folder groups + * Added file group context menu + * Quick selection of items in folder group + * Fixed FTP access errors with Explicit SSL/TLS + * Fixed Google Drive error when double quotes in file name + * Fixed RTL layout bug with number input control + * Fixed grid column default sizes + * Fixed grid rendering performance during mouse scrolling + * Update all config files transactionally + * Respect user-preferred number/time format (Linux) + * Fixed floating panels not being resizable (Linux) + * Instantly open selection context menu on right mouse button down + * Further improved high DPI support + * Updated deprecated system API calls (requires macOS 10.10 or later) + * Fixed crash when accessing Nexis storage (macOS) + * Avoid buffer flush when aborting native file output + * Clear preview after folder history selection + * Pre-allocate target file without setting size + * Unified system error message formatting + + -- Ben Stack <bgstack15@gmail.com> Tue, 01 Sep 2020 20:33:42 -0400 + +freefilesync (11.0-1+devuan) obs; urgency=medium + + * Revised file layout on main grid + * Skip download/upload when copying Google Drive files inside account + * Support moving Google Drive files between shared drives and My Drive + * Support copying Google Drive shortcuts between accounts + * Support copying Google Docs, Sheets, Slides, etc. within account + * Fixed parsing uninitialized Google Drive modification time + * Fixed Google Drive file already existing check running too late + * Ignore slash/backslash differences during manual search + * Avoid creating orphan database entry if one DB file fails to load + * Limit modification time error count for log file warning message + * Support copying WSL symlinks + * Avoid duplicate MTP/Google Drive item creation from multiple threads + * Fixed TMPDIR not found during startup (macOS) + * Added sync variant icons + * Avoid redundant icon format conversions + * Buffer high-DPI image scaling results + * Improved MTP thumbnail scaling performance + * Avoid race condition during parallel file icon rendering (Linux) + * Allow creating folder name with leading/trailing spaces + * Start supporting GTK3 (Linux) + + -- Ben Stack <bgstack15@gmail.com> Wed, 22 Jul 2020 12:55:46 -0400 + +freefilesync (10.25-2+devuan) obs; urgency=medium + + * gtk2 build (stable) + + -- Ben Stack <bgstack15@gmail.com> Sat, 20 Jun 2020 16:46:22 -0400 + +freefilesync (10.25-1+devuan) obs; urgency=medium + + * gtk3 build (unstable) + * New file tree layout for main grid + * Support Google Drive Shared Drives + * Support Google Drive Shortcuts + * Prioritize item name rendering if lacking horizontal space + * Report "out of memory" during startup instead of crashing + * Fixed excess memory consumption when loading variable-size data blocks + * Fixed VERSION_ID missing on Arch Linux + * Fixed IWbemServices::ConnectServer error during auto-update + * Fixed row being skipped during main grid page up/down + * Fixed MSSearch files not found when using Volume Shadow Copy + * Allow creating folder names with trailing dot + * Improved sort by full path speed and folder ordering + * Report detailed error when failing to parse FTP MLSD + * Sort by path component names instead of relative path + * Support access to MEGAcmd FTP server + * Fixed Google Drive error when removing last parent of shared item + * Fixed Google Drive owned+shared files being unlinked instead of deleted + * Fixed Google Drive change notificaton evaluation for item without parents + * Support double-click/"Browse directory" for (S)FTP/Google Drive (Linux) + + -- Ben Stack <bgstack15@gmail.com> Fri, 19 Jun 2020 16:21:17 -0400 + +freefilesync (10.24-2+devuan) albion; urgency=medium + + * gtk2 build (stable) + + -- Ben Stack <bgstack15@gmail.com> Mon, 18 May 2020 08:14:57 -0400 + +freefilesync (10.24-1+devuan) obs; urgency=medium + + * gtk3 build (unstable) + * Increased SFTP buffer sizes for faster upload/download + * New %WeekDay%, %WeekDayName", and %MonthName% macros + * Support Linux systems without lsb_release + * Don't exclude desktop.ini by default + * Merge error messages of failed error handling + * Added ".DocumentRevisions-V100" to default exclude filter (macOS) + * Fixed deletion error not reported during versioning + * RealTimeSync: don't block when command fails with exit code > 0 + * Visualize error status in macOS Dock and Windows Superbar + * Show error code constants on Windows Shell errors + * Suppport ProFTPD with "MultilineRFC2228 on" + * SFTP option to enable/disable zlib compression + + -- Ben Stack <bgstack15@gmail.com> Sun, 17 May 2020 19:12:44 -0400 + +freefilesync (10.23-2+devuan) albion; urgency=medium + + * gtk2 build + + -- Ben Stack <bgstack15@gmail.com> Mon, 20 Apr 2020 16:11:36 -0400 + +freefilesync (10.23-1+devuan) obs; urgency=medium + + * Run "on completion" commands on console (no need for "cmd.exe /c") + * Check exit code and report errors for external applications + * Report stream output of failed command line calls (macOs, Linux) + * Use Unicode symbols compatible with older macOS + * RealTimeSync: invoke command using cmd.exe instead of ShellExecute (Windows) + * Avoid hitting log file length limitations for aggregated jobs + * Fix OpenSSL failing on HTTP 1.0 response without Content-Length + * Don't allow creating folder names ending with space or dot + * Support base folders with trailing blanks + * Show system error descriptions on volume shadow copy errors + * Raise exit code if saving log file or sending email failed + * Report all documented MTP error descriptions + * Updated default exclude filter (macOS/Linux) + * Added image outlines for improved dark mode support + * Work around WBEM_E_INVALID_CLASS error during installation + * Align file path rendering with app layout direction + * Play sound notification also when "cancel on first error" is set + * Cleaner file path formatting (macOs, Linux) + * Added instructions when failing to start due to missing GTK2 (Ubuntu) + * RealTimeSync: distinguish drive unmount from folder change notification + * Avoid blocking command scripts waiting for user input + * Updated translation files + + -- Ben Stack <bgstack15@gmail.com> Mon, 20 Apr 2020 15:09:48 -0400 + +freefilesync (10.22-2+devuan) albion; urgency=medium + + * gtk2 build + + -- Ben Stack <bgstack15@gmail.com> Wed, 18 Mar 2020 14:24:32 -0400 + +freefilesync (10.22-1+devuan) UNRELEASED; urgency=medium + + * BROKEN! This package does not actually exist. See README.debian + * Preselect last-used email address + * Select log file format (HTML or plain text) + * Aggregate email notifications when hitting sending limits + * Show code literals in system error messages + * Limit conflict item count for log file warning message + * Show log icon error indicator even if error occured after sync + * Disable background drag & drop when showing modal dialog + * Hide dummy model, vendor names in log files + * Fixed ANSI encoding used for log file time formatting + * Reduced memory consumption for large number of log messages + * Correctly parse lock files despite corrupted trail data + * Show emoji instead of Unicode icon in email subject + * Fixed IWbemServices::ConnectServer error after sync + * Fixed aggregate email logs incomplete truncation + + -- Ben Stack <bgstack15@gmail.com> Wed, 18 Mar 2020 14:22:58 -0400 + +freefilesync (10.21-1+devuan) UNRELEASED; urgency=medium + + * upstream changelog points to 10.22 + + -- Ben Stack <bgstack15@gmail.com> Wed, 18 Mar 2020 09:18:01 -0400 + +freefilesync (10.20-1+devuan) obs; urgency=low + + * Send email notifications after sync (Donation Edition) + * Generate log files in HTML format + * Detect sync database consistency errors + * Start log file with preview of first 50 errors/warnings + * Mitigate lock file data corruption + * Print Windows error codes in hexadecimal + * Fixed missing MTP and network links in folder picker (Linux) + * Display versioning and log folder path history + * Display and log all config names for merged configurations + * Run post-sync command synchronously and log exit code + * Fixed crash on Bitvise SFTP servers with zlib delayed compression + * Show actual time out used in failure message + * Show detailed error message when failing to test sound files + * Fixed timeout for long-running FTP uploads by sending keep-alives + * Use Donation Edition on unlimited number of virtual machines + * Ignore accidental clicks in empty space of configuration panel + + -- B Stack <bgstack15@gmail.com> Sat, 15 Feb 2020 15:58:33 -0500 + +freefilesync (10.19-2+devuan) manual; urgency=low + + * gtk2 build + + -- B Stack <bgstack15@gmail.com> Fri, 27 Dec 2019 09:52:13 -0500 + +freefilesync (10.19-1+devuan) obs; urgency=low + + * Unified rendering of disabled grid layouts + * Count moved file pair as one update in view filter buttons + * Fix command button default sizes (Windows) + * Added %item_name%, %item_name2% context menu macros + * Support deleting references to shared Google Drive files + * Trash Google Drive files only when having single parent + * Fixed high DPI scaling issue on image borders + * Preserve system date format for RTL languages + * Fall back to folder path if resource archives are missing + + -- B Stack <bgstack15@gmail.com> Fri, 27 Dec 2019 09:32:55 -0500 + +freefilesync (10.18-2+devuan) obs; urgency=medium + + * Revert to libwxgtk3.0 (gtk2) instead of libwxgtk3.0-gtk3 + * This involves using the local devuan-archive repo because libwxgtk3.0 + was dropped in Devuan upstream + + -- B Stack <bgstack15@gmail.com> Thu, 26 Dec 2019 09:46:15 -0500 + +freefilesync (10.18-1+devuan) obs; urgency=low + + * Save/load database files in parallel + * Show item count for each view filter category + * Group config history items via background colors + * Allow grid sort by category and sync action + * Reduced file accesses for faster start up + * Buffer redundant database loads + * Fix ibus initialization hang on Ubuntu 19.10 + * Defer showing progress panel for short-lived tasks + * Calculate stable scrollbar dimensions on GTK2 + * Log mod time errors even when sync is cancelled + * Show progress and errors when updating sync directions + * Detect MLSD support despite invalid FTP FEAT response + * Improved GUI responsiveness during config load + * Added Vietnamese translation + + -- B Stack <bgstack15@gmail.com> Thu, 21 Nov 2019 07:53:41 -0500 + freefilesync (10.17-1+devuan) obs; urgency=low * Support PuTTY private key files for SFTP login @@ -9,7 +254,9 @@ freefilesync (10.17-1+devuan) obs; urgency=low * Integrate latest libcurl FTP bug fixes * Detect common invalid SFTP key file formats * Fixed startup crash caused by corrupted HDD properties - * Allow SFTP access via Ed25519 key in PKIX format + * Allow SFTP access via Ed25519 key in PKIX format + + -- B Stack <bgstack15@gmail.com> Tue, 22 Oct 2019 10:04:13 -0400 freefilesync (10.16-1+devuan) obs; urgency=low @@ -30,7 +277,7 @@ freefilesync (10.16-1+devuan) obs; urgency=low * Fixed accessibility issue with progress graph colors * Use short naming convention when deleting abandoned folder lock * Detect endless folder lock recursion on buggy file systems - * Fixed Google Drive parsing error for invalid file time + * Fixed Google Drive parsing error for invalid file time -- B Stack <bgstack15@gmail.com> Tue, 16 Sep 2019 10:04:13 -0400 @@ -46,7 +293,7 @@ freefilesync (10.15-1+devuan) obs; urgency=low * Fixed main dialog out-of-screen position on startup (macOS) * Activated CDN for all web accesses * Redirect error dialog to stderr during sound playback (Linux) - * Updated translation files + * Updated translation files -- B Stack <bgstack15@gmail.com> Thu, 15 Aug 2019 21:56:04 -0400 @@ -136,6 +383,8 @@ freefilesync (10.10-1devuan) manual; urgency=low * Added context information for cloud connection errors * Updated translation files + -- B Stack <bgstack15@gmail.com> Fri, 15 Mar 2019 18:23:43 -0500 + freefilesync (10.9-1devuan) manual; urgency=low * Added FTP, SFTP, Google Drive support for Linux diff --git a/freefilesync/debian/compat b/freefilesync/debian/compat index b4de394..48082f7 100644 --- a/freefilesync/debian/compat +++ b/freefilesync/debian/compat @@ -1 +1 @@ -11 +12 diff --git a/freefilesync/debian/control b/freefilesync/debian/control index a60410c..17ed18d 100644 --- a/freefilesync/debian/control +++ b/freefilesync/debian/control @@ -2,16 +2,20 @@ Source: freefilesync Section: utils Priority: optional Maintainer: B Stack <bgstack15@gmail.com> -Build-Depends: debhelper (>=11~), - autotools-dev, +Build-Depends: debhelper (>=12~), imagemagick, - libcurl4-openssl-dev, - libgtk2.0-dev, + g++-10, + libbrotli-dev, + libcurl4-openssl-dev (>=7.68.0), libssh2-1-dev, libssl-dev, - libwxgtk3.0-dev, wx3.0-headers, - unzip + unzip, +# gtk3 version, and these must be removed for gtk2 build +# install with sudo apt-get install libwxbase3.0-dev=3.0.4+dfsg-15 libwxbase3.0-0v5=3.0.4+dfsg-15 wx3.0-headers=3.0.4+dfsg-15 libgtk-3-dev libwxgtk3.0-gtk3-dev +# which will remove libwxbase3.0-dev=3.0.4+dfsg-14 + libgtk-3-dev, + libwxgtk3.0-gtk3-dev, Standards-Version: 4.1.4 Homepage: https://freefilesync.org/ @@ -20,7 +24,7 @@ Architecture: any Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends}, xdg-utils -Description: +Description: cross-platform file sync utility, gpl release FreeFileSync is a folder comparison and synchronization software that creates and manages backup copies of all your important files. Instead of copying every file every time, FreeFileSync determines the diff --git a/freefilesync/debian/debhelper-build-stamp b/freefilesync/debian/debhelper-build-stamp deleted file mode 100644 index 8df3225..0000000 --- a/freefilesync/debian/debhelper-build-stamp +++ /dev/null @@ -1 +0,0 @@ -freefilesync diff --git a/freefilesync/debian/files b/freefilesync/debian/files deleted file mode 100644 index c26d041..0000000 --- a/freefilesync/debian/files +++ /dev/null @@ -1,2 +0,0 @@ -freefilesync_10.9-1devuan_amd64.buildinfo utils optional -freefilesync_10.9-1devuan_amd64.deb utils optional diff --git a/freefilesync/debian/files-for-gtk2-to-3.txt b/freefilesync/debian/files-for-gtk2-to-3.txt new file mode 100644 index 0000000..7d15d0e --- /dev/null +++ b/freefilesync/debian/files-for-gtk2-to-3.txt @@ -0,0 +1,3 @@ +control +changelog +patches/series diff --git a/freefilesync/debian/freefilesync+devuan.dsc b/freefilesync/debian/freefilesync+devuan.dsc new file mode 100644 index 0000000..e6a707d --- /dev/null +++ b/freefilesync/debian/freefilesync+devuan.dsc @@ -0,0 +1,14 @@ +Format: 3.0 (quilt) +Source: freefilesync +Binary: freefilesync +Architecture: any +Version: 11.1-2+devuan +Maintainer: B Stack <bgstack15@gmail.com> +Homepage: https://freefilesync.org/ +Standards-Version: 4.1.4 +Build-Depends: debhelper (>= 12~), g++-10, imagemagick, libbrotli-dev, libcurl4-openssl-dev, libssh2-1-dev, libssl-dev, wx3.0-headers, unzip, libgtk-3-dev, libwxgtk3.0-gtk3-dev, libfontconfig-dev +Package-List: + freefilesync deb utils optional arch=any +Files: + 00000000000000000000000000000000 1 freefilesync.orig.tar.gz + 00000000000000000000000000000000 1 freefilesync+devuan.debian.tar.xz diff --git a/freefilesync/debian/freefilesync.lintian-overrides b/freefilesync/debian/freefilesync.lintian-overrides new file mode 100644 index 0000000..6c17eb3 --- /dev/null +++ b/freefilesync/debian/freefilesync.lintian-overrides @@ -0,0 +1 @@ +possible-gpl-code-linked-with-openssl diff --git a/freefilesync/debian/freefilesync.manpages b/freefilesync/debian/freefilesync.manpages new file mode 100644 index 0000000..2fb19fb --- /dev/null +++ b/freefilesync/debian/freefilesync.manpages @@ -0,0 +1 @@ +debian/manpages/* diff --git a/freefilesync/debian/freefilesync.substvars b/freefilesync/debian/freefilesync.substvars deleted file mode 100644 index fad364f..0000000 --- a/freefilesync/debian/freefilesync.substvars +++ /dev/null @@ -1,3 +0,0 @@ -shlibs:Depends=libatk1.0-0 (>= 1.12.4), libc6 (>= 2.28), libcairo2 (>= 1.2.4), libcurl4 (>= 7.16.2), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:3.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.14.0), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libselinux1 (>= 1.32), libssh2-1 (>= 1.7.0), libssl1.1 (>= 1.1.0), libstdc++6 (>= 7), libwxbase3.0-0v5 (>= 3.0.4+dfsg), libwxgtk3.0-0v5 (>= 3.0.4+dfsg), zlib1g (>= 1:1.2.0) -misc:Depends= -misc:Pre-Depends= diff --git a/freefilesync/debian/manpages/RealtimeSync.1 b/freefilesync/debian/manpages/RealTimeSync.1 index 9b1f992..9b1f992 100644 --- a/freefilesync/debian/manpages/RealtimeSync.1 +++ b/freefilesync/debian/manpages/RealTimeSync.1 diff --git a/freefilesync/debian/patches/ffs_allow_parallel_ops.patch b/freefilesync/debian/patches/ffs_allow_parallel_ops.patch index e464662..15bf3ab 100644 --- a/freefilesync/debian/patches/ffs_allow_parallel_ops.patch +++ b/freefilesync/debian/patches/ffs_allow_parallel_ops.patch @@ -12,14 +12,14 @@ diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/ui/folde if (showCloudSetupDialog(parent_, folderPathPhrase, parallelOps, get(parallelOpsDisabledReason)) != ReturnSmallDlg::BUTTON_OKAY) return; diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 10.9-1/FreeFileSync/Source/ui/sync_cfg.cpp ---- 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 2019-02-10 22:01:42.075159451 -0500 -+++ 10.9-1/FreeFileSync/Source/ui/sync_cfg.cpp 2019-02-11 21:25:11.685992654 -0500 -@@ -263,7 +263,7 @@ +--- 10.21-0/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 08:56:08.644066742 -0400 ++++ 10.21-1/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 09:13:30.459409986 -0400 +@@ -290,7 +290,7 @@ + commandHistoryOut_(commandHistory), globalPairCfg_(globalPairCfg), localPairCfg_(localPairConfig), - showMultipleCfgs_(showMultipleCfgs), --perfPanelActive_(false), -+perfPanelActive_(true), - commandHistItemsMax_(commandHistItemsMax) +- enableExtraFeatures_(false), ++ enableExtraFeatures_(true), + showMultipleCfgs_(showMultipleCfgs) { setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); diff --git a/freefilesync/debian/patches/ffs_curl.patch b/freefilesync/debian/patches/ffs_curl.patch index 2844a54..549d9ac 100644 --- a/freefilesync/debian/patches/ffs_curl.patch +++ b/freefilesync/debian/patches/ffs_curl.patch @@ -6,15 +6,29 @@ 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 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 @@ +--- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 ++++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 +@@ -635,7 +635,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)); ++ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 68)); /* 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 - +diff -Naur 10.20-0/libcurl/curl_wrap.h 10.20-1/libcurl/curl_wrap.h +--- 10.21-0/libcurl/curl_wrap.h 2020-03-18 08:56:08.488065042 -0400 ++++ 10.21-1/libcurl/curl_wrap.h 2020-03-18 09:25:52.871480165 -0400 +@@ -137,9 +137,9 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); + ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); ++ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); + } +- static_assert(CURL_LAST == CURLE_QUIC_CONNECT_ERROR + 1); ++ //static_assert(CURL_LAST == CURLE_QUIC_CONNECT_ERROR + 1); + + return replaceCpy<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc))); + } diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index fc16f54..67846e1 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -1,12 +1,11 @@ -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 -@@ -55,7 +55,8 @@ +Author: B Stack +Source: Original research +Last date modified: 2020-02-15 +Message: Main patch to compile on Devuan. +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/ffs_paths.cpp 10.18-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.18-1/FreeFileSync/Source/ffs_paths.cpp 2019-11-21 09:41:42.287474472 -0500 +@@ -64,7 +64,8 @@ Zstring fff::getResourceDirPf() { @@ -16,67 +15,49 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S } -diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile ---- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 08:05:57.000000000 -0400 -+++ 10.11-1/FreeFileSync/Source/Makefile 2019-04-12 14:00:16.774552362 -0400 +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/Makefile 10.24-1/FreeFileSync/Source/Makefile +--- 10.24-0/FreeFileSync/Source/Makefile 2020-05-17 11:01:12.813889858 -0400 ++++ 10.24-1/FreeFileSync/Source/Makefile 2020-05-17 11:29:01.456713486 -0400 @@ -1,10 +1,10 @@ --EXENAME = FreeFileSync_$(shell arch) -+EXENAME = FreeFileSync +-exeName = FreeFileSync_$(shell arch) ++exeName = FreeFileSync - CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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++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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags += -s `wx-config --libs std, aui --debug=no` -lz -pthread - CXXFLAGS += `pkg-config --cflags openssl` -@@ -17,6 +17,7 @@ CXXFLAGS += `pkg-config --cflags libssh2` - LINKFLAGS += `pkg-config --libs libssh2` - - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` - #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' 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile ---- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 08:05:57.000000000 -0400 -+++ 10.15-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-08-15 13:59:53.934551753 -0400 -@@ -1,13 +1,14 @@ --EXENAME = RealTimeSync_$(shell arch) -+EXENAME = RealTimeSync + cxxFlags += `pkg-config --cflags openssl` +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.19-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-12-27 07:56:06.714625467 -0500 ++++ 10.21-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 09:03:57.753183052 -0400 +@@ -97,6 +97,8 @@ + build += L"64 Bit"; + #endif + ++ build += L" for Devuan"; ++ + build += SPACED_BULLET; + build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime())); - CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \ +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/RealTimeSync/Makefile 10.24-1/FreeFileSync/Source/RealTimeSync/Makefile +--- 10.24-0/FreeFileSync/Source/RealTimeSync/Makefile 2020-05-17 11:01:12.853890213 -0400 ++++ 10.24-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-05-17 11:29:17.540857423 -0400 +@@ -1,10 +1,10 @@ +-exeName = RealTimeSync_$(shell arch) ++exeName = RealTimeSync + +-cxxFlags = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags += -s `wx-config --libs std, aui --debug=no` -lz -pthread #Gtk - support "no button border" - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` - #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 - -diff -Naur -x '*.orig' -x '*.rej' 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 08:05:57.000000000 -0400 -+++ 10.11-1/FreeFileSync/Source/ui/small_dlgs.cpp 2019-04-12 13:58:55.050550183 -0400 -@@ -115,6 +115,8 @@ - L" x64"; - #endif - -+ build += -+ L" for Devuan"; - - GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize() - + cxxFlags += `pkg-config --cflags gtk+-2.0` diff --git a/freefilesync/debian/patches/ffs_devuan_gtk3.patch b/freefilesync/debian/patches/ffs_devuan_gtk3.patch new file mode 100644 index 0000000..8a5e83e --- /dev/null +++ b/freefilesync/debian/patches/ffs_devuan_gtk3.patch @@ -0,0 +1,36 @@ +Author: B Stack +Source: Original research +Date: 2020-08-31 +Message: Main patch to compile on Devuan using GTK3. +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/Makefile 10.18-1/FreeFileSync/Source/Makefile +--- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 08:05:57.000000000 -0400 ++++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 09:42:57.408243242 -0500 +@@ -16,9 +16,10 @@ + cxxFlags += `pkg-config --cflags libssh2` + linkFlags += `pkg-config --libs libssh2` + +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 + + #support for SELinux (optional) + SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/RealTimeSync/Makefile 10.24-1/FreeFileSync/Source/RealTimeSync/Makefile +--- 10.24-0/FreeFileSync/Source/RealTimeSync/Makefile 2020-05-17 18:30:59.289498093 -0400 ++++ 10.24-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-05-17 19:32:59.791394275 -0400 +@@ -7,9 +7,10 @@ + linkFlags += -s `wx-config --libs std, aui --debug=no` -lz -pthread + + #Gtk - support "no button border" +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 + + cppFiles= + cppFiles+=application.cpp diff --git a/freefilesync/debian/patches/ffs_gcc.patch b/freefilesync/debian/patches/ffs_gcc.patch new file mode 100644 index 0000000..ed007b5 --- /dev/null +++ b/freefilesync/debian/patches/ffs_gcc.patch @@ -0,0 +1,46 @@ +diff -Naur 10.25-1/FreeFileSync/Source/Makefile 10.25-2/FreeFileSync/Source/Makefile +--- 10.25-1/FreeFileSync/Source/Makefile 2020-06-20 13:36:08.495867672 -0400 ++++ 10.25-2/FreeFileSync/Source/Makefile 2020-06-20 13:31:36.180419862 -0400 +@@ -1,4 +1,5 @@ + exeName = FreeFileSync ++CXX=g++-10 + + 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 \ +@@ -114,11 +115,11 @@ + + ../Build/Bin/$(exeName): $(objFiles) + mkdir -p $(dir $@) +- g++ -o $@ $^ $(linkFlags) ++ $(CXX) -o $@ $^ $(linkFlags) + + $(tmpPath)/ffs/src/%.o : % + mkdir -p $(dir $@) +- g++ $(cxxFlags) -c $< -o $@ ++ $(CXX) $(cxxFlags) -c $< -o $@ + + clean: + rm -rf $(tmpPath) +diff -Naur 10.25-1/FreeFileSync/Source/RealTimeSync/Makefile 10.25-2/FreeFileSync/Source/RealTimeSync/Makefile +--- 10.25-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-06-20 13:36:08.499867723 -0400 ++++ 10.25-2/FreeFileSync/Source/RealTimeSync/Makefile 2020-06-20 13:31:48.844580205 -0400 +@@ -1,4 +1,5 @@ + exeName = RealTimeSync ++CXX=g++-10 + + 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 \ +@@ -52,11 +53,11 @@ + + ../../Build/Bin/$(exeName): $(objFiles) + mkdir -p $(dir $@) +- g++ -o $@ $^ $(linkFlags) ++ $(CXX) -o $@ $^ $(linkFlags) + + $(tmpPath)/ffs/src/rts/%.o : % + mkdir -p $(dir $@) +- g++ $(cxxFlags) -c $< -o $@ ++ $(CXX) $(cxxFlags) -c $< -o $@ + + clean: + rm -rf $(tmpPath) diff --git a/freefilesync/debian/patches/ffs_libssh2.patch b/freefilesync/debian/patches/ffs_libssh2.patch index 0abd660..d5ca14e 100644 --- a/freefilesync/debian/patches/ffs_libssh2.patch +++ b/freefilesync/debian/patches/ffs_libssh2.patch @@ -9,8 +9,8 @@ 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 +--- 10.21-0/libssh2/libssh2_wrap.h 2020-03-18 08:56:08.500065173 -0400 ++++ 10.21-1/libssh2/libssh2_wrap.h 2020-03-18 09:11:49.398311857 -0400 @@ -172,8 +172,8 @@ ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT); ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET); @@ -19,18 +19,6 @@ Date: 2019-09-17T13:41:23Z - 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.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! - { -- 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) - }); - } + + default: + return replaceCpy<std::wstring>(L"SSH status %x", L"%x", numberTo<std::wstring>(sc)); diff --git a/freefilesync/debian/patches/ffs_no_check_updates.patch b/freefilesync/debian/patches/ffs_no_check_updates.patch index 4e56d19..fcbeb97 100644 --- a/freefilesync/debian/patches/ffs_no_check_updates.patch +++ b/freefilesync/debian/patches/ffs_no_check_updates.patch @@ -1,7 +1,7 @@ -diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14-1/FreeFileSync/Source/ui/main_dlg.cpp ---- 10.9-0/FreeFileSync/Source/ui/main_dlg.cpp 2019-02-10 22:01:42.029158919 -0500 -+++ 10.14-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-07-16 10:56:40.213575535 -0400 -@@ -5298,7 +5298,7 @@ +diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 11.1-1/FreeFileSync/Source/ui/main_dlg.cpp +--- 11.1-0/FreeFileSync/Source/ui/main_dlg.cpp 2020-08-31 20:04:21.621863187 -0400 ++++ 11.1-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-08-31 20:55:07.732089665 -0400 +@@ -5606,7 +5606,7 @@ globalCfg_.gui.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value! m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.gui.lastUpdateCheck)); @@ -10,24 +10,23 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14- if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5306,6 +5306,7 @@ +@@ -5614,6 +5614,7 @@ automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion, - automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare().get()).get()); + automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); } + */ } -@@ -5313,7 +5314,7 @@ - { - //execute just once per startup! - Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), nullptr, this); -- +@@ -5623,6 +5624,7 @@ + [[maybe_unused]] bool ubOk = Unbind(wxEVT_IDLE, &MainDialog::onRegularUpdateCheck, this); + assert(ubOk); + + /* if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5327,6 +5328,7 @@ +@@ -5636,6 +5638,7 @@ resultAsync.get()); //run on main thread: }); } @@ -35,10 +34,10 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14- } -diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 10.14-1/FreeFileSync/Source/ui/version_check.cpp ---- 10.9-0/FreeFileSync/Source/ui/version_check.cpp 2019-02-10 22:01:42.126160041 -0500 -+++ 10.14-1/FreeFileSync/Source/ui/version_check.cpp 2019-07-16 11:45:36.113848111 -0400 -@@ -69,6 +69,8 @@ +diff -x '*.orig' -x '*.rej' -Naur 11.1-0/FreeFileSync/Source/ui/version_check.cpp 11.1-1/FreeFileSync/Source/ui/version_check.cpp +--- 11.1-0/FreeFileSync/Source/ui/version_check.cpp 2020-08-31 20:04:21.573862614 -0400 ++++ 11.1-1/FreeFileSync/Source/ui/version_check.cpp 2020-08-31 20:48:08.102811585 -0400 +@@ -70,6 +70,8 @@ bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) { @@ -47,7 +46,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1 if (lastUpdateCheck == getVersionCheckInactiveId()) return false; -@@ -156,8 +158,7 @@ +@@ -155,8 +157,7 @@ { try { @@ -56,32 +55,32 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1 + const std::string buf = ""; updateDetailsMsg = utfTo<std::wstring>(buf); } - catch (const zen::SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); } -@@ -187,8 +188,7 @@ - //access is thread-safe on Windows (WinInet), but not on Linux/OS X (wxWidgets) + catch (const SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); } +@@ -185,8 +186,7 @@ + std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError { -- const std::string buffer = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, -- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError -+ const std::string buffer = ""; - return trimCpy(buffer); +- const std::string response = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, +- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError ++ const std::string response = ""; + return trimCpy(response); } -@@ -235,13 +235,13 @@ - const std::string onlineVersion = getOnlineVersion(geHttpPostParameters()); //throw SysError +@@ -233,13 +233,13 @@ + const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError lastOnlineVersion = onlineVersion; - if (haveNewerVersionOnline(onlineVersion)) -- showUpdateAvailableDialog(parent, onlineVersion); +- showUpdateAvailableDialog(&parent, onlineVersion); - else + //if (haveNewerVersionOnline(onlineVersion)) -+ // showUpdateAvailableDialog(parent, onlineVersion); ++ // showUpdateAvailableDialog(&parent, onlineVersion); + //else - showNotificationDialog(parent, DialogInfoType::info, PopupDialogCfg(). - setIcon(getResourceImage(L"update_check")). + showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg(). + setIcon(loadImage("update_check")). setTitle(_("Check for Program Updates")). - setMainInstructions(_("FreeFileSync is up to date."))); + setMainInstructions(_("Use your package manager for any updates to FreeFileSync."))); } - catch (const zen::SysError& e) + catch (const SysError& e) { diff --git a/freefilesync/debian/patches/ffs_no_wx311.patch b/freefilesync/debian/patches/ffs_no_wx311.patch index e6069d4..22d8260 100644 --- a/freefilesync/debian/patches/ffs_no_wx311.patch +++ b/freefilesync/debian/patches/ffs_no_wx311.patch @@ -1,13 +1,22 @@ 2019-08-15 just compile. -diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp ---- 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-07 05:03:34.000000000 -0400 -+++ 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-08 19:16:54.026727623 -0400 -@@ -984,7 +984,8 @@ +diff -Naur 10.25-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.25-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.25-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 11.0-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-07-22 11:39:25.820068366 -0400 +@@ -293,7 +293,8 @@ + { + showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); + } +- m_listBoxGdriveUsers->Append(gdriveAccounts); ++ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic ++ m_listBoxGdriveUsers->Append(item); + + //set default values for Google Drive: use first item of m_listBoxGdriveUsers + if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase)) +@@ -1682,7 +1683,7 @@ //setMainInstructionFont(*m_staticTextMain); - m_bitmapActivation->SetBitmap(getResourceImage(L"website")); + m_bitmapActivation->SetBitmap(loadImage("internet")); - m_textCtrlOfflineActivationKey->ForceUpper(); -+ // Fedora 27 does not have wxWidgets 3.1.1 yet. https://github.com/wxWidgets/wxWidgets/commit/69b66e9e2e2b8e49e3816acdde079686ce9b0da1 + //m_textCtrlOfflineActivationKey->ForceUpper(); m_textCtrlLastError ->ChangeValue(lastErrorMsg); @@ -26,47 +35,43 @@ diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp toScroll += scrollSpeed * deltaSecs; } else -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:26:56.794422701 -0400 -@@ -75,8 +75,9 @@ - Zstring cfgFolderPath; - //OS standard path (XDG layout): ~/.config/FreeFileSync - //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag -- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); -- cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync"; -+ // Fedora does not have wxGTK 3.1.1 which is the dev branch. -+ //wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); -+ cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync"; +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.18-1/FreeFileSync/Source/ffs_paths.cpp 2019-11-20 08:55:38.553446634 -0500 +@@ -80,8 +80,8 @@ + + //OS standard path (XDG layout): ~/.config/FreeFileSync + //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag +- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); +- const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync"; ++ // Many distros do not have wxGTK 3.1.1 which is the dev branch. ++ const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync"; + try //create the config folder if not existing + create "Logs" subfolder while we're at it + { +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400 +@@ -120,7 +120,8 @@ - std::call_once(onceFlagCreateCfgPath, [&] -diff --git a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp -index 6e769bb..ce6110b 100644 ---- a/FreeFileSync/Source/ui/command_box.cpp -+++ b/FreeFileSync/Source/ui/command_box.cpp -@@ -130,7 +130,9 @@ void CommandBox::setValueAndUpdateList(const wxString& value) - //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(items); -+ for (const wxString& item : items) +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic + this->Append(item); -+ - + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(value); //preserve main text! -diff --git a/FreeFileSync/Source/ui/folder_history_box.cpp b/FreeFileSync/Source/ui/folder_history_box.cpp -index 2b824b1..a17ea2f 100644 ---- a/FreeFileSync/Source/ui/folder_history_box.cpp -+++ b/FreeFileSync/Source/ui/folder_history_box.cpp -@@ -90,7 +90,8 @@ void FolderHistoryBox::setValueAndUpdateList(const wxString& folderPathPhrase) - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400 +@@ -90,7 +90,8 @@ + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(dirList); -+ for (const wxString& dir : dirList) -+ this->Append(dir); - +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic ++ this->Append(itemk); + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(folderPathPhrase); //preserve main text! diff --git a/freefilesync/debian/patches/ffs_sftp.patch b/freefilesync/debian/patches/ffs_sftp.patch index c30b09c..09e6655 100644 --- a/freefilesync/debian/patches/ffs_sftp.patch +++ b/freefilesync/debian/patches/ffs_sftp.patch @@ -3,20 +3,21 @@ 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 '*.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 -@@ -56,9 +56,10 @@ - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/afs/sftp.cpp 10.24-1/FreeFileSync/Source/afs/sftp.cpp +--- 10.24-0/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:01:12.821889929 -0400 ++++ 10.24-1/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:37:50.229446467 -0400 +@@ -63,10 +63,10 @@ + LIBSSH2_SFTP_S_IROTH | LIBSSH2_SFTP_S_IXOTH; + //attention: if operation fails due to time out, e.g. file copy, the cleanup code may hang, too => total delay = 2 x time out interval - --const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 --const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * MAX_SFTP_OUTGOING_SIZE; // +- +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * MAX_SFTP_OUTGOING_SIZE; // -static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); +// these values are all manually derived from https://github.com/libssh2/libssh2/blob/master/src/sftp.h which for some weak reason are not included in the libssh2-devel headers. -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * 30000; //https://github.com/libssh2/libssh2/issues/90 -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * 30000; // ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * 30000; //https://github.com/libssh2/libssh2/issues/90 ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * 30000; // +//static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); - /* - Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: - + + /* Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: + diff --git a/freefilesync/debian/patches/ffs_traditional_view.patch b/freefilesync/debian/patches/ffs_traditional_view.patch new file mode 100644 index 0000000..e602033 --- /dev/null +++ b/freefilesync/debian/patches/ffs_traditional_view.patch @@ -0,0 +1,275 @@ +diff --git a/FreeFileSync/Source/ui/file_grid.cpp b/FreeFileSync/Source/ui/file_grid.cpp +index 4ee72b97..d9b9a4c7 100644 +--- a/FreeFileSync/Source/ui/file_grid.cpp ++++ b/FreeFileSync/Source/ui/file_grid.cpp +@@ -437,6 +437,7 @@ private: + case ItemPathFormat::relative: + return utfTo<std::wstring>(fsObj->getRelativePath<side>()); + case ItemPathFormat::full: ++ case ItemPathFormat::traditional: + return AFS::getDisplayPath(fsObj->getAbstractPath<side>()); + } + assert(false); +@@ -615,6 +616,16 @@ private: + else //=> BaseFolderPair + groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>()); + break; ++ case ItemPathFormat::traditional: ++ if (auto groupFolder = dynamic_cast<const FolderPair*>(pdi.folderGroupObj)) ++ { ++ groupName = utfTo<std::wstring>(groupFolder->template getItemName<side>()); ++ groupParentFolder = AFS::getDisplayPath(groupFolder->parent().template getAbstractPath<side>()) + \ ++ FILE_NAME_SEPARATOR + utfTo<std::wstring>(groupFolder->template getItemName<side>()); ++ } ++ else //=> BaseFolderPair ++ groupParentFolder = AFS::getDisplayPath(pdi.fsObj->base().getAbstractPath<side>()); ++ break; + } + //add slashes for better readability + assert(!contains(groupParentFolder, L'/') || !contains(groupParentFolder, L'\\')); +@@ -650,72 +661,84 @@ private: + int widthGroupName = groupName .empty() ? 0 : ((iconMgr ? iconSize + gridGap_ : 0) + getTextExtentBuffered(dc, groupName).x + (iconMgr ? gridGap_ : 0)); + int widthGroupItems = (iconMgr ? iconSize + gridGap_ : 0) + groupItemNamesWidth; + +- //not enough space? => collapse +- if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; +- excessWidth > 0) ++ switch (itemPathFormat_) + { +- if (multiItemGroup && !groupParentFolder.empty() && !groupName.empty()) +- { +- //1. render group components on two rows +- stackedGroupRender = true; +- +- if (!endsWith(groupParentFolder, L'/' ) && +- !endsWith(groupParentFolder, L'\\')) +- groupParentFolder += groupParentSep; +- groupParentFolder += ELLIPSIS; +- +- widthGroupParent = getTextExtentBuffered(dc, groupParentFolder).x + gridGap_; +- +- int widthGroupStack = std::max(widthGroupParent, widthGroupName); +- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; +- +- if (excessWidth > 0) +- { +- //2. shrink group stack (group parent only) +- if (widthGroupParent > widthGroupName) +- { +- widthGroupStack = widthGroupParent = std::max(widthGroupParent - excessWidth, widthGroupName); +- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; +- } +- if (excessWidth > 0) +- { +- //3. shrink item rendering +- widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); +- excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; +- +- if (excessWidth > 0) +- { +- //4. shrink group stack +- widthGroupStack = std::max(widthGroupStack - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); +- +- widthGroupParent = std::min(widthGroupParent, widthGroupStack); +- widthGroupName = std::min(widthGroupName, widthGroupStack); +- } +- } +- } +- } +- else //group details on single row +- { +- //1. shrink group parent +- if (!groupParentFolder.empty()) +- { +- widthGroupParent = std::max(widthGroupParent - excessWidth, ellipsisWidth + (iconMgr ? gridGap_ : 0)); +- excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; +- } +- if (excessWidth > 0) +- { +- //2. shrink item rendering +- widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); +- excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; +- +- if (excessWidth > 0) +- //3. shrink group name +- if (!groupName.empty()) +- widthGroupName = std::max(widthGroupName - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); +- } +- } ++ case ItemPathFormat::traditional: ++ //widthGroupName = 0; ++ widthGroupParent -= widthGroupName ; ++ break; ++ case ItemPathFormat::name: ++ case ItemPathFormat::relative: ++ case ItemPathFormat::full: ++ default: ++ // the insane logic of the new views ++ //not enough space? => collapse ++ if (int excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; ++ excessWidth > 0) ++ { ++ if (multiItemGroup && !groupParentFolder.empty() && !groupName.empty()) ++ { ++ //1. render group components on two rows ++ stackedGroupRender = true; ++ ++ if (!endsWith(groupParentFolder, L'/' ) && ++ !endsWith(groupParentFolder, L'\\')) ++ groupParentFolder += groupParentSep; ++ groupParentFolder += ELLIPSIS; ++ ++ widthGroupParent = getTextExtentBuffered(dc, groupParentFolder).x + gridGap_; ++ ++ int widthGroupStack = std::max(widthGroupParent, widthGroupName); ++ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; ++ ++ if (excessWidth > 0) ++ { ++ //2. shrink group stack (group parent only) ++ if (widthGroupParent > widthGroupName) ++ { ++ widthGroupStack = widthGroupParent = std::max(widthGroupParent - excessWidth, widthGroupName); ++ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; ++ } ++ if (excessWidth > 0) ++ { ++ //3. shrink item rendering ++ widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); ++ excessWidth = gridGap_ + widthGroupStack + widthGroupItems - maxWidth; ++ ++ if (excessWidth > 0) ++ { ++ //4. shrink group stack ++ widthGroupStack = std::max(widthGroupStack - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); ++ ++ widthGroupParent = std::min(widthGroupParent, widthGroupStack); ++ widthGroupName = std::min(widthGroupName, widthGroupStack); ++ } ++ } ++ } ++ } ++ else //group details on single row ++ { ++ //1. shrink group parent ++ if (!groupParentFolder.empty()) ++ { ++ widthGroupParent = std::max(widthGroupParent - excessWidth, ellipsisWidth + (iconMgr ? gridGap_ : 0)); ++ excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; ++ } ++ if (excessWidth > 0) ++ { ++ //2. shrink item rendering ++ widthGroupItems = std::max(widthGroupItems - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth); ++ excessWidth = gridGap_ + widthGroupParent + widthGroupName + widthGroupItems - maxWidth; ++ ++ if (excessWidth > 0) ++ //3. shrink group name ++ if (!groupName.empty()) ++ widthGroupName = std::max(widthGroupName - excessWidth, (iconMgr ? iconSize + gridGap_ : 0) + ellipsisWidth + (iconMgr ? gridGap_ : 0)); ++ } ++ } ++ } ++ break; + } +- + return + { + itemName, +@@ -786,6 +809,9 @@ private: + rectGroup = rectGroupParent = rectGroupName = rectTmp; + + rectGroupParent.width = widthGroupParent; ++ // re-add back the width of groupname so that the directory name is clickable ++ if (itemPathFormat_ == ItemPathFormat::traditional) ++ rectGroupParent.width += widthGroupName; + rectGroupName .width = widthGroupName; + + if (stackedGroupRender) +@@ -837,7 +863,7 @@ private: + dc.GradientFillLinear(rectNav, getColorSelectionGradientFrom(), backCol, wxEAST); + } + +- if (!groupName.empty() && row == groupBeginRow) ++ if (!(itemPathFormat_ == ItemPathFormat::traditional) && !groupName.empty() && row == groupBeginRow) + { + wxDCTextColourChanger textColorGroupName(dc); + if (static_cast<HoverAreaGroup>(rowHover) == HoverAreaGroup::groupName) +@@ -855,9 +881,9 @@ private: + drawCellText(dc, rectGroupName, groupName, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupName)); + } + +- if (!groupParentFolder.empty() && ++ if (itemPathFormat_ == ItemPathFormat::traditional || (!groupParentFolder.empty() && + ((stackedGroupRender && row == groupBeginRow + 1) || +- (!stackedGroupRender && row == groupBeginRow))) ++ (!stackedGroupRender && row == groupBeginRow)))) + { + drawCellText(dc, rectGroupParent, groupParentFolder, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, &getTextExtentBuffered(dc, groupParentFolder)); + } +@@ -1020,6 +1046,8 @@ private: + return _("Relative path"); + case ItemPathFormat::full: + return _("Full path"); ++ case ItemPathFormat::traditional: ++ return _("Traditional"); + } + assert(false); + break; +diff --git a/FreeFileSync/Source/ui/file_grid_attr.h b/FreeFileSync/Source/ui/file_grid_attr.h +index 324619c1..7511a1ab 100644 +--- a/FreeFileSync/Source/ui/file_grid_attr.h ++++ b/FreeFileSync/Source/ui/file_grid_attr.h +@@ -79,6 +79,7 @@ enum class ItemPathFormat + name, + relative, + full, ++ traditional, + }; + + const ItemPathFormat defaultItemPathFormatLeftGrid = ItemPathFormat::relative; +diff --git a/FreeFileSync/Source/ui/main_dlg.cpp b/FreeFileSync/Source/ui/main_dlg.cpp +index 491b7321..2d5c20c3 100644 +--- a/FreeFileSync/Source/ui/main_dlg.cpp ++++ b/FreeFileSync/Source/ui/main_dlg.cpp +@@ -2716,6 +2716,7 @@ void MainDialog::onGridLabelContextRim(bool leftSide) + addFormatEntry(_("Item name" ), ItemPathFormat::name); + addFormatEntry(_("Relative path"), ItemPathFormat::relative); + addFormatEntry(_("Full path" ), ItemPathFormat::full); ++ addFormatEntry(_("Traditional" ), ItemPathFormat::traditional); + + //---------------------------------------------------------------------------------------------- + menu.addSeparator(); +diff -x .git -Naur 11.1-1/FreeFileSync/Source/config.cpp 11.1-2/FreeFileSync/Source/config.cpp +--- 11.1-1/FreeFileSync/Source/config.cpp 2020-09-01 19:07:43.715122167 -0400 ++++ 11.1-2/FreeFileSync/Source/config.cpp 2020-09-10 09:38:14.539542699 -0400 +@@ -528,6 +528,9 @@ + case ItemPathFormat::full: + output = "Full"; + break; ++ case ItemPathFormat::traditional: ++ output = "Traditional"; ++ break; + } + } + +@@ -541,6 +545,8 @@ + value = ItemPathFormat::relative; + else if (tmp == "Full") + value = ItemPathFormat::full; ++ else if (tmp == "Traditional") ++ value = ItemPathFormat::traditional; + else + return false; + return true; +diff -x .git -Naur 11.1-1/FreeFileSync/Source/ui/file_view.cpp 11.1-2/FreeFileSync/Source/ui/file_view.cpp +--- 11.1-1/FreeFileSync/Source/ui/file_view.cpp 2020-09-01 19:07:43.719122215 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/file_view.cpp 2020-09-10 09:40:11.609044834 -0400 +@@ -798,6 +798,7 @@ + break; + + case ItemPathFormat::full: ++ case ItemPathFormat::traditional: + if ( ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, LEFT_SIDE>(folderPairs_)); + else if ( ascending && !onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<true, RIGHT_SIDE>(folderPairs_)); + else if (!ascending && onLeft) std::sort(sortedRef_.begin(), sortedRef_.end(), LessFullPath<false, LEFT_SIDE>(folderPairs_)); diff --git a/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch new file mode 100644 index 0000000..12a1b43 --- /dev/null +++ b/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch @@ -0,0 +1,314 @@ +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/wx+/choice_enum.h +--- 10.24-0/wx+/choice_enum.h 2020-05-17 18:30:59.441499418 -0400 ++++ 10.24-1/wx+/choice_enum.h 2020-05-17 18:53:59.893685507 -0400 +@@ -7,7 +7,6 @@ + #ifndef CHOICE_ENUM_H_132413545345687 + #define CHOICE_ENUM_H_132413545345687 + +-#include <unordered_map> + #include <vector> + #include <wx/choice.h> + +@@ -44,11 +43,8 @@ + descrList.push_back({ value, { text, tooltip } }); + return *this; + } +- + using DescrList = std::vector<std::pair<Enum, std::pair<wxString, wxString>>>; + DescrList descrList; +- +- std::unordered_map<const wxChoice*, std::vector<wxString>> itemsSetLast; + }; + template <class Enum> void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value); + template <class Enum> Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl); +@@ -69,34 +65,26 @@ + + //--------------- impelementation ------------------------------------------- + template <class Enum> +-void setEnumVal(EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) ++void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) + { +- auto& itemsSetLast = mapping.itemsSetLast[&ctrl]; ++ ctrl.Clear(); + +- std::vector<wxString> items; ++ int selectedPos = 0; + for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) +- items.push_back(it->second.first); +- +- if (items != itemsSetLast) + { +- ctrl.Set(items); //expensive as fuck! => only call when absolutely needed! +- itemsSetLast = std::move(items); ++ ctrl.Append(it->second.first); ++ if (it->first == value) ++ { ++ selectedPos = it - mapping.descrList.begin(); ++ ++ if (it->second.second.empty()) ++ ctrl.UnsetToolTip(); ++ else ++ ctrl.SetToolTip(it->second.second); ++ } + } +- //----------------------------------------------------------------- +- +- const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); +- if (it != mapping.descrList.end()) +- { +- if (const wxString& tooltip = it->second.second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); + +- const int selectedPos = it - mapping.descrList.begin(); +- ctrl.SetSelection(selectedPos); +- } +- else assert(false); ++ ctrl.SetSelection(selectedPos); + } + + template <class Enum> +@@ -115,17 +103,11 @@ + + template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl) + { +- const int selectedPos = ctrl.GetSelection(); ++ const Enum currentValue = getEnumVal(mapping, ctrl); + +- if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) +- { +- if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); +- } +- else assert(false); ++ for (const auto& [enumValue, textAndTooltip] : mapping.descrList) ++ if (currentValue == enumValue) ++ ctrl.SetToolTip(textAndTooltip.second); + } + } + + +Version: 11.1 +Message: this one is really just a fix of Zenju's sloppy Makefile. He'll figure it out on his own for v11.2. If I tell him now, he'll replace the source tarball for 11.1 which will mess up everyone's checksums. +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/Makefile 11.1-2/FreeFileSync/Source/Makefile +--- 11.1-1/FreeFileSync/Source/Makefile 2020-09-01 20:07:26.751011466 -0400 ++++ 11.1-2/FreeFileSync/Source/Makefile 2020-09-01 20:17:31.030611773 -0400 +@@ -95,6 +95,7 @@ + cppFiles+=../../zen/shutdown.cpp + cppFiles+=../../zen/sys_error.cpp + cppFiles+=../../zen/sys_info.cpp ++cppFiles+=../../zen/sys_version.cpp + cppFiles+=../../zen/thread.cpp + cppFiles+=../../zen/zlib_wrap.cpp + cppFiles+=../../wx+/file_drop.cpp +Message: Now have to revert wxWidgets 3.1.4 upstreamisms +cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxASCII_STR' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxASCII_STR' ) ; ) +cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) ; ) +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 11.1-2/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp +--- 11.1-1/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-09-01 19:07:43.703122022 -0400 ++++ 11.1-2/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp 2020-09-01 20:13:16.679447647 -0400 +@@ -145,7 +145,7 @@ + } + + Zstring newFolderPath; +- wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo<wxString>(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); ++ wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo<wxString>(defaultFolderPath)); //put modal wxWidgets dialogs on stack: creating on freestore leads to memleak! + if (dirPicker.ShowModal() != wxID_OK) + return; + newFolderPath = utfTo<Zstring>(dirPicker.GetPath()); +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/command_box.h 11.1-2/FreeFileSync/Source/ui/command_box.h +--- 11.1-1/FreeFileSync/Source/ui/command_box.h 2020-09-01 19:07:43.719122215 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/command_box.h 2020-09-01 20:09:56.840929352 -0400 +@@ -30,7 +30,7 @@ + const wxString choices[] = nullptr, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); ++ const wxString& name = wxComboBoxNameStr); + + void setHistory(const std::vector<Zstring>& history, size_t historyMax) { history_ = history; historyMax_ = historyMax; } + std::vector<Zstring> getHistory() const { return history_; } +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 11.1-2/FreeFileSync/Source/ui/folder_history_box.h +--- 11.1-1/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 19:07:43.719122215 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/folder_history_box.h 2020-09-01 20:09:50.624849989 -0400 +@@ -68,7 +68,7 @@ + const wxString choices[] = nullptr, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); ++ const wxString& name = wxComboBoxNameStr); + + void setHistory(std::shared_ptr<HistoryList> sharedHistory) { sharedHistory_ = std::move(sharedHistory); } + std::shared_ptr<HistoryList> getHistory() { return sharedHistory_; } +diff -x '*.orig' -x '*.rej' -aur 11.1-1/FreeFileSync/Source/ui/folder_selector.cpp 11.1-2/FreeFileSync/Source/ui/folder_selector.cpp +--- 11.1-1/FreeFileSync/Source/ui/folder_selector.cpp 2020-09-01 20:07:25.907000676 -0400 ++++ 11.1-2/FreeFileSync/Source/ui/folder_selector.cpp 2020-09-01 20:13:48.791852316 -0400 +@@ -227,9 +227,10 @@ + } + + Zstring shellItemPath; +- wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo<wxString>(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); +- //GTK2: "Show hidden" is also available as a context menu option in the folder picker! +- //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? ++ wxDirDialog dirPicker(parent_, _("Select a folder"), utfTo<wxString>(defaultFolderPath)); //put modal wxWidgets dialogs on stack: creating on freestore leads to memleak! ++ ++ //-> following doesn't seem to do anything at all! still "Show hidden" is available as a context menu option: ++ //::gtk_file_chooser_set_show_hidden(GTK_FILE_CHOOSER(dirPicker.m_widget), true /*show_hidden*/); + + if (dirPicker.ShowModal() != wxID_OK) + return; +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/bitmap_button.h 11.1-2/wx+/bitmap_button.h +--- 11.1-1/wx+/bitmap_button.h 2020-09-01 19:07:43.727122311 -0400 ++++ 11.1-2/wx+/bitmap_button.h 2020-09-01 20:10:31.385364671 -0400 +@@ -26,7 +26,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) + { + SetLabel(label); +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/dc.h 11.1-2/wx+/dc.h +--- 11.1-1/wx+/dc.h 2020-09-01 19:09:33.652448178 -0400 ++++ 11.1-2/wx+/dc.h 2020-09-01 20:08:43.183988180 -0400 +@@ -68,9 +68,6 @@ + inline + int fastFromDIP(int d) //like wxWindow::FromDIP (but tied to primary monitor and buffered) + { +-#ifndef wxHAVE_DPI_INDEPENDENT_PIXELS +-#error why is wxHAVE_DPI_INDEPENDENT_PIXELS not defined? +-#endif + //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 + //=> requires general fix at wxWidgets-level + +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/graph.h 11.1-2/wx+/graph.h +--- 11.1-1/wx+/graph.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/graph.h 2020-09-01 20:10:36.541429649 -0400 +@@ -153,7 +153,7 @@ + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, +- const wxString& name = wxASCII_STR(wxPanelNameStr)); ++ const wxString& name = wxPanelNameStr); + + class CurveAttributes + { +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.cpp 11.1-2/wx+/grid.cpp +--- 11.1-1/wx+/grid.cpp 2020-09-01 20:07:24.418981662 -0400 ++++ 11.1-2/wx+/grid.cpp 2020-09-01 20:10:23.745268393 -0400 +@@ -268,7 +268,7 @@ + { + public: + SubWindow(Grid& parent) : +- wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxASCII_STR(wxPanelNameStr)), ++ wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxPanelNameStr), + parent_(parent) + { + Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/grid.h 11.1-2/wx+/grid.h +--- 11.1-1/wx+/grid.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/grid.h 2020-09-01 20:10:48.817584344 -0400 +@@ -149,7 +149,7 @@ + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxNO_BORDER, +- const wxString& name = wxASCII_STR(wxPanelNameStr)); ++ const wxString& name = wxPanelNameStr); + + size_t getRowCount() const; + +diff -x '*.orig' -x '*.rej' -aur 11.1-1/wx+/toggle_button.h 11.1-2/wx+/toggle_button.h +--- 11.1-1/wx+/toggle_button.h 2020-09-01 19:07:43.731122359 -0400 ++++ 11.1-2/wx+/toggle_button.h 2020-09-01 20:10:44.629531569 -0400 +@@ -24,7 +24,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) {} + + //wxButton constructor +@@ -35,7 +35,7 @@ + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, +- const wxString& name = wxASCII_STR(wxButtonNameStr)) : ++ const wxString& name = wxButtonNameStr) : + wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) + { + SetLabel(label); +Version: 11.1 +Message: Had to revert gui_status_handler.cpp and .h entirely to version 11.0 to avoid the wx 3.1.4-isms here. +diff --git a/FreeFileSync/Source/ui/gui_status_handler.cpp b/FreeFileSync/Source/ui/gui_status_handler.cpp +index 3cb6aaaa..9484af2c 100644 +--- a/FreeFileSync/Source/ui/gui_status_handler.cpp ++++ b/FreeFileSync/Source/ui/gui_status_handler.cpp +@@ -43,8 +43,8 @@ StatusHandlerTemporaryPanel::StatusHandlerTemporaryPanel(MainDialog& dlg, + mainDlg_.Update(); //don't wait until idle event! + + //register keys +- mainDlg_. Bind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); +- mainDlg_.m_buttonCancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); ++ mainDlg_.Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); ++ mainDlg_.m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); + } + + +@@ -128,9 +128,8 @@ StatusHandlerTemporaryPanel::~StatusHandlerTemporaryPanel() + mainDlg_.auiMgr_.Update(); + + //unregister keys +- [[maybe_unused]] bool ubOk1 = mainDlg_. Unbind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); +- [[maybe_unused]] bool ubOk2 = mainDlg_.m_buttonCancel->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); +- assert(ubOk1 && ubOk2); ++ mainDlg_.Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); ++ mainDlg_.m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); + + mainDlg_.compareStatus_->teardown(); + +@@ -314,20 +313,20 @@ void StatusHandlerTemporaryPanel::forceUiUpdateNoThrow() + } + + +-void StatusHandlerTemporaryPanel::onLocalKeyEvent(wxKeyEvent& event) ++void StatusHandlerTemporaryPanel::OnKeyPressed(wxKeyEvent& event) + { + const int keyCode = event.GetKeyCode(); + if (keyCode == WXK_ESCAPE) + { + wxCommandEvent dummy; +- onAbortCompare(dummy); ++ OnAbortCompare(dummy); + } + + event.Skip(); + } + + +-void StatusHandlerTemporaryPanel::onAbortCompare(wxCommandEvent& event) ++void StatusHandlerTemporaryPanel::OnAbortCompare(wxCommandEvent& event) + { + userRequestAbort(); + } +diff --git a/FreeFileSync/Source/ui/gui_status_handler.h b/FreeFileSync/Source/ui/gui_status_handler.h +index e8ed01e4..2a9e00d2 100644 +--- a/FreeFileSync/Source/ui/gui_status_handler.h ++++ b/FreeFileSync/Source/ui/gui_status_handler.h +@@ -41,8 +41,8 @@ public: + Result reportResults(); //noexcept!! + + private: +- void onLocalKeyEvent(wxKeyEvent& event); +- void onAbortCompare(wxCommandEvent& event); //handle abort button click ++ void OnKeyPressed(wxKeyEvent& event); ++ void OnAbortCompare(wxCommandEvent& event); //handle abort button click + void showStatsPanel(); + + MainDialog& mainDlg_; diff --git a/freefilesync/debian/patches/series b/freefilesync/debian/patches/series index 51b0191..7896b6e 100644 --- a/freefilesync/debian/patches/series +++ b/freefilesync/debian/patches/series @@ -1,7 +1,11 @@ ffs_allow_parallel_ops.patch ffs_devuan.patch +ffs_devuan_gtk3.patch ffs_no_check_updates.patch ffs_no_wx311.patch ffs_sftp.patch ffs_libssh2.patch ffs_curl.patch +revert_zenju_aggressive_upstreamisms.patch +ffs_gcc.patch +ffs_traditional_view.patch diff --git a/freefilesync/debian/rules b/freefilesync/debian/rules index 6ebd427..a359bd9 100755 --- a/freefilesync/debian/rules +++ b/freefilesync/debian/rules @@ -4,6 +4,7 @@ #export DEB_BUILD_MAINT_OPTIONS = hardening=+all #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export linkFlags="${LDFLAGS} -pie" export appname=freefilesync export pkgname=FreeFileSync @@ -14,6 +15,8 @@ export buildroot="${debuilddir}/${appname}" export _datadir="/usr/share" export _bindir="/usr/bin" +export TMPDIR=/tmp + %: dh $@ @@ -93,3 +96,7 @@ override_dh_auto_install: convert ${pkgname}/Build/Resources/${prog2name}.png -filter Lanczos -resize 128x128 ${buildroot}${_datadir}/icons/hicolor/128x128/mimetypes/application-x-freefilesync-real.png rm -f file_batch.png file_sync.png + +override_dh_fixperms: + dh_fixperms || : + chmod 0644 ${buildroot}${_datadir}/${appname}/* || : diff --git a/freefilesync/debian/source/lintian-overrides b/freefilesync/debian/source/lintian-overrides new file mode 100644 index 0000000..b9aa80e --- /dev/null +++ b/freefilesync/debian/source/lintian-overrides @@ -0,0 +1,2 @@ +patch-file-present-but-not-mentioned-in-series ffs_devuan_gtk*.patch +source-nmu-has-incorrect-version-number diff --git a/freefilesync/debian/watch b/freefilesync/debian/watch index 880dfa8..aeea20e 100644 --- a/freefilesync/debian/watch +++ b/freefilesync/debian/watch @@ -1,3 +1,4 @@ # You must remove unused comment lines for the released package. -version=3 -https://gitlab.com/opensource-tracking/FreeFileSync/-/archive/([\d\.]+)/FreeFileSync-([\d\.]+).tar.gz +version=4 +opts=filenamemangle=s/.*\/archive\/(\d\S+)\/FreeFileSync.*\.tar\.gz/FreeFileSync-$1\.tar\.gz/g \ + https://gitlab.com/opensource-tracking/FreeFileSync/tags?sort=updated_desc .*/archive/(\d\S+)/.*\.tar\.gz.* diff --git a/freefilesync/ffs_allow_parallel_ops.patch b/freefilesync/ffs_allow_parallel_ops.patch index e464662..d317bf0 100644 --- a/freefilesync/ffs_allow_parallel_ops.patch +++ b/freefilesync/ffs_allow_parallel_ops.patch @@ -12,14 +12,15 @@ diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/ui/folde if (showCloudSetupDialog(parent_, folderPathPhrase, parallelOps, get(parallelOpsDisabledReason)) != ReturnSmallDlg::BUTTON_OKAY) return; diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 10.9-1/FreeFileSync/Source/ui/sync_cfg.cpp ---- 10.9-0/FreeFileSync/Source/ui/sync_cfg.cpp 2019-02-10 22:01:42.075159451 -0500 -+++ 10.9-1/FreeFileSync/Source/ui/sync_cfg.cpp 2019-02-11 21:25:11.685992654 -0500 -@@ -263,7 +263,7 @@ +--- 10.21-0/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 08:56:08.644066742 -0400 ++++ 10.21-1/FreeFileSync/Source/ui/sync_cfg.cpp 2020-03-18 09:13:30.459409986 -0400 +@@ -290,7 +290,7 @@ + commandHistoryOut_(commandHistory), globalPairCfg_(globalPairCfg), localPairCfg_(localPairConfig), - showMultipleCfgs_(showMultipleCfgs), --perfPanelActive_(false), -+perfPanelActive_(true), - commandHistItemsMax_(commandHistItemsMax) +- enableExtraFeatures_(false), ++ enableExtraFeatures_(true), + showMultipleCfgs_(showMultipleCfgs) { setStandardButtonLayout(*bSizerStdButtons, StdButtons().setAffirmative(m_buttonOkay).setCancel(m_buttonCancel)); + diff --git a/freefilesync/ffs_curl.patch b/freefilesync/ffs_curl.patch index 25ad6a6..ec038d7 100644 --- a/freefilesync/ffs_curl.patch +++ b/freefilesync/ffs_curl.patch @@ -21,30 +21,19 @@ diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/a => 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 @@ +diff -Naur 10.20-0/libcurl/curl_wrap.h 10.20-1/libcurl/curl_wrap.h +--- 10.22-0/libcurl/curl_wrap.h 2020-03-18 15:49:57.839901161 -0400 ++++ 10.22-1/libcurl/curl_wrap.h 2020-03-18 15:56:21.034499900 -0400 +@@ -134,12 +134,7 @@ 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(CURLE_HTTP3); - ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); -+ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); -+ //ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); } -- static_assert(CURL_LAST == CURLE_AUTH_ERROR + 1); -+ //static_assert(CURL_LAST == CURLE_AUTH_ERROR + 1); +- static_assert(CURL_LAST == CURLE_QUIC_CONNECT_ERROR + 1); - return replaceCpy<std::wstring>(L"Curl status %x.", L"%x", numberTo<std::wstring>(static_cast<int>(sc))); + 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 3e1e9d3..c8b0fcc 100644 --- a/freefilesync/ffs_el.patch +++ b/freefilesync/ffs_el.patch @@ -1,10 +1,11 @@ +# 2020-07-22 starting at FreeFileSync 10.25 in 2020-06, we need g++-10 to compile but all EL targets (6, 7, and 8) do not have gcc 10 so this patch is not usable as is. But it should get the gtk3 fix if any CentOS targets get gcc-10. The cstddef discovery is from https://stackoverflow.com/questions/52567517/freefilesync-c-error-byte-is-not-a-member-of-std Some changes just make the application work better in an installed setting (e.g., the hard-coded resouce path). Tricking the wxWidgets ABI version comes from https://stackoverflow.com/questions/45123664/wxwidgets-runtime-error-mismatch-version/47822976#47822976 FreeFileSync 10.11 updated the default compile flags to -std=c++2a, but this fails on gcc 4.8.5 on el7. Reverting to -std=c++17 allows the application to compile. -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 +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.13-1/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400 @@ -55,7 +55,8 @@ Zstring fff::getResourceDirPf() @@ -17,37 +18,30 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile --- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400 -+++ 10.15-1/FreeFileSync/Source/Makefile 2019-08-16 08:19:12.101271747 -0400 ++++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 20:59:25.548277619 -0500 @@ -1,10 +1,10 @@ --EXENAME = FreeFileSync_$(shell arch) -+EXENAME = FreeFileSync +-exeName = FreeFileSync_$(shell arch) ++exeName = FreeFileSync - CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread - CXXFLAGS += `pkg-config --cflags openssl` + cxxFlags += `pkg-config --cflags openssl` @@ -17,6 +17,7 @@ - LINKFLAGS += `pkg-config --libs libssh2` + linkFlags += `pkg-config --libs libssh2` - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` + cxxFlags += `pkg-config --cflags gtk+-2.0` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + 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/RealTimeSync/application.h 10.11-1/FreeFileSync/Source/RealTimeSync/application.h --- 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 07:59:45.035147580 -0400 +++ 10.11-1/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 10:19:57.227913415 -0400 @@ -62,37 +56,37 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTim diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 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-16 08:19:21.959638104 -0400 ++++ 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-11-22 10:14:04.326175203 -0500 @@ -1,13 +1,14 @@ --EXENAME = RealTimeSync_$(shell arch) -+EXENAME = RealTimeSync +-exeName = RealTimeSync_$(shell arch) ++exeName = RealTimeSync --CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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++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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread #Gtk - support "no button border" - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` + cxxFlags += `pkg-config --cflags gtk+-2.0` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + cxxFlags += -isystem/usr/include/gtk-2.0 -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 -@@ -115,6 +115,8 @@ - L" x64"; +diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.19-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.22-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 15:49:57.837901137 -0400 ++++ 10.22-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 16:18:46.215713307 -0400 +@@ -97,6 +97,8 @@ + build += L"64 Bit"; #endif -+ build += -+ L" for CentOS 7"; - - GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize() ++ build += L" for CentOS"; ++ + build += SPACED_BULLET; + build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime())); diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/wx+/app_main.h 10.11-1/wx+/app_main.h --- 10.11-0/wx+/app_main.h 2019-04-12 07:59:44.936143019 -0400 @@ -117,14 +111,27 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/ring_buffer.h 10.11-1/z namespace zen -diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/serialize.h 10.11-1/zen/serialize.h +diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/serialize.h 10.19-1/zen/serialize.h --- 10.11-0/zen/serialize.h 2019-04-12 07:59:46.080195719 -0400 -+++ 10.11-1/zen/serialize.h 2019-04-12 10:19:57.229913463 -0400 -@@ -9,6 +9,7 @@ - ++++ 10.19-1/zen/serialize.h 2019-12-27 11:35:50.379901321 -0500 +@@ -10,6 +10,7 @@ #include <functional> #include <cstdint> + #include <stdexcept> +#include <cstddef> #include "string_base.h" //keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h! +Message: For -std=c++17 we do not get to use charconv. It appears it is not actually in use, because the application compiles with this patch. +diff -Naur -x '*.orig' -x '.git*' -x '*.swp' -x '*.rej' 10.18-0/zen/legacy_compiler.cpp 10.18-1/zen/legacy_compiler.cpp +--- 10.18-0/zen/legacy_compiler.cpp 2019-11-21 20:59:02.633016149 -0500 ++++ 10.18-1/zen/legacy_compiler.cpp 2019-11-21 20:59:31.042340308 -0500 +@@ -5,7 +5,7 @@ + // ***************************************************************************** + + #include "legacy_compiler.h" +-#include <charconv> ++//#include <charconv> + //1. including this one in string_tools.h blows up VC++: + // "An internal error has occurred in the compiler. (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\p2symtab.c', line 2618)" + //2. using inside PCH: "fatal error C1076: compiler limit: internal heap limit reached" diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch index 5c5e3b7..f804660 100644 --- a/freefilesync/ffs_fedora.patch +++ b/freefilesync/ffs_fedora.patch @@ -1,11 +1,7 @@ -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 +ffs_fedora 2020-07-22 now uses gtk3 +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.13-1/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400 @@ -55,7 +55,8 @@ Zstring fff::getResourceDirPf() @@ -16,81 +12,80 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S } -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 -@@ -75,7 +75,7 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); -+ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND); -diff -Naur 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile ---- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400 -+++ 10.11-1/FreeFileSync/Source/Makefile 2019-04-12 08:27:42.062542410 -0400 +diff -x '*.orig' -x '*.git' -x '*.rej' -x '*.swp' -Naur 11.0-0/FreeFileSync/Source/Makefile 11.0-1/FreeFileSync/Source/Makefile +--- 11.0-0/FreeFileSync/Source/Makefile 2020-07-22 11:36:55.000000000 -0400 ++++ 11.0-1/FreeFileSync/Source/Makefile 2020-07-22 13:36:27.193345688 -0400 @@ -1,10 +1,10 @@ --EXENAME = FreeFileSync_$(shell arch) -+EXENAME = FreeFileSync +-exeName = FreeFileSync_$(shell arch) ++exeName = FreeFileSync - CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread - CXXFLAGS += `pkg-config --cflags openssl` -@@ -17,6 +17,7 @@ CXXFLAGS += `pkg-config --cflags libssh2` - LINKFLAGS += `pkg-config --libs libssh2` - - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` + cxxFlags += `pkg-config --cflags openssl` +@@ -16,9 +16,10 @@ + cxxFlags += `pkg-config --cflags libssh2` + linkFlags += `pkg-config --libs libssh2` + +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` #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 -@@ -1,13 +1,14 @@ --EXENAME = RealTimeSync_$(shell arch) -+EXENAME = RealTimeSync +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 + + #support for SELinux (optional) + SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) +diff -x '*.orig' -x '*.git' -x '*.rej' -x '*.swp' -Naur 11.0-0/FreeFileSync/Source/RealTimeSync/Makefile 11.0-1/FreeFileSync/Source/RealTimeSync/Makefile +--- 11.0-0/FreeFileSync/Source/RealTimeSync/Makefile 2020-07-22 11:36:55.000000000 -0400 ++++ 11.0-1/FreeFileSync/Source/RealTimeSync/Makefile 2020-07-22 13:36:32.262394424 -0400 +@@ -1,15 +1,16 @@ +-exeName = RealTimeSync_$(shell arch) ++exeName = RealTimeSync - CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread #Gtk - support "no button border" - CXXFLAGS += `pkg-config --cflags gtk+-2.0` -+LINKFLAGS += `pkg-config --libs gtk+-2.0` +-cxxFlags += `pkg-config --cflags gtk+-2.0` ++cxxFlags += `pkg-config --cflags gtk+-3.0` ++linkFlags += `pkg-config --libs gtk+-3.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 +-cxxFlags += -isystem/usr/include/gtk-2.0 ++cxxFlags += -isystem/usr/include/gtk-3.0 -diff -Naur 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 08:27:24.421735762 -0400 -@@ -115,6 +115,8 @@ - L" x64"; + cppFiles= + cppFiles+=application.cpp +iff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.19-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.22-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 15:49:57.837901137 -0400 ++++ 10.22-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 15:51:50.381251257 -0400 +@@ -97,6 +97,8 @@ + build += L"64 Bit"; #endif -+ build += -+ L" for Fedora"; - - GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize() ++ build += L" for Fedora"; ++ + build += SPACED_BULLET; + build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime())); +diff -x '*.orig' -x '*.git' -x '*.rej' -x '*.swp' -Naur 11.0-0/wx+/dc.h 11.0-1/wx+/dc.h +--- 11.0-0/wx+/dc.h 2020-07-22 11:36:55.000000000 -0400 ++++ 11.0-1/wx+/dc.h 2020-07-22 13:37:49.535137357 -0400 +@@ -55,7 +55,7 @@ + #ifdef wxHAVE_DPI_INDEPENDENT_PIXELS //pulled from wx/window.h: https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/window.h#L2029 + return d; //e.g. macOS, GTK3 + #else //https://github.com/wxWidgets/wxWidgets/blob/master/src/common/wincmn.cpp#L2865 +- static_assert(GTK_MAJOR_VERSION == 2); ++ static_assert(GTK_MAJOR_VERSION == 3); + //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 + //=> requires general fix at wxWidgets-level + assert(wxTheApp); //only call after wxWidgets was initalized! diff --git a/freefilesync/ffs_libssh2.patch b/freefilesync/ffs_libssh2.patch index 0abd660..0872f32 100644 --- a/freefilesync/ffs_libssh2.patch +++ b/freefilesync/ffs_libssh2.patch @@ -9,28 +9,15 @@ 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 @@ +diff -Naur /usr/src/freefilesync/10.20-0/libssh2/libssh2_wrap.h /usr/src/freefilesync/10.20-1/libssh2/libssh2_wrap.h +--- 10.22-0/libssh2/libssh2_wrap.h 2020-03-18 15:49:57.839901161 -0400 ++++ 10.22-1/libssh2/libssh2_wrap.h 2020-03-18 16:17:29.758794018 -0400 +@@ -172,8 +172,6 @@ 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.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! - { -- 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) - }); - } + + default: + return replaceCpy<std::wstring>(L"SSH status %x", L"%x", numberTo<std::wstring>(sc)); diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch index 4e56d19..62f4e7e 100644 --- a/freefilesync/ffs_no_check_updates.patch +++ b/freefilesync/ffs_no_check_updates.patch @@ -1,7 +1,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14-1/FreeFileSync/Source/ui/main_dlg.cpp --- 10.9-0/FreeFileSync/Source/ui/main_dlg.cpp 2019-02-10 22:01:42.029158919 -0500 -+++ 10.14-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-07-16 10:56:40.213575535 -0400 -@@ -5298,7 +5298,7 @@ ++++ 11.0-1/FreeFileSync/Source/ui/main_dlg.cpp 2020-07-22 11:49:13.747407290 -0400 +@@ -5538,7 +5538,7 @@ globalCfg_.gui.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value! m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.gui.lastUpdateCheck)); @@ -10,15 +10,15 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14- if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5306,6 +5306,7 @@ +@@ -5546,6 +5546,7 @@ automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion, - automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare().get()).get()); + automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare(*this).get()).get()); } + */ } -@@ -5313,7 +5314,7 @@ +@@ -5553,7 +5554,7 @@ { //execute just once per startup! Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), nullptr, this); @@ -27,7 +27,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14- if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck)) { flashStatusInformation(_("Searching for program updates...")); -@@ -5327,6 +5328,7 @@ +@@ -5567,6 +5568,7 @@ resultAsync.get()); //run on main thread: }); } @@ -37,7 +37,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14- diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 10.14-1/FreeFileSync/Source/ui/version_check.cpp --- 10.9-0/FreeFileSync/Source/ui/version_check.cpp 2019-02-10 22:01:42.126160041 -0500 -+++ 10.14-1/FreeFileSync/Source/ui/version_check.cpp 2019-07-16 11:45:36.113848111 -0400 ++++ 11.0-1/FreeFileSync/Source/ui/version_check.cpp 2020-07-22 11:43:36.895201090 -0400 @@ -69,6 +69,8 @@ bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck) @@ -47,7 +47,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1 if (lastUpdateCheck == getVersionCheckInactiveId()) return false; -@@ -156,8 +158,7 @@ +@@ -159,8 +161,7 @@ { try { @@ -57,31 +57,32 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1 updateDetailsMsg = utfTo<std::wstring>(buf); } catch (const zen::SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); } -@@ -187,8 +188,7 @@ - //access is thread-safe on Windows (WinInet), but not on Linux/OS X (wxWidgets) +@@ -189,8 +190,7 @@ + std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError { -- const std::string buffer = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, -- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError -+ const std::string buffer = ""; - return trimCpy(buffer); +- const std::string response = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams, +- ffsUpdateCheckUserAgent, nullptr /*caCertFilePath*/, nullptr /*notifyUnbufferedIO*/).readAll(); //throw SysError ++ const std::string response = ""; + return trimCpy(response); } -@@ -235,13 +235,13 @@ - const std::string onlineVersion = getOnlineVersion(geHttpPostParameters()); //throw SysError +@@ -237,13 +237,13 @@ + const std::string onlineVersion = getOnlineVersion(geHttpPostParameters(parent)); //throw SysError lastOnlineVersion = onlineVersion; - if (haveNewerVersionOnline(onlineVersion)) -- showUpdateAvailableDialog(parent, onlineVersion); +- showUpdateAvailableDialog(&parent, onlineVersion); - else + //if (haveNewerVersionOnline(onlineVersion)) -+ // showUpdateAvailableDialog(parent, onlineVersion); ++ // showUpdateAvailableDialog(&parent, onlineVersion); + //else - showNotificationDialog(parent, DialogInfoType::info, PopupDialogCfg(). - setIcon(getResourceImage(L"update_check")). + showNotificationDialog(&parent, DialogInfoType::info, PopupDialogCfg(). + setIcon(loadImage("update_check")). setTitle(_("Check for Program Updates")). - setMainInstructions(_("FreeFileSync is up to date."))); + setMainInstructions(_("Use your package manager for any updates to FreeFileSync."))); } catch (const zen::SysError& e) { + diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_no_eraseif.patch new file mode 100644 index 0000000..71239e4 --- /dev/null +++ b/freefilesync/ffs_no_eraseif.patch @@ -0,0 +1,405 @@ +Message: generated with roughly sed -i -r -e 's/std::erase_if/eraseIf/g' $( grep -l -riIE 'std::erase_if\(' ) +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h +--- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500 ++++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500 +@@ -255,7 +255,7 @@ + pathLocks_.access([&](std::map<NativePath, std::weak_ptr<std::mutex>>& pathLocks) + { + //remove obsolete entries +- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); }); ++ zen::eraseIf(pathLocks, [](const auto& v) { return !v.second.lock(); }); + + //get or create mutex + std::weak_ptr<std::mutex>& weakPtr = pathLocks[nativePath]; +diff -Naur 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 10.25-1/FreeFileSync/Source/afs/gdrive.cpp +--- 10.25-0/FreeFileSync/Source/afs/gdrive.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 10.25-1/FreeFileSync/Source/afs/gdrive.cpp 2020-06-20 20:54:52.438669026 -0400 +@@ -1930,7 +1930,7 @@ + if (auto it = itemDetails_.find(itemId); it != itemDetails_.end()) + { + GdriveItemDetails detailsNew = it->second; +- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); ++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); + notifyItemUpdated(stateDelta, itemId, &detailsNew); + } + else //conflict!!! +@@ -1944,7 +1944,7 @@ + GdriveItemDetails detailsNew = it->second; + detailsNew.itemName = newName; + +- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // ++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); // + detailsNew.parentIds.push_back(parentIdTo); //not a duplicate + + notifyItemUpdated(stateDelta, itemId, &detailsNew); +@@ -2095,7 +2095,7 @@ + return; //=> avoid misleading changeLog_ entries after Google Drive sync!!! + + //update change logs (and clean up obsolete entries) +- std::erase_if(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr) ++ eraseIf(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr) + { + if (std::shared_ptr<ItemIdDelta> iid = weakPtr.lock()) + { +@@ -2116,15 +2116,15 @@ + + std::vector<std::string> parentIdsNew = details->parentIds; + std::vector<std::string> parentIdsRemoved = it->second.parentIds; +- std::erase_if(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); +- std::erase_if(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); ++ eraseIf(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); }); ++ eraseIf(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); }); + + for (const std::string& parentId : parentIdsNew) + folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check + + for (const std::string& parentId : parentIdsRemoved) + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) +- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); ++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications! + //OR: item without parents located in "Shared with me", but referenced via Shortcut => don't remove!!! + +@@ -2144,7 +2144,7 @@ + { + for (const std::string& parentId : it->second.parentIds) //1. delete from parent folders + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) +- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); ++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + + itemDetails_.erase(it); + } +@@ -2153,7 +2153,7 @@ + itP != folderContents_.end()) + { + for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children) +- std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); ++ eraseIf(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); + folderContents_.erase(itP); + } + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/sftp.cpp 10.18-2/FreeFileSync/Source/afs/sftp.cpp +--- 10.18-1/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:54:23.078438037 -0500 ++++ 10.18-2/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:57:30.557558372 -0500 +@@ -946,7 +946,7 @@ + std::this_thread::yield(); + return; //don't hold lock for too long: delete only one session at a time, then yield... + } +- std::erase_if(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer ++ eraseIf(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer + done = true; + }); + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/algorithm.cpp 10.18-2/FreeFileSync/Source/base/algorithm.cpp +--- 10.18-1/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 16:15:55.832668168 -0500 ++++ 10.18-2/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 17:57:30.558558384 -0500 +@@ -1372,8 +1372,8 @@ + { + std::vector<const FileSystemObject*> itemSelectionLeft (rowsToCopyOnLeft .begin(), rowsToCopyOnLeft .end()); + std::vector<const FileSystemObject*> itemSelectionRight(rowsToCopyOnRight.begin(), rowsToCopyOnRight.end()); +- std::erase_if(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! +- std::erase_if(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); // ++ eraseIf(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats! ++ eraseIf(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); // + + const int itemTotal = static_cast<int>(itemSelectionLeft.size() + itemSelectionRight.size()); + int64_t bytesTotal = 0; +@@ -1548,8 +1548,8 @@ + std::vector<FileSystemObject*> deleteLeft = rowsToDeleteOnLeft; + std::vector<FileSystemObject*> deleteRight = rowsToDeleteOnRight; + +- std::erase_if(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? +- std::erase_if(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats: ++ eraseIf(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed? ++ eraseIf(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats: + + const int itemCount = static_cast<int>(deleteLeft.size() + deleteRight.size()); + callback.initNewPhase(itemCount, 0, ProcessPhase::none); //throw X +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/db_file.cpp 10.18-2/FreeFileSync/Source/base/db_file.cpp +--- 10.18-1/FreeFileSync/Source/base/db_file.cpp 2019-11-20 16:15:55.836668213 -0500 ++++ 10.18-2/FreeFileSync/Source/base/db_file.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -591,7 +591,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbFiles, [&](const InSyncFolder::FileList::value_type& v) ++ eraseIf(dbFiles, [&](const InSyncFolder::FileList::value_type& v) + { + if (contains(toPreserve, v.first)) + return false; +@@ -628,7 +628,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) ++ eraseIf(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v) + { + if (contains(toPreserve, v.first)) + return false; +@@ -663,7 +663,7 @@ + } + + //delete removed items (= "in-sync") from database +- std::erase_if(dbFolders, [&](InSyncFolder::FolderList::value_type& v) ++ eraseIf(dbFolders, [&](InSyncFolder::FolderList::value_type& v) + { + if (auto it = toPreserve.find(v.first); it != toPreserve.end()) + { +@@ -687,10 +687,10 @@ + //delete all entries for removed folder (= "in-sync") from database + void dbSetEmptyState(InSyncFolder& dbFolder, const Zstring& parentRelPathPf) + { +- std::erase_if(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); +- std::erase_if(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); ++ eraseIf(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); ++ eraseIf(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); }); + +- std::erase_if(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) ++ eraseIf(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v) + { + const Zstring& itemRelPath = parentRelPathPf + v.first; + +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 10.18-2/FreeFileSync/Source/base/dir_lock.cpp +--- 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 16:15:55.836668213 -0500 ++++ 10.18-2/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -502,8 +502,8 @@ + + void tidyUp() //remove obsolete entries + { +- std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); +- std::erase_if(guidByPath_, [&](const auto& v) { return !contains(locksByGuid_, v.second); }); ++ eraseIf(locksByGuid_, [](const auto& v) { return !v.second.lock(); }); ++ eraseIf(guidByPath_, [&](const auto& v) { return locksByGuid_.find(v.second) == locksByGuid_.end(); }); + } + + std::map<Zstring, UniqueId> guidByPath_; //lockFilePath |-> GUID; n:1; locks can be referenced by a lockFilePath or alternatively a GUID +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp +--- 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 16:15:55.820668033 -0500 ++++ 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 17:57:30.559558395 -0500 +@@ -155,7 +155,7 @@ + checkXmlMappingErrors(in, filePath); //throw FileError + //--------------------------------------------------------------------------------------- + +- std::erase_if(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); ++ eraseIf(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); }); + cfg.directories.assign(uniqueFolders.begin(), uniqueFolders.end()); + cfg.commandline = Zstr('"') + fff::getFreeFileSyncLauncherPath() + Zstr("\" \"") + filePath + Zstr('"'); + } +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp +--- 10.23-0/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 08:03:55.508842092 -0400 ++++ 10.23-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 2020-04-21 09:10:54.765302811 -0400 +@@ -152,7 +152,7 @@ + if (change.type == DirWatcher::ChangeType::baseFolderUnavailable) + return change; + +- std::erase_if(changes, [](const DirWatcher::Change& e) ++ eraseIf(changes, [](const DirWatcher::Change& e) + { + return + endsWith(e.itemPath, Zstr(".ffs_tmp")) || //sync.8ea2.ffs_tmp +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp +--- 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 16:15:55.822668055 -0500 ++++ 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 17:57:30.560558406 -0500 +@@ -247,7 +247,7 @@ + rts::AbortReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname) + { + std::vector<Zstring> dirNamesNonFmt = config.directories; +- std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! ++ eraseIf(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet! + + if (dirNamesNonFmt.empty()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 16:15:55.847668337 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 17:57:30.561558418 -0500 +@@ -113,7 +113,7 @@ + { + const std::set<Zstring, LessNativePath> pathsSorted(filePaths.begin(), filePaths.end()); + +- std::erase_if(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); ++ eraseIf(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); }); + + for (const Zstring& filePath : filePaths) + cfgList_.erase(filePath); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/command_box.cpp 10.18-2/FreeFileSync/Source/ui/command_box.cpp +--- 10.18-1/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:54:14.861345102 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:57:30.561558418 -0500 +@@ -75,7 +75,7 @@ + equalNoCase(newCommand, cmd)) + return; + +- std::erase_if(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); ++ eraseIf(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); }); + + history_.insert(history_.begin(), newCommand); + +@@ -194,7 +194,7 @@ + //this->SetSelection(wxNOT_FOUND); + + //delete selected row +- std::erase_if(history_, [&](const Zstring& item) { return item == selValue; }); ++ eraseIf(history_, [&](const Zstring& item) { return item == selValue; }); + + SetString(pos, wxString()); //in contrast to Delete(), this one does not kill the drop-down list and gives a nice visual feedback! + //Delete(pos); +diff -Naur 10.25-0/FreeFileSync/Source/ui/file_view.cpp 10.25-1/FreeFileSync/Source/ui/file_view.cpp +--- 10.25-0/FreeFileSync/Source/ui/file_view.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 10.25-1/FreeFileSync/Source/ui/file_view.cpp 2020-06-20 20:55:25.978009894 -0400 +@@ -321,7 +321,7 @@ + void FileView::removeInvalidRows() + { + //remove rows that have been deleted meanwhile +- std::erase_if(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); ++ eraseIf(sortedRef_, [&](const FileSystemObject::ObjectId& objId) { return !FileSystemObject::retrieve(objId); }); + + viewRef_ .clear(); + rowPositions_ .clear(); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 10.18-2/FreeFileSync/Source/ui/folder_history_box.h +--- 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 16:15:55.849668360 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 17:57:30.562558429 -0500 +@@ -35,13 +35,13 @@ + const Zstring nameTmp = zen::trimCpy(folderPathPhrase); + + //insert new folder or put it to the front if already existing +- std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); ++ zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); }); + + folderPathPhrases_.insert(folderPathPhrases_.begin(), nameTmp); + truncate(); + } + +- void delItem(const Zstring& folderPathPhrase) { std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } ++ void delItem(const Zstring& folderPathPhrase) { zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); } + + private: + void truncate() +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 10.18-2/FreeFileSync/Source/ui/log_panel.cpp +--- 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 16:15:55.852668394 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 17:57:30.562558429 -0500 +@@ -545,7 +545,7 @@ + if (auto prov = m_gridMessages->getDataProvider()) + { + std::vector<Grid::ColAttributes> colAttr = m_gridMessages->getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + for (size_t row : m_gridMessages->getSelectedRows()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp +--- 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:54:16.135359512 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:57:30.564558452 -0500 +@@ -1240,7 +1240,7 @@ + if (auto prov = grid->getDataProvider()) + { + std::vector<Grid::ColAttributes> colAttr = grid->getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + for (size_t row : grid->getSelectedRows()) + { +@@ -5372,9 +5372,9 @@ + auto colAttrCenter = m_gridMainC->getColumnConfig(); + auto colAttrRight = m_gridMainR->getColumnConfig(); + +- std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); +- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; }); +- std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; }); ++ eraseIf(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + + if (provLeft && provCenter && provRight) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 10.18-2/FreeFileSync/Source/ui/search_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 16:15:55.855668428 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 17:57:30.564558452 -0500 +@@ -69,7 +69,7 @@ + if (auto prov = grid.getDataProvider()) + { + std::vector<Grid::ColAttributes> colAttr = grid.getColumnConfig(); +- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); ++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; }); + if (!colAttr.empty()) + { + const MatchFound<respectCase> matchFound(searchString); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp +--- 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 16:15:55.858668462 -0500 ++++ 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 17:57:30.565558463 -0500 +@@ -601,7 +601,7 @@ + folderCmp_ = newData; + + //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp" +- std::erase_if(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj) ++ eraseIf(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj) + { + return AFS::isNullPath(baseObj->getAbstractPath< LEFT_SIDE>()) && + AFS::isNullPath(baseObj->getAbstractPath<RIGHT_SIDE>()); +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/wx+/async_task.h 10.18-2/wx+/async_task.h +--- 10.18-1/wx+/async_task.h 2019-11-20 16:15:55.860668484 -0500 ++++ 10.18-2/wx+/async_task.h 2019-11-20 17:57:30.565558463 -0500 +@@ -85,7 +85,7 @@ + + std::vector<std::unique_ptr<Task>> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf + +- std::erase_if(tasks_, [&](std::unique_ptr<Task>& task) ++ eraseIf(tasks_, [&](std::unique_ptr<Task>& task) + { + if (task->resultReady()) + { +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/zen/stl_tools.h 10.18-2/zen/stl_tools.h +--- 10.18-1/zen/stl_tools.h 2019-11-20 16:15:55.875668653 -0500 ++++ 10.18-2/zen/stl_tools.h 2019-11-20 17:58:20.801126674 -0500 +@@ -20,6 +20,16 @@ + //enhancements for <algorithm> + namespace zen + { ++//erase selected elements from any container: ++template <class T, class Alloc, class Predicate> ++void eraseIf(std::vector<T, Alloc>& v, Predicate p); ++ ++template <class T, class LessType, class Alloc, class Predicate> ++void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p); ++ ++template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate> ++void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p); ++ + //append STL containers + template <class T, class Alloc, class C> + void append(std::vector<T, Alloc>& v, const C& c); +@@ -115,6 +125,36 @@ + + + //######################## implementation ######################## ++ ++template <class T, class Alloc, class Predicate> inline ++void eraseIf(std::vector<T, Alloc>& v, Predicate p) ++{ ++ v.erase(std::remove_if(v.begin(), v.end(), p), v.end()); ++} ++ ++ ++namespace impl ++{ ++template <class S, class Predicate> inline ++void setOrMapEraseIf(S& s, Predicate p) ++{ ++ for (auto it = s.begin(); it != s.end();) ++ if (p(*it)) ++ s.erase(it++); ++ else ++ ++it; ++} ++} ++ ++ ++template <class T, class LessType, class Alloc, class Predicate> inline ++void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p) { impl::setOrMapEraseIf(s, p); } //don't make this any more generic! e.g. must not compile for std::vector!!! ++ ++ ++template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate> inline ++void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p) { impl::setOrMapEraseIf(m, p); } ++ ++ + template <class T, class Alloc, class C> inline + void append(std::vector<T, Alloc>& v, const C& c) { v.insert(v.end(), c.begin(), c.end()); } + diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch index e6069d4..22d8260 100644 --- a/freefilesync/ffs_no_wx311.patch +++ b/freefilesync/ffs_no_wx311.patch @@ -1,13 +1,22 @@ 2019-08-15 just compile. -diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp ---- 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-07 05:03:34.000000000 -0400 -+++ 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-08 19:16:54.026727623 -0400 -@@ -984,7 +984,8 @@ +diff -Naur 10.25-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.25-1/FreeFileSync/Source/ui/small_dlgs.cpp +--- 10.25-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-06-19 16:17:15.000000000 -0400 ++++ 11.0-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-07-22 11:39:25.820068366 -0400 +@@ -293,7 +293,8 @@ + { + showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString())); + } +- m_listBoxGdriveUsers->Append(gdriveAccounts); ++ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic ++ m_listBoxGdriveUsers->Append(item); + + //set default values for Google Drive: use first item of m_listBoxGdriveUsers + if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase)) +@@ -1682,7 +1683,7 @@ //setMainInstructionFont(*m_staticTextMain); - m_bitmapActivation->SetBitmap(getResourceImage(L"website")); + m_bitmapActivation->SetBitmap(loadImage("internet")); - m_textCtrlOfflineActivationKey->ForceUpper(); -+ // Fedora 27 does not have wxWidgets 3.1.1 yet. https://github.com/wxWidgets/wxWidgets/commit/69b66e9e2e2b8e49e3816acdde079686ce9b0da1 + //m_textCtrlOfflineActivationKey->ForceUpper(); m_textCtrlLastError ->ChangeValue(lastErrorMsg); @@ -26,47 +35,43 @@ diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp toScroll += scrollSpeed * deltaSecs; } else -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:26:56.794422701 -0400 -@@ -75,8 +75,9 @@ - Zstring cfgFolderPath; - //OS standard path (XDG layout): ~/.config/FreeFileSync - //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag -- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); -- cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync"; -+ // Fedora does not have wxGTK 3.1.1 which is the dev branch. -+ //wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); -+ cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync"; +diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source/ffs_paths.cpp +--- 10.13-0/FreeFileSync/Source/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400 ++++ 10.18-1/FreeFileSync/Source/ffs_paths.cpp 2019-11-20 08:55:38.553446634 -0500 +@@ -80,8 +80,8 @@ + + //OS standard path (XDG layout): ~/.config/FreeFileSync + //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag +- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG); +- const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync"; ++ // Many distros do not have wxGTK 3.1.1 which is the dev branch. ++ const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync"; + try //create the config folder if not existing + create "Logs" subfolder while we're at it + { +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400 +@@ -120,7 +120,8 @@ - std::call_once(onceFlagCreateCfgPath, [&] -diff --git a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp -index 6e769bb..ce6110b 100644 ---- a/FreeFileSync/Source/ui/command_box.cpp -+++ b/FreeFileSync/Source/ui/command_box.cpp -@@ -130,7 +130,9 @@ void CommandBox::setValueAndUpdateList(const wxString& value) - //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(items); -+ for (const wxString& item : items) +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic + this->Append(item); -+ - + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(value); //preserve main text! -diff --git a/FreeFileSync/Source/ui/folder_history_box.cpp b/FreeFileSync/Source/ui/folder_history_box.cpp -index 2b824b1..a17ea2f 100644 ---- a/FreeFileSync/Source/ui/folder_history_box.cpp -+++ b/FreeFileSync/Source/ui/folder_history_box.cpp -@@ -90,7 +90,8 @@ void FolderHistoryBox::setValueAndUpdateList(const wxString& folderPathPhrase) - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400 +@@ -90,7 +90,8 @@ + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(dirList); -+ for (const wxString& dir : dirList) -+ this->Append(dir); - +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic ++ this->Append(itemk); + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(folderPathPhrase); //preserve main text! diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch index c30b09c..09e6655 100644 --- a/freefilesync/ffs_sftp.patch +++ b/freefilesync/ffs_sftp.patch @@ -3,20 +3,21 @@ 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 '*.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 -@@ -56,9 +56,10 @@ - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/afs/sftp.cpp 10.24-1/FreeFileSync/Source/afs/sftp.cpp +--- 10.24-0/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:01:12.821889929 -0400 ++++ 10.24-1/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:37:50.229446467 -0400 +@@ -63,10 +63,10 @@ + LIBSSH2_SFTP_S_IROTH | LIBSSH2_SFTP_S_IXOTH; + //attention: if operation fails due to time out, e.g. file copy, the cleanup code may hang, too => total delay = 2 x time out interval - --const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 --const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * MAX_SFTP_OUTGOING_SIZE; // +- +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * MAX_SFTP_OUTGOING_SIZE; // -static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); +// these values are all manually derived from https://github.com/libssh2/libssh2/blob/master/src/sftp.h which for some weak reason are not included in the libssh2-devel headers. -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * 30000; //https://github.com/libssh2/libssh2/issues/90 -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * 30000; // ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * 30000; //https://github.com/libssh2/libssh2/issues/90 ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * 30000; // +//static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); - /* - Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: - + + /* Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: + diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index ce183fa..030b863 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -1,14 +1,15 @@ %global pkgname FreeFileSync %global prog2name RealTimeSync %global dummy_package 0 +%define debug_package %{nil} %define min_libcurl %{nil} %define min_libssh2 %{nil} %define min_openssl %{nil} %define scl_env %{nil} %define scl_buildreq coreutils %if 0%{?el6}%{?el7} - %define scl_env devtoolset-8 - %define scl_buildreq devtoolset-8-toolchain + %define scl_env devtoolset-7 + %define scl_buildreq devtoolset-7-toolchain %define min_libcurl >= 7.64.0 %define min_libssh2 >= 1.8.0 %define min_openssl >= 1.1.1c @@ -18,7 +19,7 @@ %define libssh2_name libssh2-%{name} %endif Name: freefilesync -Version: 10.17 +Version: 11.0 Release: 1%{?dist} Summary: A file synchronization utility @@ -40,10 +41,12 @@ Patch5: ffs_el.patch Patch6: ffs_libssh2.patch Patch7: ffs_curl.patch Patch8: ffs_bit.patch +Patch9: ffs_no_eraseif.patch +Patch10: revert_zenju_aggressive_upstreamisms.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. -BuildRequires: compat-wxGTK3-gtk2-devel +BuildRequires: brotli-devel +BuildRequires: wxGTK3-devel BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: ImageMagick @@ -54,7 +57,6 @@ BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) %if 0%{?el6}%{?el7} -BuildRequires: wxGTK-devel BuildRequires: %{scl_buildreq} BuildRequires: openssl-%{name}-devel %{min_openssl} Requires: libcurl %{min_libcurl} @@ -90,23 +92,26 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ # use the el patch %patch5 -p1 %else -# use the fedora patch +# use the fedora patch, even for el8 %patch4 -p1 %endif %patch6 -p1 %patch7 -p1 %if 0%{?el6}%{?el7}%{?el8}%{?fc29} %patch8 -p1 +%patch9 -p1 %endif +%patch10 -p1 # custom build parameters for packaging application in rpm # fedora provides build_cxxflags, which is really just optflags %{__sed} \ -e 's|-O3 -DNDEBUG|-DNDEBUG -D"warn_static(arg)= " -DZEN_LINUX %{?build_cxxflags:%{build_cxxflags}}%{!?build_cxxflags:%{optflags}}|g' \ - -e '/LINKFLAGS/s|-s|%{__global_ldflags}|;' \ + -e '/linkFlags/s|-s|%{__global_ldflags}|;' \ -i %{pkgname}/Source/Makefile %{pkgname}/Source/%{prog2name}/Makefile %build +export TMPDIR=/tmp # necessary since 11.0 %if !%{dummy_package} %if "%{?scl_env}" != "" scl enable %{scl_env} /bin/bash << 'EOFSCL' @@ -119,6 +124,7 @@ EOFSCL %endif %install +export TMPDIR=/tmp # necessary since 11.0 %if !%{dummy_package} # removed by upstream! #%%make_install -C %%{pkgname}/Source @@ -200,6 +206,40 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & : %ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml %changelog +* Wed Jul 22 2020 B Stack <bgstack15@gmail.com> - 11.0-1 +- version bump +- use gtk3 +- el6,7,8 and fc31 packages are becoming stale + +* Sun Jun 21 2020 B Stack <bgstack15@gmail.com> - 10.25-1 +- version bump +- el6,7,8 and fc31 packages not built because upstream requires g++-10 + +* Mon May 18 2020 B Stack <bgstack15@gmail.com> - 10.24-1 +- version bump +- add revert_zenju_aggressive_upstreamisms.patch +- disable debug package + +* Tue Apr 21 2020 B Stack <bgstack15@gmail.com> - 10.23-1 +- version bump +- remove ffs_libssl.patch + +* Wed Mar 18 2020 B Stack <bgstack15@gmail.com> - 10.22-1 +- version bump +- add ffs_libssl.patch + +* Tue Feb 18 2020 B Stack <bgstack15@gmail.com> - 10.20-1 +- version bump + +* Fri Dec 27 2019 B Stack <bgstack15@gmail.com> - 10.19-1 +- version bump + +* Thu Nov 21 2019 B Stack <bgstack15@gmail.com> - 10.18-2 +- el and fc29 reverted to devtoolset-7, -std=c++17, and some older internal logic + +* Wed Nov 20 2019 B Stack <bgstack15@gmail.com> - 10.18-1 +- version bump + * Wed Oct 23 2019 B Stack <bgstack15@gmail.com> - 10.17-1 - version bump - el7 uses devtoolset-8 for c++2a support diff --git a/freefilesync/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/revert_zenju_aggressive_upstreamisms.patch new file mode 100644 index 0000000..522080d --- /dev/null +++ b/freefilesync/revert_zenju_aggressive_upstreamisms.patch @@ -0,0 +1,112 @@ +Author: Ben Stack <bgstack15@gmail.com> +Date: 2020-06-21 16:45 -0400 +Message: Use the following command to get this old contents. Zenju must be using some newer definition of -std=c++2a than what Devuan Ceres provides as of 2020-05-17, and probably wxwidgets. This is the 10.23 code for these files. + + git checkout b4ecf755 wx+/choice_enum.h + +Unfortunately with the removal of the wxWidgets-gtk2 code from Debian, we are stuck using all available at approximately November 1, 2019 snapshot of Debian: https://snapshot.debian.org/archive/debian/20191101T211023Z/pool/main/w/wxwidgets3.0/ +libwxbase3.0-0v5_3.0.4+dfsg-14_amd64.deb +libwxbase3.0-0v5_3.0.4+dfsg-14_i386.deb +libwxbase3.0-dev_3.0.4+dfsg-14_amd64.deb +libwxbase3.0-dev_3.0.4+dfsg-14_i386.deb +libwxgtk3.0-0v5_3.0.4+dfsg-14_amd64.deb +libwxgtk3.0-0v5_3.0.4+dfsg-14_i386.deb +libwxgtk3.0-dev_3.0.4+dfsg-14_amd64.deb +libwxgtk3.0-dev_3.0.4+dfsg-14_i386.deb +wx3.0-headers_3.0.4+dfsg-14_all.deb +wx-common_3.0.4+dfsg-14_amd64.deb +wx-common_3.0.4+dfsg-14_i386.deb +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/wx+/choice_enum.h +--- 10.24-0/wx+/choice_enum.h 2020-05-17 18:30:59.441499418 -0400 ++++ 10.24-1/wx+/choice_enum.h 2020-05-17 18:53:59.893685507 -0400 +@@ -7,7 +7,6 @@ + #ifndef CHOICE_ENUM_H_132413545345687 + #define CHOICE_ENUM_H_132413545345687 + +-#include <unordered_map> + #include <vector> + #include <wx/choice.h> + +@@ -44,11 +43,8 @@ + descrList.push_back({ value, { text, tooltip } }); + return *this; + } +- + using DescrList = std::vector<std::pair<Enum, std::pair<wxString, wxString>>>; + DescrList descrList; +- +- std::unordered_map<const wxChoice*, std::vector<wxString>> itemsSetLast; + }; + template <class Enum> void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value); + template <class Enum> Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl); +@@ -69,34 +65,26 @@ + + //--------------- impelementation ------------------------------------------- + template <class Enum> +-void setEnumVal(EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) ++void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) + { +- auto& itemsSetLast = mapping.itemsSetLast[&ctrl]; ++ ctrl.Clear(); + +- std::vector<wxString> items; ++ int selectedPos = 0; + for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) +- items.push_back(it->second.first); +- +- if (items != itemsSetLast) + { +- ctrl.Set(items); //expensive as fuck! => only call when absolutely needed! +- itemsSetLast = std::move(items); ++ ctrl.Append(it->second.first); ++ if (it->first == value) ++ { ++ selectedPos = it - mapping.descrList.begin(); ++ ++ if (it->second.second.empty()) ++ ctrl.UnsetToolTip(); ++ else ++ ctrl.SetToolTip(it->second.second); ++ } + } +- //----------------------------------------------------------------- +- +- const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); +- if (it != mapping.descrList.end()) +- { +- if (const wxString& tooltip = it->second.second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); + +- const int selectedPos = it - mapping.descrList.begin(); +- ctrl.SetSelection(selectedPos); +- } +- else assert(false); ++ ctrl.SetSelection(selectedPos); + } + + template <class Enum> +@@ -115,17 +103,11 @@ + + template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl) + { +- const int selectedPos = ctrl.GetSelection(); ++ const Enum currentValue = getEnumVal(mapping, ctrl); + +- if (0 <= selectedPos && selectedPos < static_cast<int>(mapping.descrList.size())) +- { +- if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); +- } +- else assert(false); ++ for (const auto& [enumValue, textAndTooltip] : mapping.descrList) ++ if (currentValue == enumValue) ++ ctrl.SetToolTip(textAndTooltip.second); + } + } + |