Accepting request 891760 from KDE:Frameworks5

KDE Frameworks 5.82 (forwarded request 891438 from cgiboudeaux)

OBS-URL: https://build.opensuse.org/request/show/891760
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kio?expand=0&rev=110
This commit is contained in:
Dominique Leuenberger 2021-05-10 13:35:37 +00:00 committed by Git OBS Bridge
commit cb01ffe920
7 changed files with 51 additions and 91 deletions

View File

@ -1,56 +0,0 @@
From bc02b2528c97eab0961b3ad608a4914d3ce4b46c Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Tue, 4 May 2021 22:22:53 +0200
Subject: [PATCH] PreviewJob: Create a larger SHM when necessary
It's possible that during the lifetime of a PreviewJob thumbnails with
different sizes are created. The SHM was created to match the size of the first
(non-empty) thumbnail, so any larger ones after that would reuse the SHM with
insufficient size.
BUG: 430862
---
src/widgets/previewjob.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
index d30f71cf..4f71c1c7 100644
--- a/src/widgets/previewjob.cpp
+++ b/src/widgets/previewjob.cpp
@@ -136,6 +136,8 @@ public:
int shmid;
// And the data area
uchar *shmaddr;
+ // Size of the shm segment
+ size_t shmsize;
// Root of thumbnail cache
QString thumbRoot;
// List of encrypted mount points for checking if we should save thumbnail
@@ -733,17 +735,19 @@ void PreviewJobPrivate::createThumbnail(const QString &pixPath)
}
#if WITH_SHM
- if (shmid == -1) {
+ size_t requiredSize = thumb_width * devicePixelRatio * thumb_height * devicePixelRatio * 4;
+ if (shmid == -1 || shmsize < requiredSize) {
if (shmaddr) {
// clean previous shared memory segment
shmdt((char *)shmaddr);
- shmctl(shmid, IPC_RMID, nullptr);
shmaddr = nullptr;
+ shmctl(shmid, IPC_RMID, nullptr);
+ shmid = -1;
}
- auto size = thumb_width * thumb_height;
- if (size > 0) {
- shmid = shmget(IPC_PRIVATE, size * 4 * devicePixelRatio * devicePixelRatio, IPC_CREAT | 0600);
+ if (requiredSize > 0) {
+ shmid = shmget(IPC_PRIVATE, requiredSize, IPC_CREAT | 0600);
if (shmid != -1) {
+ shmsize = requiredSize;
shmaddr = (uchar *)(shmat(shmid, nullptr, SHM_RDONLY));
if (shmaddr == (uchar *)-1) {
shmctl(shmid, IPC_RMID, nullptr);
--
2.25.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c62bae911978d163bbb86648344708d5b963823244941de0904c2a7800ecc07e
size 3319696

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEU+a0e0XOo+DVt0V3WNDuZIpIs7sFAmBprWoACgkQWNDuZIpI
s7vfDAf/WQQlC4vXkwI+8yVgzRcbW0Qpy489rEZB7CEpwyTKK/cnHOQ1AjO9Fgjg
SdmLQcVpOF4M2/vd3iXmI1cptIF36hHMjBwq9sXZGKfSxERXjU6xsCgDWJzB/bXA
/HALa2sTyUQyFMsrZIzhm/eWy3KWMd/L13xGBaEadZI67jR1Ogoeu5sYJbrlV1Fh
aCLFbDwYlLqZi8NuTjawU4DgWBRd2mI6t40rsFqHbqrRHoAGIUwuDQrqItKiQnIr
kRH3goxqC6A9hXFdMv4h74nSz0rKPhAUEHmEDAAmfGPplq6ZEOdDKOvI0ASDbLRv
WZzBh6fZrbLr+HcDi/y5b/VufN2L1A==
=GuIF
-----END PGP SIGNATURE-----

3
kio-5.82.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb970d0550054fd0bb0957de010b9ea73b2d89e8df725c0d8344320e82473144
size 3330028

11
kio-5.82.0.tar.xz.sig Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEU+a0e0XOo+DVt0V3WNDuZIpIs7sFAmCULJcACgkQWNDuZIpI
s7vHogf/bHYyqsRzdDBxqWWRo5/XPV0E1+mNXAHlKR9xDfELLmMtc6S47GGTPOiR
wSFUhPtxE+9ORk3/OUTqRkyMIxjXq9bCrlQbLcPGgyGwXqjVQ9f8xL0pI7L72/4h
pOfRVPU4Un5WJTtcWr+e1vjckXpH8K6Zxw/ZU9145/XAY33Q2D8daqS/KMhRa6ut
UZIzzN6qIS7i51kwZTScbVX3PMfMr/fzMs2slAGQVpn9zgDN1uCwxoaD1I/4tubi
Zph+I+qZfGKJ0b57dZMpBYfUaGKxqZ5lTElCVJ3Hq+41G7U9htAVUz8IrPdmjt8B
GW6X+6wBeQlRQrTiOJzHgBpjfCgFYw==
=+8we
-----END PGP SIGNATURE-----

View File

@ -1,9 +1,27 @@
-------------------------------------------------------------------
Thu May 6 18:12:12 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Drop 0001-PreviewJob-Create-a-larger-SHM-when-necessary.patch.
Merged in kio 5.82.
-------------------------------------------------------------------
Tue May 4 20:28:31 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix thumnail creation in certain conditions (kde#430862):
* 0001-PreviewJob-Create-a-larger-SHM-when-necessary.patch
-------------------------------------------------------------------
Sat May 1 16:40:59 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 5.82.0
* New feature release
* For more details please see:
* https://kde.org/announcements/frameworks/5/5.82.0
- Too many changes since 5.81.0, only listing bugfixes:
* Make the openOrExecute dialog modal (kde#430396)
* KDirOperator: show the progress bar above the horizontal scrollbar
(kde#194017)
-------------------------------------------------------------------
Mon Apr 5 07:12:32 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -16,14 +16,14 @@
#
%define _tar_path 5.81
%define _tar_path 5.82
# Full KF5 version (e.g. 5.33.0)
%{!?_kf5_version: %global _kf5_version %{version}}
# Last major and minor KF5 version (e.g. 5.33)
%{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
%bcond_without lang
Name: kio
Version: 5.81.0
Version: 5.82.0
Release: 0
Summary: Network transparent access to files and data
License: LGPL-2.1-or-later
@ -37,8 +37,6 @@ Source2: frameworks.keyring
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5
Patch0: kio_help-fallback-to-kde4-docs.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-PreviewJob-Create-a-larger-SHM-when-necessary.patch
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
BuildRequires: fdupes
BuildRequires: kf5-filesystem
@ -67,16 +65,16 @@ BuildRequires: cmake(KF5Wallet) >= %{_kf5_bugfix_version}
BuildRequires: cmake(KF5WidgetsAddons) >= %{_kf5_bugfix_version}
BuildRequires: cmake(KF5WindowSystem) >= %{_kf5_bugfix_version}
BuildRequires: cmake(KF5XmlGui) >= %{_kf5_bugfix_version}
BuildRequires: cmake(Qt5Concurrent) >= 5.14.0
BuildRequires: cmake(Qt5Core) >= 5.14.0
BuildRequires: cmake(Qt5DBus) >= 5.14.0
BuildRequires: cmake(Qt5Network) >= 5.14.0
BuildRequires: cmake(Qt5Qml) >= 5.14.0
BuildRequires: cmake(Qt5Test) >= 5.14.0
BuildRequires: cmake(Qt5UiPlugin) >= 5.14.0
BuildRequires: cmake(Qt5Widgets) >= 5.14.0
BuildRequires: cmake(Qt5X11Extras) >= 5.14.0
BuildRequires: cmake(Qt5Xml) >= 5.14.0
BuildRequires: cmake(Qt5Concurrent) >= 5.15.0
BuildRequires: cmake(Qt5Core) >= 5.15.0
BuildRequires: cmake(Qt5DBus) >= 5.15.0
BuildRequires: cmake(Qt5Network) >= 5.15.0
BuildRequires: cmake(Qt5Qml) >= 5.15.0
BuildRequires: cmake(Qt5Test) >= 5.15.0
BuildRequires: cmake(Qt5UiPlugin) >= 5.15.0
BuildRequires: cmake(Qt5Widgets) >= 5.15.0
BuildRequires: cmake(Qt5X11Extras) >= 5.15.0
BuildRequires: cmake(Qt5Xml) >= 5.15.0
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(x11)
Requires: %{name}-core = %{version}
@ -121,9 +119,9 @@ Requires: cmake(KF5Service) >= %{_kf5_bugfix_version}
Requires: cmake(KF5Solid) >= %{_kf5_bugfix_version}
Requires: cmake(KF5WindowSystem) >= %{_kf5_bugfix_version}
Requires: cmake(KF5XmlGui) >= %{_kf5_bugfix_version}
Requires: cmake(Qt5Concurrent) >= 5.14.0
Requires: cmake(Qt5DBus) >= 5.14.0
Requires: cmake(Qt5Network) >= 5.14.0
Requires: cmake(Qt5Concurrent) >= 5.15.0
Requires: cmake(Qt5DBus) >= 5.15.0
Requires: cmake(Qt5Network) >= 5.15.0
%description devel
This framework implements almost all the file management functions you