public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kpipewire/, kde-plasma/kpipewire/files/
@ 2024-09-02 20:13 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2024-09-02 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c030d1c36dc9744564649cadfd55c3cb4085f680
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  2 19:34:36 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep  2 20:13:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c030d1c3

kde-plasma/kpipewire: Backport segfault/crash fixes from 6.1.5

See also:
https://invent.kde.org/plasma/kpipewire/-/merge_requests/162
https://invent.kde.org/plasma/kpipewire/-/merge_requests/167

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kpipewire-6.1.4-avoid-segfault.patch     | 42 +++++++++++++++++
 ...kpipewire-6.1.4-dont-process-null-streams.patch | 39 ++++++++++++++++
 kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild     | 52 ++++++++++++++++++++++
 3 files changed, 133 insertions(+)

diff --git a/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch b/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch
new file mode 100644
index 000000000000..eb4fa8b4f447
--- /dev/null
+++ b/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch
@@ -0,0 +1,42 @@
+From 32628055172430a5b06a3ec5724d774290e86fd6 Mon Sep 17 00:00:00 2001
+From: Akseli Lahtinen <akselmo@akselmo.dev>
+Date: Mon, 12 Aug 2024 08:20:50 +0000
+Subject: [PATCH] pipewireproduce.cpp: Add guard to m_stream
+
+After multiple consecutive KRDP sessions,
+m_stream can be null, so add a guard to it to avoid segfault.
+
+
+(cherry picked from commit c9c8c1a7410463c98bab1d9b47abb71a80804258)
+
+96dc2be6 pipewireproduce.cpp: Add guard to m_stream
+a3afdd53 Destroy queued connection if no m_stream or m_encoder is found
+6de6cb8f Simplify code
+
+Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>
+---
+ src/pipewireproduce.cpp | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/pipewireproduce.cpp b/src/pipewireproduce.cpp
+index 8fbf366..8bdcb91 100644
+--- a/src/pipewireproduce.cpp
++++ b/src/pipewireproduce.cpp
+@@ -152,9 +152,11 @@ void PipeWireProduce::deactivate()
+ {
+     m_deactivated = true;
+ 
+-    auto streamState = m_stream->state();
+-
+-    m_stream->setActive(false);
++    auto streamState = PW_STREAM_STATE_PAUSED;
++    if (m_stream) {
++        streamState = m_stream->state();
++        m_stream->setActive(false);
++    }
+ 
+     // If we have not been initialized properly before, ensure we still run any
+     // cleanup code and exit the thread, otherwise we risk applications not closing
+-- 
+GitLab
+

diff --git a/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch b/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch
new file mode 100644
index 000000000000..d04b15ef5e76
--- /dev/null
+++ b/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch
@@ -0,0 +1,39 @@
+From dd08a7afd5957d8ae74cd0d1cb07d6e0f755ae9a Mon Sep 17 00:00:00 2001
+From: Aleix Pol Gonzalez <aleixpol@kde.org>
+Date: Mon, 19 Aug 2024 10:13:01 +0000
+Subject: [PATCH] sourcestream: Do not process null streams
+
+We have a callback that tells us that a stream has been destroyed and so
+we clean it up. Now we shouldn't process streams after this happened,
+otherwise we crash.
+
+
+(cherry picked from commit b526691684b004ff12fe52d8d86f77c21dedc996)
+
+Co-authored-by: Aleix Pol <aleixpol@kde.org>
+---
+ src/pipewiresourcestream.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/pipewiresourcestream.cpp b/src/pipewiresourcestream.cpp
+index f4fc63e..6f8242a 100644
+--- a/src/pipewiresourcestream.cpp
++++ b/src/pipewiresourcestream.cpp
+@@ -685,6 +685,14 @@ void PipeWireSourceStream::coreFailed(const QString &errorMessage)
+ 
+ void PipeWireSourceStream::process()
+ {
++#if !PW_CHECK_VERSION(0, 3, 73)
++    if (Q_UNLIKELY(!d->pwStream)) {
++        // Assuming it's caused by https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3314
++        qCDebug(PIPEWIRE_LOGGING) << "stream was terminated before processing buffer";
++        return;
++    }
++#endif
++
+     pw_buffer *buf = pw_stream_dequeue_buffer(d->pwStream);
+     if (!buf) {
+         qCDebug(PIPEWIRE_LOGGING) << "out of buffers";
+-- 
+GitLab
+

diff --git a/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild b/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild
new file mode 100644
index 000000000000..90d1d97139cd
--- /dev/null
+++ b/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+PVCUT=$(ver_cut 1-3)
+KFMIN=6.5.0
+QTMIN=6.7.2
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Components relating to Flatpak pipewire use in Plasma"
+
+LICENSE="LGPL-2.1+"
+SLOT="6"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+RESTRICT="test" # bug 926511, fixed in 6.2
+
+COMMON_DEPEND="
+	>=dev-qt/qtbase-${QTMIN}:6[dbus,gui]
+	>=dev-qt/qtdeclarative-${QTMIN}:6
+	>=kde-frameworks/kcoreaddons-${KFMIN}:6
+	>=kde-frameworks/ki18n-${KFMIN}:6
+	media-libs/libepoxy
+	media-libs/libglvnd
+	media-libs/libva:=
+	media-libs/mesa[opengl]
+	media-video/ffmpeg:=
+	>=media-video/pipewire-0.3:=
+	x11-libs/libdrm
+"
+DEPEND="${COMMON_DEPEND}
+	test? (
+		dev-libs/plasma-wayland-protocols
+		dev-libs/wayland
+		>=dev-qt/qtwayland-${QTMIN}:6
+		>=kde-plasma/kwayland-${PVCUT}:6
+		media-video/pipewire[extra]
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	>=kde-frameworks/kirigami-${KFMIN}:6
+	x11-themes/sound-theme-freedesktop
+"
+BDEPEND="test? ( >=dev-qt/qtwayland-${QTMIN}:6 )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-avoid-segfault.patch"
+	"${FILESDIR}/${P}-dont-process-null-streams"
+)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kpipewire/, kde-plasma/kpipewire/files/
@ 2024-09-10 17:58 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2024-09-10 17:58 UTC (permalink / raw
  To: gentoo-commits

commit:     385f7af14497fe5a382afb5d52d22c43f6d3b1d2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 10 17:37:28 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 10 17:58:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=385f7af1

kde-plasma/kpipewire: drop 6.1.4-r2

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kpipewire-6.1.4-avoid-segfault.patch     | 42 -----------------
 ...kpipewire-6.1.4-dont-process-null-streams.patch | 39 ----------------
 kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild     | 52 ----------------------
 3 files changed, 133 deletions(-)

diff --git a/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch b/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch
deleted file mode 100644
index eb4fa8b4f447..000000000000
--- a/kde-plasma/kpipewire/files/kpipewire-6.1.4-avoid-segfault.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 32628055172430a5b06a3ec5724d774290e86fd6 Mon Sep 17 00:00:00 2001
-From: Akseli Lahtinen <akselmo@akselmo.dev>
-Date: Mon, 12 Aug 2024 08:20:50 +0000
-Subject: [PATCH] pipewireproduce.cpp: Add guard to m_stream
-
-After multiple consecutive KRDP sessions,
-m_stream can be null, so add a guard to it to avoid segfault.
-
-
-(cherry picked from commit c9c8c1a7410463c98bab1d9b47abb71a80804258)
-
-96dc2be6 pipewireproduce.cpp: Add guard to m_stream
-a3afdd53 Destroy queued connection if no m_stream or m_encoder is found
-6de6cb8f Simplify code
-
-Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>
----
- src/pipewireproduce.cpp | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/pipewireproduce.cpp b/src/pipewireproduce.cpp
-index 8fbf366..8bdcb91 100644
---- a/src/pipewireproduce.cpp
-+++ b/src/pipewireproduce.cpp
-@@ -152,9 +152,11 @@ void PipeWireProduce::deactivate()
- {
-     m_deactivated = true;
- 
--    auto streamState = m_stream->state();
--
--    m_stream->setActive(false);
-+    auto streamState = PW_STREAM_STATE_PAUSED;
-+    if (m_stream) {
-+        streamState = m_stream->state();
-+        m_stream->setActive(false);
-+    }
- 
-     // If we have not been initialized properly before, ensure we still run any
-     // cleanup code and exit the thread, otherwise we risk applications not closing
--- 
-GitLab
-

diff --git a/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch b/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch
deleted file mode 100644
index d04b15ef5e76..000000000000
--- a/kde-plasma/kpipewire/files/kpipewire-6.1.4-dont-process-null-streams.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From dd08a7afd5957d8ae74cd0d1cb07d6e0f755ae9a Mon Sep 17 00:00:00 2001
-From: Aleix Pol Gonzalez <aleixpol@kde.org>
-Date: Mon, 19 Aug 2024 10:13:01 +0000
-Subject: [PATCH] sourcestream: Do not process null streams
-
-We have a callback that tells us that a stream has been destroyed and so
-we clean it up. Now we shouldn't process streams after this happened,
-otherwise we crash.
-
-
-(cherry picked from commit b526691684b004ff12fe52d8d86f77c21dedc996)
-
-Co-authored-by: Aleix Pol <aleixpol@kde.org>
----
- src/pipewiresourcestream.cpp | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/pipewiresourcestream.cpp b/src/pipewiresourcestream.cpp
-index f4fc63e..6f8242a 100644
---- a/src/pipewiresourcestream.cpp
-+++ b/src/pipewiresourcestream.cpp
-@@ -685,6 +685,14 @@ void PipeWireSourceStream::coreFailed(const QString &errorMessage)
- 
- void PipeWireSourceStream::process()
- {
-+#if !PW_CHECK_VERSION(0, 3, 73)
-+    if (Q_UNLIKELY(!d->pwStream)) {
-+        // Assuming it's caused by https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3314
-+        qCDebug(PIPEWIRE_LOGGING) << "stream was terminated before processing buffer";
-+        return;
-+    }
-+#endif
-+
-     pw_buffer *buf = pw_stream_dequeue_buffer(d->pwStream);
-     if (!buf) {
-         qCDebug(PIPEWIRE_LOGGING) << "out of buffers";
--- 
-GitLab
-

diff --git a/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild b/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild
deleted file mode 100644
index defd0cee287e..000000000000
--- a/kde-plasma/kpipewire/kpipewire-6.1.4-r2.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_TEST="true"
-PVCUT=$(ver_cut 1-3)
-KFMIN=6.5.0
-QTMIN=6.7.2
-inherit ecm plasma.kde.org
-
-DESCRIPTION="Components relating to Flatpak pipewire use in Plasma"
-
-LICENSE="LGPL-2.1+"
-SLOT="6"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
-IUSE=""
-
-RESTRICT="test" # bug 926511, fixed in 6.2
-
-COMMON_DEPEND="
-	>=dev-qt/qtbase-${QTMIN}:6[dbus,gui]
-	>=dev-qt/qtdeclarative-${QTMIN}:6
-	>=kde-frameworks/kcoreaddons-${KFMIN}:6
-	>=kde-frameworks/ki18n-${KFMIN}:6
-	media-libs/libepoxy
-	media-libs/libglvnd
-	media-libs/libva:=
-	media-libs/mesa[opengl]
-	media-video/ffmpeg:=
-	>=media-video/pipewire-0.3:=
-	x11-libs/libdrm
-"
-DEPEND="${COMMON_DEPEND}
-	test? (
-		dev-libs/plasma-wayland-protocols
-		dev-libs/wayland
-		>=dev-qt/qtwayland-${QTMIN}:6
-		>=kde-plasma/kwayland-${PVCUT}:6
-		media-video/pipewire[extra]
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	>=kde-frameworks/kirigami-${KFMIN}:6
-	x11-themes/sound-theme-freedesktop
-"
-BDEPEND="test? ( >=dev-qt/qtwayland-${QTMIN}:6 )"
-
-PATCHES=(
-	"${FILESDIR}/${P}-avoid-segfault.patch"
-	"${FILESDIR}/${P}-dont-process-null-streams.patch"
-)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kpipewire/, kde-plasma/kpipewire/files/
@ 2025-05-15 15:35 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2025-05-15 15:35 UTC (permalink / raw
  To: gentoo-commits

commit:     c3fe3b1e90f1d1223450bbe5b25f413c72c88478
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 15 07:28:30 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu May 15 15:34:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3fe3b1e

kde-plasma/kpipewire: Fix build with Qt 6.10

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kpipewire/files/kpipewire-6.3.5-qt-6.10.patch  | 76 ++++++++++++++++++++++
 kde-plasma/kpipewire/kpipewire-6.3.5.ebuild        |  2 +
 2 files changed, 78 insertions(+)

diff --git a/kde-plasma/kpipewire/files/kpipewire-6.3.5-qt-6.10.patch b/kde-plasma/kpipewire/files/kpipewire-6.3.5-qt-6.10.patch
new file mode 100644
index 000000000000..0d4b61f6a472
--- /dev/null
+++ b/kde-plasma/kpipewire/files/kpipewire-6.3.5-qt-6.10.patch
@@ -0,0 +1,76 @@
+From 8d23762cc1a87eaf2b6ef4838ee426ac93d86641 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Wed, 29 Jan 2025 15:29:26 +0100
+Subject: [PATCH] Fix build with Qt 6.10
+
+The private parts have been extracted into a separate CMake config file, which we need to search for now
+
+See https://bugreports.qt.io/browse/QTBUG-87776
+
+Also remove some unneeded private usage
+
+(cherry picked from commit 6f229e2deb990cba775b2337e8c3c10347a772b7)
+---
+ CMakeLists.txt         | 5 +++++
+ src/CMakeLists.txt     | 2 +-
+ src/pipewirerecord.cpp | 1 -
+ tests/CMakeLists.txt   | 2 +-
+ 4 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 312ee91..90747a1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,6 +13,11 @@ include(ECMQtDeclareLoggingCategory)
+ include(ECMDeprecationSettings)
+ 
+ find_package(Qt6 REQUIRED COMPONENTS DBus Quick)
++
++if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
++    find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
++endif()
++
+ find_package(KF6 REQUIRED COMPONENTS I18n CoreAddons)
+ 
+ find_package(EGL REQUIRED)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 10d1a11..05a395b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -144,7 +144,7 @@ add_library(KPipeWireRecord ${kpipewirerecord_SRCS}
+ target_link_libraries(KPipeWireRecord PUBLIC KPipeWire
+     PRIVATE Qt::Core Qt::Gui KF6::CoreAddons KPipeWireDmaBuf
+     PkgConfig::AVCodec PkgConfig::AVUtil PkgConfig::AVFormat PkgConfig::AVFilter PkgConfig::GBM PkgConfig::SWScale
+-    epoxy::epoxy Libdrm::Libdrm Qt::GuiPrivate
++    epoxy::epoxy Libdrm::Libdrm
+ )
+ 
+ ecm_generate_headers(KPipeWireRecord_HEADERS
+diff --git a/src/pipewirerecord.cpp b/src/pipewirerecord.cpp
+index b8cd042..7293b57 100644
+--- a/src/pipewirerecord.cpp
++++ b/src/pipewirerecord.cpp
+@@ -13,7 +13,6 @@
+ #include <QGuiApplication>
+ #include <QImage>
+ #include <QPainter>
+-#include <qpa/qplatformnativeinterface.h>
+ 
+ #include <KShell>
+ 
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 8b10222..35ed9b6 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -40,7 +40,7 @@ qt_add_dbus_interface(
+ )
+ 
+ add_executable(xdp-recordme xdp-main.cpp recordme.qrc ${XDP_SRCS} RecordMe.cpp)
+-target_link_libraries(xdp-recordme Qt::DBus Qt::Quick KPipeWire Qt::GuiPrivate Wayland::Client Qt::WaylandClient )
++target_link_libraries(xdp-recordme Qt::DBus Qt::Quick KPipeWire Wayland::Client Qt::WaylandClient )
+ 
+ option(INSTALL_TESTS "The recordme test needs installing, disabled by default for convenience" OFF)
+ if(INSTALL_TESTS)
+-- 
+GitLab
+

diff --git a/kde-plasma/kpipewire/kpipewire-6.3.5.ebuild b/kde-plasma/kpipewire/kpipewire-6.3.5.ebuild
index 6220e3b642f3..127fa39cf48a 100644
--- a/kde-plasma/kpipewire/kpipewire-6.3.5.ebuild
+++ b/kde-plasma/kpipewire/kpipewire-6.3.5.ebuild
@@ -41,3 +41,5 @@ RDEPEND="${COMMON_DEPEND}
 	>=kde-frameworks/kirigami-${KFMIN}:6
 "
 BDEPEND="test? ( >=dev-qt/qtwayland-${QTMIN}:6 )"
+
+PATCHES=( "${FILESDIR}/${P}-qt-6.10.patch" )


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-15 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 20:13 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kpipewire/, kde-plasma/kpipewire/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-09-10 17:58 Andreas Sturmlechner
2025-05-15 15:35 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox