diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-06-03 14:22:02 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-06-03 14:22:02 +0200 |
commit | a4f4108bd01a1ae114efd10ef0d97bd5948347b5 (patch) | |
tree | 5300962546ee3d79bb8e1eddeaf88e1233666fc5 /app-admin | |
parent | app-admin/keepassxc: Bump to version 2.4.2 (diff) | |
download | gentoo-a4f4108bd01a1ae114efd10ef0d97bd5948347b5.tar.gz gentoo-a4f4108bd01a1ae114efd10ef0d97bd5948347b5.tar.bz2 gentoo-a4f4108bd01a1ae114efd10ef0d97bd5948347b5.zip |
app-admin/keepassxc: Removed old.
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/keepassxc/Manifest | 1 | ||||
-rw-r--r-- | app-admin/keepassxc/files/keepassxc-2.4.0-build_fix.patch | 38 | ||||
-rw-r--r-- | app-admin/keepassxc/files/keepassxc-2.4.0-update_checker_toggle.patch | 445 | ||||
-rw-r--r-- | app-admin/keepassxc/keepassxc-2.4.0-r1.ebuild | 102 |
4 files changed, 0 insertions, 586 deletions
diff --git a/app-admin/keepassxc/Manifest b/app-admin/keepassxc/Manifest index b5e380200e85..665ab5adedb9 100644 --- a/app-admin/keepassxc/Manifest +++ b/app-admin/keepassxc/Manifest @@ -1,4 +1,3 @@ DIST keepassxc-2.3.4-src.tar.xz 4137176 BLAKE2B bbf8dbef5fb365f3c0d9332454b2b3bce7d4e411f43939ae683428ca669a459f1662bb8b1a1da228bc9447ee15349a5cd558e4fdfcc5194f22401f56003fd0f0 SHA512 edca22ef9d7c553d21d8ea6115a5635265176acc56fdf055f1961a3e65046de49ed5b67eb68ecf4f925226fb5bca140d5d473a5082301168f6a8bb7979f562a8 -DIST keepassxc-2.4.0-src.tar.xz 3252104 BLAKE2B 7c82822f6fb0eaf6b5d086aebdf4927af215339f92e7f52104e05d5ff301461a1ad816d8a39b377c717e975001c9295ec6d8b2f2003a2215c05931eb9acb5c73 SHA512 b7295f5983237606efd236955dc73d477992d944e547eeb2c3a267d846e70ce6f83e489f58e3bd9b5bb21decabd9052a4ea7b98bd98e8283abbb678ae19e5559 DIST keepassxc-2.4.1-src.tar.xz 3277856 BLAKE2B 64ed15987f26fd884db8fec9dc8e5d9ecd1ab9c298c2c35ee41f5aacd51bf3cd512c8ca0370ccc294d4f1ac6214678d2a3a4d8c47441c01ae8e858252018ec97 SHA512 4369043700d3de4fece0a1dd0f8aab3f621df379bc9d0214b4c70ab72d081f978104aa09fd39c4b4bf8b8df8f78266835dc206c31e7174bdf872a977c0d79502 DIST keepassxc-2.4.2-src.tar.xz 3290468 BLAKE2B bcb4974729c771073b6ccf4f5af5ac94a237c349dacc10be5db698630e4fc8fc226a6911957c1ea4723dfce9aa348c11588aa1e5927487cdd36d9c8bae0d7758 SHA512 4ad7e559a36831ad715672d3cddcd3becd4f39847b7ad4451d920c76671e607f8ec9d65ed6f5450dd95e037d129cafe8faff8c1ecd9d20a22fed2c72b2dde9f2 diff --git a/app-admin/keepassxc/files/keepassxc-2.4.0-build_fix.patch b/app-admin/keepassxc/files/keepassxc-2.4.0-build_fix.patch deleted file mode 100644 index 486c8e2dd9a3..000000000000 --- a/app-admin/keepassxc/files/keepassxc-2.4.0-build_fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ff43f3ff8a8a1630d10e7117c45048623d215616 Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Wed, 20 Mar 2019 11:53:21 +0100 -Subject: [PATCH] src/gui/DatabaseWidget.cpp: Build fails without - WITH_XC_KEESHARE -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp: In member function ‘void DatabaseWidget::search(const QString&)’: -/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp:1115:5: error: ‘m_shareLabel’ was not declared in this scope - m_shareLabel->setVisible(false); - ^~~~~~~~~~~~ -/var/tmp/portage/app-admin/keepassxc-2.4.0/work/keepassxc-2.4.0/src/gui/DatabaseWidget.cpp:1115:5: note: suggested alternative: ‘m_searchingLabel’ - m_shareLabel->setVisible(false); - ^~~~~~~~~~~~ - m_searchingLabel ---- - src/gui/DatabaseWidget.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp -index 8728c331..e4196734 100644 ---- a/src/gui/DatabaseWidget.cpp -+++ b/src/gui/DatabaseWidget.cpp -@@ -1112,7 +1112,9 @@ void DatabaseWidget::search(const QString& searchtext) - } - - m_searchingLabel->setVisible(true); -+#ifdef WITH_XC_KEESHARE - m_shareLabel->setVisible(false); -+#endif - - emit searchModeActivated(); - } --- -2.21.0 - diff --git a/app-admin/keepassxc/files/keepassxc-2.4.0-update_checker_toggle.patch b/app-admin/keepassxc/files/keepassxc-2.4.0-update_checker_toggle.patch deleted file mode 100644 index 64e02066916b..000000000000 --- a/app-admin/keepassxc/files/keepassxc-2.4.0-update_checker_toggle.patch +++ /dev/null @@ -1,445 +0,0 @@ -From 28994fef0d2c04690490f34b5da87c42e60a6b5e Mon Sep 17 00:00:00 2001 -From: Jonathan White <support@dmapps.us> -Date: Tue, 9 Apr 2019 21:06:13 -0400 -Subject: [PATCH] Enhance update checker - -* Reduce initial update check notification to 500 ms to prevent inappropriately stealing focus from user -* Add build flag WITH_XC_UPDATECHECK which defaults to ON -* Update checks are resolved every 7 days instead of every time the application is started -* Better checks for beta builds; ignore snapshots -* Increase test cases ---- - CMakeLists.txt | 5 ++ - src/CMakeLists.txt | 1 + - src/config-keepassx.h.cmake | 1 + - src/core/Clock.cpp | 1 + - src/gui/ApplicationSettingsWidget.cpp | 25 ++++++- - src/gui/ApplicationSettingsWidget.h | 2 + - src/gui/ApplicationSettingsWidgetGeneral.ui | 39 +++++++--- - src/gui/MainWindow.cpp | 12 ++-- - src/updatecheck/UpdateChecker.cpp | 79 +++++++++++++-------- - src/updatecheck/UpdateChecker.h | 2 +- - tests/TestUpdateCheck.cpp | 35 ++++++--- - 11 files changed, 147 insertions(+), 55 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 658548f7..4f8a419c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -49,6 +49,7 @@ option(WITH_XC_YUBIKEY "Include YubiKey support." OFF) - option(WITH_XC_SSHAGENT "Include SSH agent support." OFF) - option(WITH_XC_KEESHARE "Sharing integration with KeeShare" OFF) - option(WITH_XC_KEESHARE_SECURE "Sharing integration with secured KeeShare containers" OFF) -+option(WITH_XC_UPDATECHECK "Include automatic update checks; disable for controlled distributions" ON) - if(APPLE) - option(WITH_XC_TOUCHID "Include TouchID support for macOS." OFF) - endif() -@@ -76,6 +77,10 @@ else() - set(WITH_XC_CRYPTO_SSH OFF) - endif() - -+if(WITH_XC_UPDATECHECK) -+ set(WITH_XC_NETWORKING ON) -+endif() -+ - set(KEEPASSXC_VERSION_MAJOR "2") - set(KEEPASSXC_VERSION_MINOR "4") - set(KEEPASSXC_VERSION_PATCH "0") -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 110dc606..31f29033 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -195,6 +195,7 @@ add_feature_info(SSHAgent WITH_XC_SSHAGENT "SSH agent integration compatible wit - add_feature_info(KeeShare WITH_XC_KEESHARE "Sharing integration with KeeShare") - add_feature_info(KeeShare-Secure WITH_XC_KEESHARE_SECURE "Sharing integration with KeeShare with secure sources") - add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response") -+add_feature_info(UpdateCheck WITH_XC_UPDATECHECK "Automatic update checking") - if(APPLE) - add_feature_info(TouchID WITH_XC_TOUCHID "TouchID integration") - endif() -diff --git a/src/config-keepassx.h.cmake b/src/config-keepassx.h.cmake -index 7d701886..2acff446 100644 ---- a/src/config-keepassx.h.cmake -+++ b/src/config-keepassx.h.cmake -@@ -20,6 +20,7 @@ - #cmakedefine WITH_XC_KEESHARE - #cmakedefine WITH_XC_KEESHARE_INSECURE - #cmakedefine WITH_XC_KEESHARE_SECURE -+#cmakedefine WITH_XC_UPDATECHECK - #cmakedefine WITH_XC_TOUCHID - - #cmakedefine KEEPASSXC_BUILD_TYPE "@KEEPASSXC_BUILD_TYPE@" -diff --git a/src/core/Clock.cpp b/src/core/Clock.cpp -index 88ac4fb7..be9e91dc 100644 ---- a/src/core/Clock.cpp -+++ b/src/core/Clock.cpp -@@ -30,6 +30,7 @@ QDateTime Clock::currentDateTime() - - uint Clock::currentSecondsSinceEpoch() - { -+ // TODO: change to toSecsSinceEpoch() when min Qt >= 5.8 - return instance().currentDateTimeImpl().toTime_t(); - } - -diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp -index 90b851bd..e6a7068d 100644 ---- a/src/gui/ApplicationSettingsWidget.cpp -+++ b/src/gui/ApplicationSettingsWidget.cpp -@@ -91,8 +91,15 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent) - m_secUi->touchIDResetSpinBox, SLOT(setEnabled(bool))); - // clang-format on - --#ifndef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK -+ connect(m_generalUi->checkForUpdatesOnStartupCheckBox, SIGNAL(toggled(bool)), SLOT(checkUpdatesToggled(bool))); -+#else - m_generalUi->checkForUpdatesOnStartupCheckBox->setVisible(false); -+ m_generalUi->checkForUpdatesIncludeBetasCheckBox->setVisible(false); -+ m_generalUi->checkUpdatesSpacer->changeSize(0,0, QSizePolicy::Fixed, QSizePolicy::Fixed); -+#endif -+ -+#ifndef WITH_XC_NETWORKING - m_secUi->privacy->setVisible(false); - #endif - -@@ -336,3 +343,19 @@ void ApplicationSettingsWidget::enableToolbarSettings(bool checked) - m_generalUi->toolButtonStyleComboBox->setEnabled(!checked); - m_generalUi->toolButtonStyleLabel->setEnabled(!checked); - } -+ -+void ApplicationSettingsWidget::rememberDatabasesToggled(bool checked) -+{ -+ if (!checked) { -+ m_generalUi->rememberLastKeyFilesCheckBox->setChecked(false); -+ m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(false); -+ } -+ -+ m_generalUi->rememberLastKeyFilesCheckBox->setEnabled(checked); -+ m_generalUi->openPreviousDatabasesOnStartupCheckBox->setEnabled(checked); -+} -+ -+void ApplicationSettingsWidget::checkUpdatesToggled(bool checked) -+{ -+ m_generalUi->checkForUpdatesIncludeBetasCheckBox->setEnabled(checked); -+} -diff --git a/src/gui/ApplicationSettingsWidget.h b/src/gui/ApplicationSettingsWidget.h -index ffcfea2b..86688b70 100644 ---- a/src/gui/ApplicationSettingsWidget.h -+++ b/src/gui/ApplicationSettingsWidget.h -@@ -56,6 +56,8 @@ private slots: - void autoSaveToggled(bool checked); - void systrayToggled(bool checked); - void enableToolbarSettings(bool checked); -+ void rememberDatabasesToggled(bool checked); -+ void checkUpdatesToggled(bool checked); - - private: - QWidget* const m_secWidget; -diff --git a/src/gui/ApplicationSettingsWidgetGeneral.ui b/src/gui/ApplicationSettingsWidgetGeneral.ui -index 798971bf..678b55fa 100644 ---- a/src/gui/ApplicationSettingsWidgetGeneral.ui -+++ b/src/gui/ApplicationSettingsWidgetGeneral.ui -@@ -86,10 +86,40 @@ - <item> - <widget class="QCheckBox" name="checkForUpdatesOnStartupCheckBox"> - <property name="text"> -- <string>Check for updates at application startup</string> -+ <string>Check for updates at application startup once per week</string> - </property> - </widget> - </item> -+ <item> -+ <layout class="QHBoxLayout" name="checkUpdatesSubLayout"> -+ <property name="spacing"> -+ <number>0</number> -+ </property> -+ <item> -+ <spacer name="checkUpdatesSpacer"> -+ <property name="orientation"> -+ <enum>Qt::Horizontal</enum> -+ </property> -+ <property name="sizeType"> -+ <enum>QSizePolicy::Fixed</enum> -+ </property> -+ <property name="sizeHint" stdset="0"> -+ <size> -+ <width>20</width> -+ <height>20</height> -+ </size> -+ </property> -+ </spacer> -+ </item> -+ <item> -+ <widget class="QCheckBox" name="checkForUpdatesIncludeBetasCheckBox"> -+ <property name="text"> -+ <string>Include beta releases when checking for updates</string> -+ </property> -+ </widget> -+ </item> -+ </layout> -+ </item> - </layout> - </widget> - </item> -@@ -186,13 +216,6 @@ - <string>General</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_7"> -- <item> -- <widget class="QCheckBox" name="checkForUpdatesIncludeBetasCheckBox"> -- <property name="text"> -- <string>Include pre-releases when checking for updates</string> -- </property> -- </widget> -- </item> - <item> - <widget class="QCheckBox" name="toolbarHideCheckBox"> - <property name="text"> -diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp -index 6e3c96af..6776a59d 100644 ---- a/src/gui/MainWindow.cpp -+++ b/src/gui/MainWindow.cpp -@@ -41,7 +41,7 @@ - #include "keys/FileKey.h" - #include "keys/PasswordKey.h" - --#ifdef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK - #include "gui/MessageBox.h" - #include "gui/UpdateCheckDialog.h" - #include "updatecheck/UpdateChecker.h" -@@ -372,12 +372,12 @@ MainWindow::MainWindow() - setUnifiedTitleAndToolBarOnMac(true); - #endif - --#ifdef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK - connect(m_ui->actionCheckForUpdates, SIGNAL(triggered()), SLOT(showUpdateCheckDialog())); - connect(UpdateChecker::instance(), - SIGNAL(updateCheckFinished(bool, QString, bool)), - SLOT(hasUpdateAvailable(bool, QString, bool))); -- QTimer::singleShot(3000, this, SLOT(showUpdateCheckStartup())); -+ QTimer::singleShot(500, this, SLOT(showUpdateCheckStartup())); - #else - m_ui->actionCheckForUpdates->setVisible(false); - #endif -@@ -687,7 +687,7 @@ void MainWindow::showAboutDialog() - - void MainWindow::showUpdateCheckStartup() - { --#ifdef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK - if (!config()->get("UpdateCheckMessageShown", false).toBool()) { - auto result = - MessageBox::question(this, -@@ -710,7 +710,7 @@ void MainWindow::showUpdateCheckStartup() - - void MainWindow::hasUpdateAvailable(bool hasUpdate, const QString& version, bool isManuallyRequested) - { --#ifdef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK - if (hasUpdate && !isManuallyRequested) { - auto* updateCheckDialog = new UpdateCheckDialog(this); - updateCheckDialog->showUpdateCheckResponse(hasUpdate, version); -@@ -725,7 +725,7 @@ void MainWindow::hasUpdateAvailable(bool hasUpdate, const QString& version, bool - - void MainWindow::showUpdateCheckDialog() - { --#ifdef WITH_XC_NETWORKING -+#ifdef WITH_XC_UPDATECHECK - updateCheck()->checkForUpdates(true); - auto* updateCheckDialog = new UpdateCheckDialog(this); - updateCheckDialog->show(); -diff --git a/src/updatecheck/UpdateChecker.cpp b/src/updatecheck/UpdateChecker.cpp -index 4272410b..14531290 100644 ---- a/src/updatecheck/UpdateChecker.cpp -+++ b/src/updatecheck/UpdateChecker.cpp -@@ -17,6 +17,7 @@ - - #include "UpdateChecker.h" - #include "config-keepassx.h" -+#include "core/Clock.h" - #include "core/Config.h" - #include <QJsonObject> - #include <QNetworkAccessManager> -@@ -38,24 +39,28 @@ UpdateChecker::~UpdateChecker() - - void UpdateChecker::checkForUpdates(bool manuallyRequested) - { -+ auto nextCheck = config()->get("GUI/CheckForUpdatesNextCheck", 0).toULongLong(); - m_isManuallyRequested = manuallyRequested; -- m_bytesReceived.clear(); - -- QString apiUrlStr = QString("https://api.github.com/repos/keepassxreboot/keepassxc/releases"); -+ if (m_isManuallyRequested || Clock::currentSecondsSinceEpoch() >= nextCheck) { -+ m_bytesReceived.clear(); - -- if (!config()->get("GUI/CheckForUpdatesIncludeBetas", false).toBool()) { -- apiUrlStr += "/latest"; -- } -+ QString apiUrlStr = QString("https://api.github.com/repos/keepassxreboot/keepassxc/releases"); -+ -+ if (!config()->get("GUI/CheckForUpdatesIncludeBetas", false).toBool()) { -+ apiUrlStr += "/latest"; -+ } - -- QUrl apiUrl = QUrl(apiUrlStr); -+ QUrl apiUrl = QUrl(apiUrlStr); - -- QNetworkRequest request(apiUrl); -- request.setRawHeader("Accept", "application/json"); -+ QNetworkRequest request(apiUrl); -+ request.setRawHeader("Accept", "application/json"); - -- m_reply = m_netMgr->get(request); -+ m_reply = m_netMgr->get(request); - -- connect(m_reply, &QNetworkReply::finished, this, &UpdateChecker::fetchFinished); -- connect(m_reply, &QIODevice::readyRead, this, &UpdateChecker::fetchReadyRead); -+ connect(m_reply, &QNetworkReply::finished, this, &UpdateChecker::fetchFinished); -+ connect(m_reply, &QIODevice::readyRead, this, &UpdateChecker::fetchReadyRead); -+ } - } - - void UpdateChecker::fetchReadyRead() -@@ -84,8 +89,12 @@ void UpdateChecker::fetchFinished() - - if (!jsonObject.value("tag_name").isUndefined()) { - version = jsonObject.value("tag_name").toString(); -- hasNewVersion = compareVersions(version, QString(KEEPASSXC_VERSION)); -+ hasNewVersion = compareVersions(QString(KEEPASSXC_VERSION), version); - } -+ -+ // Check again in 7 days -+ // TODO: change to toSecsSinceEpoch() when min Qt >= 5.8 -+ config()->set("GUI/CheckForUpdatesNextCheck", Clock::currentDateTime().addDays(7).toTime_t()); - } else { - version = "error"; - } -@@ -93,38 +102,46 @@ void UpdateChecker::fetchFinished() - emit updateCheckFinished(hasNewVersion, version, m_isManuallyRequested); - } - --bool UpdateChecker::compareVersions(const QString& remoteVersion, const QString& localVersion) -+bool UpdateChecker::compareVersions(const QString& localVersion, const QString& remoteVersion) - { -+ // Quick full-string equivalence check - if (localVersion == remoteVersion) { -- return false; // Currently using updated version -+ return false; - } - -- QRegularExpression verRegex("^(\\d+(\\.\\d+){0,2})(-\\w+)?$", QRegularExpression::CaseInsensitiveOption); -+ QRegularExpression verRegex(R"(^((?:\d+\.){2}\d+)(?:-(\w+?)(\d+)?)?$)"); - -- QRegularExpressionMatch lmatch = verRegex.match(localVersion); -- QRegularExpressionMatch rmatch = verRegex.match(remoteVersion); -+ auto lmatch = verRegex.match(localVersion); -+ auto rmatch = verRegex.match(remoteVersion); - -- if (!lmatch.captured(1).isNull() && !rmatch.captured(1).isNull()) { -- if (lmatch.captured(1) == rmatch.captured(1) && !lmatch.captured(3).isNull()) { -- // Same version, but installed version has snapshot/beta suffix and should be updated to stable -- return true; -- } -+ auto lVersion = lmatch.captured(1).split("."); -+ auto lSuffix = lmatch.captured(2); -+ auto lBetaNum = lmatch.captured(3); - -- QStringList lparts = lmatch.captured(1).split("."); -- QStringList rparts = rmatch.captured(1).split("."); -+ auto rVersion = rmatch.captured(1).split("."); -+ auto rSuffix = rmatch.captured(2); -+ auto rBetaNum = rmatch.captured(3); - -- if (lparts.length() < 3) -- lparts << "0"; -+ if (!lVersion.isEmpty() && !rVersion.isEmpty()) { -+ if (lSuffix.compare("snapshot", Qt::CaseInsensitive) == 0) { -+ // Snapshots are not checked for version updates -+ return false; -+ } - -- if (rparts.length() < 3) -- rparts << "0"; -+ // Check "-beta[X]" versions -+ if (lVersion == rVersion && !lSuffix.isEmpty()) { -+ // Check if stable version has been released or new beta is available -+ // otherwise the version numbers are equal -+ return rSuffix.isEmpty() || lBetaNum.toInt() < rBetaNum.toInt(); -+ } - - for (int i = 0; i < 3; i++) { -- int l = lparts[i].toInt(); -- int r = rparts[i].toInt(); -+ int l = lVersion[i].toInt(); -+ int r = rVersion[i].toInt(); - -- if (l == r) -+ if (l == r) { - continue; -+ } - - if (l > r) { - return false; // Installed version is newer than release -diff --git a/src/updatecheck/UpdateChecker.h b/src/updatecheck/UpdateChecker.h -index ac6471d6..64430bda 100644 ---- a/src/updatecheck/UpdateChecker.h -+++ b/src/updatecheck/UpdateChecker.h -@@ -31,7 +31,7 @@ public: - ~UpdateChecker() override; - - void checkForUpdates(bool manuallyRequested); -- static bool compareVersions(const QString& remoteVersion, const QString& localVersion); -+ static bool compareVersions(const QString& localVersion, const QString& remoteVersion); - static UpdateChecker* instance(); - - signals: -diff --git a/tests/TestUpdateCheck.cpp b/tests/TestUpdateCheck.cpp -index 8cba43b1..ff709cd5 100644 ---- a/tests/TestUpdateCheck.cpp -+++ b/tests/TestUpdateCheck.cpp -@@ -29,13 +29,32 @@ void TestUpdateCheck::initTestCase() - - void TestUpdateCheck::testCompareVersion() - { -- // Remote Version , Installed Version -- QCOMPARE(UpdateChecker::compareVersions(QString("2.4.0"), QString("2.3.4")), true); -- QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.4.0")), false); -+ // No upgrade - QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.3.0")), false); -- QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.3.0-beta1")), true); -- QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta2"), QString("2.3.0-beta1")), true); -- QCOMPARE(UpdateChecker::compareVersions(QString("2.3.4"), QString("2.4.0-snapshot")), false); -- QCOMPARE(UpdateChecker::compareVersions(QString("invalid"), QString("2.4.0")), false); -- QCOMPARE(UpdateChecker::compareVersions(QString(""), QString("2.4.0")), false); -+ -+ // First digit upgrade -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.4.0"), QString("3.0.0")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("3.0.0"), QString("2.4.0")), false); -+ -+ // Second digit upgrade -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.4"), QString("2.4.0")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.4.0"), QString("2.3.4")), false); -+ -+ // Third digit upgrade -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.3.1")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.1"), QString("2.3.0")), false); -+ -+ // Beta builds -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.3.0-beta1")), false); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0"), QString("2.3.1-beta1")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta1"), QString("2.3.0")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta"), QString("2.3.0-beta1")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta1"), QString("2.3.0-beta")), false); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta1"), QString("2.3.0-beta2")), true); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.0-beta2"), QString("2.3.0-beta1")), false); -+ -+ // Snapshot and invalid data -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.3.4-snapshot"), QString("2.4.0")), false); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.4.0"), QString("invalid")), false); -+ QCOMPARE(UpdateChecker::compareVersions(QString("2.4.0"), QString("")), false); - } --- -2.21.0 - diff --git a/app-admin/keepassxc/keepassxc-2.4.0-r1.ebuild b/app-admin/keepassxc/keepassxc-2.4.0-r1.ebuild deleted file mode 100644 index 1b2e89238032..000000000000 --- a/app-admin/keepassxc/keepassxc-2.4.0-r1.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake-utils xdg - -DESCRIPTION="KeePassXC - KeePass Cross-platform Community Edition" -HOMEPAGE="https://keepassxc.org" - -if [[ "${PV}" != 9999 ]] ; then - if [[ "${PV}" == *_beta* ]] ; then - SRC_URI="https://github.com/keepassxreboot/keepassxc/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}/${P/_/-}" - else - #SRC_URI="https://github.com/keepassxreboot/keepassxc/archive/${PV}.tar.gz -> ${P}.tar.gz" - SRC_URI="https://github.com/keepassxreboot/keepassxc/releases/download/${PV}/${P}-src.tar.xz" - KEYWORDS="~amd64 ~x86" - fi -else - inherit git-r3 - EGIT_REPO_URI="https://github.com/keepassxreboot/${PN}" -fi - -LICENSE="LGPL-2.1 GPL-2 GPL-3" -SLOT="0" -IUSE="autotype browser debug network test yubikey" - -RDEPEND=" - app-crypt/argon2:= - dev-libs/libgcrypt:= - dev-qt/qtcore:5 - dev-qt/qtdbus:5 - dev-qt/qtgui:5 - dev-qt/qtnetwork:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - media-gfx/qrencode:= - sys-libs/zlib - autotype? ( - dev-qt/qtx11extras:5 - x11-libs/libX11 - x11-libs/libXi - x11-libs/libXtst - ) - browser? ( >=dev-libs/libsodium-1.0.12 ) - yubikey? ( sys-auth/ykpers ) -" - -DEPEND=" - ${RDEPEND} - dev-qt/linguist-tools:5 - dev-qt/qttest:5 - dev-qt/qtconcurrent:5 -" - -# Not a runtime dependency but still needed (see bug #667092) -PDEPEND=" - x11-misc/xsel -" - -PATCHES=( - "${FILESDIR}/${PN}-dont_call_mandb.patch" - "${FILESDIR}/${P}-build_fix.patch" - "${FILESDIR}/${P}-update_checker_toggle.patch" -) - -src_prepare() { - use test || \ - sed -e "/^find_package(Qt5Test/d" -i CMakeLists.txt || die - - cmake-utils_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DWITH_GUI_TESTS=OFF - -DWITH_TESTS="$(usex test)" - -DWITH_XC_AUTOTYPE="$(usex autotype)" - -DWITH_XC_BROWSER="$(usex browser)" - -DWITH_XC_NETWORKING="$(usex network)" - -DWITH_XC_SSHAGENT=ON - -DWITH_XC_UPDATECHECK=OFF - -DWITH_XC_YUBIKEY="$(usex yubikey)" - ) - if [[ "${PV}" == *_beta* ]] ; then - mycmakeargs+=( -DOVERRIDE_VERSION="${PV/_/-}" ) - fi - cmake-utils_src_configure -} - -pkg_preinst() { - xdg_pkg_preinst -} - -pkg_postinst() { - xdg_pkg_postinst -} - -pkg_postrm() { - xdg_pkg_postrm -} |