diff options
Diffstat (limited to 'libre/nextcloud-client')
-rw-r--r-- | libre/nextcloud-client/PKGBUILD | 63 | ||||
-rw-r--r-- | libre/nextcloud-client/remove-qtwebengine.patch | 155 |
2 files changed, 130 insertions, 88 deletions
diff --git a/libre/nextcloud-client/PKGBUILD b/libre/nextcloud-client/PKGBUILD index 69a997b48..2fe462798 100644 --- a/libre/nextcloud-client/PKGBUILD +++ b/libre/nextcloud-client/PKGBUILD @@ -8,9 +8,9 @@ pkgname=nextcloud-client -pkgver=2.6.1 -_commit=5adbc01ef138efd252c5c8c340f57dae0b34d8b9 -pkgrel=2 +pkgver=2.6.2 +_commit=1d745535f7a95ff2265d6b6b47121200338fce83 +pkgrel=1 pkgrel+=.parabola1 pkgdesc='Nextcloud desktop client' pkgdesc+=', without nonfree qt5-webengine dependency' @@ -18,41 +18,41 @@ arch=(x86_64) arch+=(i686 armv7h) url='https://nextcloud.com/' license=(GPL) - -depends=('openssl' 'sqlite' 'qtkeychain' 'qt5-svg' 'xdg-utils') +depends=(openssl sqlite qtkeychain qt5-svg xdg-utils libcloudproviders) +makedepends=(doxygen extra-cmake-modules kio python-sphinx qt5-tools git cmocka) optdepends=( 'kio: integration with Dolphin' 'nemo-python: integration with Nemo' 'python-nautilus: integration with Nautilus' 'python2-caja: integration with Caja' ) -makedepends=('doxygen' 'extra-cmake-modules' 'kio' 'python-sphinx' 'qt5-tools' 'git' 'cmocka') -backup=(etc/Nextcloud/sync-exclude.lst) - -source=($pkgname::git+https://github.com/nextcloud/desktop.git?signed#commit=$_commit +source=("$pkgname::git+https://github.com/nextcloud/desktop.git?signed#commit=$_commit" issue1458-workaround.patch::https://github.com/yan12125/desktop/commit/7da680ef7843a52c3136916744f50d4a003bb8b5.patch issue1458-2.patch::https://github.com/yan12125/desktop/commit/2b313368325dac5b8d0e69394cfcc4faaa745f75.patch - remove-qtwebengine.patch - $pkgname-fix-build.diff) -validpgpkeys=('A26B951528EA1BA1678C7AE5D406C75CEE1A36D6') # one of keys controlled by github.com/camilasan + $pkgname-fix-build.diff + $pkgname-FS64630.diff) +source+=(remove-qtwebengine.patch) +validpgpkeys=( + A26B951528EA1BA1678C7AE5D406C75CEE1A36D6 # one of keys controlled by github.com/camilasan + 42E775EAA3E47F9E0D5CDB0E00819E3BF4177B28 # controlled by github.com/misch7 +) sha256sums=('SKIP' '07cd68f54c004175b4a09cce25830a357d0ebaafaf4e4cabfb8b0d4deeded2f3' '157c87a789219a3442ca5947c48dcd1ef3898612ff32070bf8842a42bfbe857a' - '0e036c1f9f200aff057092f5a5848a5f496903bac51105349b87b2cf11b04958' - '8b257a0554ceb54a7ed320dbfa3becb97d6845338e28a8aa0a4f6239f3141645') - - -prepare() -{ - cd "$srcdir/$pkgname/" + '8b257a0554ceb54a7ed320dbfa3becb97d6845338e28a8aa0a4f6239f3141645' + '6dea4453f220b63b993722cb155d567959600af261403870f5e34d35144a4fa7') +sha256sums+=('77d7afd2dc65a7625e1617dd2c287c1be004deca2f64ecc18a96bb6c3cd733cf') +backup=('etc/Nextcloud/sync-exclude.lst') +prepare() { # tmpdir for check() - mkdir tmpdir "$srcdir/$pkgname/build" + mkdir tmpdir $pkgname/build # Use system GNUInstallDirs.cmake so that we can benefit from # https://gitlab.kitware.com/cmake/cmake/merge_requests/3735 - rm -v cmake/modules/GNUInstallDirs.cmake + rm -v $pkgname/cmake/modules/GNUInstallDirs.cmake + cd $pkgname patch -Np1 -i ../issue1458-workaround.patch patch -Np1 -i ../issue1458-2.patch @@ -60,13 +60,15 @@ prepare() # "Rename owncloud tests to nextcloud" - actually breaks building of tests patch -Np1 -i ../$pkgname-fix-build.diff + # https://bugs.archlinux.org/task/64630 + patch -Np1 -i ../$pkgname-FS64630.diff + # Remove qt5-webengine dependency patch -Np1 -i ../remove-qtwebengine.patch } -build() -{ - cd "$srcdir/$pkgname/build" +build() { + cd $pkgname/build # bundled breakpad in libcrashreporter-qt submodule is too old and does not build with glibc >= 2.26 # Upstream fix: https://github.com/google/breakpad/commit/bddcc58860f522a0d4cbaa7e9d04058caee0db9d @@ -83,21 +85,16 @@ build() make doc-man } -check() -{ - cd "$srcdir/$pkgname/build" - - # many tests fail on i686 and armv7h - [ "$CARCH" == 'i686' ] || [ "$CARCH" == 'armv7h' ] && return 0 +check() { + cd $pkgname/build # Tests fail if $TMPDIR is too small; specify an alternative for machines # with a small /tmp partition. TMPDIR="$srcdir/tmpdir" make test ARGS="-V" } -package() -{ - cd "$srcdir/$pkgname/build" +package() { + cd $pkgname/build make DESTDIR="$pkgdir" install } diff --git a/libre/nextcloud-client/remove-qtwebengine.patch b/libre/nextcloud-client/remove-qtwebengine.patch index b35267825..a480f4ad4 100644 --- a/libre/nextcloud-client/remove-qtwebengine.patch +++ b/libre/nextcloud-client/remove-qtwebengine.patch @@ -1,37 +1,41 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e14c97e..f6c4180 100644 +index 9f854b006..6f3546353 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ endif() - + set(synclib_NAME ${APPLICATION_EXECUTABLE}sync) - + -find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent WebEngineWidgets WebEngine REQUIRED) +find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent REQUIRED) if (Qt5Core_VERSION VERSION_LESS 5.9.0) message(STATUS "For HTTP/2 support, compile with Qt 5.9 or higher.") endif() diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt -index e806beb..e56a811 100644 +index 285057992..8e61531bd 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt -@@ -39,11 +39,8 @@ set(client_UI_SRCS +@@ -35,14 +35,12 @@ set(client_UI_SRCS + addcertificatedialog.ui + proxyauthdialog.ui + mnemonicdialog.ui +- wizard/flow2authwidget.ui + wizard/owncloudadvancedsetuppage.ui wizard/owncloudconnectionmethoddialog.ui wizard/owncloudhttpcredspage.ui wizard/owncloudoauthcredspage.ui -- wizard/flow2authcredspage.ui -- wizard/flow2authwidget.ui wizard/owncloudsetupnocredspage.ui wizard/owncloudwizardresultpage.ui - wizard/webview.ui ) - + set(client_SRCS -@@ -107,23 +104,16 @@ set(client_SRCS +@@ -108,24 +106,17 @@ set(client_SRCS creds/credentialsfactory.cpp creds/httpcredentialsgui.cpp creds/oauth.cpp - creds/flow2auth.cpp + creds/keychainchunk.cpp - creds/webflowcredentials.cpp - creds/webflowcredentialsdialog.cpp wizard/postfixlineedit.cpp @@ -50,24 +54,24 @@ index e806beb..e56a811 100644 - wizard/webview.cpp wizard/slideshow.cpp ) - -@@ -306,7 +296,7 @@ else() + +@@ -298,7 +289,7 @@ else() endif() - + add_library(updater STATIC ${updater_SRCS}) -target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml Qt5::WebEngineWidgets) +target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml) target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - + set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp -index ca00a4e..25e6a8b 100644 +index eec375180..c8ae72bda 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -253,20 +253,6 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings) acc->setUrl(urlConfig.toUrl()); } - + - // Migrate to webflow - if (authType == QLatin1String("http")) { - authType = "webflow"; @@ -83,10 +87,10 @@ index ca00a4e..25e6a8b 100644 - } - qCInfo(lcAccountManager) << "Account for" << acc->url() << "using auth type" << authType; - + acc->_serverVersion = settings.value(QLatin1String(serverVersionC)).toString(); diff --git a/src/gui/creds/credentialsfactory.cpp b/src/gui/creds/credentialsfactory.cpp -index 6062f70..52e003b 100644 +index 6062f70eb..52e003b57 100644 --- a/src/gui/creds/credentialsfactory.cpp +++ b/src/gui/creds/credentialsfactory.cpp @@ -21,7 +21,6 @@ @@ -94,9 +98,9 @@ index 6062f70..52e003b 100644 #include "creds/shibbolethcredentials.h" #endif -#include "creds/webflowcredentials.h" - + namespace OCC { - + @@ -40,8 +39,6 @@ namespace CredentialsFactory { } else if (type == "shibboleth") { return new ShibbolethCredentials; @@ -107,23 +111,23 @@ index 6062f70..52e003b 100644 qCWarning(lcGuiCredentials, "Unknown credentials type: %s", qPrintable(type)); return new DummyCredentials; diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp -index 3d20344..5785cad 100644 +index 875dacf55..65dea6619 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp -@@ -408,7 +408,7 @@ void OwncloudSetupWizard::slotAuthError() - } - - _ocWizard->show(); +@@ -409,7 +409,7 @@ void OwncloudSetupWizard::slotAuthError() + + // bring wizard to top + _ocWizard->bringToTop(); - if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) { + if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds) { _ocWizard->back(); } _ocWizard->displayError(errorMsg, _ocWizard->currentId() == WizardCommon::Page_ServerSetup && checkDowngradeAdvised(reply)); diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp -index 3a956b0..8b32b5b 100644 +index 9a6ced74b..101b5dae5 100644 --- a/src/gui/wizard/owncloudsetuppage.cpp +++ b/src/gui/wizard/owncloudsetuppage.cpp -@@ -143,7 +143,7 @@ void OwncloudSetupPage::slotLogin() +@@ -144,7 +144,7 @@ void OwncloudSetupPage::slotLogin() void OwncloudSetupPage::slotGotoProviderList() { _ocWizard->setRegistration(true); @@ -132,7 +136,7 @@ index 3a956b0..8b32b5b 100644 _authTypeKnown = true; _checking = false; emit completeChanged(); -@@ -258,12 +258,8 @@ int OwncloudSetupPage::nextId() const +@@ -259,12 +259,8 @@ int OwncloudSetupPage::nextId() const return WizardCommon::Page_HttpCreds; case DetermineAuthTypeJob::OAuth: return WizardCommon::Page_OAuthCreds; @@ -146,19 +150,19 @@ index 3a956b0..8b32b5b 100644 return WizardCommon::Page_HttpCreds; } diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp -index e4dda0f..370302c 100644 +index 2076136ff..5f3480340 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp -@@ -26,8 +26,6 @@ +@@ -27,8 +27,6 @@ #endif #include "wizard/owncloudadvancedsetuppage.h" #include "wizard/owncloudwizardresultpage.h" -#include "wizard/webviewpage.h" -#include "wizard/flow2authcredspage.h" - + #include "QProgressIndicator.h" - -@@ -46,14 +44,12 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + +@@ -47,14 +45,12 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) , _setupPage(new OwncloudSetupPage(this)) , _httpCredsPage(new OwncloudHttpCredsPage(this)) , _browserCredsPage(new OwncloudOAuthCredsPage) @@ -173,7 +177,7 @@ index e4dda0f..370302c 100644 , _setupLog() , _registration(false) { -@@ -61,13 +57,11 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) +@@ -62,13 +58,11 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) setPage(WizardCommon::Page_ServerSetup, _setupPage); setPage(WizardCommon::Page_HttpCreds, _httpCredsPage); setPage(WizardCommon::Page_OAuthCreds, _browserCredsPage); @@ -184,10 +188,10 @@ index e4dda0f..370302c 100644 setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage); setPage(WizardCommon::Page_Result, _resultPage); - setPage(WizardCommon::Page_WebView, _webViewPage); - + connect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished); - -@@ -79,11 +73,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + +@@ -80,11 +74,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) connect(_setupPage, &OwncloudSetupPage::determineAuthType, this, &OwncloudWizard::determineAuthType); connect(_httpCredsPage, &OwncloudHttpCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); connect(_browserCredsPage, &OwncloudOAuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); @@ -199,10 +203,26 @@ index e4dda0f..370302c 100644 connect(_advancedSetupPage, &OwncloudAdvancedSetupPage::createLocalAndRemoteFolders, this, &OwncloudWizard::createLocalAndRemoteFolders); connect(this, &QWizard::customButtonClicked, this, &OwncloudWizard::skipFolderConfiguration); -@@ -168,20 +160,12 @@ void OwncloudWizard::successfulStep() +@@ -103,15 +95,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + setButtonText(QWizard::CustomButton1, tr("Skip folders configuration")); + + +- // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) +- connect(this, &OwncloudWizard::styleChanged, _setupPage, &OwncloudSetupPage::slotStyleChanged); +- connect(this, &OwncloudWizard::styleChanged, _advancedSetupPage, &OwncloudAdvancedSetupPage::slotStyleChanged); +- connect(this, &OwncloudWizard::styleChanged, _flow2CredsPage, &Flow2AuthCredsPage::slotStyleChanged); +- +- customizeStyle(); +- +- // allow Flow2 page to poll on window activation +- connect(this, &OwncloudWizard::onActivate, _flow2CredsPage, &Flow2AuthCredsPage::slotPollNow); + } + + void OwncloudWizard::setAccount(AccountPtr account) +@@ -180,20 +163,12 @@ void OwncloudWizard::successfulStep() _browserCredsPage->setConnected(); break; - + - case WizardCommon::Page_Flow2AuthCreds: - _flow2CredsPage->setConnected(); - break; @@ -212,7 +232,7 @@ index e4dda0f..370302c 100644 _shibbolethCredsPage->setConnected(); break; #endif - + - case WizardCommon::Page_WebView: - _webViewPage->setConnected(); - break; @@ -220,7 +240,7 @@ index e4dda0f..370302c 100644 case WizardCommon::Page_AdvancedSetup: _advancedSetupPage->directoriesCreated(); break; -@@ -205,10 +189,6 @@ void OwncloudWizard::setAuthType(DetermineAuthTypeJob::AuthType type) +@@ -217,10 +192,6 @@ void OwncloudWizard::setAuthType(DetermineAuthTypeJob::AuthType type) #endif if (type == DetermineAuthTypeJob::OAuth) { _credentialsPage = _browserCredsPage; @@ -231,9 +251,9 @@ index e4dda0f..370302c 100644 } else { // try Basic auth even for "Unknown" _credentialsPage = _httpCredsPage; } -@@ -233,7 +213,7 @@ void OwncloudWizard::slotCurrentPageChanged(int id) +@@ -245,7 +216,7 @@ void OwncloudWizard::slotCurrentPageChanged(int id) } - + setOption(QWizard::HaveCustomButton1, id == WizardCommon::Page_AdvancedSetup); - if (id == WizardCommon::Page_AdvancedSetup && (_credentialsPage == _browserCredsPage || _credentialsPage == _flow2CredsPage)) { + if (id == WizardCommon::Page_AdvancedSetup) { @@ -241,7 +261,7 @@ index e4dda0f..370302c 100644 // to re-open the browser. button(QWizard::BackButton)->setEnabled(false); diff --git a/src/gui/wizard/owncloudwizard.h b/src/gui/wizard/owncloudwizard.h -index c1d290d..1e32077 100644 +index 3cbf89f71..2eecbf95a 100644 --- a/src/gui/wizard/owncloudwizard.h +++ b/src/gui/wizard/owncloudwizard.h @@ -39,8 +39,6 @@ class OwncloudAdvancedSetupPage; @@ -250,10 +270,10 @@ index c1d290d..1e32077 100644 class AbstractCredentialsWizardPage; -class WebViewPage; -class Flow2AuthCredsPage; - + /** * @brief The OwncloudWizard class -@@ -105,11 +103,9 @@ private: +@@ -114,11 +112,9 @@ private: #ifndef NO_SHIBBOLETH OwncloudShibbolethCredsPage *_shibbolethCredsPage; #endif @@ -262,11 +282,11 @@ index c1d290d..1e32077 100644 OwncloudWizardResultPage *_resultPage; AbstractCredentialsWizardPage *_credentialsPage; - WebViewPage *_webViewPage; - + QStringList _setupLog; - + diff --git a/src/gui/wizard/owncloudwizardcommon.h b/src/gui/wizard/owncloudwizardcommon.h -index d1f7c08..c55ed04 100644 +index d1f7c08be..c55ed04fd 100644 --- a/src/gui/wizard/owncloudwizardcommon.h +++ b/src/gui/wizard/owncloudwizardcommon.h @@ -38,8 +38,6 @@ namespace WizardCommon { @@ -279,26 +299,51 @@ index d1f7c08..c55ed04 100644 Page_Result }; diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp -index c178895..eab4723 100644 +index 76789a8ce..06c94ea5b 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp -@@ -922,12 +922,12 @@ void DetermineAuthTypeJob::checkBothDone() - +@@ -921,7 +921,7 @@ void DetermineAuthTypeJob::start() + }); + connect(oldFlowRequired, &JsonApiJob::jsonReceived, this, [this](const QJsonDocument &json, int statusCode) { + if (statusCode == 200) { +- _resultOldFlow = LoginFlowV2; ++ _resultOldFlow = Basic; + + auto data = json.object().value("ocs").toObject().value("data").toObject().value("capabilities").toObject(); + auto gs = data.value("globalscale"); +@@ -929,7 +929,7 @@ void DetermineAuthTypeJob::start() + auto flow = gs.toObject().value("desktoplogin"); + if (flow != QJsonValue::Undefined) { + if (flow.toInt() == 1) { +- _resultOldFlow = WebViewFlow; ++ _resultOldFlow = Basic; + } + } + } +@@ -955,17 +955,17 @@ void DetermineAuthTypeJob::checkAllDone() + // WebViewFlow > OAuth > Shib > Basic if (_account->serverVersionInt() >= Account::makeServerVersion(12, 0, 0)) { - result = WebViewFlow; + result = Basic; } - + // LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic if (_account->serverVersionInt() >= Account::makeServerVersion(16, 0, 0)) { - result = LoginFlowV2; + result = Basic; } - + + // If we determined that we need the webview flow (GS for example) then we switch to that +- if (_resultOldFlow == WebViewFlow) { +- result = WebViewFlow; ++ if (_resultOldFlow == Basic) { ++ result = Basic; + } + qCInfo(lcDetermineAuthTypeJob) << "Auth type for" << _account->davUrl() << "is" << result; diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h -index d0829b4..925ace0 100644 +index 765204c88..088c517d7 100644 --- a/src/libsync/networkjobs.h +++ b/src/libsync/networkjobs.h @@ -412,8 +412,6 @@ public: @@ -308,5 +353,5 @@ index d0829b4..925ace0 100644 - WebViewFlow, - LoginFlowV2 }; - + explicit DetermineAuthTypeJob(AccountPtr account, QObject *parent = nullptr); |