public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Quentin Retornaz" <gentoo@retornaz.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/, dev-qt/qtnetwork/files/
Date: Wed, 27 Jan 2021 22:31:58 +0000 (UTC)	[thread overview]
Message-ID: <1611786644.21ac3653f78ef5484fd9e029e93de3e90889780a.quentin@gentoo> (raw)

commit:     21ac3653f78ef5484fd9e029e93de3e90889780a
Author:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Wed Jan 27 22:30:44 2021 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Wed Jan 27 22:30:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=21ac3653

dev-qt/qtnetwork: revbump to 5.15.2-r1

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 dev-qt/qtnetwork/Manifest                          |  1 +
 ...work-5.15.2-QNetworkAccessManager-memleak.patch | 41 +++++++++++
 dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild        | 82 ++++++++++++++++++++++
 3 files changed, 124 insertions(+)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 8d47df5..c298c0a 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1 +1,2 @@
+DIST qtbase-5.15.2-gcc11.patch.xz 1208 BLAKE2B a2e5764b723adda991eca5b84cf8e15437a4832febd12e3c93cdc394931af666e17c01e229e9be7e0efc446a955cc26388c0f93cadfcabd93cc6b6f03bb41eb0 SHA512 da3a41ea5d9573a029946d26b26d51d6dce9c8b91db6d78ca71d8343d3ceb5010d21750dcb45abb663e227b5f068985ff4ed51da07efd17c64cc8dd5aef8f3e4
 DIST qtbase-everywhere-src-5.15.2.tar.xz 50179672 BLAKE2B 0e4bdaab43cf59664bde89f87ea260c39acc2ef866d8629d41d9c326cab0ab68bcd943c86a472ae74bc9fb0b7ad50795ccb66275bb6b77d1fcf0a38b5662cb42 SHA512 a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9

diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch
new file mode 100644
index 0000000..be2c1f6
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch
@@ -0,0 +1,41 @@
+From 0807f16eb407eaf8a5b34b67602d0a97778d945d Mon Sep 17 00:00:00 2001
+From: =?utf8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
+Date: Fri, 6 Nov 2020 12:51:42 +0100
+Subject: [PATCH] QNAM: Work around QObject finicky orphan cleanup details
+
+Details described in a comment.
+
+Task-number: QTBUG-88063
+Change-Id: I763ecfedf518de97615e04a8eaae0fe1fd784f52
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
+(cherry picked from commit 1c6d6cbb62c5e93cbcad2d740c3b0ed01095618c)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/network/access/qnetworkreplyhttpimpl.cpp | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
+index 21916f53f15..727c1a0316d 100644
+--- a/src/network/access/qnetworkreplyhttpimpl.cpp
++++ b/src/network/access/qnetworkreplyhttpimpl.cpp
+@@ -808,7 +808,17 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
+ 
+     // For the synchronous HTTP, this is the normal way the delegate gets deleted
+     // For the asynchronous HTTP this is a safety measure, the delegate deletes itself when HTTP is finished
+-    QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
++    QMetaObject::Connection threadFinishedConnection =
++            QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
++
++    // QTBUG-88063: When 'delegate' is deleted the connection will be added to 'thread''s orphaned
++    // connections list. This orphaned list will be cleaned up next time 'thread' emits a signal,
++    // unfortunately that's the finished signal. It leads to a soft-leak so we do this to disconnect
++    // it on deletion so that it cleans up the orphan immediately.
++    QObject::connect(delegate, &QObject::destroyed, delegate, [threadFinishedConnection]() {
++        if (bool(threadFinishedConnection))
++            QObject::disconnect(threadFinishedConnection);
++    });
+ 
+     // Set the properties it needs
+     delegate->httpRequest = httpRequest;
+-- 
+2.16.3

diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild
new file mode 100644
index 0000000..cc9144c
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/qtbase-${PV}-gcc11.patch.xz"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86"
+fi
+
+IUSE="bindist connman gssapi libressl libproxy networkmanager sctp +ssl"
+
+DEPEND="
+	~dev-qt/qtcore-${PV}:5=
+	sys-libs/zlib:=
+	connman? ( ~dev-qt/qtdbus-${PV} )
+	gssapi? ( virtual/krb5 )
+	libproxy? ( net-libs/libproxy )
+	networkmanager? ( ~dev-qt/qtdbus-${PV} )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	ssl? (
+		!libressl? ( >=dev-libs/openssl-1.1.1:0=[bindist=] )
+		libressl? ( dev-libs/libressl:0= )
+	)
+"
+RDEPEND="${DEPEND}
+	connman? ( net-misc/connman )
+	networkmanager? ( net-misc/networkmanager )
+"
+
+QT5_TARGET_SUBDIRS=(
+	src/network
+	src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+	libproxy:libproxy:
+	ssl::SSL
+	ssl::OPENSSL
+	ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+	:network
+)
+
+PATCHES=(
+	"${FILESDIR}"/${P}-QNetworkAccessManager-memleak.patch # QTBUG-88063
+	"${FILESDIR}"/${PN}-5.15.2-libressl.patch # Bug 562050, not upstreamable
+	"${WORKDIR}"/qtbase-${PV}-gcc11.patch # bug 752012
+)
+
+pkg_setup() {
+	use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+	use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+	local myconf=(
+		$(usex connman -dbus-linked '')
+		$(usex gssapi -feature-gssapi -no-feature-gssapi)
+		$(qt_use libproxy)
+		$(usex networkmanager -dbus-linked '')
+		$(qt_use sctp)
+		$(usex ssl -openssl-linked '')
+	)
+	qt5-build_src_configure
+}
+
+src_install() {
+	qt5-build_src_install
+	# workaround for bug 652650
+	if use ssl; then
+		sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+			-i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+	fi
+}


             reply	other threads:[~2021-01-27 22:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 22:31 Quentin Retornaz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-29 14:50 [gentoo-commits] repo/proj/libressl:master commit in: dev-qt/qtnetwork/, dev-qt/qtnetwork/files/ orbea
2024-07-19  3:40 orbea
2024-06-28 21:14 orbea
2023-07-14 19:29 orbea
2023-05-24 18:06 orbea
2023-05-23 13:16 orbea
2023-01-14 23:23 Quentin Retornaz
2022-06-26  2:24 Quentin Retornaz
2021-11-06 18:16 Quentin Retornaz
2021-10-02 22:19 Quentin Retornaz
2021-10-02 22:09 Quentin Retornaz
2020-07-16  7:58 Stefan Strogin
2019-07-20  0:19 Stefan Strogin
2019-07-20  0:19 Stefan Strogin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1611786644.21ac3653f78ef5484fd9e029e93de3e90889780a.quentin@gentoo \
    --to=gentoo@retornaz.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox