From acfcfb4b230be284df0f1ef80e167ba06007a668925698b86a4864d56a52de5a Mon Sep 17 00:00:00 2001 From: Jannik Seiler Date: Sun, 16 Jan 2022 17:02:18 +0000 Subject: [PATCH] Accepting request 946822 from home:seil0:branches:network - Add FreeFileSync-disable-in-app-updates.patch to disable the in app standalone updater for the packaged version of FreeFileSync. OBS-URL: https://build.opensuse.org/request/show/946822 OBS-URL: https://build.opensuse.org/package/show/network/FreeFileSync?expand=0&rev=52 --- ...nc-Build.patch => FreeFileSync-build.patch | 0 FreeFileSync-disable-in-app-updates.patch | 47 +++++++++++++++++++ ...er.patch => FreeFileSync-icon-loader.patch | 0 ...rces.patch => FreeFileSync-resources.patch | 0 FreeFileSync.changes | 6 +++ FreeFileSync.spec | 9 ++-- 6 files changed, 58 insertions(+), 4 deletions(-) rename FreeFileSync-Build.patch => FreeFileSync-build.patch (100%) create mode 100644 FreeFileSync-disable-in-app-updates.patch rename FreeFileSync-icon_loader.patch => FreeFileSync-icon-loader.patch (100%) rename FreeFileSync-Resources.patch => FreeFileSync-resources.patch (100%) diff --git a/FreeFileSync-Build.patch b/FreeFileSync-build.patch similarity index 100% rename from FreeFileSync-Build.patch rename to FreeFileSync-build.patch diff --git a/FreeFileSync-disable-in-app-updates.patch b/FreeFileSync-disable-in-app-updates.patch new file mode 100644 index 0000000..1487b00 --- /dev/null +++ b/FreeFileSync-disable-in-app-updates.patch @@ -0,0 +1,47 @@ +diff -Naur FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/gui_generated.cpp FreeFileSync_11.13_Source/FreeFileSync/Source/ui/gui_generated.cpp +--- FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/gui_generated.cpp 2021-08-17 09:48:08.000000000 +0200 ++++ FreeFileSync_11.13_Source/FreeFileSync/Source/ui/gui_generated.cpp 2022-01-16 17:43:23.315321793 +0100 +@@ -108,13 +108,14 @@ + m_menuItemHelp = new wxMenuItem( m_menuHelp, wxID_HELP, wxString( _("&View help") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL ); + m_menuHelp->Append( m_menuItemHelp ); + +- m_menuHelp->AppendSeparator(); ++ // disable update/auto update actions for packaged version (they are only hidden, to not break any code and keep the patch small) ++ //m_menuHelp->AppendSeparator(); + + m_menuItemCheckVersionNow = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("&Check for updates now") ), wxEmptyString, wxITEM_NORMAL ); +- m_menuHelp->Append( m_menuItemCheckVersionNow ); ++ //m_menuHelp->Append( m_menuItemCheckVersionNow ); + + m_menuItemCheckVersionAuto = new wxMenuItem( m_menuHelp, wxID_ANY, wxString( _("Check &automatically once a week") ), wxEmptyString, wxITEM_CHECK ); +- m_menuHelp->Append( m_menuItemCheckVersionAuto ); ++ //m_menuHelp->Append( m_menuItemCheckVersionAuto ); + m_menuItemCheckVersionAuto->Check( true ); + + m_menuHelp->AppendSeparator(); +diff -Naur FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/main_dlg.cpp FreeFileSync_11.13_Source/FreeFileSync/Source/ui/main_dlg.cpp +--- FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/main_dlg.cpp 2021-08-17 09:48:08.000000000 +0200 ++++ FreeFileSync_11.13_Source/FreeFileSync/Source/ui/main_dlg.cpp 2022-01-16 17:27:16.593500053 +0100 +@@ -845,7 +845,7 @@ + updateGui(); + + //register regular check for update on next idle event +- Bind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); ++ //Bind(wxEVT_IDLE, &MainDialog::onStartupUpdateCheck, this); + + //asynchronous call to wxWindow::Layout(): fix superfluous frame on right and bottom when FFS is started in fullscreen mode + Bind(wxEVT_IDLE, &MainDialog::onLayoutWindowAsync, this); +diff -Naur FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/version_check.cpp FreeFileSync_11.13_Source/FreeFileSync/Source/ui/version_check.cpp +--- FreeFileSync_11.13_Source_orig/FreeFileSync/Source/ui/version_check.cpp 2022-01-16 17:31:51.876901517 +0100 ++++ FreeFileSync_11.13_Source/FreeFileSync/Source/ui/version_check.cpp 2022-01-16 17:32:03.004877442 +0100 +@@ -77,7 +77,9 @@ + return false; + + const time_t now = std::time(nullptr); +- return std::abs(now - lastUpdateCheck) >= 7 * 24 * 3600; //check weekly ++ //return std::abs(now - lastUpdateCheck) >= 7 * 24 * 3600; //check weekly ++ ++ return false; + } + + diff --git a/FreeFileSync-icon_loader.patch b/FreeFileSync-icon-loader.patch similarity index 100% rename from FreeFileSync-icon_loader.patch rename to FreeFileSync-icon-loader.patch diff --git a/FreeFileSync-Resources.patch b/FreeFileSync-resources.patch similarity index 100% rename from FreeFileSync-Resources.patch rename to FreeFileSync-resources.patch diff --git a/FreeFileSync.changes b/FreeFileSync.changes index 5ee92f6..ae0862a 100644 --- a/FreeFileSync.changes +++ b/FreeFileSync.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jan 16 17:01:17 UTC 2022 - Jannik Seiler + +- Add FreeFileSync-disable-in-app-updates.patch to disable the in app + standalone updater for the packaged version of FreeFileSync. + ------------------------------------------------------------------- Tue Aug 24 01:51:15 UTC 2021 - Jan Engelhardt diff --git a/FreeFileSync.spec b/FreeFileSync.spec index 7384d0d..14c121e 100644 --- a/FreeFileSync.spec +++ b/FreeFileSync.spec @@ -1,7 +1,7 @@ # # spec file for package FreeFileSync # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,9 +28,10 @@ Source1: %{name}.desktop Source2: %{name}.png Source3: RealTimeSync.desktop Source4: RealTimeSync.png -Patch0: FreeFileSync-Build.patch -Patch1: FreeFileSync-Resources.patch -Patch2: FreeFileSync-icon_loader.patch +Patch0: FreeFileSync-build.patch +Patch1: FreeFileSync-resources.patch +Patch2: FreeFileSync-icon-loader.patch +Patch3: FreeFileSync-disable-in-app-updates.patch BuildRequires: boost-devel >= 1.54 BuildRequires: gcc-c++ BuildRequires: libcurl-devel