[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2023-07-25 Thread Andreas Sturmlechner
commit: a6d77b87ead492ffc0b9cece27cfe8b270a52a12
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Jul 25 08:49:06 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Jul 25 09:04:46 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6d77b87

kde-frameworks/kcoreaddons: kurlmimedata: don't portal symlinks

Upstream commit 2ec1a017b4cd0c56318b38ccd92b523ad21a1a08
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=464225

Bug: https://bugs.gentoo.org/910062
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...5.108.0-kurlmimedata-dont-portal-symlinks.patch | 46 ++
 .../kcoreaddons/kcoreaddons-5.108.0-r1.ebuild  | 56 ++
 2 files changed, 102 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.108.0-kurlmimedata-dont-portal-symlinks.patch
 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.108.0-kurlmimedata-dont-portal-symlinks.patch
new file mode 100644
index ..0d5e6767c46f
--- /dev/null
+++ 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.108.0-kurlmimedata-dont-portal-symlinks.patch
@@ -0,0 +1,46 @@
+From 2ec1a017b4cd0c56318b38ccd92b523ad21a1a08 Mon Sep 17 00:00:00 2001
+From: Harald Sitter 
+Date: Thu, 29 Jun 2023 12:43:14 +0200
+Subject: [PATCH] kurlmimedata: don't portal symlinks
+
+they are not really supported. from testing it seems that opening
+O_NOFOLLOW results in the portal not being able to use the fd so
+ultimately we have no way to copy a symlink (instead of the file it
+points to)
+
+BUG: 464225
+
+
+(cherry picked from commit 14e954248e365098e4b98cfd7c76e5ea1defb8a7)
+---
+ src/lib/io/kurlmimedata.cpp | 14 +++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/io/kurlmimedata.cpp b/src/lib/io/kurlmimedata.cpp
+index 6b62232c1..fe18717c6 100644
+--- a/src/lib/io/kurlmimedata.cpp
 b/src/lib/io/kurlmimedata.cpp
+@@ -275,9 +275,17 @@ bool KUrlMimeData::exportUrlsToPortal(QMimeData *mimeData)
+ qWarning() << "kio-fuse is missing";
+ return false;
+ }
+-} else if (isLocal && QFileInfo(url.toLocalFile()).isDir()) {
+-// XDG Document Portal doesn't support directories and silently 
drops them.
+-return false;
++} else {
++const QFileInfo info(url.toLocalFile());
++if (info.isDir()) {
++// XDG Document Portal doesn't support directories and 
silently drops them.
++return false;
++}
++if (info.isSymbolicLink()) {
++// XDG Document Portal also doesn't support symlinks since it 
doesn't let us open the fd O_NOFOLLOW.
++// 
https://github.com/flatpak/xdg-desktop-portal/issues/961#issuecomment-1573646299
++return false;
++}
+ }
+ }
+ 
+-- 
+GitLab
+

diff --git a/kde-frameworks/kcoreaddons/kcoreaddons-5.108.0-r1.ebuild 
b/kde-frameworks/kcoreaddons/kcoreaddons-5.108.0-r1.ebuild
new file mode 100644
index ..108c0669
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/kcoreaddons-5.108.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QTMIN=5.15.9
+inherit ecm frameworks.kde.org xdg-utils
+
+DESCRIPTION="Framework for solving common problems such as caching, 
randomisation, and more"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="dbus fam"
+
+DEPEND="
+   >=dev-qt/qtcore-${QTMIN}:5[icu]
+   virtual/libudev:=
+   dbus? ( >=dev-qt/qtdbus-${QTMIN}:5 )
+   fam? ( virtual/fam )
+"
+RDEPEND="${DEPEND}
+   >=dev-qt/qttranslations-${QTMIN}:5
+"
+BDEPEND=">=dev-qt/linguist-tools-${QTMIN}:5"
+
+PATCHES=( "${FILESDIR}/${P}-kurlmimedata-dont-portal-symlinks.patch" ) # 5.109
+
+src_configure() {
+   local mycmakeargs=(
+   -D_KDE4_DEFAULT_HOME_POSTFIX=4
+   $(cmake_use_find_package fam FAM)
+   $(cmake_use_find_package dbus Qt5DBus)
+   )
+
+   ecm_src_configure
+}
+
+src_test() {
+   # bugs: 619656, 632398, 647414, 665682
+   local myctestargs=(
+   -j1
+   -E 
"(kautosavefiletest|kdirwatch_qfswatch_unittest|kdirwatch_stat_unittest|kformattest)"
+   )
+
+   ecm_src_test
+}
+
+pkg_postinst() {
+   ecm_pkg_postinst
+   xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+   ecm_pkg_postrm
+   xdg_mimeinfo_database_update
+}



