From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BB557138334 for ; Tue, 27 Nov 2018 07:49:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95BD8E0C5E; Tue, 27 Nov 2018 07:49:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52D7BE0C5E for ; Tue, 27 Nov 2018 07:49:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7647D335C78 for ; Tue, 27 Nov 2018 07:49:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E2AEB44B for ; Tue, 27 Nov 2018 07:49:09 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1543304929.8314b692cec95b14220ce96cf8f02f0e7b58c736.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kio/files/kio-5.52.0-sendfile.patch kde-frameworks/kio/kio-5.52.0-r1.ebuild X-VCS-Directories: kde-frameworks/kio/files/ kde-frameworks/kio/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 8314b692cec95b14220ce96cf8f02f0e7b58c736 X-VCS-Branch: master Date: Tue, 27 Nov 2018 07:49:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 37c3286a-ff5f-4859-8483-bfa89f1c4608 X-Archives-Hash: 5f9d1ad648f9b1dea5cff0ce04b3d6d0 commit: 8314b692cec95b14220ce96cf8f02f0e7b58c736 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Nov 26 22:13:06 2018 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Nov 27 07:48:49 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8314b692 kde-frameworks/kio: Restore sendfile support Backport from 5.53.0, fixes KF5-porting regression. Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner gentoo.org> kde-frameworks/kio/files/kio-5.52.0-sendfile.patch | 109 +++++++++++++++++++++ kde-frameworks/kio/kio-5.52.0-r1.ebuild | 82 ++++++++++++++++ 2 files changed, 191 insertions(+) diff --git a/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch b/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch new file mode 100644 index 00000000000..d02b8f50b19 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.52.0-sendfile.patch @@ -0,0 +1,109 @@ +From 31980ecd1cacac9bd75ce35e3048946e1c27e1a0 Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Wed, 21 Nov 2018 15:30:48 +0000 +Subject: Restore sendfile support + +Summary: +Somehow in the kdelibs -> framework port the cmake checks for +HAVE_SENDFILE got lost. + +That re-enables a massive optimisation in the file kioslave that has all the code existing and used in kdelibs4 that we're currently missing. + +Test Plan: +Put a compilation fail inside the #ifdef, before it wasn't triggered, now it is. + +Ran unit tests +Moved a file in dolphin + +Reviewers: dfaure + +Reviewed By: dfaure + +Subscribers: ngraham, apol, kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D17048 +--- + src/ioslaves/file/ConfigureChecks.cmake | 1 + + src/ioslaves/file/config-kioslave-file.h.cmake | 2 ++ + src/ioslaves/file/file_unix.cpp | 2 +- + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/ioslaves/file/ConfigureChecks.cmake b/src/ioslaves/file/ConfigureChecks.cmake +index 5a83d1b..39fcd6f 100644 +--- a/src/ioslaves/file/ConfigureChecks.cmake ++++ b/src/ioslaves/file/ConfigureChecks.cmake +@@ -7,6 +7,7 @@ include(CheckStructHasMember) + check_include_files(sys/time.h HAVE_SYS_TIME_H) + check_include_files(string.h HAVE_STRING_H) + check_include_files(limits.h HAVE_LIMITS_H) ++check_function_exists(sendfile HAVE_SENDFILE) + + check_function_exists(posix_fadvise HAVE_FADVISE) # kioslave + +diff --git a/src/ioslaves/file/config-kioslave-file.h.cmake b/src/ioslaves/file/config-kioslave-file.h.cmake +index e47fdb2..3df7ebd 100644 +--- a/src/ioslaves/file/config-kioslave-file.h.cmake ++++ b/src/ioslaves/file/config-kioslave-file.h.cmake +@@ -13,3 +13,5 @@ + /* Defined if system has extended file attributes support. */ + #cmakedefine01 HAVE_SYS_XATTR_H + ++/* Defined if system has the sendfile function. */ ++#cmakedefine01 HAVE_SENDFILE +diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp +index 817cce8..34422e5 100644 +--- a/src/ioslaves/file/file_unix.cpp ++++ b/src/ioslaves/file/file_unix.cpp +@@ -49,7 +49,7 @@ + #include "fdreceiver.h" + + //sendfile has different semantics in different platforms +-#if defined HAVE_SENDFILE && defined Q_OS_LINUX ++#if HAVE_SENDFILE && defined Q_OS_LINUX + #define USE_SENDFILE 1 + #endif + +-- +cgit v0.11.2 +From 8f926e4596221b11e62c7ac80bb5864d3d8cf4f6 Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Wed, 21 Nov 2018 15:30:53 +0000 +Subject: Use correct variable type for returned value from read/sendfile + +Summary: +n stores the read/transferred bytes. This returns a ssize_t. +We were casting to an int, which theoretically is a loss of data. + +In practice it isn't an issue as we only read a max of MAX_IPC_SIZE at a +time, which would fit in an int. + +Reviewers: apol + +Reviewed By: apol + +Subscribers: kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D17051 +--- + src/ioslaves/file/file_unix.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp +index 34422e5..7ed0ae8 100644 +--- a/src/ioslaves/file/file_unix.cpp ++++ b/src/ioslaves/file/file_unix.cpp +@@ -251,7 +251,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, + + KIO::filesize_t processed_size = 0; + char buffer[ MAX_IPC_SIZE ]; +- int n; ++ ssize_t n = 0; + #ifdef USE_SENDFILE + bool use_sendfile = buff_src.st_size < 0x7FFFFFFF; + #endif +-- +cgit v0.11.2 diff --git a/kde-frameworks/kio/kio-5.52.0-r1.ebuild b/kde-frameworks/kio/kio-5.52.0-r1.ebuild new file mode 100644 index 00000000000..7a9357c5fed --- /dev/null +++ b/kde-frameworks/kio/kio-5.52.0-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_TEST="forceoptional" +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework providing transparent file and data management" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="acl +handbook kerberos +kwallet X" + +RDEPEND=" + $(add_frameworks_dep kauth) + $(add_frameworks_dep karchive) + $(add_frameworks_dep kbookmarks) + $(add_frameworks_dep kcodecs) + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kcrash) + $(add_frameworks_dep kdbusaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kitemviews) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_frameworks_dep kxmlgui) + $(add_frameworks_dep solid) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork 'ssl') + $(add_qt_dep qtscript) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + dev-libs/libxml2 + dev-libs/libxslt + acl? ( + sys-apps/attr + virtual/acl + ) + handbook? ( $(add_frameworks_dep kdoctools) ) + kerberos? ( virtual/krb5 ) + kwallet? ( $(add_frameworks_dep kwallet) ) + X? ( $(add_qt_dep qtx11extras) ) +" +DEPEND="${RDEPEND} + $(add_qt_dep qtconcurrent) + test? ( sys-libs/zlib ) + X? ( + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXrender + ) +" +PDEPEND=" + $(add_frameworks_dep kded) +" + +# tests hang +RESTRICT+=" test" + +PATCHES=( "${FILESDIR}/${P}-sendfile.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package acl ACL) + $(cmake-utils_use_find_package handbook KF5DocTools) + $(cmake-utils_use_find_package kerberos GSSAPI) + $(cmake-utils_use_find_package kwallet KF5Wallet) + $(cmake-utils_use_find_package X X11) + ) + + kde5_src_configure +}