repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/
"Andreas Sturmlechner" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786777070.0aa3f12a7153583b1db3194d1541689591048302.asturm@gentoo> |
commit: 0aa3f12a7153583b1db3194d1541689591048302 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Fri Aug 14 18:18:44 2026 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sat Aug 15 06:57:50 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0aa3f12a kde-frameworks/kio: 6.29.0 version bump Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> kde-frameworks/kio/Manifest | 1 + .../kio-6.29.0-openurljob-fix-shellscripts.patch | 173 +++++++++++++++++++++ kde-frameworks/kio/kio-6.29.0.ebuild | 87 +++++++++++ 3 files changed, 261 insertions(+) diff --git a/kde-frameworks/kio/Manifest b/kde-frameworks/kio/Manifest index 1398234f719d..c88a16748c00 100644 --- a/kde-frameworks/kio/Manifest +++ b/kde-frameworks/kio/Manifest @@ -1,2 +1,3 @@ DIST kio-6.27.0.tar.xz 3526288 BLAKE2B 17078510bddb889ac88b6573e8ac895d42f455c941588a1603009dccd6b17529f414ad12030d93cad472082a89a591d2d003f6003c19b2abd971929696ae77f1 SHA512 d9aa0085d593b05ab4d90d864941215802ad955a1d3c410b0e4c9765a27dff945d6f182e3c602b129c446e52f2db90a1039bf90a2b29bc6dd5ba814b837c90f1 DIST kio-6.28.0.tar.xz 3569284 BLAKE2B 79d4dbb370ff2ed6a2bc765b51e85afca5e161f6f1bd07a554faf1deeaba7e2515ce3ea5acf71b86d460a981339e91bbeed3dd874f9246d493acd86d1f8343bc SHA512 c7cd99a8a2dd0d4a77ed62b1a6acf105af55ff4072f25b1f214b0539756de8c80889b3c992835f71503cd5ddb3e0bf91687a196eb460aa5b6c743501c26ac859 +DIST kio-6.29.0.tar.xz 3585540 BLAKE2B 1594d3326e7b8fabb63d0f2198f4bdca40c4d936f05cc9aaf91db6f09964c201a5724e64429b24cfcb87f1677e19147b06cfec88cd0a9eee07cc7abe29c4c146 SHA512 5c7d906b59d6295752302dfe533642462fc18a4fd66badc8f01216f698efeaa9f6a58737d03a0996268b7519b26aefcc98a56a36854e354d15dfd0df958fc507 diff --git a/kde-frameworks/kio/files/kio-6.29.0-openurljob-fix-shellscripts.patch b/kde-frameworks/kio/files/kio-6.29.0-openurljob-fix-shellscripts.patch new file mode 100644 index 000000000000..322bf7dc3979 --- /dev/null +++ b/kde-frameworks/kio/files/kio-6.29.0-openurljob-fix-shellscripts.patch @@ -0,0 +1,173 @@ +From 329e84b859525482a5a293ff8372bef95dc2f644 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?M=C3=A9ven=20Car?= <[email protected]> +Date: Mon, 10 Aug 2026 10:13:14 +0000 +Subject: [PATCH 1/3] openurljob: open a shell script rather than refuse it as + a program + +shared-mime-info 2.5.1 renamed application/x-shellscript to +text/x-shellscript and left application/x-executable as its only parent, +where a script used to be a kind of text/plain as well. + +Being both is how a script was told apart from a binary, so a shell script +now reads as a binary and opening one where running is not allowed ends in +an error rather than in the editor. The same loss took the text editors +away from scripts, so one that nothing else claims is opened with whatever +opens text. + +BUG: 522948 +FIXED-IN: 6.30 +--- + src/gui/openurljob.cpp | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/gui/openurljob.cpp b/src/gui/openurljob.cpp +index 5fc0b93261..f3701661e4 100644 +--- a/src/gui/openurljob.cpp ++++ b/src/gui/openurljob.cpp +@@ -367,7 +367,13 @@ static bool isBinary(const QMimeType &mimeType) + // e.g. ".sh", ".csh", ".py", ".js" + static bool isTextScript(const QMimeType &mimeType) + { +- return (mimeType.inherits(QStringLiteral("application/x-executable")) && mimeType.inherits(QStringLiteral("text/plain"))); ++ if (!mimeType.inherits(QStringLiteral("application/x-executable"))) { ++ return false; ++ } ++ ++ // A type under text/ holds text whether or not the database spells out that it is a ++ // kind of text/plain, and shared-mime-info stopped saying so for shell scripts. ++ return mimeType.inherits(QStringLiteral("text/plain")) || mimeType.name().startsWith(QLatin1String("text/")); + } + + // Helper function that returns whether a file has the execute bit set or not. +@@ -645,6 +651,16 @@ void KIO::OpenUrlJobPrivate::handleScripts() + void KIO::OpenUrlJobPrivate::openInPreferredApp() + { + KService::Ptr service = KApplicationTrader::preferredService(m_mimeTypeName); ++ if (!service) { ++ // A script is text, and the program someone picked for text is the one to show it ++ // to them in. The MIME database used to say a script is a kind of text/plain and ++ // no longer does for every script, so the text program is asked for by name. ++ const QMimeType mimeType = QMimeDatabase().mimeTypeForName(m_mimeTypeName); ++ if (isTextScript(mimeType)) { ++ service = KApplicationTrader::preferredService(QStringLiteral("text/plain")); ++ } ++ } ++ + if (service) { + // If file mimetype is set to xdg-open or kde-open, the file will be opened in endless loop + // In these cases, showOpenWithDialog instead +-- +GitLab + + +From 71fcfa96e292a15d395b2c756bb03afff1063d90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?M=C3=A9ven=20Car?= <[email protected]> +Date: Mon, 10 Aug 2026 10:13:14 +0000 +Subject: [PATCH 2/3] autotests: ask the mime database which type a test means + +shared-mime-info 2.5.1 made application/x-shellscript another name of +text/x-shellscript and made text/x-csrc a kind of text/x-c++src. Tests +that spell those names out fail on the renames alone, although the files +they look at are the same as ever. +--- + autotests/kdirlistertest.cpp | 4 +++- + autotests/mimetypefinderjobtest.cpp | 9 +++++++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/autotests/kdirlistertest.cpp b/autotests/kdirlistertest.cpp +index d45472757a..4fa88be50b 100644 +--- a/autotests/kdirlistertest.cpp ++++ b/autotests/kdirlistertest.cpp +@@ -1536,7 +1536,9 @@ void KDirListerTest::testMimeFilter_data() + + const QStringList files = {"bla.txt", "main.cpp", "main.c", "image.jpeg", "picture.png"}; + +- QTest::newRow("single_file_exact_mimetype") << files << QStringList{"text/x-c++src"} << QStringList{"main.cpp"}; ++ // Not a C or C++ source: shared-mime-info made C source a kind of C++ source, so a ++ // filter on one of them takes both and says nothing about matching a type exactly. ++ QTest::newRow("single_file_exact_mimetype") << files << QStringList{"image/png"} << QStringList{"picture.png"}; + QTest::newRow("inherited_mimetype") << files << QStringList{"text/plain"} << QStringList{"bla.txt", "main.cpp", "main.c"}; + QTest::newRow("no_match") << files << QStringList{"audio/flac"} << QStringList{}; + QTest::newRow("glob") << files << QStringList{"image/*"} << QStringList{"image.jpeg", "picture.png"}; +diff --git a/autotests/mimetypefinderjobtest.cpp b/autotests/mimetypefinderjobtest.cpp +index 9a41ac7fc3..0be00dd119 100644 +--- a/autotests/mimetypefinderjobtest.cpp ++++ b/autotests/mimetypefinderjobtest.cpp +@@ -12,6 +12,7 @@ + + #include <KConfigGroup> + #include <KSharedConfig> ++#include <QMimeDatabase> + #include <QStandardPaths> + #include <QTemporaryDir> + #include <QTest> +@@ -74,7 +75,11 @@ void MimeTypeFinderJobTest::determineMimeType() + // When running a MimeTypeFinderJob + KIO::MimeTypeFinderJob *job = new KIO::MimeTypeFinderJob(url, this); + QVERIFY2(job->exec(), qPrintable(job->errorString())); +- QCOMPARE(job->mimeType(), mimeType); ++ // The database gives a type one name of its own and knows it under others as well, so ++ // both sides are asked which type they mean rather than compared as they are spelled. ++ QMimeDatabase db; ++ const QString expected = db.mimeTypeForName(mimeType).name(); ++ QCOMPARE(db.mimeTypeForName(job->mimeType()).name(), expected); + + // Check that the result is the same when accessing the source, skip on Windows + #ifndef Q_OS_WIN +@@ -86,7 +91,7 @@ void MimeTypeFinderJobTest::determineMimeType() + + job = new KIO::MimeTypeFinderJob(linkUrl, this); + QVERIFY2(job->exec(), qPrintable(job->errorString())); +- QCOMPARE(job->mimeType(), mimeType); ++ QCOMPARE(db.mimeTypeForName(job->mimeType()).name(), expected); + #endif + } + +From 92594ac39daeba6ffe117812055fcde2ae50d6b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?M=C3=A9ven=20Car?= <[email protected]> +Date: Tue, 4 Aug 2026 16:00:51 +0000 +Subject: [PATCH 3/3] openurljobtest: wait for the launched processes before ending + a test + +A KProcessRunner watches its process until it exits, then deletes itself. A +test that ends before that leaves the runner behind, and the CI leak checker +reports it, failing the test even though every case passed. Each case now +waits for the runners to be gone, as applicationlauncherjobtest and +commandlauncherjobtest already do. +--- + autotests/openurljobtest.cpp | 7 +++++++ + autotests/openurljobtest.h | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/autotests/openurljobtest.cpp b/autotests/openurljobtest.cpp +index 456c086c1a..0cee9a6e79 100644 +--- a/autotests/openurljobtest.cpp ++++ b/autotests/openurljobtest.cpp +@@ -91,6 +91,13 @@ void OpenUrlJobTest::init() + QFile::remove(m_tempDir.path() + "/dest"); + } + ++void OpenUrlJobTest::cleanup() ++{ ++ // A launched process is watched by a runner that deletes itself once the process is gone. A test that ++ // ends before that leaves the runner behind, which the leak checker of the CI reports. ++ QTRY_COMPARE(KProcessRunner::instanceCount(), 0); ++} ++ + static void createSrcFile(const QString &path) + { + QFile srcFile(path); +diff --git a/autotests/openurljobtest.h b/autotests/openurljobtest.h +index b874d52e34..4c046b94e1 100644 +--- a/autotests/openurljobtest.h ++++ b/autotests/openurljobtest.h +@@ -20,6 +20,7 @@ private Q_SLOTS: + void initTestCase(); + void cleanupTestCase(); + void init(); ++ void cleanup(); + + void startProcess_data(); + void startProcess(); +-- +GitLab diff --git a/kde-frameworks/kio/kio-6.29.0.ebuild b/kde-frameworks/kio/kio-6.29.0.ebuild new file mode 100644 index 000000000000..22bc10c64401 --- /dev/null +++ b/kde-frameworks/kio/kio-6.29.0.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_DESIGNERPLUGIN="true" +ECM_HANDBOOK="optional" +ECM_HANDBOOK_DIR="docs" +ECM_TEST="forceoptional" +QTMIN=6.10.1 +inherit ecm flag-o-matic frameworks.kde.org xdg + +DESCRIPTION="Framework providing transparent file and data management" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="acl +kwallet wayland X" + +# tests hang +RESTRICT="test" + +# slot op: Uses Qt6::GuiPrivate for qtx11extras_p.h +COMMON_DEPEND=" + >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,ssl,widgets,X?] + >=dev-qt/qtdeclarative-${QTMIN}:6 + =kde-frameworks/kbookmarks-${KDE_CATV}*:6 + =kde-frameworks/kcodecs-${KDE_CATV}*:6 + =kde-frameworks/kcolorscheme-${KDE_CATV}*:6 + =kde-frameworks/kcompletion-${KDE_CATV}*:6 + =kde-frameworks/kconfig-${KDE_CATV}*:6 + =kde-frameworks/kcoreaddons-${KDE_CATV}*:6 + =kde-frameworks/kcrash-${KDE_CATV}*:6 + =kde-frameworks/kdbusaddons-${KDE_CATV}*:6 + =kde-frameworks/kguiaddons-${KDE_CATV}*:6 + =kde-frameworks/ki18n-${KDE_CATV}*:6 + =kde-frameworks/kiconthemes-${KDE_CATV}*:6 + =kde-frameworks/kitemviews-${KDE_CATV}*:6 + =kde-frameworks/kjobwidgets-${KDE_CATV}*:6 + =kde-frameworks/knotifications-${KDE_CATV}*:6 + =kde-frameworks/kservice-${KDE_CATV}*:6 + =kde-frameworks/ktextwidgets-${KDE_CATV}*:6 + =kde-frameworks/kwidgetsaddons-${KDE_CATV}*:6 + =kde-frameworks/kwindowsystem-${KDE_CATV}*:6[wayland?,X?] + =kde-frameworks/solid-${KDE_CATV}*:6 + sys-apps/util-linux + acl? ( + sys-apps/attr + virtual/acl + ) + handbook? ( + dev-libs/libxml2:= + dev-libs/libxslt + =kde-frameworks/karchive-${KDE_CATV}*:6 + =kde-frameworks/kdoctools-${KDE_CATV}*:6 + ) + kwallet? ( =kde-frameworks/kwallet-${KDE_CATV}*:6 ) + X? ( >=dev-qt/qtbase-${QTMIN}:6=[gui] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-qt/qtbase-${QTMIN}:6[concurrent] +" +RDEPEND="${COMMON_DEPEND} + >=dev-qt/qtbase-${QTMIN}:6[libproxy] + sys-power/switcheroo-control +" +# bug 944812: File Properties is accessible from KFileWidget (KIO); this +# provides access to keditfiletype binary via KWidgetsAddons (Tier1) +# Typical KIO revdeps (dolphin, krusader et al.) can rely on this dep +PDEPEND=" + >=kde-frameworks/kded-${KDE_CATV}:6 + kde-plasma/keditfiletype +" + +PATCHES=( "${FILESDIR}/${P}-openurljob-fix-shellscripts.patch" ) # KDE-bug 522948 + +src_configure() { + use elibc_musl && append-ldflags -Wl,-z,stack-size=0x100000 # upstream bug 470763 + + local mycmakeargs=( + $(cmake_use_find_package acl ACL) + $(cmake_use_find_package kwallet KF6Wallet) + -DWITH_WAYLAND=$(usex wayland) + -DWITH_X11=$(usex X) + ) + + ecm_src_configure +}