[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2023-03-23 Thread Andreas Sturmlechner
commit: c986087a4afcd9106262bf3df9a8b82abe76aadf
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Mar 23 11:08:45 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Mar 23 14:46:51 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c986087a

kde-frameworks/kcoreaddons: Prevent KSignalHandler leaking signalfd

Bug: https://bugs.gentoo.org/899706
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...eaddons-5.104.0-prevent-leak-signalfd-fds.patch | 29 +++
 .../kcoreaddons/kcoreaddons-5.104.0-r1.ebuild  | 56 ++
 2 files changed, 85 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.104.0-prevent-leak-signalfd-fds.patch
 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.104.0-prevent-leak-signalfd-fds.patch
new file mode 100644
index ..b5f1c4d0e0da
--- /dev/null
+++ 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.104.0-prevent-leak-signalfd-fds.patch
@@ -0,0 +1,29 @@
+From 3e0d5fe16650b48b6002a167bb822b48596bc129 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii 
+Date: Wed, 8 Mar 2023 15:45:36 +
+Subject: [PATCH] Prevent KSignalHandler leaking signalfd file descriptors
+
+We need SOCK_CLOEXEC otherwise the file descriptors will be leaked to
+the child processes.
+
+(cherry picked from commit 6a3cf7fe658da22e2c98af681204666b27fc8d56)
+---
+ src/lib/util/ksignalhandler.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/util/ksignalhandler.cpp b/src/lib/util/ksignalhandler.cpp
+index a051088c..1a644805 100644
+--- a/src/lib/util/ksignalhandler.cpp
 b/src/lib/util/ksignalhandler.cpp
+@@ -34,7 +34,7 @@ KSignalHandler::KSignalHandler()
+ {
+ d->q = this;
+ #ifndef Q_OS_WIN
+-if (::socketpair(AF_UNIX, SOCK_STREAM, 0, 
KSignalHandlerPrivate::signalFd)) {
++if (::socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, 
KSignalHandlerPrivate::signalFd)) {
+ qCWarning(KCOREADDONS_DEBUG) << "Couldn't create a socketpair";
+ return;
+ }
+-- 
+2.40.0
+

diff --git a/kde-frameworks/kcoreaddons/kcoreaddons-5.104.0-r1.ebuild 
b/kde-frameworks/kcoreaddons/kcoreaddons-5.104.0-r1.ebuild
new file mode 100644
index ..8530e533f2cd
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/kcoreaddons-5.104.0-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QTMIN=5.15.5
+inherit ecm frameworks.kde.org xdg-utils
+
+DESCRIPTION="Framework for solving common problems such as caching, 
randomisation, and more"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="dbus fam"
+
+DEPEND="
+   >=dev-qt/qtcore-${QTMIN}:5[icu]
+   virtual/libudev:=
+   dbus? ( >=dev-qt/qtdbus-${QTMIN}:5 )
+   fam? ( virtual/fam )
+"
+RDEPEND="${DEPEND}
+   >=dev-qt/qttranslations-${QTMIN}:5
+"
+BDEPEND=">=dev-qt/linguist-tools-${QTMIN}:5"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-leak-signalfd-fds.patch" )
+
+src_configure() {
+   local mycmakeargs=(
+   -D_KDE4_DEFAULT_HOME_POSTFIX=4
+   $(cmake_use_find_package fam FAM)
+   $(cmake_use_find_package dbus Qt5DBus)
+   )
+
+   ecm_src_configure
+}
+
+src_test() {
+   # bugs: 619656, 632398, 647414, 665682
+   local myctestargs=(
+   -j1
+   -E 
"(kautosavefiletest|kdirwatch_qfswatch_unittest|kdirwatch_stat_unittest|kformattest)"
+   )
+
+   ecm_src_test
+}
+
+pkg_postinst() {
+   ecm_pkg_postinst
+   xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+   ecm_pkg_postrm
+   xdg_mimeinfo_database_update
+}



[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2018-11-18 Thread Andreas Sturmlechner
commit: e5d5b6474794bf4cab01a184fc86b2d90529077f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Nov 18 09:33:41 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Nov 18 09:36:54 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5d5b647

kde-frameworks/kcoreaddons: Fix crash if XDG_CACHE_HOME is too small

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=400610
Reported-by: Mike  ubhofmann.de>
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...ddons-5.52.0-xdg_cache_home-nospace-crash.patch | 54 ++
 .../kcoreaddons/kcoreaddons-5.52.0-r1.ebuild   | 41 
 2 files changed, 95 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.52.0-xdg_cache_home-nospace-crash.patch
 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.52.0-xdg_cache_home-nospace-crash.patch
new file mode 100644
index 000..7b1a7965292
--- /dev/null
+++ 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.52.0-xdg_cache_home-nospace-crash.patch
@@ -0,0 +1,54 @@
+From eb916c305a5cd8683e7e8f955740a7c810220e19 Mon Sep 17 00:00:00 2001
+From: Alexey Min 
+Date: Thu, 8 Nov 2018 00:28:30 +0300
+Subject: Fix crash if XDG_CACHE_HOME directory is too small or out of space
+
+Summary:
+Incorrect checking for error return code of posix_fallocate() causes function 
to think that everything is OK, while it is not, causing crash in some cases.
+
+BUG: 400610
+CCBUG: 339829
+
+Test Plan:
+good test plan provided in https://bugs.kde.org/show_bug.cgi?id=400610 . Works 
like a charm, tested in KDE Neon dev-ustable
+
+The reason for bug was that return value of posix_fallocate() was assumed to 
be negative on error, but in fact it is a positive integer. The check was `< 
0`, whi should be `!= 0`. ( 
http://man7.org/linux/man-pages/man3/posix_fallocate.3.html )
+
+With this fix applied test application does not crash, and the output in 
console widow is:
+```
+No space left on device. Check filesystem free space at your XDG_CACHE_HOME!
+The operating system is unable to promise 10547304 bytes for mapped cache, 
abandoning the cache for crash-safety.
+org.kde.kcoreaddons: Failed to establish shared memory mapping, will fallback 
to private memory -- memory usage will increase
+```
+
+Reviewers: dfaure, #frameworks, mpyne
+
+Reviewed By: dfaure
+
+Subscribers: cfeck, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D16744
+---
+ src/lib/caching/kshareddatacache_p.h | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/caching/kshareddatacache_p.h 
b/src/lib/caching/kshareddatacache_p.h
+index 625bc5d..c13275b 100644
+--- a/src/lib/caching/kshareddatacache_p.h
 b/src/lib/caching/kshareddatacache_p.h
+@@ -472,7 +472,10 @@ static bool ensureFileAllocated(int fd, size_t fileSize)
+ ;
+ }
+ 
+-if (result < 0) {
++if (result != 0) {
++if (result == ENOSPC) {
++qCritical() << "No space left on device. Check filesystem free 
space at your XDG_CACHE_HOME!";
++}
+ qCritical() << "The operating system is unable to promise"
+ << fileSize
+ << "bytes for mapped cache, "
+-- 
+cgit v0.11.2

diff --git a/kde-frameworks/kcoreaddons/kcoreaddons-5.52.0-r1.ebuild 
b/kde-frameworks/kcoreaddons/kcoreaddons-5.52.0-r1.ebuild
new file mode 100644
index 000..af442d38971
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/kcoreaddons-5.52.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit kde5
+
+DESCRIPTION="Framework for solving common problems such as caching, 
randomisation, and more"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="fam nls"
+
+RDEPEND="
+   $(add_qt_dep qtcore 'icu')
+   fam? ( virtual/fam )
+"
+DEPEND="${RDEPEND}
+   x11-misc/shared-mime-info
+   nls? ( $(add_qt_dep linguist-tools) )
+"
+
+PATCHES=( "${FILESDIR}/${P}-xdg_cache_home-nospace-crash.patch" )
+
+src_configure() {
+   local mycmakeargs=(
+   -D_KDE4_DEFAULT_HOME_POSTFIX=4
+   $(cmake-utils_use_find_package fam FAM)
+   )
+
+   kde5_src_configure
+}
+
+src_test() {
+   # bugs: 619656, 632398, 647414, 665682
+   local myctestargs=(
+   -j1
+   -E "(kautosavefiletest|kdirwatch_qfswatch_unittest|kformattest)"
+   )
+
+   kde5_src_test
+}



[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2017-05-24 Thread Andreas Sturmlechner
commit: 60aa4721e747935d2f6a37df35a51f996a9b9929
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed May 24 20:00:36 2017 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed May 24 20:24:21 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60aa4721

kde-frameworks/kcoreaddons: Add kdirwatch fix

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 .../kcoreaddons-5.34.0-ignore-qrc-paths.patch  | 93 ++
 .../kcoreaddons/kcoreaddons-5.34.0-r1.ebuild   | 32 
 2 files changed, 125 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.34.0-ignore-qrc-paths.patch 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.34.0-ignore-qrc-paths.patch
new file mode 100644
index 000..5f23f4eb027
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.34.0-ignore-qrc-paths.patch
@@ -0,0 +1,93 @@
+From 792680d43877efbea7c2367bab564e41da98be45 Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio 
+Date: Mon, 15 May 2017 23:44:04 +0200
+Subject: Do not watch QRC's paths
+
+Watching a QRC path is not supported and results in `"."` being
+watched which can lead to problems.
+
+For example in bug #374075 KIO adds ":/kio5/newfile-templates"
+as path to watch (this is probably another bug in itself).
+If we are already watching "/home/user", this breaks the emission
+of the dirty() signal for every new children of "/home/user" (somehow,
+the relative path is used for them, e.g. "./foo.txt" instead of
+"/home/user/foo.txt"). In particular, in inotifyEventReceived()
+e->m_client is empty and so e->path is not added to
+e->m_pendingFileChanges. This only happens if "/home/user" is also
+the cwd of the process using KDirWatch.
+
+Ignoring QRC paths fixes this issue.
+
+BUG: 374075
+FIXED-IN: 5.35
+
+Test Plan:
+From dolphin, Create New -> Text File in a folder which is also the current 
working
+directory of the dolphin process.
+
+Reviewers: dfaure
+
+Differential Revision: https://phabricator.kde.org/D5877
+---
+ autotests/kdirwatch_unittest.cpp | 24 
+ src/lib/io/kdirwatch.cpp |  4 
+ 2 files changed, 28 insertions(+)
+
+diff --git a/autotests/kdirwatch_unittest.cpp 
b/autotests/kdirwatch_unittest.cpp
+index b436eb4..e574b5a 100644
+--- a/autotests/kdirwatch_unittest.cpp
 b/autotests/kdirwatch_unittest.cpp
+@@ -112,6 +112,7 @@ private Q_SLOTS: // test methods
+ void nestedEventLoop();
+ void testHardlinkChange();
+ void stopAndRestart();
++void shouldIgnoreQrcPaths();
+ 
+ protected Q_SLOTS: // internal slots
+ void nestedEventLoopSlot();
+@@ -749,4 +750,27 @@ void KDirWatch_UnitTest::stopAndRestart()
+ QFile::remove(file3);
+ }
+ 
++void KDirWatch_UnitTest::shouldIgnoreQrcPaths()
++{
++const auto oldCwd = QDir::currentPath();
++QVERIFY(QDir::setCurrent(QDir::homePath()));
++
++KDirWatch watch;
++watch.addDir(QDir::homePath());
++// This triggers bug #374075.
++watch.addDir(QStringLiteral(":/kio5/newfile-templates"));
++
++QSignalSpy dirtySpy(, ::dirty);
++
++QFile file(QStringLiteral("bug374075.txt"));
++QVERIFY(file.open(QIODevice::WriteOnly));
++QVERIFY(file.write(QByteArrayLiteral("test")));
++file.close();
++QVERIFY(file.exists());
++QVERIFY(dirtySpy.wait());
++QVERIFY(dirtySpy.count() > 0);
++QVERIFY(file.remove());
++QVERIFY(QDir::setCurrent(oldCwd));
++}
++
+ #include "kdirwatch_unittest.moc"
+diff --git a/src/lib/io/kdirwatch.cpp b/src/lib/io/kdirwatch.cpp
+index 060037b..2278b71 100644
+--- a/src/lib/io/kdirwatch.cpp
 b/src/lib/io/kdirwatch.cpp
+@@ -791,6 +791,10 @@ void KDirWatchPrivate::addEntry(KDirWatch *instance, 
const QString &_path,
+ Entry *sub_entry, bool isDir, 
KDirWatch::WatchModes watchModes)
+ {
+ QString path(_path);
++if (path.startsWith(QLatin1String(":/"))) {
++qCWarning(KDIRWATCH) << "Cannot watch QRC-like path" << path;
++return;
++}
+ if (path.isEmpty()
+ #ifndef Q_OS_WIN
+ || path == QLatin1String("/dev")
+-- 
+cgit v0.11.2
+

diff --git a/kde-frameworks/kcoreaddons/kcoreaddons-5.34.0-r1.ebuild 
b/kde-frameworks/kcoreaddons/kcoreaddons-5.34.0-r1.ebuild
new file mode 100644
index 000..cf10cf9decb
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/kcoreaddons-5.34.0-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit kde5
+
+DESCRIPTION="Framework for solving common problems such as caching, 
randomisation, and more"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="fam nls"
+
+RDEPEND="
+   $(add_qt_dep qtcore 'icu')
+   fam? ( virtual/fam )
+   !

[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2016-11-02 Thread Michael Palimaka
commit: b77bfbf1331d5dfcce3cf6ebe084a76197238767
Author: Michael Palimaka  gentoo  org>
AuthorDate: Wed Nov  2 11:25:46 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Wed Nov  2 11:28:38 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b77bfbf1

kde-frameworks/kcoreaddons: backport additional commits from upstream to 
resolve CVE-2016-7966

Gentoo-bug: 596224

Package-Manager: portage-2.3.2

 .../kcoreaddons-5.26.0-CVE-2016-7966-r1.patch  | 342 +
 .../files/kcoreaddons-5.27.0-CVE-2016-7966.patch   | 117 +++
 ...-5.27.0.ebuild => kcoreaddons-5.26.0-r2.ebuild} |   2 +
 ...-5.27.0.ebuild => kcoreaddons-5.27.0-r1.ebuild} |   2 +
 4 files changed, 463 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966-r1.patch 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966-r1.patch
new file mode 100644
index ..92e255a
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966-r1.patch
@@ -0,0 +1,342 @@
+From 2a5142fecf8615ccfa3e7c1f9c088fa6ae5cc2a1 Mon Sep 17 00:00:00 2001
+From: Montel Laurent 
+Date: Wed, 21 Sep 2016 07:24:30 +0200
+Subject: [PATCH 1/2] Fix very old bug when we remove space in url as "foo
+ < >"
+
+---
+ autotests/ktexttohtmltest.cpp | 14 ++
+ src/lib/text/ktexttohtml.cpp  | 14 --
+ 2 files changed, 26 insertions(+), 2 deletions(-)
+
+diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp
+index 474f0ca..8fc0c56 100644
+--- a/autotests/ktexttohtmltest.cpp
 b/autotests/ktexttohtmltest.cpp
+@@ -30,6 +30,15 @@ QTEST_MAIN(KTextToHTMLTest)
+ 
+ Q_DECLARE_METATYPE(KTextToHTML::Options)
+ 
++#ifndef Q_OS_WIN
++void initLocale()
++{
++setenv("LC_ALL", "en_US.utf-8", 1);
++}
++Q_CONSTRUCTOR_FUNCTION(initLocale)
++#endif
++
++
+ void KTextToHTMLTest::testGetEmailAddress()
+ {
+ // empty input
+@@ -372,6 +381,11 @@ void KTextToHTMLTest::testHtmlConvert_data()
+ QTest::newRow("url-in-parenthesis-3") << "bla (http://www.kde.org - 
section 5.2)"
+   << 
KTextToHTML::Options(KTextToHTML::PreserveSpaces)
+   << "bla (http://www.kde.org\;>http://www.kde.org - section 5.2)";
++
++   // Fix url as foo < > when we concatened them.
++   QTest::newRow("url-with-url") << "foo >"
++   << 
KTextToHTML::Options(KTextToHTML::PreserveSpaces)
++   << "foo http://www.kde.org/ 
\">http://www.kde.org/ http://www.kde.org/\;>http://www.kde.org/";
+ }
+ 
+ 
+diff --git a/src/lib/text/ktexttohtml.cpp b/src/lib/text/ktexttohtml.cpp
+index 8ed923d..b181f56 100644
+--- a/src/lib/text/ktexttohtml.cpp
 b/src/lib/text/ktexttohtml.cpp
+@@ -228,11 +228,19 @@ QString KTextToHTMLHelper::getUrl()
+ 
+ url.reserve(mMaxUrlLen);// avoid allocs
+ int start = mPos;
++bool previousCharIsSpace = false;
+ while ((mPos < mText.length()) &&
+ (mText[mPos].isPrint() || mText[mPos].isSpace()) &&
+ ((afterUrl.isNull() && !mText[mPos].isSpace()) ||
+  (!afterUrl.isNull() && mText[mPos] != afterUrl))) {
+-if (!mText[mPos].isSpace()) { // skip whitespace
++if (mText[mPos].isSpace()) {
++previousCharIsSpace = true;
++} else { // skip whitespace
++if (previousCharIsSpace && mText[mPos] == QLatin1Char('<')) {
++url.append(QLatin1Char(' '));
++break;
++}
++previousCharIsSpace = false;
+ url.append(mText[mPos]);
+ if (url.length() > mMaxUrlLen) {
+ break;
+@@ -267,7 +275,6 @@ QString KTextToHTMLHelper::getUrl()
+ }
+ } while (url.length() > 1);
+ }
+-
+ return url;
+ }
+ 
+@@ -334,6 +341,7 @@ QString KTextToHTML::convertToHtml(const QString 
, const KTextToHTML::
+ QChar ch;
+ int x;
+ bool startOfLine = true;
++//qDebug()<<" plainText"<parseEmoticons(result, true, 
exclude);
+ }
++//qDebug()<<" result "<

[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2016-10-06 Thread Michael Palimaka
commit: 9c24f341bc27f6cb5d205210820fe300b5d228a8
Author: Michael Palimaka  gentoo  org>
AuthorDate: Thu Oct  6 18:47:29 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Thu Oct  6 18:47:59 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c24f341

kde-frameworks/kcoreaddons: revert failing patch

This reverts commit bd38ebeaf7ab220314d81699d0176c0be1600447.

 .../files/kcoreaddons-5.26.0-CVE-2016-7966.patch   | 122 -
 .../kcoreaddons/kcoreaddons-5.26.0-r1.ebuild   |  33 --
 2 files changed, 155 deletions(-)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch
deleted file mode 100644
index 8374d5a..
--- a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 96e562d9138c100498da38e4c5b4091a226dde12 Mon Sep 17 00:00:00 2001
-From: Montel Laurent 
-Date: Fri, 30 Sep 2016 13:21:45 +0200
-Subject: [PATCH] Don't convert as url an url which has a "
-

- autotests/ktexttohtmltest.cpp |  6 ++
- src/lib/text/ktexttohtml.cpp  | 25 +++--
- src/lib/text/ktexttohtml_p.h  |  2 +-
- 3 files changed, 26 insertions(+), 7 deletions(-)
-
-diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp
-index 8fc0c56..c5690e8 100644
 a/autotests/ktexttohtmltest.cpp
-+++ b/autotests/ktexttohtmltest.cpp
-@@ -386,6 +386,12 @@ void KTextToHTMLTest::testHtmlConvert_data()
-QTest::newRow("url-with-url") << "foo >"
-<< 
KTextToHTML::Options(KTextToHTML::PreserveSpaces)
-<< "foo http://www.kde.org/ 
\">http://www.kde.org/ http://www.kde.org/\;>http://www.kde.org/";
-+
-+   //Fix url exploit
-+   QTest::newRow("url-exec-html") << 

[gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kcoreaddons/, kde-frameworks/kcoreaddons/files/

2016-10-06 Thread Michael Palimaka
commit: bd38ebeaf7ab220314d81699d0176c0be1600447
Author: Michael Palimaka  gentoo  org>
AuthorDate: Thu Oct  6 18:11:32 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Thu Oct  6 18:12:44 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd38ebea

kde-frameworks/kcoreaddons: backport patch from upstream for CVE-2016-7966

Gentoo-bug: 596224

Package-Manager: portage-2.3.1

 .../files/kcoreaddons-5.26.0-CVE-2016-7966.patch   | 122 +
 .../kcoreaddons/kcoreaddons-5.26.0-r1.ebuild   |  33 ++
 2 files changed, 155 insertions(+)

diff --git 
a/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch 
b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch
new file mode 100644
index ..8374d5a
--- /dev/null
+++ b/kde-frameworks/kcoreaddons/files/kcoreaddons-5.26.0-CVE-2016-7966.patch
@@ -0,0 +1,122 @@
+From 96e562d9138c100498da38e4c5b4091a226dde12 Mon Sep 17 00:00:00 2001
+From: Montel Laurent 
+Date: Fri, 30 Sep 2016 13:21:45 +0200
+Subject: [PATCH] Don't convert as url an url which has a "
+
+---
+ autotests/ktexttohtmltest.cpp |  6 ++
+ src/lib/text/ktexttohtml.cpp  | 25 +++--
+ src/lib/text/ktexttohtml_p.h  |  2 +-
+ 3 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp
+index 8fc0c56..c5690e8 100644
+--- a/autotests/ktexttohtmltest.cpp
 b/autotests/ktexttohtmltest.cpp
+@@ -386,6 +386,12 @@ void KTextToHTMLTest::testHtmlConvert_data()
+QTest::newRow("url-with-url") << "foo >"
+<< 
KTextToHTML::Options(KTextToHTML::PreserveSpaces)
+<< "foo http://www.kde.org/ 
\">http://www.kde.org/ http://www.kde.org/\;>http://www.kde.org/";
++
++   //Fix url exploit
++   QTest::newRow("url-exec-html") <<