summaryrefslogtreecommitdiff
path: root/x11-misc/copyq
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/copyq')
-rw-r--r--x11-misc/copyq/Manifest5
-rw-r--r--x11-misc/copyq/copyq-7.1.0-r1.ebuild138
-rw-r--r--x11-misc/copyq/files/copyq-7.1.0-fix-gpg-2.1-support.patch558
-rw-r--r--x11-misc/copyq/files/copyq-7.1.0-fix-qt-6.6.0-build.patch44
-rw-r--r--x11-misc/copyq/files/copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch98
5 files changed, 0 insertions, 843 deletions
diff --git a/x11-misc/copyq/Manifest b/x11-misc/copyq/Manifest
index 317afcdca9ae..222fa2f2e52f 100644
--- a/x11-misc/copyq/Manifest
+++ b/x11-misc/copyq/Manifest
@@ -1,9 +1,4 @@
-AUX copyq-7.1.0-fix-gpg-2.1-support.patch 20025 BLAKE2B faab876bfd8813afea0ed2f9e822e4604cf1813233af86bd9a49ee54ff0fc121333b9a7e8aa549c9a39751cd9cb4f12b73c7b8bfd714f00715a93a8acc7a553f SHA512 d1022e3141273d1bcd1bf85822e1113cc03503c740e27f38453d1e29c8d5524e8f9dc3be4b41b82db9e5cdb845f66dcf234aac207556ca80275c63e1bda87d66
-AUX copyq-7.1.0-fix-qt-6.6.0-build.patch 1671 BLAKE2B f5e563ff590ee05ae09f37887e2ce6e72000ac13f37ccfcff7a7f9cfece2d83160fa2e8c462087f2eed377601f87bb5bc8469d2ef6734e375e662838b889356c SHA512 773b31a7976358be31a09aed93d2eca12768f8c3a8541b822e833cef409f39eb26819db2fd49ce7e2eec7b8419e0ed60bbe92c25f69de2f15a9a15fd6fa812aa
-AUX copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch 3822 BLAKE2B f95dfe294136907ee0f22d8f9810989928da18642ab674da9725daa029d75adebe4b8c5fd9d71a92298bd46b464ed9b20a6a12c2689f6f96c09742c1fda5d96b SHA512 415a24815233668e51303b3188bde028f0cfcb9483f92ec143a4350d2130f2b4752f704aa5ee27997be1ce44c3dabf2a384a7fb97756367a6be1029a10e04ec0
AUX copyq-7.1.0-support-plugin-dir-envvar-r1.patch 782 BLAKE2B 9cb80e575a08dad54c54e8144fa06f45691ed5914d42af07073e3882930a636a0ac1557563d2c559d20f73525374c79d3a2523b6d5f24807b9032f33e3f0b362 SHA512 3d03c47873a3a2940ce5a239d620a46d63bb28a3f0ff0f547af247f74365403b52e1a91b402cbb64921c31bc4d6fff2f7e725b71edd3ea298058ad3a2d514a25
-DIST copyq-7.1.0.tar.gz 3351093 BLAKE2B 758271f6bb54760372b8b5ab84de7c91af874bd72a22c8c22d338705869eab5500fde90808b4bf1288f8bdbad11163283637b81d85c09ccf0d734286dee605b6 SHA512 4320095ab75c361cc3d553c7817951eb6e74d47223f62bf6c1722e0f0b0d3ff59a1762354cf46fe0de064d516d60a467bff9ad9143b12016fc3f9e62139d3909
DIST copyq-9.1.0.tar.gz 3417507 BLAKE2B 582b532cdc0c01976fa52b01b3656902fc392ce5785145230efe7f42da8920553161e8bd44b1fcbd9ba2f7d4a8169ac017474f1dd8a34874aec1919e442326a6 SHA512 d87964b876de28be860a17490d9816f5224a25565f84916ee4ca39f83d2e7c5d57dafdf9f54667c43fd93d232e1e1f1f32064e6435aad6abab086398e6ae246d
-EBUILD copyq-7.1.0-r1.ebuild 3630 BLAKE2B 1524647e6231a99ed85be4c954a36092a2318321938617b1a8a4f93de1cf3c3f7bdbca4541d92fb8f6c84cad125b2565105fb53c44a668b4605a4acbd4e75483 SHA512 8d86cfb0d90fb9a9facd2648bfd69786a98a260758724f192e154c1eb02389ec7685a9c8aec77283b20dd196bb724b33951d568d5c2949daadd707cd09516529
EBUILD copyq-9.1.0.ebuild 2258 BLAKE2B 2a325a51af0ec3a5ba11fca33286732876da4191fcc21cecb1071aec86bed7905b475b9b3363d0d52024dbf3de8f5c7dd0af403a4a51bccc9d5aa4622a1cf7fb SHA512 7eced274eb6dc839098a1b2682babe5707fd83460fb5e41dfb2bec3a9faffc0315a6bfb0be7990b3be10aef90b078dc2824c6f1b72d441577d43b5b50a389941
MISC metadata.xml 429 BLAKE2B 22f09cc6c63f32d0d0bcc5dc2cf7fb8d437653e0358ba30aeb3ab79978cafd9ea971fb0f56931744146e5ab7a16401e5f366d31f91ffba52ca6c2c26c1ba5931 SHA512 32f0a4a4c0065463ae826511758b42f7a2c815a6d49657dec47560b9510f21d44fe0d6f397922998fd3ad022e9b4fa88c45babdd9aa3874d8db0cfdbab7813d8
diff --git a/x11-misc/copyq/copyq-7.1.0-r1.ebuild b/x11-misc/copyq/copyq-7.1.0-r1.ebuild
deleted file mode 100644
index 85ed9029ecee..000000000000
--- a/x11-misc/copyq/copyq-7.1.0-r1.ebuild
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake optfeature virtualx xdg
-
-DESCRIPTION="Clipboard manager with advanced features"
-HOMEPAGE="
- https://hluk.github.io/CopyQ/
- https://github.com/hluk/CopyQ/
-"
-SRC_URI="https://github.com/hluk/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/CopyQ-${PV}"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
-
-IUSE="notification qt6 test"
-# Native notifications are not supported with Qt 6
-# (Bumpers please check when this requirement is lifted).
-# src/notifications.cmake
-REQUIRED_USE="notification? ( !qt6 )"
-
-RDEPEND="
- dev-libs/wayland
- x11-libs/libX11
- x11-libs/libXtst
- !qt6? (
- dev-qt/qtcore:5
- dev-qt/qtdeclarative:5
- dev-qt/qtgui:5
- dev-qt/qtnetwork:5
- dev-qt/qtsvg:5
- dev-qt/qtwayland:5
- dev-qt/qtwidgets:5
- dev-qt/qtx11extras:5
- notification? ( kde-frameworks/knotifications:5 )
- test? ( dev-qt/qttest:5 )
- )
- qt6? (
- dev-qt/qtbase:6=[X,gui,network,widgets,xml(+)]
- dev-qt/qtdeclarative:6
- dev-qt/qtsvg:6
- dev-qt/qtwayland:6
- )
-"
-DEPEND="${RDEPEND}
- x11-base/xorg-proto
-"
-BDEPEND="
- kde-frameworks/extra-cmake-modules:0
- !qt6? (
- dev-qt/linguist-tools:5
- dev-qt/qtwaylandscanner:5
- )
- qt6? (
- dev-qt/qttools:6[linguist]
- dev-util/wayland-scanner
- )
- test? (
- app-crypt/gnupg
- x11-wm/openbox
- )
-"
-
-PATCHES=(
- "${FILESDIR}/copyq-7.1.0-fix-qt-6.6.0-build.patch"
- "${FILESDIR}/copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch"
- "${FILESDIR}/copyq-7.1.0-fix-gpg-2.1-support.patch"
- "${FILESDIR}/copyq-7.1.0-support-plugin-dir-envvar-r1.patch"
-)
-
-src_prepare() {
- cmake_src_prepare
-
- # FAIL! : Tests::actionDialogAccept() 'NO_ERRORS(m_test->runClient((Args() << "keys" << actionDialogId << "ENTER" << clipboardBrowserId), toByteArray("")))' returned FALSE.
- # FAIL! : Tests::actionDialogSelection() 'NO_ERRORS(m_test->runClient((Args() << "keys" << actionDialogId << "ENTER" << clipboardBrowserId), toByteArray("")))' returned FALSE.
- # FAIL! : Tests::actionDialogSelectionInputOutput() 'NO_ERRORS(m_test->runClient((Args() << "keys" << actionDialogId << "ENTER" << clipboardBrowserId), toByteArray("")))' returned FALSE.
- # FAIL! : Tests::commandShowAt() 'NO_ERRORS(m_test->waitOnOutput((Args() << "visible"), toByteArray("true\n")))' returned FALSE.
- sed -Ei -e '
- /Tests::(actionDialog(Accept|Selection(|InputOutput))|commandShow)/,/}/ {
- /^\s*\{/ a \
- #if QT_VERSION < QT_VERSION_CHECK(6,0,0)\
- SKIP("Broken on qt5");\
- #endif
- }' src/tests/tests.cpp || die
-}
-
-src_configure() {
- local mycmakeargs=(
- -DPLUGIN_INSTALL_PREFIX="${EPREFIX}/usr/$(get_libdir)/${PN}/plugins"
- -DWITH_NATIVE_NOTIFICATIONS=$(usex notification)
- -DWITH_QT6=$(usex qt6)
- -DWITH_TESTS=$(usex test)
- )
-
- cmake_src_configure
-}
-
-my_src_test() {
- # Don't rerun tests and more logs
- local -x COPYQ_TESTS_RERUN_FAILED=0
- local -x COPYQ_LOG_LEVEL=DEBUG
-
- # Skip test that require network
- local -x COPYQ_TESTS_NO_NETWORK=1
-
- # Less noise from trying the wayland plugin
- local -x QT_QPA_PLATFORM=xcb
-
- # Make sure copyq doesn't use system installed plugins which may be incompatible.
- local -x COPYQ_PLUGIN_DIR="${BUILD_DIR}/plugins"
-
- # In case the users current system confuses the notification integration
- unset KDE_FULL_SESSION XDG_CURRENT_DESKTOP
-
- mkdir "${HOME}"/.gnupg || die
-
- ebegin "Starting Openbox"
- openbox & # upstream uses Openbox and it doesn't fail like IceWM
- sleep 5
- eend 0
-
- "${BUILD_DIR}"/copyq tests
-
- return $?
-}
-
-src_test() {
- virtx my_src_test
-}
-
-pkg_postinst() {
- xdg_pkg_postinst
- optfeature "encryption support" app-crypt/gnupg
-}
diff --git a/x11-misc/copyq/files/copyq-7.1.0-fix-gpg-2.1-support.patch b/x11-misc/copyq/files/copyq-7.1.0-fix-gpg-2.1-support.patch
deleted file mode 100644
index b06e7e759b84..000000000000
--- a/x11-misc/copyq/files/copyq-7.1.0-fix-gpg-2.1-support.patch
+++ /dev/null
@@ -1,558 +0,0 @@
-https://github.com/hluk/CopyQ/pull/2471
-https://github.com/hluk/CopyQ/issues/2463
-https://github.com/hluk/CopyQ/commit/a7a891e1f84c6c046a7bfc904c5fc6ebb98dec94
-
-From a7a891e1f84c6c046a7bfc904c5fc6ebb98dec94 Mon Sep 17 00:00:00 2001
-From: Lukas Holecek <hluk@email.cz>
-Date: Wed, 20 Sep 2023 19:42:08 +0200
-Subject: [PATCH] itemencrypted: Fix managing keys with gpg 2.1 and above
- (#2471)
-
-* itemencrypted: Fix managing keys with gpg 2.1 and above
-
-Fixes #2463, #1208
-
-* Tests: Avoid skipping itemencrypted tests if gpg is not found
-
-* Windows: Fix running itemencrypted plugin tests
-
-* itemencrypted: Fix error logging
-
-* Ensure config directory exists
-
-* itemencrypted: Fix handling native/non-native key paths
-
-* Appveyor: Fix stuck job waiting on gpg-agent
---- a/plugins/itemencrypted/itemencrypted.cpp
-+++ b/plugins/itemencrypted/itemencrypted.cpp
-@@ -57,20 +57,23 @@ bool waitOrTerminate(QProcess *p, int timeoutMs)
- bool verifyProcess(QProcess *p, int timeoutMs = 30000)
- {
- if ( !waitOrTerminate(p, timeoutMs) ) {
-- log( "ItemEncrypt ERROR: Process timed out; stderr: " + p->readAllStandardError(), LogError );
-+ log( QStringLiteral("ItemEncrypt: Process timed out; stderr: %1")
-+ .arg(QString::fromUtf8(p->readAllStandardError())), LogError );
- return false;
- }
-
- const int exitCode = p->exitCode();
- if ( p->exitStatus() != QProcess::NormalExit ) {
-- log( "ItemEncrypt ERROR: Failed to run GnuPG: " + p->errorString(), LogError );
-+ log( QStringLiteral("ItemEncrypt: Failed to run GnuPG: %1")
-+ .arg(p->errorString()), LogError );
- return false;
- }
-
- if (exitCode != 0) {
- const QString errors = p->readAllStandardError();
- if ( !errors.isEmpty() )
-- log( "ItemEncrypt ERROR: GnuPG stderr:\n" + errors, LogError );
-+ log( QStringLiteral("ItemEncrypt: GnuPG stderr:\n%1")
-+ .arg(errors), LogError );
- return false;
- }
-
-@@ -88,55 +91,106 @@ QString getGpgVersionOutput(const QString &executable) {
- return p.readAllStandardOutput();
- }
-
--bool checkGpgExecutable(const QString &executable)
-+struct GpgVersion {
-+ int major;
-+ int minor;
-+};
-+
-+GpgVersion parseVersion(const QString &versionOutput)
- {
-- const auto versionOutput = getGpgVersionOutput(executable);
-- return versionOutput.contains(" 2.");
-+ const int lineEndIndex = versionOutput.indexOf('\n');
-+#if QT_VERSION < QT_VERSION_CHECK(5,15,2)
-+ const QStringRef firstLine = versionOutput.midRef(0, lineEndIndex);
-+#else
-+ const auto firstLine = QStringView{versionOutput}.mid(0, lineEndIndex);
-+#endif
-+ const QRegularExpression versionRegex(QStringLiteral(R"( (\d+)\.(\d+))"));
-+ const QRegularExpressionMatch match = versionRegex.match(firstLine);
-+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
-+ const int major = match.hasMatch() ? match.capturedView(1).toInt() : 0;
-+ const int minor = match.hasMatch() ? match.capturedView(2).toInt() : 0;
-+#else
-+ const int major = match.hasMatch() ? match.capturedRef(1).toInt() : 0;
-+ const int minor = match.hasMatch() ? match.capturedRef(2).toInt() : 0;
-+#endif
-+ return GpgVersion{major, minor};
- }
-
-+class GpgExecutable {
-+public:
-+ GpgExecutable() = default;
-+
-+ explicit GpgExecutable(const QString &executable)
-+ : m_executable(executable)
-+ {
-+ const auto versionOutput = getGpgVersionOutput(executable);
-+ if ( !versionOutput.isEmpty() ) {
-+ COPYQ_LOG_VERBOSE(
-+ QStringLiteral("ItemEncrypt INFO: '%1 --version' output: %2")
-+ .arg(executable, versionOutput) );
-+
-+ const GpgVersion version = parseVersion(versionOutput);
-+ m_isSupported = version.major >= 2;
-+ COPYQ_LOG( QStringLiteral("ItemEncrypt INFO: %1 gpg version: %2.%3")
-+ .arg(m_isSupported ? "Supported" : "Unsupported")
-+ .arg(version.major)
-+ .arg(version.minor) );
-+
-+ const bool needsSecring = version.major == 2 && version.minor == 0;
-+
-+ const QString path = getConfigurationFilePath("");
-+ m_pubring = path + ".pub";
-+ m_pubringNative = QDir::toNativeSeparators(m_pubring);
-+ if (needsSecring) {
-+ m_secring = path + ".sec";
-+ m_secringNative = QDir::toNativeSeparators(m_secring);
-+ }
-+
- #ifdef Q_OS_WIN
--bool checkUnixGpg(const QString &executable)
--{
-- static const auto unixGpg = getGpgVersionOutput(executable).contains("Home: /c/");
-- return unixGpg;
--}
-+ const bool isUnixGpg = versionOutput.contains("Home: /c/");
-+ if (isUnixGpg) {
-+ m_pubringNative = QString(m_pubring).replace(":", "").insert(0, '/');
-+ if (needsSecring)
-+ m_secringNative = QString(m_secring).replace(":", "").insert(0, '/');
-+ }
- #endif
-+ }
-+ }
-+
-+ const QString &executable() const { return m_executable; }
-+ bool isSupported() const { return m_isSupported; }
-+ bool needsSecring() const { return !m_secring.isEmpty(); }
-+ const QString &pubring() const { return m_pubring; }
-+ const QString &secring() const { return m_secring; }
-+ const QString &pubringNative() const { return m_pubringNative; }
-+ const QString &secringNative() const { return m_secringNative; }
-+
-+private:
-+ QString m_executable;
-+ QString m_pubring;
-+ QString m_secring;
-+ QString m_pubringNative;
-+ QString m_secringNative;
-+ bool m_isSupported = false;
-+};
-
--QString findGpgExecutable()
-+GpgExecutable findGpgExecutable()
- {
- for (const auto &executable : {"gpg2", "gpg"}) {
-- if ( checkGpgExecutable(executable) )
-- return executable;
-+ GpgExecutable gpg(executable);
-+ if ( gpg.isSupported() )
-+ return gpg;
- }
-
-- return QString();
-+ return GpgExecutable();
- }
-
--const QString &gpgExecutable()
-+const GpgExecutable &gpgExecutable()
- {
- static const auto gpg = findGpgExecutable();
- return gpg;
- }
-
--struct KeyPairPaths {
-- KeyPairPaths()
-- {
-- const QString path = getConfigurationFilePath("");
-- sec = QDir::toNativeSeparators(path + ".sec");
-- pub = QDir::toNativeSeparators(path + ".pub");
--
--#ifdef Q_OS_WIN
-- if (checkUnixGpg(gpgExecutable())) {
-- pub = QDir::fromNativeSeparators(pub).replace(":", "").insert(0, '/');
-- sec = QDir::fromNativeSeparators(sec).replace(":", "").insert(0, '/');
-- }
--#endif
-- }
--
-- QString sec;
-- QString pub;
--};
--
- QStringList getDefaultEncryptCommandArguments(const QString &publicKeyPath)
- {
- return QStringList() << "--trust-model" << "always" << "--recipient" << "copyq"
-@@ -146,16 +200,18 @@ QStringList getDefaultEncryptCommandArguments(const QString &publicKeyPath)
-
- void startGpgProcess(QProcess *p, const QStringList &args, QIODevice::OpenModeFlag mode)
- {
-- KeyPairPaths keys;
-- p->start(gpgExecutable(), getDefaultEncryptCommandArguments(keys.pub) + args, mode);
-+ const auto &gpg = gpgExecutable();
-+ p->start(gpg.executable(), getDefaultEncryptCommandArguments(gpg.pubringNative()) + args, mode);
- }
-
- QString importGpgKey()
- {
-- KeyPairPaths keys;
-+ const auto &gpg = gpgExecutable();
-+ if ( !gpg.needsSecring() )
-+ return QString();
-
- QProcess p;
-- p.start(gpgExecutable(), getDefaultEncryptCommandArguments(keys.pub) << "--import" << keys.sec);
-+ p.start(gpg.executable(), getDefaultEncryptCommandArguments(gpg.pubringNative()) << "--import" << gpg.secringNative());
- if ( !verifyProcess(&p) )
- return "Failed to import private key (see log).";
-
-@@ -164,18 +220,20 @@ QString importGpgKey()
-
- QString exportGpgKey()
- {
-- KeyPairPaths keys;
-+ const auto &gpg = gpgExecutable();
-+ if ( !gpg.needsSecring() )
-+ return QString();
-
- // Private key already created or exported.
-- if ( QFile::exists(keys.sec) )
-+ if ( QFile::exists(gpg.secring()) )
- return QString();
-
- QProcess p;
-- p.start(gpgExecutable(), getDefaultEncryptCommandArguments(keys.pub) << "--export-secret-key" << "copyq");
-+ p.start(gpg.executable(), getDefaultEncryptCommandArguments(gpg.pubringNative()) << "--export-secret-key" << gpg.secringNative());
- if ( !verifyProcess(&p) )
- return "Failed to export private key (see log).";
-
-- QFile secKey(keys.sec);
-+ QFile secKey(gpg.secring());
- if ( !secKey.open(QIODevice::WriteOnly) )
- return "Failed to create private key.";
-
-@@ -240,7 +298,7 @@ bool encryptMimeData(const QVariantMap &data, const QModelIndex &index, QAbstrac
-
- void startGenerateKeysProcess(QProcess *process, bool useTransientPasswordlessKey = false)
- {
-- const KeyPairPaths keys;
-+ const auto &gpg = gpgExecutable();
-
- auto args = QStringList() << "--batch" << "--gen-key";
-
-@@ -253,15 +311,19 @@ void startGenerateKeysProcess(QProcess *process, bool useTransientPasswordlessKe
- }
-
- startGpgProcess(process, args, QIODevice::ReadWrite);
-- process->write( "\nKey-Type: RSA"
-- "\nKey-Usage: encrypt"
-- "\nKey-Length: 4096"
-- "\nName-Real: copyq"
-- + transientOptions +
-- "\n%secring " + keys.sec.toUtf8() +
-- "\n%pubring " + keys.pub.toUtf8() +
-- "\n%commit"
-- "\n" );
-+ process->write(
-+ "\nKey-Type: RSA"
-+ "\nKey-Usage: encrypt"
-+ "\nKey-Length: 4096"
-+ "\nName-Real: copyq"
-+ + transientOptions +
-+ "\n%pubring " + gpg.pubringNative().toUtf8()
-+ );
-+
-+ if ( gpg.needsSecring() )
-+ process->write("\n%secring " + gpg.secringNative().toUtf8());
-+
-+ process->write("\n%commit\n");
- process->closeWriteChannel();
- }
-
-@@ -276,7 +338,7 @@ QString exportImportGpgKeys()
-
- bool isGpgInstalled()
- {
-- return !gpgExecutable().isEmpty();
-+ return gpgExecutable().isSupported();
- }
-
- } // namespace
-@@ -314,7 +376,7 @@ bool ItemEncryptedSaver::saveItems(const QString &, const QAbstractItemModel &mo
- bytes = readGpgOutput(QStringList("--encrypt"), bytes);
- if ( bytes.isEmpty() ) {
- emitEncryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to read encrypted data");
-+ log("ItemEncrypt: Failed to read encrypted data", LogError);
- return false;
- }
-
-@@ -325,7 +387,7 @@ bool ItemEncryptedSaver::saveItems(const QString &, const QAbstractItemModel &mo
-
- if ( stream.status() != QDataStream::Ok ) {
- emitEncryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to write encrypted data");
-+ log("ItemEncrypt: Failed to write encrypted data", LogError);
- return false;
- }
-
-@@ -510,17 +572,22 @@ void ItemEncryptedScriptable::pasteEncryptedItems()
-
- QString ItemEncryptedScriptable::generateTestKeys()
- {
-- const KeyPairPaths keys;
-- for ( const auto &keyFileName : {keys.sec, keys.pub} ) {
-+ const auto &gpg = gpgExecutable();
-+
-+ const QStringList keys = gpg.needsSecring()
-+ ? QStringList{gpg.pubring(), gpg.secring()}
-+ : QStringList{gpg.pubring()};
-+
-+ for (const auto &keyFileName : keys) {
- if ( QFile::exists(keyFileName) && !QFile::remove(keyFileName) )
-- return QString("Failed to remove \"%1\"").arg(keys.sec);
-+ return QString("Failed to remove \"%1\"").arg(keyFileName);
- }
-
- QProcess process;
- startGenerateKeysProcess(&process, true);
-
- if ( !verifyProcess(&process) ) {
-- return QString("ItemEncrypt ERROR: %1; stderr: %2")
-+ return QString("ItemEncrypt: %1; stderr: %2")
- .arg( process.errorString(),
- QString::fromUtf8(process.readAllStandardError()) );
- }
-@@ -529,9 +596,9 @@ QString ItemEncryptedScriptable::generateTestKeys()
- if ( !error.isEmpty() )
- return error;
-
-- for ( const auto &keyFileName : {keys.sec, keys.pub} ) {
-+ for (const auto &keyFileName : keys) {
- if ( !QFile::exists(keyFileName) )
-- return QString("Failed to create \"%1\"").arg(keys.sec);
-+ return QString("Failed to create \"%1\"").arg(keyFileName);
- }
-
- return QString();
-@@ -606,19 +673,29 @@ QWidget *ItemEncryptedLoader::createSettingsWidget(QWidget *parent)
- m_encryptTabs.join('\n') );
-
- if (status() != GpgNotInstalled) {
-- KeyPairPaths keys;
-+ const auto &gpg = gpgExecutable();
- ui->labelShareInfo->setTextFormat(Qt::RichText);
-- ui->labelShareInfo->setText( ItemEncryptedLoader::tr(
-- "To share encrypted items on other computer or"
-- " session, you'll need public and secret key files:"
-- "<ul>"
-- "<li>%1</li>"
-- "<li>%2<br />(Keep this secret key in a safe place.)</li>"
-- "</ul>"
-- )
-- .arg( quoteString(keys.pub),
-- quoteString(keys.sec) )
-- );
-+ QString text = ItemEncryptedLoader::tr(
-+ "To share encrypted items on other computer or"
-+ " session, you'll need these secret key files (keep them in a safe place):"
-+ );
-+ if (gpg.needsSecring()) {
-+ text.append( QStringLiteral(
-+ "<ul>"
-+ "<li>%1</li>"
-+ "<li>%2</li>"
-+ "</ul>"
-+ ).arg(quoteString(gpg.pubringNative()), quoteString(gpg.secringNative()))
-+ );
-+ } else {
-+ text.append( QStringLiteral(
-+ "<ul>"
-+ "<li>%1</li>"
-+ "</ul>"
-+ ).arg(quoteString(gpg.pubringNative()))
-+ );
-+ }
-+ ui->labelShareInfo->setText(text);
- }
-
- updateUi();
-@@ -689,7 +766,7 @@ ItemSaverPtr ItemEncryptedLoader::loadItems(const QString &, QAbstractItemModel
- const int bytesRead = stream.readRawData(encryptedBytes, 4096);
- if (bytesRead == -1) {
- emitDecryptFailed();
-- COPYQ_LOG("ItemEncrypted ERROR: Failed to read encrypted data");
-+ log("ItemEncrypted: Failed to read encrypted data", LogError);
- return nullptr;
- }
- p.write(encryptedBytes, bytesRead);
-@@ -708,7 +785,7 @@ ItemSaverPtr ItemEncryptedLoader::loadItems(const QString &, QAbstractItemModel
- const QByteArray bytes = p.readAllStandardOutput();
- if ( bytes.isEmpty() ) {
- emitDecryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to read encrypted data.");
-+ log("ItemEncrypt: Failed to read encrypted data", LogError);
- verifyProcess(&p);
- return nullptr;
- }
-@@ -719,7 +796,7 @@ ItemSaverPtr ItemEncryptedLoader::loadItems(const QString &, QAbstractItemModel
- stream2 >> length;
- if ( stream2.status() != QDataStream::Ok ) {
- emitDecryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to parse item count!");
-+ log("ItemEncrypt: Failed to parse item count", LogError);
- return nullptr;
- }
- length = qMin(length, static_cast<quint64>(maxItems)) - static_cast<quint64>(model->rowCount());
-@@ -728,7 +805,7 @@ ItemSaverPtr ItemEncryptedLoader::loadItems(const QString &, QAbstractItemModel
- for ( int i = 0; i < count && stream2.status() == QDataStream::Ok; ++i ) {
- if ( !model->insertRow(i) ) {
- emitDecryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to insert item!");
-+ log("ItemEncrypt: Failed to insert item", LogError);
- return nullptr;
- }
- QVariantMap dataMap;
-@@ -738,7 +815,7 @@ ItemSaverPtr ItemEncryptedLoader::loadItems(const QString &, QAbstractItemModel
-
- if ( stream2.status() != QDataStream::Ok ) {
- emitDecryptFailed();
-- COPYQ_LOG("ItemEncrypt ERROR: Failed to decrypt item!");
-+ log("ItemEncrypt: Failed to decrypt item", LogError);
- return nullptr;
- }
-
---- a/plugins/itemencrypted/tests/itemencryptedtests.cpp
-+++ b/plugins/itemencrypted/tests/itemencryptedtests.cpp
-@@ -25,6 +25,8 @@ void ItemEncryptedTests::cleanupTestCase()
- void ItemEncryptedTests::init()
- {
- TEST(m_test->init());
-+
-+ QVERIFY(isGpgInstalled());
- }
-
- void ItemEncryptedTests::cleanup()
-@@ -34,13 +36,10 @@ void ItemEncryptedTests::cleanup()
-
- void ItemEncryptedTests::encryptDecryptData()
- {
-- if ( !isGpgInstalled() )
-- SKIP("gpg2 is required to run the test");
--
-- RUN("-e" << "plugins.itemencrypted.generateTestKeys()", "\n");
-+ RUN("plugins.itemencrypted.generateTestKeys()", "\n");
-
- // Test gpg errors first.
-- RUN("-e" << "plugins.itemencrypted.encrypt(input());print('')", "");
-+ RUN("plugins.itemencrypted.encrypt(input());print('')", "");
-
- const QByteArray input("\x00\x01\x02\x03\x04", 5);
- QByteArray stdoutActual;
-@@ -60,10 +59,7 @@ void ItemEncryptedTests::encryptDecryptItems()
- SKIP("Ctrl+L shortcut doesn't seem work on OS X");
- #endif
-
-- if ( !isGpgInstalled() )
-- SKIP("gpg2 is required to run the test");
--
-- RUN("-e" << "plugins.itemencrypted.generateTestKeys()", "\n");
-+ RUN("plugins.itemencrypted.generateTestKeys()", "\n");
-
- // Load commands from the plugin generating keys.
- RUN("keys" << "Ctrl+P" << "ENTER", "");
---- a/src/app/clipboardserver.cpp
-+++ b/src/app/clipboardserver.cpp
-@@ -124,6 +124,8 @@ ClipboardServer::ClipboardServer(QApplication *app, const QString &sessionName)
-
- QApplication::setQuitOnLastWindowClosed(false);
-
-+ ensureSettingsDirectoryExists();
-+
- m_sharedData = std::make_shared<ClipboardBrowserShared>();
- m_sharedData->itemFactory = new ItemFactory(this);
- m_sharedData->notifications = new NotificationDaemon(this);
---- a/src/common/config.cpp
-+++ b/src/common/config.cpp
-@@ -157,6 +157,20 @@ QString getConfigurationFilePathHelper()
-
- } // namespace
-
-+bool ensureSettingsDirectoryExists()
-+{
-+ QDir settingsDir( settingsDirectoryPath() );
-+ if ( !settingsDir.mkpath(".") ) {
-+ log( QStringLiteral("Failed to create the directory for settings: %1")
-+ .arg(settingsDir.path()),
-+ LogError );
-+
-+ return false;
-+ }
-+
-+ return true;
-+}
-+
- const QString &getConfigurationFilePath()
- {
- static const QString path = getConfigurationFilePathHelper();
---- a/src/common/config.h
-+++ b/src/common/config.h
-@@ -9,6 +9,8 @@ class QString;
- class QVariant;
- class QWidget;
-
-+bool ensureSettingsDirectoryExists();
-+
- const QString &getConfigurationFilePath();
-
- QString getConfigurationFilePath(const char *suffix);
---- a/src/item/itemstore.cpp
-+++ b/src/item/itemstore.cpp
-@@ -22,20 +22,6 @@ QString itemFileName(const QString &id)
- return getConfigurationFilePath("_tab_") + part + QLatin1String(".dat");
- }
-
--bool createItemDirectory()
--{
-- QDir settingsDir( settingsDirectoryPath() );
-- if ( !settingsDir.mkpath(".") ) {
-- log( QString("Cannot create directory for settings %1!")
-- .arg(quoteString(settingsDir.path()) ),
-- LogError );
--
-- return false;
-- }
--
-- return true;
--}
--
- void printItemFileError(
- const QString &action, const QString &id, const QFileDevice &file)
- {
-@@ -83,9 +69,6 @@ ItemSaverPtr createTab(
-
- ItemSaverPtr loadItems(const QString &tabName, QAbstractItemModel &model, ItemFactory *itemFactory, int maxItems)
- {
-- if ( !createItemDirectory() )
-- return nullptr;
--
- const QString tabFileName = itemFileName(tabName);
- if ( !QFile::exists(tabFileName) )
- return createTab(tabName, model, itemFactory, maxItems);
-@@ -107,7 +90,7 @@ bool saveItems(const QString &tabName, const QAbstractItemModel &model, const It
- {
- const QString tabFileName = itemFileName(tabName);
-
-- if ( !createItemDirectory() )
-+ if ( !ensureSettingsDirectoryExists() )
- return false;
-
- // Save tab data to a new temporary file.
diff --git a/x11-misc/copyq/files/copyq-7.1.0-fix-qt-6.6.0-build.patch b/x11-misc/copyq/files/copyq-7.1.0-fix-qt-6.6.0-build.patch
deleted file mode 100644
index 2b149ab843bf..000000000000
--- a/x11-misc/copyq/files/copyq-7.1.0-fix-qt-6.6.0-build.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://bugs.gentoo.org/916129
-https://github.com/hluk/CopyQ/pull/2508
-https://github.com/hluk/CopyQ/commit/19e9dd1c2ecb49b14a24159c5ac3bc1b77fdf250
-
-From 19e9dd1c2ecb49b14a24159c5ac3bc1b77fdf250 Mon Sep 17 00:00:00 2001
-From: Nick Cao <nickcao@nichi.co>
-Date: Tue, 17 Oct 2023 02:08:51 -0400
-Subject: [PATCH] itemfakevim: fix build with qt 6.6.0 (#2508)
-
-Reference: https://github.com/qt-creator/qt-creator/commit/e56e3b6f374e00179eb0537198437864dddc47f2
---- a/plugins/itemfakevim/fakevim/fakevimhandler.cpp
-+++ b/plugins/itemfakevim/fakevim/fakevimhandler.cpp
-@@ -1057,14 +1057,6 @@ inline QString msgMarkNotSet(const QString &text)
- return Tr::tr("Mark \"%1\" not set.").arg(text);
- }
-
--static void initSingleShotTimer(QTimer *timer, int interval, FakeVimHandler::Private *receiver,
-- void (FakeVimHandler::Private::*slot)())
--{
-- timer->setSingleShot(true);
-- timer->setInterval(interval);
-- QObject::connect(timer, &QTimer::timeout, receiver, slot);
--}
--
- class Input
- {
- public:
-@@ -2424,6 +2416,16 @@ class FakeVimHandler::Private : public QObject
- FakeVimSettings &s = *fakeVimSettings();
- };
-
-+static void initSingleShotTimer(QTimer *timer,
-+ int interval,
-+ FakeVimHandler::Private *receiver,
-+ void (FakeVimHandler::Private::*slot)())
-+{
-+ timer->setSingleShot(true);
-+ timer->setInterval(interval);
-+ QObject::connect(timer, &QTimer::timeout, receiver, slot);
-+}
-+
- FakeVimHandler::Private::GlobalData FakeVimHandler::Private::g;
-
- FakeVimHandler::Private::Private(FakeVimHandler *parent, QWidget *widget)
diff --git a/x11-misc/copyq/files/copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch b/x11-misc/copyq/files/copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch
deleted file mode 100644
index e526f3a89f0b..000000000000
--- a/x11-misc/copyq/files/copyq-7.1.0-fix-test-failure-due-to-invalid-regex.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-https://github.com/hluk/CopyQ/commit/42c02f2dc74b188ea7982a30c38acaf668bbf76a
-
-From 42c02f2dc74b188ea7982a30c38acaf668bbf76a Mon Sep 17 00:00:00 2001
-From: Lukas Holecek <hluk@email.cz>
-Date: Mon, 4 Sep 2023 21:12:44 +0200
-Subject: [PATCH] Avoid showing warnings about invalid regex
-
---- a/src/scriptable/scriptableitemselection.cpp
-+++ b/src/scriptable/scriptableitemselection.cpp
-@@ -46,10 +46,6 @@ QVector<int> toIntVector(const QJSValue &value)
-
- QRegularExpression toRegularExpression(const QJSValue &value)
- {
-- // If argument is invalid/not-regexp, create an invalid regex to match nothing.
-- if ( !value.isRegExp() )
-- return QRegularExpression("(");
--
- const QVariant variant = value.toVariant();
- QRegularExpression regexp = variant.toRegularExpression();
-
-@@ -136,7 +132,7 @@ QJSValue ScriptableItemSelection::selectAll()
-
- QJSValue ScriptableItemSelection::select(const QJSValue &re, const QString &mimeFormat)
- {
-- const QVariant regexp = re.isUndefined() ? QVariant() : toRegularExpression(re);
-+ const QVariant regexp = re.isRegExp() ? toRegularExpression(re) : QVariant();
- m_proxy->selectionSelect(m_id, regexp, mimeFormat);
- return m_self;
- }
---- a/src/tests/testinterface.h
-+++ b/src/tests/testinterface.h
-@@ -85,9 +85,6 @@ class TestInterface {
- /// Clean up tabs and items. Return error string on error.
- virtual QByteArray cleanup() = 0;
-
-- /// Ignore given text in logs for current unit test.
-- virtual void setIgnoreError(const QByteArray &ignoreError) = 0;
--
- /// Platform specific key to remove (usually Delete, Backspace on OS X).
- virtual QString shortcutToRemove() = 0;
-
---- a/src/tests/tests.cpp
-+++ b/src/tests/tests.cpp
-@@ -150,8 +150,6 @@ bool testStderr(const QByteArray &stderrData, TestInterface::ReadStderrFlag flag
- // Ignore exceptions and errors from clients in application log
- // (these are expected in some tests).
- static const std::vector<QRegularExpression> ignoreList{
-- plain("[EXPECTED-IN-TEST]"),
--
- regex(R"(CopyQ Note \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\] <Client-[^\n]*)"),
-
- // X11 (Linux)
-@@ -520,8 +518,6 @@ class TestInterfaceImpl final : public TestInterface {
- if (m_server) {
- QCoreApplication::processEvents();
- QByteArray output = readLogFile(maxReadLogSize);
-- if ( !m_ignoreError.isEmpty() )
-- output.replace(m_ignoreError, "[EXPECTED-IN-TEST] " + m_ignoreError);
- if ( flag == ReadAllStderr || !testStderr(output, flag) )
- return decorateOutput("Server STDERR", output);
- }
-@@ -645,16 +641,10 @@ class TestInterfaceImpl final : public TestInterface {
-
- QByteArray cleanup() override
- {
-- m_ignoreError.clear();
- addFailedTest();
- return QByteArray();
- }
-
-- void setIgnoreError(const QByteArray &ignoreError) override
-- {
-- m_ignoreError = ignoreError;
-- }
--
- QString shortcutToRemove() override
- {
- return ::shortcutToRemove();
-@@ -771,8 +761,6 @@ class TestInterfaceImpl final : public TestInterface {
- QStringList m_failed;
-
- PlatformClipboardPtr m_clipboard;
--
-- QByteArray m_ignoreError;
- };
-
- QString keyNameFor(QKeySequence::StandardKey standardKey)
-@@ -2272,9 +2260,8 @@ void Tests::classItemSelection()
- RUN(args << "ItemSelection().select(undefined, mimeItemNotes).str()", outRows.arg("0,2"));
-
- // Match nothing if select() argument is not a regular expression.
-- m_test->setIgnoreError("QtWarning: QString::contains: invalid QRegularExpression object");
-+ RUN(args << "add" << "", "");
- RUN(args << "ItemSelection().select('A').str()", outRows.arg(""));
-- m_test->setIgnoreError(QByteArray());
- }
-
- void Tests::classItemSelectionGetCurrent()