summaryrefslogtreecommitdiff
path: root/kde-apps/kio-extras
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-23 07:00:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-23 07:00:28 +0100
commite23cdda4dbb0c83b9e682ab5e916085a35203da5 (patch)
tree5a4ac448a3b288b731c24d947e0ce52df3cab07b /kde-apps/kio-extras
parent8187a741807f3e9a9e26304973cf18087dcf2560 (diff)
gentoo resync : 23.06.2018
Diffstat (limited to 'kde-apps/kio-extras')
-rw-r--r--kde-apps/kio-extras/Manifest2
-rw-r--r--kde-apps/kio-extras/files/kio-extras-18.04.2-fix-sftp-links.patch227
-rw-r--r--kde-apps/kio-extras/kio-extras-18.04.2-r1.ebuild80
3 files changed, 309 insertions, 0 deletions
diff --git a/kde-apps/kio-extras/Manifest b/kde-apps/kio-extras/Manifest
index 16c9937e7202..2db511b8e4b0 100644
--- a/kde-apps/kio-extras/Manifest
+++ b/kde-apps/kio-extras/Manifest
@@ -1,5 +1,7 @@
+AUX kio-extras-18.04.2-fix-sftp-links.patch 7283 BLAKE2B 97f053a81cf582cf8473f14e1ebbe16746cf287570451e6da55a354db191747d171a7044e6cad465b071b4b420e0933101e5431fe6e92fa1687f0d6defdeeb96 SHA512 2730b59eb987a7182b3c6291b26f17b05fc57350f37e782c2b8eb64f2cc1d1e5d1e54c8faf0b41b1fd051b3e2bc33d8c085a2a2b954dd242283dd90ae72e9103
DIST kio-extras-17.12.3.tar.xz 555544 BLAKE2B f8821e0ce5c3f6a7a28ae6a5d672227697efec49b9841b272bc9574aca897bbf104644ea303f11749161c68543206407c26174141ae31c43ca6b403c7d39c179 SHA512 a7d13516646954a00b03d1284c6d93ae71ec9598d03e3f500a6449160c228be9e41aa2351b71522423960e5321cc3a30a46ac6d2ba9e8dbad043def2804b57d5
DIST kio-extras-18.04.2.tar.xz 550488 BLAKE2B 21b6be4cbe060ddee3dc05b7ae15a426fd69db4b17d178a4aa1392feb349427c26ee7aa16d5fbf85ddac95beff143e0be02727df8018e84fc0602999f711993e SHA512 122dbb68740e80af346dc4ca01f53ee6bf267c9d2c0e2f09c04999d3b2aba69586c9ca446b3b5426160571c4b64b6a09452aa46e9451e3de12c20db6bf654251
EBUILD kio-extras-17.12.3.ebuild 2296 BLAKE2B 765a560c155d84d38e9b2112ffc9bbb8c24b25fbf77e45a82b263c4a84ef0931b3d42f75f37416b685ce630e0988bcde065c513ba70e16cfb76dc380b34781b6 SHA512 6d7d7f1f347b11b038d6d0c224f26762068b495b90447d82f2ca4b9e54f45529ffd37250d60a1c273e5e8e95fc3e97e819d7381e0ebcf3ce003a238276d42bae
+EBUILD kio-extras-18.04.2-r1.ebuild 2278 BLAKE2B 6dd6d35f82318d032b6606fefc93109bd9a93e975eec051b5bac4f7408e100c5f9915d8c6800f71b19e6dde340b6d4b5c8be2b1d452d458aac5376b2b44fb262 SHA512 2929ed94aa1458ed40422383ab0d0e25703a5bac0efac8c9994284ca272b3cdc4a91c8afa7dc6faeaf166e81411d9003d432ca820cd2fdc94c45642ea62b7bbe
EBUILD kio-extras-18.04.2.ebuild 2225 BLAKE2B 1fee0b466ed3ff3feb108bcbfdac696749c94b550bf17d9b5e86f86359926c8b0404c29341192a4ee1a1bea14fa5fe400b0355cf63ebe370690d150e396aa42d SHA512 67b691874315de0d52cadab2f404d54d63b1677f660c80cf2cd8ee966ff2967f83bf46080a74c2b3e03ca600af93ebd652b61c3f5240b1010487659d96acd818
MISC metadata.xml 765 BLAKE2B dc7954f6adcbf433e73a70b1e352c0522d61a9dbcd09894584407d5bad621788b36eb8e9f5f79c83b923baf11b14dea8372244d06f005220c282549a7d8f3dd6 SHA512 63acedc06b541f4150c89fc289ce05b86fab57de253e33626fbe9b02ca0511e9d34cdc1169c1559945ee1621f46aad09fd526c7fa647ffd1cc04e09509516378
diff --git a/kde-apps/kio-extras/files/kio-extras-18.04.2-fix-sftp-links.patch b/kde-apps/kio-extras/files/kio-extras-18.04.2-fix-sftp-links.patch
new file mode 100644
index 000000000000..8f7c02338794
--- /dev/null
+++ b/kde-apps/kio-extras/files/kio-extras-18.04.2-fix-sftp-links.patch
@@ -0,0 +1,227 @@
+From bca40518682a038aa08823fbbfb2cc4b9ef63802 Mon Sep 17 00:00:00 2001
+From: Jaime Torres <jtamate@gmail.com>
+Date: Wed, 13 Jun 2018 19:21:34 +0200
+Subject: fix sftp links with new uds implementation
+
+Summary:
+When listening a directory with links in sftp, the type of the entry of a symlink was inserted twice.
+Now the entry data is inserted only once.
+Get rid of the goto statement using local variables.
+
+Test Plan: Tested in sftp://127.0.0.1 with broken symbolic links and sftp://127.0.0.1/usr/lib64 with a lot of symbolic links.
+
+Reviewers: dfaure, martinkostolny, asturmlechner, lbeltrame, bruns
+
+Reviewed By: dfaure, martinkostolny
+
+Differential Revision: https://phabricator.kde.org/D13475
+---
+ sftp/kio_sftp.cpp | 129 ++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 67 insertions(+), 62 deletions(-)
+
+diff --git a/sftp/kio_sftp.cpp b/sftp/kio_sftp.cpp
+index 0a82365..f515458 100644
+--- a/sftp/kio_sftp.cpp
++++ b/sftp/kio_sftp.cpp
+@@ -342,6 +342,9 @@ bool sftpProtocol::createUDSEntry(const QString &filename, const QByteArray &pat
+ mode_t type;
+ mode_t access;
+ char *link;
++ bool isBrokenLink = false;
++ long long fileType = S_IFREG;
++ long long size = 0LL;
+
+ Q_ASSERT(entry.count() == 0);
+
+@@ -353,54 +356,53 @@ bool sftpProtocol::createUDSEntry(const QString &filename, const QByteArray &pat
+ entry.insert(KIO::UDSEntry::UDS_NAME, filename);
+
+ if (sb->type == SSH_FILEXFER_TYPE_SYMLINK) {
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG);
+ link = sftp_readlink(mSftp, path.constData());
+ if (link == nullptr) {
+ sftp_attributes_free(sb);
+ return false;
+ }
+ entry.insert(KIO::UDSEntry::UDS_LINK_DEST, QFile::decodeName(link));
+- delete link;
++ free(link);
+ // A symlink -> follow it only if details > 1
+ if (details > 1) {
+ sftp_attributes sb2 = sftp_stat(mSftp, path.constData());
+ if (sb2 == nullptr) {
+- // It is a link pointing to nowhere
+- type = S_IFMT - 1;
+- access = S_IRWXU | S_IRWXG | S_IRWXO;
+- entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, type);
+- entry.insert( KIO::UDSEntry::UDS_ACCESS, access);
+- entry.insert( KIO::UDSEntry::UDS_SIZE, 0LL );
+-
+- goto notype;
++ isBrokenLink = true;
++ } else {
++ sftp_attributes_free(sb);
++ sb = sb2;
+ }
+- sftp_attributes_free(sb);
+- sb = sb2;
+ }
+ }
+
+- switch (sb->type) {
+- case SSH_FILEXFER_TYPE_REGULAR:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG);
+- break;
+- case SSH_FILEXFER_TYPE_DIRECTORY:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
+- break;
+- case SSH_FILEXFER_TYPE_SYMLINK:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFLNK);
+- break;
+- case SSH_FILEXFER_TYPE_SPECIAL:
+- case SSH_FILEXFER_TYPE_UNKNOWN:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFMT - 1);
+- break;
++ if (isBrokenLink) {
++ // It is a link pointing to nowhere
++ fileType = S_IFMT - 1;
++ access = S_IRWXU | S_IRWXG | S_IRWXO;
++ size = 0LL;
++ } else {
++ switch (sb->type) {
++ case SSH_FILEXFER_TYPE_REGULAR:
++ fileType = S_IFREG;
++ break;
++ case SSH_FILEXFER_TYPE_DIRECTORY:
++ fileType = S_IFDIR;
++ break;
++ case SSH_FILEXFER_TYPE_SYMLINK:
++ fileType = S_IFLNK;
++ break;
++ case SSH_FILEXFER_TYPE_SPECIAL:
++ case SSH_FILEXFER_TYPE_UNKNOWN:
++ fileType = S_IFMT - 1;
++ break;
++ }
++ access = sb->permissions & 07777;
++ size = sb->size;
+ }
+-
+- access = sb->permissions & 07777;
++ entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, fileType);
+ entry.insert(KIO::UDSEntry::UDS_ACCESS, access);
++ entry.insert( KIO::UDSEntry::UDS_SIZE, size);
+
+- entry.insert(KIO::UDSEntry::UDS_SIZE, sb->size);
+-
+-notype:
+ if (details > 0) {
+ if (sb->owner) {
+ entry.insert(KIO::UDSEntry::UDS_USER, QString::fromUtf8(sb->owner));
+@@ -419,6 +421,7 @@ notype:
+ entry.insert(KIO::UDSEntry::UDS_CREATION_TIME, sb->createtime);
+ }
+
++
+ sftp_attributes_free(sb);
+
+ return true;
+@@ -1830,6 +1833,9 @@ void sftpProtocol::listDir(const QUrl& url) {
+ mode_t access;
+ mode_t type;
+ char *link;
++ bool isBrokenLink = false;
++ long long fileType = S_IFREG;
++ long long size = 0LL;
+
+ dirent = sftp_readdir(mSftp, dp);
+ if (dirent == nullptr) {
+@@ -1842,8 +1848,6 @@ void sftpProtocol::listDir(const QUrl& url) {
+ if (dirent->type == SSH_FILEXFER_TYPE_SYMLINK) {
+ QByteArray file = path + '/' + QFile::decodeName(dirent->name).toUtf8();
+
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG);
+-
+ link = sftp_readlink(mSftp, file.constData());
+ if (link == nullptr) {
+ sftp_attributes_free(dirent);
+@@ -1851,46 +1855,47 @@ void sftpProtocol::listDir(const QUrl& url) {
+ return;
+ }
+ entry.insert(KIO::UDSEntry::UDS_LINK_DEST, QFile::decodeName(link));
+- delete link;
++ free(link);
+ // A symlink -> follow it only if details > 1
+ if (details > 1) {
+ sftp_attributes sb = sftp_stat(mSftp, file.constData());
+ if (sb == nullptr) {
+- // It is a link pointing to nowhere
+- type = S_IFMT - 1;
+- access = S_IRWXU | S_IRWXG | S_IRWXO;
+- entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, type);
+- entry.insert( KIO::UDSEntry::UDS_ACCESS, access);
+- entry.insert( KIO::UDSEntry::UDS_SIZE, 0LL );
+-
+- goto notype;
++ isBrokenLink = true;
++ } else {
++ sftp_attributes_free(dirent);
++ dirent = sb;
+ }
+- sftp_attributes_free(dirent);
+- dirent = sb;
+ }
+ }
+
+- switch (dirent->type) {
+- case SSH_FILEXFER_TYPE_REGULAR:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFREG);
+- break;
+- case SSH_FILEXFER_TYPE_DIRECTORY:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
+- break;
+- case SSH_FILEXFER_TYPE_SYMLINK:
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFLNK);
+- break;
+- case SSH_FILEXFER_TYPE_SPECIAL:
+- case SSH_FILEXFER_TYPE_UNKNOWN:
+- break;
+- }
++ if (isBrokenLink) {
++ // It is a link pointing to nowhere
++ fileType = S_IFMT - 1;
++ access = S_IRWXU | S_IRWXG | S_IRWXO;
++ size = 0LL;
++ } else {
++ switch (dirent->type) {
++ case SSH_FILEXFER_TYPE_REGULAR:
++ fileType = S_IFREG;
++ break;
++ case SSH_FILEXFER_TYPE_DIRECTORY:
++ fileType = S_IFDIR;
++ break;
++ case SSH_FILEXFER_TYPE_SYMLINK:
++ fileType = S_IFLNK;
++ break;
++ case SSH_FILEXFER_TYPE_SPECIAL:
++ case SSH_FILEXFER_TYPE_UNKNOWN:
++ break;
++ }
+
+- access = dirent->permissions & 07777;
++ access = dirent->permissions & 07777;
++ size = dirent->size;
++ }
++ entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, fileType);
+ entry.insert(KIO::UDSEntry::UDS_ACCESS, access);
++ entry.insert(KIO::UDSEntry::UDS_SIZE, size);
+
+- entry.insert(KIO::UDSEntry::UDS_SIZE, dirent->size);
+-
+-notype:
+ if (details > 0) {
+ if (dirent->owner) {
+ entry.insert(KIO::UDSEntry::UDS_USER, QString::fromUtf8(dirent->owner));
+--
+cgit v0.11.2
+
diff --git a/kde-apps/kio-extras/kio-extras-18.04.2-r1.ebuild b/kde-apps/kio-extras/kio-extras-18.04.2-r1.ebuild
new file mode 100644
index 000000000000..9ba190026570
--- /dev/null
+++ b/kde-apps/kio-extras/kio-extras-18.04.2-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="optional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KIO plugins present a filesystem-like view of arbitrary data"
+HOMEPAGE="https://cgit.kde.org/kio-extras.git"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="activities htmlthumbs +man mtp openexr phonon samba +sftp taglib"
+
+COMMON_DEPEND="
+ $(add_frameworks_dep karchive 'bzip2,lzma')
+ $(add_frameworks_dep kbookmarks)
+ $(add_frameworks_dep kcodecs)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kdnssd)
+ $(add_frameworks_dep kguiaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kpty)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kxmlgui)
+ $(add_frameworks_dep solid)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ activities? (
+ $(add_frameworks_dep kactivities)
+ $(add_qt_dep qtsql)
+ )
+ htmlthumbs? ( $(add_qt_dep qtwebengine 'widgets') )
+ man? ( $(add_frameworks_dep khtml) )
+ mtp? ( media-libs/libmtp:= )
+ openexr? ( media-libs/openexr )
+ phonon? ( media-libs/phonon[qt5(+)] )
+ samba? ( net-fs/samba[client] )
+ sftp? ( net-libs/libssh:=[sftp] )
+ taglib? ( >=media-libs/taglib-1.11.1 )
+"
+RDEPEND="${COMMON_DEPEND}
+ $(add_frameworks_dep kded)
+"
+DEPEND="${COMMON_DEPEND}
+ x11-misc/shared-mime-info
+ man? ( dev-util/gperf )
+"
+
+# requires running kde environment
+RESTRICT+=" test"
+
+PATCHES=( "${FILESDIR}/${P}-fix-sftp-links.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package activities KF5Activities)
+ $(cmake-utils_use_find_package htmlthumbs Qt5WebEngineWidgets)
+ $(cmake-utils_use_find_package man Gperf)
+ $(cmake-utils_use_find_package mtp Mtp)
+ $(cmake-utils_use_find_package openexr OpenEXR)
+ $(cmake-utils_use_find_package phonon Phonon4Qt5)
+ $(cmake-utils_use_find_package samba Samba)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ $(cmake-utils_use_find_package taglib Taglib)
+ )
+
+ kde5_src_configure
+}