public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-03-02 19:18 Mike Gilbert
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Gilbert @ 2023-03-02 19:18 UTC (permalink / raw
  To: gentoo-commits

commit:     32189d086ac2495b35ea6ed5547b584b731e8532
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  2 16:36:53 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar  2 19:18:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32189d08

dev-qt/qtbase: apply patch for -march compat

Upstream expects people to use specific -march values, but that just causes
problems for Gentoo users. Remove the offending check.

Bug: https://bugs.gentoo.org/898644
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6-march.patch | 46 ++++++++++++++++++++++++++++++++
 dev-qt/qtbase/qtbase-6.4.2.ebuild        |  4 +++
 2 files changed, 50 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6-march.patch b/dev-qt/qtbase/files/qtbase-6-march.patch
new file mode 100644
index 000000000000..2c5cb0a010cb
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6-march.patch
@@ -0,0 +1,46 @@
+https://bugreports.qt.io/browse/QTBUG-111698
+https://bugs.gentoo.org/898644
+
+From 5fe96c901cd1ecd3e53acedeb97efd38b6af49a4 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Wed, 1 Mar 2023 21:31:22 -0500
+Subject: [PATCH] Don't error on partial support for x86-64 v3/v4
+
+Bug: https://bugs.gentoo.org/898644
+---
+ src/corelib/global/qsimd_p.h | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h
+index 1d12902a0a..1449d75d5c 100644
+--- a/src/corelib/global/qsimd_p.h
++++ b/src/corelib/global/qsimd_p.h
+@@ -227,11 +227,7 @@ asm(
+ // macOS's fat binaries support the "x86_64h" sub-architecture and the GNU libc
+ // ELF loader also supports a "haswell/" subdir (e.g., /usr/lib/haswell).
+ #  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI2__ + __FMA__ + __LZCNT__)
+-#  if ARCH_HASWELL_MACROS != 0
+-#    if ARCH_HASWELL_MACROS != 4
+-#      error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
+-#    endif
+-static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which features are missing.");
++#  if ARCH_HASWELL_MACROS == 4
+ #    define __haswell__       1
+ #  endif
+ #  undef ARCH_HASWELL_MACROS
+@@ -243,11 +239,7 @@ static_assert(ARCH_HASWELL_MACROS, "Undeclared identifiers indicate which featur
+ // with AVX512 support and it includes all of these too.
+ //
+ #  define ARCH_SKX_MACROS           (__AVX512F__ + __AVX512BW__ + __AVX512CD__ + __AVX512DQ__ + __AVX512VL__)
+-#  if ARCH_SKX_MACROS != 0
+-#    if ARCH_SKX_MACROS != 5
+-#      error "Please enable all x86-64-v4 extensions; you probably want to use -march=skylake-avx512 or -march=x86-64-v4 instead of -mavx512f"
+-#    endif
+-static_assert(ARCH_SKX_MACROS, "Undeclared identifiers indicate which features are missing.");
++#  if ARCH_SKX_MACROS == 5
+ #    define __skylake_avx512__  1
+ #  endif
+ #  undef ARCH_SKX_MACROS
+-- 
+2.39.2
+

diff --git a/dev-qt/qtbase/qtbase-6.4.2.ebuild b/dev-qt/qtbase/qtbase-6.4.2.ebuild
index 589a3d13aacf..c6545a5f1a0c 100644
--- a/dev-qt/qtbase/qtbase-6.4.2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.4.2.ebuild
@@ -102,6 +102,10 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/qtbase-6-march.patch"
+)
+
 src_configure() {
 	local mycmakeargs=(
 		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-05-24  6:52 Jimi Huotari
  0 siblings, 0 replies; 20+ messages in thread
From: Jimi Huotari @ 2023-05-24  6:52 UTC (permalink / raw
  To: gentoo-commits

commit:     4c3e28351aba00d13ba92a26a23bc51bca630d7d
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Wed May 24 06:43:38 2023 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Wed May 24 06:52:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c3e2835

dev-qt/qtbase: add patch for CVE-2023-32762

See also: https://www.qt.io/blog/security-advisory-qt-network

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 .../qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch |  54 ++++++
 dev-qt/qtbase/qtbase-6.5.0-r2.ebuild               | 192 +++++++++++++++++++++
 2 files changed, 246 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
new file mode 100644
index 000000000000..3574706fcd85
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
@@ -0,0 +1,54 @@
+From eae7c36d681acfb82572b56e24bbb2cd42242e57 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
+Date: Fri, 5 May 2023 11:07:26 +0200
+Subject: [PATCH] Hsts: match header names case insensitively
+
+Header field names are always considered to be case-insensitive.
+
+Fixes: QTBUG-113392
+Change-Id: Ifb4def4bb7f2ac070416cdc76581a769f1e52b43
+Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
+Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
+Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
+(cherry picked from commit 1b736a815be0222f4b24289cf17575fc15707305)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/network/access/qhsts.cpp                 | 4 ++--
+ tests/auto/network/access/hsts/tst_qhsts.cpp | 6 ++++++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
+index 39905f354807..82deede17298 100644
+--- a/src/network/access/qhsts.cpp
++++ b/src/network/access/qhsts.cpp
+@@ -327,8 +327,8 @@ quoted-pair    = "\" CHAR
+ bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
+ {
+     for (const auto &h : headers) {
+-        // We use '==' since header name was already 'trimmed' for us:
+-        if (h.first == "Strict-Transport-Security") {
++        // We compare directly because header name was already 'trimmed' for us:
++        if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
+             header = h.second;
+             // RFC6797, 8.1:
+             //
+diff --git a/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
+index 252f5e8f5792..97a2d2889e57 100644
+--- a/tests/auto/network/access/hsts/tst_qhsts.cpp
++++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
+@@ -216,6 +216,12 @@ void tst_QHsts::testSTSHeaderParser()
+     QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
+     QVERIFY(parser.includeSubDomains());
+ 
++    list.pop_back();
++    list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
++    QVERIFY(parser.parse(list));
++    QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
++    QVERIFY(parser.includeSubDomains());
++
+     list.pop_back();
+     // Invalid (includeSubDomains twice):
+     list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
+-- 
+2.16.3
+

diff --git a/dev-qt/qtbase/qtbase-6.5.0-r2.ebuild b/dev-qt/qtbase/qtbase-6.5.0-r2.ebuild
new file mode 100644
index 000000000000..afcd30dfe9f6
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.5.0-r2.ebuild
@@ -0,0 +1,192 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt6-build
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64"
+fi
+
+# Qt Modules
+IUSE="+concurrent +dbus +gui +network +sql opengl +widgets +xml zstd"
+REQUIRED_USE="
+	opengl? ( gui )
+	widgets? ( gui )
+	X? ( || ( evdev libinput ) )
+"
+
+QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
+QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
+QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
+IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev"
+# QtPrintSupport = QtGui + QtWidgets enabled.
+# ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
+REQUIRED_USE+="
+	$(printf '%s? ( gui ) ' ${QTGUI_IUSE//+/})
+	$(printf '%s? ( network ) ' ${QTNETWORK_IUSE//+/})
+	$(printf '%s? ( sql ) ' ${QTSQL_IUSE//+/})
+	accessibility? ( dbus X )
+	cups? ( gui widgets )
+	eglfs? ( egl )
+	gtk? ( widgets )
+	gui? ( || ( eglfs X ) || ( libinput X ) )
+	libinput? ( udev )
+	sql? ( || ( freetds mysql oci8 odbc postgres sqlite ) )
+	vnc? ( gui )
+	X? ( gles2-only? ( egl ) )
+"
+
+# TODO:
+# qtimageformats: mng not done yet, qtimageformats.git upstream commit 9443239c
+# qtnetwork: connman, networkmanager
+DEPEND="
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode]
+	dev-util/gtk-update-icon-cache
+	media-libs/fontconfig
+	>=media-libs/freetype-2.6.1:2
+	>=media-libs/harfbuzz-1.6.0:=
+	media-libs/tiff:=
+	>=sys-apps/dbus-1.4.20
+	sys-libs/zlib:=
+	brotli? ( app-arch/brotli:= )
+	evdev? ( sys-libs/mtdev )
+	freetds? ( dev-db/freetds )
+	gles2-only? ( media-libs/libglvnd )
+	!gles2-only? ( media-libs/libglvnd[X] )
+	gssapi? ( virtual/krb5 )
+	gtk? (
+		x11-libs/gtk+:3
+		x11-libs/libX11
+		x11-libs/pango
+	)
+	gui? ( media-libs/libpng:= )
+	icu? ( dev-libs/icu:= )
+	!icu? ( virtual/libiconv )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	libinput? (
+		dev-libs/libinput:=
+		>=x11-libs/libxkbcommon-0.5.0
+	)
+	libproxy? ( net-libs/libproxy )
+	mysql? ( dev-db/mysql-connector-c:= )
+	oci8? ( dev-db/oracle-instantclient:=[sdk] )
+	odbc? ( dev-db/unixODBC )
+	postgres? ( dev-db/postgresql:* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:= )
+	systemd? ( sys-apps/systemd:= )
+	tslib? ( >=x11-libs/tslib-1.21 )
+	udev? ( virtual/libudev:= )
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		x11-libs/libdrm
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		>=x11-libs/libxcb-1.12:=
+		>=x11-libs/libxkbcommon-0.5.0[X]
+		x11-libs/xcb-util-cursor
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-6.5.0-setActiveWindow-deprecated-version.patch"
+	"${FILESDIR}/${PN}-6.5.0-CVE-2023-32762.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
+		-DINSTALL_BINDIR=${QT6_BINDIR}
+		-DINSTALL_DATADIR=${QT6_DATADIR}
+		-DINSTALL_DOCDIR=${QT6_DOCDIR}
+		-DINSTALL_EXAMPLESDIR=${QT6_EXAMPLESDIR}
+		-DINSTALL_INCLUDEDIR=${QT6_HEADERDIR}
+		-DINSTALL_LIBDIR=${QT6_LIBDIR}
+		-DINSTALL_LIBEXECDIR=${QT6_LIBEXECDIR}
+		-DINSTALL_MKSPECSDIR=${QT6_ARCHDATADIR}/mkspecs
+		-DINSTALL_PLUGINSDIR=${QT6_PLUGINDIR}
+		-DINSTALL_QMLDIR=${QT6_QMLDIR}
+		-DINSTALL_SYSCONFDIR=${QT6_SYSCONFDIR}
+		-DINSTALL_TRANSLATIONSDIR=${QT6_TRANSLATIONDIR}
+		-DQT_FEATURE_androiddeployqt=OFF
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature gui testlib)
+		$(qt_feature icu)
+		$(qt_feature network)
+		$(qt_feature sql)
+		$(qt_feature systemd journald)
+		$(qt_feature udev libudev)
+		$(qt_feature xml)
+		$(qt_feature zstd)
+	)
+	use gui && mycmakeargs+=(
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature egl)
+		$(qt_feature egl xcb_egl_plugin)
+		$(qt_feature eglfs eglfs_egldevice)
+		$(qt_feature eglfs eglfs_gbm)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		-DQT_FEATURE_gif=ON
+		$(qt_feature jpeg)
+		$(qt_feature opengl)
+		$(qt_feature gles2-only opengles2)
+		$(qt_feature libinput)
+		$(qt_feature tslib)
+		$(qt_feature tuio tuiotouch)
+		$(qt_feature vulkan)
+		$(qt_feature widgets)
+		$(qt_feature X xcb)
+		$(qt_feature X xcb_xlib)
+	)
+	use widgets && mycmakeargs+=(
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+	if use libinput || use X; then
+		mycmakeargs+=( -DQT_FEATURE_xkbcommon=ON )
+	fi
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(qt_feature ssl openssl)
+		$(qt_feature vnc)
+	)
+	use sql && mycmakeargs+=(
+		$(qt_feature freetds sql_tds)
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	qt6-build_src_configure
+}
+
+src_install() {
+	qt6-build_src_install
+
+	# https://bugs.gentoo.org/863395
+	qt6_symlink_binary_to_path qmake 6
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-06-02 15:39 Jimi Huotari
  0 siblings, 0 replies; 20+ messages in thread
From: Jimi Huotari @ 2023-06-02 15:39 UTC (permalink / raw
  To: gentoo-commits

commit:     f52d27ffe1bd759c222566fecb6454b92a3319f0
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  2 14:52:40 2023 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 15:39:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f52d27ff

dev-qt/qtbase: add patch for CVE-2023-33285

https://lists.qt-project.org/pipermail/development/2023-June/043989.html

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 .../qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch | 101 +++++++++++
 dev-qt/qtbase/qtbase-6.5.0-r3.ebuild               | 193 +++++++++++++++++++++
 2 files changed, 294 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
new file mode 100644
index 000000000000..c982cce36e9e
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
@@ -0,0 +1,101 @@
+From a2dc11b37fd71f785c342c40549f54edfdd1a6f8 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Thu, 11 May 2023 21:40:15 -0700
+Subject: [PATCH] QDnsLookup/Unix: make sure we don't overflow the buffer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+The DNS Records are variable length and encode their size in 16 bits
+before the Record Data (RDATA). Ensure that both the RDATA and the
+Record header fields before it fall inside the buffer we have.
+
+Additionally reject any replies containing more than one query records.
+
+[ChangeLog][QtNetwork][QDnsLookup] Fixed a bug that could cause a buffer
+overflow in Unix systems while parsing corrupt, malicious, or truncated
+replies.
+
+Pick-to: 5.15 6.2 6.5.1
+Change-Id: I3e3bfef633af4130a03afffd175e4b9547654b95
+Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
+Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
+(cherry picked from commit 7dba2c87619d558a61a30eb30cc1d9c3fe6df94c)
+Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
+---
+ src/network/kernel/qdnslookup_unix.cpp | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
+index 8db79028f775..ad7bb51f67a5 100644
+--- a/src/network/kernel/qdnslookup_unix.cpp
++++ b/src/network/kernel/qdnslookup_unix.cpp
+@@ -193,7 +193,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+     // responseLength in case of error, we still can extract the
+     // exact error code from the response.
+     HEADER *header = (HEADER*)response;
+-    const int answerCount = ntohs(header->ancount);
+     switch (header->rcode) {
+     case NOERROR:
+         break;
+@@ -227,18 +226,31 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         return;
+     }
+ 
+-    // Skip the query host, type (2 bytes) and class (2 bytes).
+     char host[PACKETSZ], answer[PACKETSZ];
+     unsigned char *p = response + sizeof(HEADER);
+-    int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+-    if (status < 0) {
++    int status;
++
++    if (ntohs(header->qdcount) == 1) {
++        // Skip the query host, type (2 bytes) and class (2 bytes).
++        status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
++        if (status < 0) {
++            reply->error = QDnsLookup::InvalidReplyError;
++            reply->errorString = tr("Could not expand domain name");
++            return;
++        }
++        if ((p - response) + status + 4 >= responseLength)
++            header->qdcount = 0xffff;   // invalid reply below
++        else
++            p += status + 4;
++    }
++    if (ntohs(header->qdcount) > 1) {
+         reply->error = QDnsLookup::InvalidReplyError;
+-        reply->errorString = tr("Could not expand domain name");
++        reply->errorString = tr("Invalid reply received");
+         return;
+     }
+-    p += status + 4;
+ 
+     // Extract results.
++    const int answerCount = ntohs(header->ancount);
+     int answerIndex = 0;
+     while ((p < response + responseLength) && (answerIndex < answerCount)) {
+         status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
+@@ -250,6 +262,11 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         const QString name = QUrl::fromAce(host);
+ 
+         p += status;
++
++        if ((p - response) + 10 > responseLength) {
++            // probably just a truncated reply, return what we have
++            return;
++        }
+         const quint16 type = (p[0] << 8) | p[1];
+         p += 2; // RR type
+         p += 2; // RR class
+@@ -257,6 +274,8 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
+         p += 4;
+         const quint16 size = (p[0] << 8) | p[1];
+         p += 2;
++        if ((p - response) + size > responseLength)
++            return;             // truncated
+ 
+         if (type == QDnsLookup::A) {
+             if (size != 4) {
+-- 
+2.16.3
+

diff --git a/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild b/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
new file mode 100644
index 000000000000..c0afe61d6725
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
@@ -0,0 +1,193 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt6-build
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64"
+fi
+
+# Qt Modules
+IUSE="+concurrent +dbus +gui +network +sql opengl +widgets +xml zstd"
+REQUIRED_USE="
+	opengl? ( gui )
+	widgets? ( gui )
+	X? ( || ( evdev libinput ) )
+"
+
+QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
+QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
+QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
+IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev"
+# QtPrintSupport = QtGui + QtWidgets enabled.
+# ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
+REQUIRED_USE+="
+	$(printf '%s? ( gui ) ' ${QTGUI_IUSE//+/})
+	$(printf '%s? ( network ) ' ${QTNETWORK_IUSE//+/})
+	$(printf '%s? ( sql ) ' ${QTSQL_IUSE//+/})
+	accessibility? ( dbus X )
+	cups? ( gui widgets )
+	eglfs? ( egl )
+	gtk? ( widgets )
+	gui? ( || ( eglfs X ) || ( libinput X ) )
+	libinput? ( udev )
+	sql? ( || ( freetds mysql oci8 odbc postgres sqlite ) )
+	vnc? ( gui )
+	X? ( gles2-only? ( egl ) )
+"
+
+# TODO:
+# qtimageformats: mng not done yet, qtimageformats.git upstream commit 9443239c
+# qtnetwork: connman, networkmanager
+DEPEND="
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode]
+	dev-util/gtk-update-icon-cache
+	media-libs/fontconfig
+	>=media-libs/freetype-2.6.1:2
+	>=media-libs/harfbuzz-1.6.0:=
+	media-libs/tiff:=
+	>=sys-apps/dbus-1.4.20
+	sys-libs/zlib:=
+	brotli? ( app-arch/brotli:= )
+	evdev? ( sys-libs/mtdev )
+	freetds? ( dev-db/freetds )
+	gles2-only? ( media-libs/libglvnd )
+	!gles2-only? ( media-libs/libglvnd[X] )
+	gssapi? ( virtual/krb5 )
+	gtk? (
+		x11-libs/gtk+:3
+		x11-libs/libX11
+		x11-libs/pango
+	)
+	gui? ( media-libs/libpng:= )
+	icu? ( dev-libs/icu:= )
+	!icu? ( virtual/libiconv )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	libinput? (
+		dev-libs/libinput:=
+		>=x11-libs/libxkbcommon-0.5.0
+	)
+	libproxy? ( net-libs/libproxy )
+	mysql? ( dev-db/mysql-connector-c:= )
+	oci8? ( dev-db/oracle-instantclient:=[sdk] )
+	odbc? ( dev-db/unixODBC )
+	postgres? ( dev-db/postgresql:* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:= )
+	systemd? ( sys-apps/systemd:= )
+	tslib? ( >=x11-libs/tslib-1.21 )
+	udev? ( virtual/libudev:= )
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		x11-libs/libdrm
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		>=x11-libs/libxcb-1.12:=
+		>=x11-libs/libxkbcommon-0.5.0[X]
+		x11-libs/xcb-util-cursor
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-6.5.0-setActiveWindow-deprecated-version.patch"
+	"${FILESDIR}/${PN}-6.5.0-CVE-2023-32762.patch"
+	"${FILESDIR}/${PN}-6.5.0-CVE-2023-33285.patch"
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
+		-DINSTALL_BINDIR=${QT6_BINDIR}
+		-DINSTALL_DATADIR=${QT6_DATADIR}
+		-DINSTALL_DOCDIR=${QT6_DOCDIR}
+		-DINSTALL_EXAMPLESDIR=${QT6_EXAMPLESDIR}
+		-DINSTALL_INCLUDEDIR=${QT6_HEADERDIR}
+		-DINSTALL_LIBDIR=${QT6_LIBDIR}
+		-DINSTALL_LIBEXECDIR=${QT6_LIBEXECDIR}
+		-DINSTALL_MKSPECSDIR=${QT6_ARCHDATADIR}/mkspecs
+		-DINSTALL_PLUGINSDIR=${QT6_PLUGINDIR}
+		-DINSTALL_QMLDIR=${QT6_QMLDIR}
+		-DINSTALL_SYSCONFDIR=${QT6_SYSCONFDIR}
+		-DINSTALL_TRANSLATIONSDIR=${QT6_TRANSLATIONDIR}
+		-DQT_FEATURE_androiddeployqt=OFF
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature gui testlib)
+		$(qt_feature icu)
+		$(qt_feature network)
+		$(qt_feature sql)
+		$(qt_feature systemd journald)
+		$(qt_feature udev libudev)
+		$(qt_feature xml)
+		$(qt_feature zstd)
+	)
+	use gui && mycmakeargs+=(
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature egl)
+		$(qt_feature egl xcb_egl_plugin)
+		$(qt_feature eglfs eglfs_egldevice)
+		$(qt_feature eglfs eglfs_gbm)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		-DQT_FEATURE_gif=ON
+		$(qt_feature jpeg)
+		$(qt_feature opengl)
+		$(qt_feature gles2-only opengles2)
+		$(qt_feature libinput)
+		$(qt_feature tslib)
+		$(qt_feature tuio tuiotouch)
+		$(qt_feature vulkan)
+		$(qt_feature widgets)
+		$(qt_feature X xcb)
+		$(qt_feature X xcb_xlib)
+	)
+	use widgets && mycmakeargs+=(
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+	if use libinput || use X; then
+		mycmakeargs+=( -DQT_FEATURE_xkbcommon=ON )
+	fi
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(qt_feature ssl openssl)
+		$(qt_feature vnc)
+	)
+	use sql && mycmakeargs+=(
+		$(qt_feature freetds sql_tds)
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	qt6-build_src_configure
+}
+
+src_install() {
+	qt6-build_src_install
+
+	# https://bugs.gentoo.org/863395
+	qt6_symlink_binary_to_path qmake 6
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-06-10 13:33 Jimi Huotari
  0 siblings, 0 replies; 20+ messages in thread
From: Jimi Huotari @ 2023-06-10 13:33 UTC (permalink / raw
  To: gentoo-commits

commit:     dea3d4525da6db5bcf9f466c0233880b4a04b2b8
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 14:34:14 2023 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 13:33:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea3d452

dev-qt/qtbase: drop 6.5.0-r3

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 dev-qt/qtbase/Manifest                             |   1 -
 .../qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch |  54 ------
 .../qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch | 101 -----------
 ...-6.5.0-setActiveWindow-deprecated-version.patch |  35 ----
 dev-qt/qtbase/qtbase-6.5.0-r3.ebuild               | 193 ---------------------
 5 files changed, 384 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index c3071149fa00..3c5bf4d0f896 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,2 +1 @@
-DIST qtbase-everywhere-src-6.5.0.tar.xz 48020636 BLAKE2B 234000eeb6e1b57a1c7561613bf437453fc2db0d23d5ddd61c38961311a7de5263c086864554aff7a0bc1e5a406af78ef8342eed3c8a5f48b9237912614f380b SHA512 29f70b9a9650afdd8e34703a7a8191feab4c3a25d0bc3a41010ea842389335b24e2685721fdb4a03653475ebd9bf8a8e4f4a77bf5d64b1289590b5ca0e4623f3
 DIST qtbase-everywhere-src-6.5.1.tar.xz 48287392 BLAKE2B 47872492f21a936d980891c28df61591380bc236adc66b57a90fbb87dd292cdeb3c632fb1159231ba40142d25e02944e4c5e8568153f1286e0a1abc8c5b26699 SHA512 7f7b20bbc25cda65266d6067cdd68e3e077636988d67dbf5783f79a61186135fb3a36d57ac72cfe4501012035b630ab1f5849148e4817726d4f459fa1937e91a

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
deleted file mode 100644
index 3574706fcd85..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-32762.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From eae7c36d681acfb82572b56e24bbb2cd42242e57 Mon Sep 17 00:00:00 2001
-From: =?utf8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
-Date: Fri, 5 May 2023 11:07:26 +0200
-Subject: [PATCH] Hsts: match header names case insensitively
-
-Header field names are always considered to be case-insensitive.
-
-Fixes: QTBUG-113392
-Change-Id: Ifb4def4bb7f2ac070416cdc76581a769f1e52b43
-Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit 1b736a815be0222f4b24289cf17575fc15707305)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
----
- src/network/access/qhsts.cpp                 | 4 ++--
- tests/auto/network/access/hsts/tst_qhsts.cpp | 6 ++++++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
-index 39905f354807..82deede17298 100644
---- a/src/network/access/qhsts.cpp
-+++ b/src/network/access/qhsts.cpp
-@@ -327,8 +327,8 @@ quoted-pair    = "\" CHAR
- bool QHstsHeaderParser::parse(const QList<QPair<QByteArray, QByteArray>> &headers)
- {
-     for (const auto &h : headers) {
--        // We use '==' since header name was already 'trimmed' for us:
--        if (h.first == "Strict-Transport-Security") {
-+        // We compare directly because header name was already 'trimmed' for us:
-+        if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
-             header = h.second;
-             // RFC6797, 8.1:
-             //
-diff --git a/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
-index 252f5e8f5792..97a2d2889e57 100644
---- a/tests/auto/network/access/hsts/tst_qhsts.cpp
-+++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
-@@ -216,6 +216,12 @@ void tst_QHsts::testSTSHeaderParser()
-     QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
-     QVERIFY(parser.includeSubDomains());
- 
-+    list.pop_back();
-+    list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
-+    QVERIFY(parser.parse(list));
-+    QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
-+    QVERIFY(parser.includeSubDomains());
-+
-     list.pop_back();
-     // Invalid (includeSubDomains twice):
-     list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
--- 
-2.16.3
-

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch b/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
deleted file mode 100644
index c982cce36e9e..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.0-CVE-2023-33285.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From a2dc11b37fd71f785c342c40549f54edfdd1a6f8 Mon Sep 17 00:00:00 2001
-From: Thiago Macieira <thiago.macieira@intel.com>
-Date: Thu, 11 May 2023 21:40:15 -0700
-Subject: [PATCH] QDnsLookup/Unix: make sure we don't overflow the buffer
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf8
-Content-Transfer-Encoding: 8bit
-
-The DNS Records are variable length and encode their size in 16 bits
-before the Record Data (RDATA). Ensure that both the RDATA and the
-Record header fields before it fall inside the buffer we have.
-
-Additionally reject any replies containing more than one query records.
-
-[ChangeLog][QtNetwork][QDnsLookup] Fixed a bug that could cause a buffer
-overflow in Unix systems while parsing corrupt, malicious, or truncated
-replies.
-
-Pick-to: 5.15 6.2 6.5.1
-Change-Id: I3e3bfef633af4130a03afffd175e4b9547654b95
-Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
-(cherry picked from commit 7dba2c87619d558a61a30eb30cc1d9c3fe6df94c)
-Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
----
- src/network/kernel/qdnslookup_unix.cpp | 31 +++++++++++++++++++++++++------
- 1 file changed, 25 insertions(+), 6 deletions(-)
-
-diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp
-index 8db79028f775..ad7bb51f67a5 100644
---- a/src/network/kernel/qdnslookup_unix.cpp
-+++ b/src/network/kernel/qdnslookup_unix.cpp
-@@ -193,7 +193,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
-     // responseLength in case of error, we still can extract the
-     // exact error code from the response.
-     HEADER *header = (HEADER*)response;
--    const int answerCount = ntohs(header->ancount);
-     switch (header->rcode) {
-     case NOERROR:
-         break;
-@@ -227,18 +226,31 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
-         return;
-     }
- 
--    // Skip the query host, type (2 bytes) and class (2 bytes).
-     char host[PACKETSZ], answer[PACKETSZ];
-     unsigned char *p = response + sizeof(HEADER);
--    int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
--    if (status < 0) {
-+    int status;
-+
-+    if (ntohs(header->qdcount) == 1) {
-+        // Skip the query host, type (2 bytes) and class (2 bytes).
-+        status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-+        if (status < 0) {
-+            reply->error = QDnsLookup::InvalidReplyError;
-+            reply->errorString = tr("Could not expand domain name");
-+            return;
-+        }
-+        if ((p - response) + status + 4 >= responseLength)
-+            header->qdcount = 0xffff;   // invalid reply below
-+        else
-+            p += status + 4;
-+    }
-+    if (ntohs(header->qdcount) > 1) {
-         reply->error = QDnsLookup::InvalidReplyError;
--        reply->errorString = tr("Could not expand domain name");
-+        reply->errorString = tr("Invalid reply received");
-         return;
-     }
--    p += status + 4;
- 
-     // Extract results.
-+    const int answerCount = ntohs(header->ancount);
-     int answerIndex = 0;
-     while ((p < response + responseLength) && (answerIndex < answerCount)) {
-         status = local_dn_expand(response, response + responseLength, p, host, sizeof(host));
-@@ -250,6 +262,11 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
-         const QString name = QUrl::fromAce(host);
- 
-         p += status;
-+
-+        if ((p - response) + 10 > responseLength) {
-+            // probably just a truncated reply, return what we have
-+            return;
-+        }
-         const quint16 type = (p[0] << 8) | p[1];
-         p += 2; // RR type
-         p += 2; // RR class
-@@ -257,6 +274,8 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
-         p += 4;
-         const quint16 size = (p[0] << 8) | p[1];
-         p += 2;
-+        if ((p - response) + size > responseLength)
-+            return;             // truncated
- 
-         if (type == QDnsLookup::A) {
-             if (size != 4) {
--- 
-2.16.3
-

diff --git a/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch b/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch
deleted file mode 100644
index 0ba60e01e02a..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.0-setActiveWindow-deprecated-version.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream commit: https://code.qt.io/cgit/qt/qtbase.git/commit/?h=6.5&id=bbb330c95fd
-
-From bbb330c95fdf6161b23227cb08cec58cca31e465 Mon Sep 17 00:00:00 2001
-From: Nicolas Fella <nicolas.fella@kdab.com>
-Date: Tue, 14 Mar 2023 19:14:41 +0100
-Subject: QApplication: Fix DEPRECATED_VERSION for setActiveWindow
-
-It's not deprecated in 6.4, only 6.5
-
-Change-Id: I86a09b9ce5a7f4d8b1d80a6e67218dfe00f93844
-Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-(cherry picked from commit 99975ec07feb6b1a9f6be9e0d392a35e40f9550a)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
----
- src/widgets/kernel/qapplication.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
-index c4c73d4cf8..fd698fb69f 100644
---- a/src/widgets/kernel/qapplication.h
-+++ b/src/widgets/kernel/qapplication.h
-@@ -79,8 +79,8 @@ public:
- 
-     static QWidget *activeWindow();
- 
--#if QT_DEPRECATED_SINCE(6,4)
--    QT_DEPRECATED_VERSION_X_6_4("Use QWidget::activateWindow() instead.")
-+#if QT_DEPRECATED_SINCE(6, 5)
-+    QT_DEPRECATED_VERSION_X_6_5("Use QWidget::activateWindow() instead.")
-     static void setActiveWindow(QWidget* act);
- #endif
- 
--- 
-cgit v1.2.3
-

diff --git a/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild b/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
deleted file mode 100644
index c0afe61d6725..000000000000
--- a/dev-qt/qtbase/qtbase-6.5.0-r3.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit qt6-build
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="~amd64"
-fi
-
-# Qt Modules
-IUSE="+concurrent +dbus +gui +network +sql opengl +widgets +xml zstd"
-REQUIRED_USE="
-	opengl? ( gui )
-	widgets? ( gui )
-	X? ( || ( evdev libinput ) )
-"
-
-QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
-QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
-QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
-IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev"
-# QtPrintSupport = QtGui + QtWidgets enabled.
-# ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
-REQUIRED_USE+="
-	$(printf '%s? ( gui ) ' ${QTGUI_IUSE//+/})
-	$(printf '%s? ( network ) ' ${QTNETWORK_IUSE//+/})
-	$(printf '%s? ( sql ) ' ${QTSQL_IUSE//+/})
-	accessibility? ( dbus X )
-	cups? ( gui widgets )
-	eglfs? ( egl )
-	gtk? ( widgets )
-	gui? ( || ( eglfs X ) || ( libinput X ) )
-	libinput? ( udev )
-	sql? ( || ( freetds mysql oci8 odbc postgres sqlite ) )
-	vnc? ( gui )
-	X? ( gles2-only? ( egl ) )
-"
-
-# TODO:
-# qtimageformats: mng not done yet, qtimageformats.git upstream commit 9443239c
-# qtnetwork: connman, networkmanager
-DEPEND="
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode]
-	dev-util/gtk-update-icon-cache
-	media-libs/fontconfig
-	>=media-libs/freetype-2.6.1:2
-	>=media-libs/harfbuzz-1.6.0:=
-	media-libs/tiff:=
-	>=sys-apps/dbus-1.4.20
-	sys-libs/zlib:=
-	brotli? ( app-arch/brotli:= )
-	evdev? ( sys-libs/mtdev )
-	freetds? ( dev-db/freetds )
-	gles2-only? ( media-libs/libglvnd )
-	!gles2-only? ( media-libs/libglvnd[X] )
-	gssapi? ( virtual/krb5 )
-	gtk? (
-		x11-libs/gtk+:3
-		x11-libs/libX11
-		x11-libs/pango
-	)
-	gui? ( media-libs/libpng:= )
-	icu? ( dev-libs/icu:= )
-	!icu? ( virtual/libiconv )
-	jpeg? ( media-libs/libjpeg-turbo:= )
-	libinput? (
-		dev-libs/libinput:=
-		>=x11-libs/libxkbcommon-0.5.0
-	)
-	libproxy? ( net-libs/libproxy )
-	mysql? ( dev-db/mysql-connector-c:= )
-	oci8? ( dev-db/oracle-instantclient:=[sdk] )
-	odbc? ( dev-db/unixODBC )
-	postgres? ( dev-db/postgresql:* )
-	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
-	sqlite? ( dev-db/sqlite:3 )
-	ssl? ( dev-libs/openssl:= )
-	systemd? ( sys-apps/systemd:= )
-	tslib? ( >=x11-libs/tslib-1.21 )
-	udev? ( virtual/libudev:= )
-	vulkan? ( dev-util/vulkan-headers )
-	X? (
-		x11-libs/libdrm
-		x11-libs/libICE
-		x11-libs/libSM
-		x11-libs/libX11
-		>=x11-libs/libxcb-1.12:=
-		>=x11-libs/libxkbcommon-0.5.0[X]
-		x11-libs/xcb-util-cursor
-		x11-libs/xcb-util-image
-		x11-libs/xcb-util-keysyms
-		x11-libs/xcb-util-renderutil
-		x11-libs/xcb-util-wm
-	)
-	zstd? ( app-arch/zstd:= )
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-6.5.0-setActiveWindow-deprecated-version.patch"
-	"${FILESDIR}/${PN}-6.5.0-CVE-2023-32762.patch"
-	"${FILESDIR}/${PN}-6.5.0-CVE-2023-33285.patch"
-)
-
-src_configure() {
-	local mycmakeargs=(
-		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
-		-DINSTALL_BINDIR=${QT6_BINDIR}
-		-DINSTALL_DATADIR=${QT6_DATADIR}
-		-DINSTALL_DOCDIR=${QT6_DOCDIR}
-		-DINSTALL_EXAMPLESDIR=${QT6_EXAMPLESDIR}
-		-DINSTALL_INCLUDEDIR=${QT6_HEADERDIR}
-		-DINSTALL_LIBDIR=${QT6_LIBDIR}
-		-DINSTALL_LIBEXECDIR=${QT6_LIBEXECDIR}
-		-DINSTALL_MKSPECSDIR=${QT6_ARCHDATADIR}/mkspecs
-		-DINSTALL_PLUGINSDIR=${QT6_PLUGINDIR}
-		-DINSTALL_QMLDIR=${QT6_QMLDIR}
-		-DINSTALL_SYSCONFDIR=${QT6_SYSCONFDIR}
-		-DINSTALL_TRANSLATIONSDIR=${QT6_TRANSLATIONDIR}
-		-DQT_FEATURE_androiddeployqt=OFF
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature gui testlib)
-		$(qt_feature icu)
-		$(qt_feature network)
-		$(qt_feature sql)
-		$(qt_feature systemd journald)
-		$(qt_feature udev libudev)
-		$(qt_feature xml)
-		$(qt_feature zstd)
-	)
-	use gui && mycmakeargs+=(
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature egl)
-		$(qt_feature egl xcb_egl_plugin)
-		$(qt_feature eglfs eglfs_egldevice)
-		$(qt_feature eglfs eglfs_gbm)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		-DQT_FEATURE_gif=ON
-		$(qt_feature jpeg)
-		$(qt_feature opengl)
-		$(qt_feature gles2-only opengles2)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature tuio tuiotouch)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		$(qt_feature X xcb)
-		$(qt_feature X xcb_xlib)
-	)
-	use widgets && mycmakeargs+=(
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-	if use libinput || use X; then
-		mycmakeargs+=( -DQT_FEATURE_xkbcommon=ON )
-	fi
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(qt_feature ssl openssl)
-		$(qt_feature vnc)
-	)
-	use sql && mycmakeargs+=(
-		$(qt_feature freetds sql_tds)
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-	)
-
-	qt6-build_src_configure
-}
-
-src_install() {
-	qt6-build_src_install
-
-	# https://bugs.gentoo.org/863395
-	qt6_symlink_binary_to_path qmake 6
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-07-20 19:41 Jimi Huotari
  0 siblings, 0 replies; 20+ messages in thread
From: Jimi Huotari @ 2023-07-20 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     5d72e7f2e0af850a03d1c6424380521de752154b
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 20 19:28:54 2023 +0000
Commit:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
CommitDate: Thu Jul 20 19:40:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d72e7f2

dev-qt/qtbase: add 6.5.2

Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>

 dev-qt/qtbase/Manifest                             |   1 +
 .../qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch | 404 +++++++++++++++++++++
 dev-qt/qtbase/qtbase-6.5.2.ebuild                  | 190 ++++++++++
 3 files changed, 595 insertions(+)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 3c5bf4d0f896..f18d34b4b586 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1 +1,2 @@
 DIST qtbase-everywhere-src-6.5.1.tar.xz 48287392 BLAKE2B 47872492f21a936d980891c28df61591380bc236adc66b57a90fbb87dd292cdeb3c632fb1159231ba40142d25e02944e4c5e8568153f1286e0a1abc8c5b26699 SHA512 7f7b20bbc25cda65266d6067cdd68e3e077636988d67dbf5783f79a61186135fb3a36d57ac72cfe4501012035b630ab1f5849148e4817726d4f459fa1937e91a
+DIST qtbase-everywhere-src-6.5.2.tar.xz 48410716 BLAKE2B 578c69ede6f45a8b21cba0a24674d5d8801722503d13ab9578b06b2446ce15e6a84bcdbd0c5d2c9aa868ec70862f0845406c959ed79b695f82bb398ecf299c63 SHA512 8d97029aae5b73a3e03624c9a8495dbf2fe54a4f5e992071c06f3d93935e64c80f2121b33eeb60a92d96ceb288cb25d74906a5bf47b45bb018d859d4a2d13f20

diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch b/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch
new file mode 100644
index 000000000000..220e94d9ca2f
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.2-CVE-2023-38197.patch
@@ -0,0 +1,404 @@
+Upstream: https://codereview.qt-project.org/c/qt/qtbase/+/490550
+Upstream: https://lists.qt-project.org/pipermail/development/2023-July/044166.html
+
+From c216c3d9859a20b3aeec985512e89316423fc3a8 Mon Sep 17 00:00:00 2001
+From: Axel Spoerl <axel.spoerl@qt.io>
+Date: Fri, 30 Jun 2023 12:43:59 +0200
+Subject: [PATCH] QXmlStreamReader: Raise error on unexpected tokens
+
+QXmlStreamReader accepted multiple DOCTYPE elements, containing DTD
+fragments in the XML prolog, and in the XML body.
+Well-formed but invalid XML files - with multiple DTD fragments in
+prolog and body, combined with recursive entity expansions - have
+caused infinite loops in QXmlStreamReader.
+
+This patch implements a token check in QXmlStreamReader.
+A stream is allowed to start with an XML prolog. StartDocument
+and DOCTYPE elements are only allowed in this prolog, which
+may also contain ProcessingInstruction and Comment elements.
+As soon as anything else is seen, the prolog ends.
+After that, the prolog-specific elements are treated as unexpected.
+Furthermore, the prolog can contain at most one DOCTYPE element.
+
+Update the documentation to reflect the new behavior.
+Add an autotest that checks the new error cases are correctly detected,
+and no error is raised for legitimate input.
+
+The original OSS-Fuzz files (see bug reports) are not included in this
+patch for file size reasons. They have been tested manually. Each of
+them has more than one DOCTYPE element, causing infinite loops in
+recursive entity expansions. The newly implemented functionality
+detects those invalid DTD fragments. By raising an error, it aborts
+stream reading before an infinite loop occurs.
+
+Thanks to OSS-Fuzz for finding this.
+
+Fixes: QTBUG-92113
+Fixes: QTBUG-95188
+Change-Id: I0a082b9188b2eee50b396c4d5b1c9e1fd237bbdd
+Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
+(cherry picked from commit c4301be7d5f94852e1b17f2c2989d5ca807855d4)
+---
+ src/corelib/serialization/qxmlstream.cpp           | 145 +++++++++++++++++++--
+ src/corelib/serialization/qxmlstream_p.h           |  11 ++
+ .../qxmlstream/tokenError/dtdInBody.xml            |  20 +++
+ .../qxmlstream/tokenError/multipleDtd.xml          |  20 +++
+ .../qxmlstream/tokenError/wellFormed.xml           |  15 +++
+ .../serialization/qxmlstream/tst_qxmlstream.cpp    |  39 ++++++
+ 6 files changed, 242 insertions(+), 8 deletions(-)
+ create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
+ create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
+ create mode 100644 tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
+
+diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
+index 6e34d4da6e5a..cf46d690f122 100644
+--- a/src/corelib/serialization/qxmlstream.cpp
++++ b/src/corelib/serialization/qxmlstream.cpp
+@@ -185,7 +185,7 @@ WRAP(indexOf, QLatin1StringView)
+     addData() or by waiting for it to arrive on the device().
+ 
+     \value UnexpectedElementError The parser encountered an element
+-    that was different to those it expected.
++    or token that was different to those it expected.
+ 
+ */
+ 
+@@ -322,13 +322,34 @@ QXmlStreamEntityResolver *QXmlStreamReader::entityResolver() const
+ 
+   QXmlStreamReader is a well-formed XML 1.0 parser that does \e not
+   include external parsed entities. As long as no error occurs, the
+-  application code can thus be assured that the data provided by the
+-  stream reader satisfies the W3C's criteria for well-formed XML. For
+-  example, you can be certain that all tags are indeed nested and
+-  closed properly, that references to internal entities have been
+-  replaced with the correct replacement text, and that attributes have
+-  been normalized or added according to the internal subset of the
+-  DTD.
++  application code can thus be assured, that
++  \list
++  \li the data provided by the stream reader satisfies the W3C's
++      criteria for well-formed XML,
++  \li tokens are provided in a valid order.
++  \endlist
++
++  Unless QXmlStreamReader raises an error, it guarantees the following:
++  \list
++  \li All tags are nested and closed properly.
++  \li References to internal entities have been replaced with the
++      correct replacement text.
++  \li Attributes have been normalized or added according to the
++      internal subset of the \l DTD.
++  \li Tokens of type \l StartDocument happen before all others,
++      aside from comments and processing instructions.
++  \li At most one DOCTYPE element (a token of type \l DTD) is present.
++  \li If present, the DOCTYPE appears before all other elements,
++      aside from StartDocument, comments and processing instructions.
++  \endlist
++
++  In particular, once any token of type \l StartElement, \l EndElement,
++  \l Characters, \l EntityReference or \l EndDocument is seen, no
++  tokens of type StartDocument or DTD will be seen. If one is present in
++  the input stream, out of order, an error is raised.
++
++  \note The token types \l Comment and \l ProcessingInstruction may appear
++  anywhere in the stream.
+ 
+   If an error occurs while parsing, atEnd() and hasError() return
+   true, and error() returns the error that occurred. The functions
+@@ -659,6 +680,7 @@ QXmlStreamReader::TokenType QXmlStreamReader::readNext()
+         d->token = -1;
+         return readNext();
+     }
++    d->checkToken();
+     return d->type;
+ }
+ 
+@@ -743,6 +765,11 @@ static constexpr auto QXmlStreamReader_tokenTypeString = qOffsetStringArray(
+     "ProcessingInstruction"
+ );
+ 
++static constexpr auto QXmlStreamReader_XmlContextString = qOffsetStringArray(
++    "Prolog",
++    "Body"
++);
++
+ /*!
+     \property  QXmlStreamReader::namespaceProcessing
+     \brief the namespace-processing flag of the stream reader.
+@@ -777,6 +804,15 @@ QString QXmlStreamReader::tokenString() const
+     return QLatin1StringView(QXmlStreamReader_tokenTypeString.at(d->type));
+ }
+ 
++/*!
++   \internal
++   \return \param loc (Prolog/Body) as a string.
++ */
++static constexpr QLatin1StringView contextString(QXmlStreamReaderPrivate::XmlContext ctxt)
++{
++    return QLatin1StringView(QXmlStreamReader_XmlContextString.at(static_cast<int>(ctxt)));
++}
++
+ #endif // QT_NO_XMLSTREAMREADER
+ 
+ QXmlStreamPrivateTagStack::QXmlStreamPrivateTagStack()
+@@ -864,6 +900,8 @@ void QXmlStreamReaderPrivate::init()
+ 
+     type = QXmlStreamReader::NoToken;
+     error = QXmlStreamReader::NoError;
++    currentContext = XmlContext::Prolog;
++    foundDTD = false;
+ }
+ 
+ /*
+@@ -3838,6 +3876,97 @@ void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)
+     }
+ }
+ 
++static constexpr bool isTokenAllowedInContext(QXmlStreamReader::TokenType type,
++                                               QXmlStreamReaderPrivate::XmlContext loc)
++{
++    switch (type) {
++    case QXmlStreamReader::StartDocument:
++    case QXmlStreamReader::DTD:
++        return loc == QXmlStreamReaderPrivate::XmlContext::Prolog;
++
++    case QXmlStreamReader::StartElement:
++    case QXmlStreamReader::EndElement:
++    case QXmlStreamReader::Characters:
++    case QXmlStreamReader::EntityReference:
++    case QXmlStreamReader::EndDocument:
++        return loc == QXmlStreamReaderPrivate::XmlContext::Body;
++
++    case QXmlStreamReader::Comment:
++    case QXmlStreamReader::ProcessingInstruction:
++        return true;
++
++    case QXmlStreamReader::NoToken:
++    case QXmlStreamReader::Invalid:
++        return false;
++    }
++
++    // GCC 8.x does not treat __builtin_unreachable() as constexpr
++#if !defined(Q_CC_GNU_ONLY) || (Q_CC_GNU >= 900)
++    Q_UNREACHABLE_RETURN(false);
++#else
++    return false;
++#endif
++}
++
++/*!
++   \internal
++   \brief QXmlStreamReader::isValidToken
++   \return \c true if \param type is a valid token type.
++   \return \c false if \param type is an unexpected token,
++   which indicates a non-well-formed or invalid XML stream.
++ */
++bool QXmlStreamReaderPrivate::isValidToken(QXmlStreamReader::TokenType type)
++{
++    // Don't change currentContext, if Invalid or NoToken occur in the prolog
++    if (type == QXmlStreamReader::Invalid || type == QXmlStreamReader::NoToken)
++        return false;
++
++    // If a token type gets rejected in the body, there is no recovery
++    const bool result = isTokenAllowedInContext(type, currentContext);
++    if (result || currentContext == XmlContext::Body)
++        return result;
++
++    // First non-Prolog token observed => switch context to body and check again.
++    currentContext = XmlContext::Body;
++    return isTokenAllowedInContext(type, currentContext);
++}
++
++/*!
++   \internal
++   Checks token type and raises an error, if it is invalid
++   in the current context (prolog/body).
++ */
++void QXmlStreamReaderPrivate::checkToken()
++{
++    Q_Q(QXmlStreamReader);
++
++    // The token type must be consumed, to keep track if the body has been reached.
++    const XmlContext context = currentContext;
++    const bool ok = isValidToken(type);
++
++    // Do nothing if an error has been raised already (going along with an unexpected token)
++    if (error != QXmlStreamReader::Error::NoError)
++        return;
++
++    if (!ok) {
++        raiseError(QXmlStreamReader::UnexpectedElementError,
++                   QObject::tr("Unexpected token type %1 in %2.")
++                   .arg(q->tokenString(), contextString(context)));
++        return;
++    }
++
++    if (type != QXmlStreamReader::DTD)
++        return;
++
++    // Raise error on multiple DTD tokens
++    if (foundDTD) {
++        raiseError(QXmlStreamReader::UnexpectedElementError,
++                   QObject::tr("Found second DTD token in %1.").arg(contextString(context)));
++    } else {
++        foundDTD = true;
++    }
++}
++
+ /*!
+  \fn bool QXmlStreamAttributes::hasAttribute(QAnyStringView qualifiedName) const
+ 
+diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
+index 070424a9f523..f09adaa37e66 100644
+--- a/src/corelib/serialization/qxmlstream_p.h
++++ b/src/corelib/serialization/qxmlstream_p.h
+@@ -297,6 +297,17 @@ public:
+     QStringDecoder decoder;
+     bool atEnd;
+ 
++    enum class XmlContext
++    {
++        Prolog,
++        Body,
++    };
++
++    XmlContext currentContext = XmlContext::Prolog;
++    bool foundDTD = false;
++    bool isValidToken(QXmlStreamReader::TokenType type);
++    void checkToken();
++
+     /*!
+       \sa setType()
+      */
+diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
+new file mode 100644
+index 000000000000..1c3ca4e2711f
+--- /dev/null
++++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/dtdInBody.xml
+@@ -0,0 +1,20 @@
++<!DOCTYPE TEST [
++   <!ELEMENT TESTATTRIBUTE (CASE+)>
++   <!ELEMENT CASE (CLASS, FUNCTION)>
++   <!ELEMENT CLASS (#PCDATA)>
++
++   <!-- adding random ENTITY statement, as this is typical DTD content -->
++   <!ENTITY unite "&#x222a;">
++
++   <!ATTLIST CASE CLASS CDATA #REQUIRED>
++]>
++<TEST>
++  <CASE>
++    <CLASS>tst_QXmlStream</CLASS>
++  </CASE>
++  <!-- invalid DTD in XML body follows -->
++  <!DOCTYPE DTDTEST [
++    <!ELEMENT RESULT (CASE+)>
++    <!ATTLIST RESULT OUTPUT CDATA #REQUIRED>
++  ]>
++</TEST>
+diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
+new file mode 100644
+index 000000000000..cd398c0f9fde
+--- /dev/null
++++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/multipleDtd.xml
+@@ -0,0 +1,20 @@
++<!DOCTYPE TEST [
++   <!ELEMENT TESTATTRIBUTE (CASE+)>
++   <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
++   <!ELEMENT CLASS (#PCDATA)>
++
++   <!-- adding random ENTITY statements, as this is typical DTD content -->
++   <!ENTITY iff "&hArr;">
++
++   <!ATTLIST CASE CLASS CDATA #REQUIRED>
++]>
++<!-- invalid second DTD follows -->
++<!DOCTYPE SECOND [
++   <!ELEMENT SECONDATTRIBUTE (#PCDATA)>
++   <!ENTITY on "&#8728;">
++]>
++<TEST>
++  <CASE>
++    <CLASS>tst_QXmlStream</CLASS>
++  </CASE>
++</TEST>
+diff --git a/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml b/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
+new file mode 100644
+index 000000000000..1b61a3f06225
+--- /dev/null
++++ b/tests/auto/corelib/serialization/qxmlstream/tokenError/wellFormed.xml
+@@ -0,0 +1,15 @@
++<!DOCTYPE TEST [
++   <!ELEMENT TESTATTRIBUTE (CASE+)>
++   <!ELEMENT CASE (CLASS, FUNCTION, DATASET, COMMENTS)>
++   <!ELEMENT CLASS (#PCDATA)>
++
++   <!-- adding random ENTITY statements, as this is typical DTD content -->
++   <!ENTITY unite "&#x222a;">
++
++   <!ATTLIST CASE CLASS CDATA #REQUIRED>
++]>
++<TEST>
++  <CASE>
++    <CLASS>tst_QXmlStream</CLASS>
++  </CASE>
++</TEST>
+diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+index 2a340e11bff5..30f54999e7c8 100644
+--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
++++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+@@ -590,6 +590,9 @@ private slots:
+ 
+     void entityExpansionLimit() const;
+ 
++    void tokenErrorHandling_data() const;
++    void tokenErrorHandling() const;
++
+ private:
+     static QByteArray readFile(const QString &filename);
+ 
+@@ -1855,5 +1858,41 @@ void tst_QXmlStream::test_fastScanName() const
+     QCOMPARE(reader.error(), errorType);
+ }
+ 
++void tst_QXmlStream::tokenErrorHandling_data() const
++{
++    QTest::addColumn<QString>("fileName");
++    QTest::addColumn<QXmlStreamReader::Error>("expectedError");
++    QTest::addColumn<QString>("errorKeyWord");
++
++    constexpr auto invalid = QXmlStreamReader::Error::UnexpectedElementError;
++    constexpr auto valid = QXmlStreamReader::Error::NoError;
++    QTest::newRow("DtdInBody") << "dtdInBody.xml" << invalid << "DTD";
++    QTest::newRow("multipleDTD") << "multipleDtd.xml" << invalid << "second DTD";
++    QTest::newRow("wellFormed") << "wellFormed.xml" << valid << "";
++}
++
++void tst_QXmlStream::tokenErrorHandling() const
++{
++    QFETCH(const QString, fileName);
++    QFETCH(const QXmlStreamReader::Error, expectedError);
++    QFETCH(const QString, errorKeyWord);
++
++    const QDir dir(QFINDTESTDATA("tokenError"));
++    QFile file(dir.absoluteFilePath(fileName));
++
++    // Cross-compiling: File will be on host only
++    if (!file.exists())
++        QSKIP("Testfile not found.");
++
++    file.open(QIODevice::ReadOnly);
++    QXmlStreamReader reader(&file);
++    while (!reader.atEnd())
++        reader.readNext();
++
++    QCOMPARE(reader.error(), expectedError);
++    if (expectedError != QXmlStreamReader::Error::NoError)
++        QVERIFY(reader.errorString().contains(errorKeyWord));
++}
++
+ #include "tst_qxmlstream.moc"
+ // vim: et:ts=4:sw=4:sts=4
+-- 
+2.16.3
+

diff --git a/dev-qt/qtbase/qtbase-6.5.2.ebuild b/dev-qt/qtbase/qtbase-6.5.2.ebuild
new file mode 100644
index 000000000000..5e1b328fd988
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.5.2.ebuild
@@ -0,0 +1,190 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt6-build
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64"
+fi
+
+# Qt Modules
+IUSE="+concurrent +dbus +gui +network +sql opengl +widgets +xml zstd"
+REQUIRED_USE="
+	opengl? ( gui )
+	widgets? ( gui )
+	X? ( || ( evdev libinput ) )
+"
+
+QTGUI_IUSE="accessibility egl eglfs evdev gles2-only +jpeg +libinput tslib tuio vulkan +X"
+QTNETWORK_IUSE="brotli gssapi libproxy sctp +ssl vnc"
+QTSQL_IUSE="freetds mysql oci8 odbc postgres +sqlite"
+IUSE+=" ${QTGUI_IUSE} ${QTNETWORK_IUSE} ${QTSQL_IUSE} cups gtk icu systemd +udev wayland"
+# QtPrintSupport = QtGui + QtWidgets enabled.
+# ibus = xkbcommon + dbus, and xkbcommon needs either libinput or X
+REQUIRED_USE+="
+	$(printf '%s? ( gui ) ' ${QTGUI_IUSE//+/})
+	$(printf '%s? ( network ) ' ${QTNETWORK_IUSE//+/})
+	$(printf '%s? ( sql ) ' ${QTSQL_IUSE//+/})
+	accessibility? ( dbus X )
+	cups? ( gui widgets )
+	eglfs? ( egl )
+	gtk? ( widgets )
+	gui? ( || ( eglfs X ) || ( libinput X ) )
+	libinput? ( udev )
+	sql? ( || ( freetds mysql oci8 odbc postgres sqlite ) )
+	vnc? ( gui )
+	X? ( gles2-only? ( egl ) )
+"
+
+# TODO:
+# qtimageformats: mng not done yet, qtimageformats.git upstream commit 9443239c
+# qtnetwork: connman, networkmanager
+DEPEND="
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode]
+	dev-util/gtk-update-icon-cache
+	media-libs/fontconfig
+	>=media-libs/freetype-2.6.1:2
+	>=media-libs/harfbuzz-1.6.0:=
+	media-libs/tiff:=
+	>=sys-apps/dbus-1.4.20
+	sys-libs/zlib:=
+	brotli? ( app-arch/brotli:= )
+	evdev? ( sys-libs/mtdev )
+	freetds? ( dev-db/freetds )
+	gles2-only? ( media-libs/libglvnd )
+	!gles2-only? ( media-libs/libglvnd[X] )
+	gssapi? ( virtual/krb5 )
+	gtk? (
+		x11-libs/gtk+:3
+		x11-libs/libX11
+		x11-libs/pango
+	)
+	gui? ( media-libs/libpng:= )
+	icu? ( dev-libs/icu:= )
+	!icu? ( virtual/libiconv )
+	jpeg? ( media-libs/libjpeg-turbo:= )
+	libinput? (
+		dev-libs/libinput:=
+		>=x11-libs/libxkbcommon-0.5.0
+	)
+	libproxy? ( net-libs/libproxy )
+	mysql? ( dev-db/mysql-connector-c:= )
+	oci8? ( dev-db/oracle-instantclient:=[sdk] )
+	odbc? ( dev-db/unixODBC )
+	postgres? ( dev-db/postgresql:* )
+	sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:= )
+	systemd? ( sys-apps/systemd:= )
+	tslib? ( >=x11-libs/tslib-1.21 )
+	udev? ( virtual/libudev:= )
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		x11-libs/libdrm
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		>=x11-libs/libxcb-1.12:=
+		>=x11-libs/libxkbcommon-0.5.0[X]
+		x11-libs/xcb-util-cursor
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="wayland? ( =dev-qt/qtwayland-${PV}* )"
+
+PATCHES=( "${FILESDIR}/${PN}-6.5.2-CVE-2023-38197.patch" )
+
+src_configure() {
+	local mycmakeargs=(
+		-DINSTALL_ARCHDATADIR=${QT6_ARCHDATADIR}
+		-DINSTALL_BINDIR=${QT6_BINDIR}
+		-DINSTALL_DATADIR=${QT6_DATADIR}
+		-DINSTALL_DOCDIR=${QT6_DOCDIR}
+		-DINSTALL_EXAMPLESDIR=${QT6_EXAMPLESDIR}
+		-DINSTALL_INCLUDEDIR=${QT6_HEADERDIR}
+		-DINSTALL_LIBDIR=${QT6_LIBDIR}
+		-DINSTALL_LIBEXECDIR=${QT6_LIBEXECDIR}
+		-DINSTALL_MKSPECSDIR=${QT6_ARCHDATADIR}/mkspecs
+		-DINSTALL_PLUGINSDIR=${QT6_PLUGINDIR}
+		-DINSTALL_QMLDIR=${QT6_QMLDIR}
+		-DINSTALL_SYSCONFDIR=${QT6_SYSCONFDIR}
+		-DINSTALL_TRANSLATIONSDIR=${QT6_TRANSLATIONDIR}
+		-DQT_FEATURE_androiddeployqt=OFF
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature gui testlib)
+		$(qt_feature icu)
+		$(qt_feature network)
+		$(qt_feature sql)
+		$(qt_feature systemd journald)
+		$(qt_feature udev libudev)
+		$(qt_feature xml)
+		$(qt_feature zstd)
+	)
+	use gui && mycmakeargs+=(
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature egl)
+		$(qt_feature egl xcb_egl_plugin)
+		$(qt_feature eglfs eglfs_egldevice)
+		$(qt_feature eglfs eglfs_gbm)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		-DQT_FEATURE_gif=ON
+		$(qt_feature jpeg)
+		$(qt_feature opengl)
+		$(qt_feature gles2-only opengles2)
+		$(qt_feature libinput)
+		$(qt_feature tslib)
+		$(qt_feature tuio tuiotouch)
+		$(qt_feature vulkan)
+		$(qt_feature widgets)
+		$(qt_feature X xcb)
+		$(qt_feature X xcb_xlib)
+	)
+	use widgets && mycmakeargs+=(
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+	if use libinput || use X; then
+		mycmakeargs+=( -DQT_FEATURE_xkbcommon=ON )
+	fi
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(qt_feature ssl openssl)
+		$(qt_feature vnc)
+	)
+	use sql && mycmakeargs+=(
+		$(qt_feature freetds sql_tds)
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	qt6-build_src_configure
+}
+
+src_install() {
+	qt6-build_src_install
+
+	# https://bugs.gentoo.org/863395
+	qt6_symlink_binary_to_path qmake 6
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-09-24 17:22 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2023-09-24 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     023de8617b587136277486bcbce5852070c8e37c
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 24 15:54:16 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 17:18:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=023de861

dev-qt/qtbase: backport fix for libglvnd[-X]

Currently only exists in 6.9999 and will be in Qt6.7 unless upstream
backports it to 6.6.x earlier.

Originally thought that this already worked with the cmake migration,
thus libglvnd[-X] not being only for gles2-only like in qtgui:5.
Rather than change that dependency, just backport the cmake check
to allow building.

Trivial elseif() so this does nothing unless GLX is missing.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch | 29 +++++++++++++++++++++++++++
 dev-qt/qtbase/qtbase-6.5.2-r2.ebuild          |  1 +
 dev-qt/qtbase/qtbase-6.5.9999.ebuild          |  1 +
 dev-qt/qtbase/qtbase-6.6.9999.ebuild          |  1 +
 4 files changed, 32 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch b/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch
new file mode 100644
index 000000000000..f8263d10c022
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch
@@ -0,0 +1,29 @@
+Fixes build with libglvnd[-X].
+
+https://github.com/qt/qtbase/commit/929d9a4ca5c9eb0a590479182471d0bbc81589aa
+From: Yaroslav Isakov <yaroslav.isakov@gmail.com>
+Date: Sat, 8 Jul 2023 22:09:40 +0200
+Subject: [PATCH] Allow OpenGL to be found on X11-less Linux systems (using
+ libOpenGL)
+
+Cmake supports finding OpenGL, even if there is no GLX (for glvnd) or
+old-style libGL. This change keeps old behavior, but in case, if
+X11-related OpenGL libraries cannot be found on Linux, it adds logic
+to check for (and link with) libOpenGL, if it is present.
+--- a/cmake/FindWrapOpenGL.cmake
++++ b/cmake/FindWrapOpenGL.cmake
+@@ -47,4 +47,14 @@
+         target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL)
+     endif()
++elseif(UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "Integrity")
++    # Requesting only the OpenGL component ensures CMake does not mark the package as
++    # not found if neither GLX nor libGL are available. This allows finding OpenGL
++    # on an X11-less Linux system.
++    find_package(OpenGL ${WrapOpenGL_FIND_VERSION} COMPONENTS OpenGL)
++    if (OpenGL_FOUND)
++        set(WrapOpenGL_FOUND ON)
++        add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
++        target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::OpenGL)
++    endif()
+ endif()
+ 

diff --git a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild
index 67ce1f180005..23cf23a2b4ad 100644
--- a/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.2-r2.ebuild
@@ -131,6 +131,7 @@ PDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${P}-CVE-2023-38197.patch
 	"${FILESDIR}"/${P}-tests-gcc13.patch

diff --git a/dev-qt/qtbase/qtbase-6.5.9999.ebuild b/dev-qt/qtbase/qtbase-6.5.9999.ebuild
index a9f5f90dbb5e..7b0f034f5934 100644
--- a/dev-qt/qtbase/qtbase-6.5.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.9999.ebuild
@@ -131,6 +131,7 @@ PDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 )
 

diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
index 2d2b28ed79e1..7b0f89e55b28 100644
--- a/dev-qt/qtbase/qtbase-6.6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
@@ -131,6 +131,7 @@ PDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 )
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-10-09 23:03 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2023-10-09 23:03 UTC (permalink / raw
  To: gentoo-commits

commit:     c3b3bb3434de90888d3e173435966aaf2b9dbfe2
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  9 22:45:54 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 23:02:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3b3bb34

dev-qt/qtbase: fix build with >=libxkbcommon-1.6.0

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch | 14 ++++++++++++++
 dev-qt/qtbase/qtbase-6.5.3.ebuild                   |  1 +
 dev-qt/qtbase/qtbase-6.6.0_rc.ebuild                |  1 +
 dev-qt/qtbase/qtbase-6.6.9999.ebuild                |  1 +
 dev-qt/qtbase/qtbase-6.9999.ebuild                  |  1 +
 5 files changed, 18 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch b/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
new file mode 100644
index 000000000000..6a93b6b20b9e
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
@@ -0,0 +1,14 @@
+These were removed in libxkbcommon-1.6.0[1] and were apparently
+unnecesary. Usage results in build failure.
+
+Just a quick fix while waiting for what [2] comes up with.
+
+[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
+[2] https://bugreports.qt.io/browse/QTBUG-117950
+--- a/src/gui/platform/unix/qxkbcommon.cpp
++++ b/src/gui/platform/unix/qxkbcommon.cpp
+@@ -242,4 +241,0 @@
+-        Xkb2Qt<XKB_KEY_dead_lowline,            Qt::Key_Dead_Lowline>,
+-        Xkb2Qt<XKB_KEY_dead_aboveverticalline,  Qt::Key_Dead_Aboveverticalline>,
+-        Xkb2Qt<XKB_KEY_dead_belowverticalline,  Qt::Key_Dead_Belowverticalline>,
+-        Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,

diff --git a/dev-qt/qtbase/qtbase-6.5.3.ebuild b/dev-qt/qtbase/qtbase-6.5.3.ebuild
index ff54e3219118..ce35f875214a 100644
--- a/dev-qt/qtbase/qtbase-6.5.3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.5.3.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.6.0_rc.ebuild b/dev-qt/qtbase/qtbase-6.6.0_rc.ebuild
index 209286c5d22d..25600cdad0be 100644
--- a/dev-qt/qtbase/qtbase-6.6.0_rc.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.0_rc.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
index 209286c5d22d..25600cdad0be 100644
--- a/dev-qt/qtbase/qtbase-6.6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild b/dev-qt/qtbase/qtbase-6.9999.ebuild
index bda0eaf0fd5c..0f189b78263b 100644
--- a/dev-qt/qtbase/qtbase-6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
@@ -137,6 +137,7 @@ PDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-11-29  5:36 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2023-11-29  5:36 UTC (permalink / raw
  To: gentoo-commits

commit:     313ee5bd17f851405ea0f9176797bc7355a9e648
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 29 04:44:24 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Nov 29 05:36:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=313ee5bd

dev-qt/qtbase: re-add forkfd stacksize patch but with 32k

Bug: https://bugs.gentoo.org/918664
Bug: https://bugs.gentoo.org/915695
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase-6.6.1-forkfd-childstack-size.patch      | 23 ++++++++++++++++++++++
 ...{qtbase-6.6.1.ebuild => qtbase-6.6.1-r1.ebuild} |  1 +
 dev-qt/qtbase/qtbase-6.6.9999.ebuild               |  1 +
 dev-qt/qtbase/qtbase-6.9999.ebuild                 |  1 +
 4 files changed, 26 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch b/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch
new file mode 100644
index 000000000000..6b0ff1709abb
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.1-forkfd-childstack-size.patch
@@ -0,0 +1,23 @@
+Avoid crash that happens for some users in qsb, qmake, and
+potentially other Qt tools when ran under sandbox leading
+to build failures for qtdeclarative and other packages.
+
+Former fix involved replacing 4096 by SIGSTKSZ but
+bug #918664 shown that this may be insufficient so this
+tries 32k instead.
+
+https://bugs.gentoo.org/908809
+https://bugs.gentoo.org/908816
+https://bugs.gentoo.org/913493
+https://bugs.gentoo.org/915695
+https://bugs.gentoo.org/918664
+https://codereview.qt-project.org/c/qt/qtbase/+/513140
+--- a/src/3rdparty/forkfd/forkfd_linux.c
++++ b/src/3rdparty/forkfd/forkfd_linux.c
+@@ -158,5 +158,5 @@
+ int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void *token, int *system)
+ {
+-    __attribute__((aligned(64))) char childStack[SIGSTKSZ];
++    __attribute__((aligned(64))) char childStack[32768];
+     pid_t pid;
+     int pidfd;

diff --git a/dev-qt/qtbase/qtbase-6.6.1.ebuild b/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.6.1.ebuild
rename to dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
index adbaf526bcf1..90146aaed3c8 100644
--- a/dev-qt/qtbase/qtbase-6.6.1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.1-r1.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
index adbaf526bcf1..90146aaed3c8 100644
--- a/dev-qt/qtbase/qtbase-6.6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild b/dev-qt/qtbase/qtbase-6.9999.ebuild
index 9516155745e3..4de73e3c0c2f 100644
--- a/dev-qt/qtbase/qtbase-6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
@@ -137,6 +137,7 @@ PDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2023-12-19 20:33 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2023-12-19 20:33 UTC (permalink / raw
  To: gentoo-commits

commit:     dc370b35bace4ff25926ef90e7023fdb9e74c0ec
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 19 19:40:49 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 19 20:31:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc370b35

dev-qt/qtbase: drop 6.5.3-r1

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/Manifest                             |   1 -
 .../qtbase-6.5.3-forkfd-childstack-size.patch      |  27 --
 .../qtbase/files/qtbase-6.5.3-xkbcommon160.patch   |  18 --
 dev-qt/qtbase/qtbase-6.5.3-r1.ebuild               | 353 ---------------------
 4 files changed, 399 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 9152b649b69c..67b563a63d76 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,2 +1 @@
-DIST qtbase-everywhere-src-6.5.3.tar.xz 47142456 BLAKE2B 5b4c774b7199563dc7f2aebf9b2b531d851ee49bc038212f4970eeb43a17c364710432708f82a518eee6692ab123d78b642c234d9548d5b553f689a43aa05ee6 SHA512 31c6c01d466f1e01f18d6dcee593360c08ee83ad0a6be495a8eba023faad628cf07ce7285426fabfd247db306319e9a64da329682c99a712a282e32f7493cdb9
 DIST qtbase-everywhere-src-6.6.1.tar.xz 48370760 BLAKE2B 2dd551d15eef30c7d9a5f4c406143d6f8908d7ebade9daf9fbd3d82a25765425956f2cb8689c50f87f6477de2150eee7b820ef25bb4355c51e7e7fad3ef73005 SHA512 93e77b9b077a3acd5607b643db282fdd7ed0bdfa07df74c3f0d2285afeb1672a6fa229a7e7a6c8a462701305fc22ffef20c212d906484e50fb5cdb706a7b72e1

diff --git a/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch b/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch
deleted file mode 100644
index 34cbec61895b..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.3-forkfd-childstack-size.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Avoid crash that happens for some users in qsb, qmake, and
-potentially other Qt tools when ran under sandbox leading
-to build failures for qtdeclarative and other packages.
-
-Note that this is the initial (simple) version of the patch
-to ensure no issues, a more proper fix should land upstream
-eventually.
-
-https://bugs.gentoo.org/908809
-https://bugs.gentoo.org/908816
-https://bugs.gentoo.org/913493
-https://bugs.gentoo.org/915695
-https://codereview.qt-project.org/c/qt/qtbase/+/513140
-From: Huang Rui <vowstar@users.noreply.github.com>
-Date: Fri, 20 Oct 2023 10:16:01 +0800
-Subject: [PATCH] folkfd_linux,c: set stack size to 8192
---- a/src/3rdparty/forkfd/forkfd_linux.c
-+++ b/src/3rdparty/forkfd/forkfd_linux.c
-@@ -157,7 +157,7 @@ static int system_forkfd_pidfd_set_flags(int pidfd, int flags)
- 
- int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void *token, int *system)
- {
--    __attribute__((aligned(64))) char childStack[4096];
-+    __attribute__((aligned(64))) char childStack[8192];
-     pid_t pid;
-     int pidfd;
-     unsigned long cloneflags = CLONE_PIDFD | CLONE_VFORK | CLONE_VM | SIGCHLD;

diff --git a/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch b/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
deleted file mode 100644
index bc0e0793d7e9..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.3-xkbcommon160.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-These were removed in libxkbcommon-1.6.0[1] and were apparently
-unnecesary. Usage results in build failure.
-
-Just a quick fix while waiting for what [2] comes up with.
-
-[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
-[2] https://bugreports.qt.io/browse/QTBUG-117950
---- a/src/gui/platform/unix/qxkbcommon.cpp
-+++ b/src/gui/platform/unix/qxkbcommon.cpp
-@@ -242,4 +242,4 @@
--        Xkb2Qt<XKB_KEY_dead_lowline,            Qt::Key_Dead_Lowline>,
--        Xkb2Qt<XKB_KEY_dead_aboveverticalline,  Qt::Key_Dead_Aboveverticalline>,
--        Xkb2Qt<XKB_KEY_dead_belowverticalline,  Qt::Key_Dead_Belowverticalline>,
--        Xkb2Qt<XKB_KEY_dead_longsolidusoverlay, Qt::Key_Dead_Longsolidusoverlay>,
-+        Xkb2Qt<0xfe90,                          Qt::Key_Dead_Lowline>,
-+        Xkb2Qt<0xfe91,                          Qt::Key_Dead_Aboveverticalline>,
-+        Xkb2Qt<0xfe92,                          Qt::Key_Dead_Belowverticalline>,
-+        Xkb2Qt<0xfe93,                          Qt::Key_Dead_Longsolidusoverlay>,

diff --git a/dev-qt/qtbase/qtbase-6.5.3-r1.ebuild b/dev-qt/qtbase/qtbase-6.5.3-r1.ebuild
deleted file mode 100644
index 8c60fe9a49b6..000000000000
--- a/dev-qt/qtbase/qtbase-6.5.3-r1.ebuild
+++ /dev/null
@@ -1,353 +0,0 @@
-# Copyright 2021-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl tslib vulkan +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls wayland" #810802,864509
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( X dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${PN}-6.5.3-xkbcommon160.patch
-	"${FILESDIR}"/${PN}-6.5.3-forkfd-childstack-size.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		# trivial, and is often needed (sometimes even when not building tests)
-		-DQT_FEATURE_testlib=ON
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-		-DQT_FEATURE_sql_tds=OFF # currently a no-op in CMakeLists.txt
-	)
-
-	if use amd64 || use x86; then
-		# see bug #913400 for explanations
-		local cpufeats=(
-			# list of checked cpu features in configure.cmake
-			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
-			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
-		)
-		# handle odd ones out not matching -m* and macros (keep same order)
-		local cpuflags=( "${cpufeats[@]}" aes sha )
-		local cpufeats+=( aesni shani )
-
-		local -a intrins
-		IFS=' ' read -ra intrins < <(
-			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
-			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
-				#include <x86intrin.h>
-				#endif
-				$(printf '__%s__ ' "${cpuflags[@]^^}")
-			EOF
-			assert
-		)
-
-		# do nothing and leave to qtbase if no macros expanded (test failed?)
-		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
-			local -i i
-			for ((i=0; i<${#cpufeats[@]}; i++)); do
-				[[ ${intrins[i]} == __* ]] &&
-					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
-			done
-			mycmakeargs+=( -DTEST_x86intrin=ON )
-		fi
-	fi
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# randomly fails without -j1, and not worth it over this (bug #916181)
-		tst_qfiledialog{,2}
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qprinter # checks system's printers (bug #916216)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing at least on BE arches (bug #914033,914371)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-01-03 15:52 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-01-03 15:52 UTC (permalink / raw
  To: gentoo-commits

commit:     68e098de62a63945f1549ec7700c0704f759756a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  3 15:17:28 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jan  3 15:51:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68e098de

dev-qt/qtbase: backport CVE-2023-51714 HTTP2 fix

Still pending stable, which won't need to wait long.

Bug: https://bugs.gentoo.org/921292
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch |  55 ++++
 dev-qt/qtbase/qtbase-6.6.1-r2.ebuild               | 362 +++++++++++++++++++++
 2 files changed, 417 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch b/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
new file mode 100644
index 000000000000..8d2b0e74ad08
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.1-CVE-2023-51714.patch
@@ -0,0 +1,55 @@
+Combination of the two patches [1][2] for CVE-2023-51714[3],
+fixed in upcoming qtbase-6.6.2.
+
+https://bugs.gentoo.org/921292
+
+[1] https://codereview.qt-project.org/c/qt/qtbase/+/525295
+[2] https://codereview.qt-project.org/c/qt/qtbase/+/525297
+[3] https://lists.qt-project.org/pipermail/announce/2024-January/000465.html
+
+From 13c16b756900fe524f6d9534e8a07aa003c05e0c Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Tue, 12 Dec 2023 20:51:56 +0100
+Subject: [PATCH] HPack: fix a Yoda Condition
+
+Putting the variable on the LHS of a relational operation makes the
+expression easier to read. In this case, we find that the whole
+expression is nonsensical as an overflow protection, because if
+name.size() + value.size() overflows, the result will exactly _not_
+be > max() - 32, because UB will have happened.
+
+To be fixed in a follow-up commit.
+
+As a drive-by, add parentheses around the RHS.
+
+From 811b9eef6d08d929af8708adbf2a5effb0eb62d7 Mon Sep 17 00:00:00 2001
+From: Marc Mutz <marc.mutz@qt.io>
+Date: Tue, 12 Dec 2023 22:08:07 +0100
+Subject: [PATCH] HPack: fix incorrect integer overflow check
+
+This code never worked:
+
+For the comparison with max() - 32 to trigger, on 32-bit platforms (or
+Qt 5) signed interger overflow would have had to happen in the
+addition of the two sizes. The compiler can therefore remove the
+overflow check as dead code.
+
+On Qt 6 and 64-bit platforms, the signed integer addition would be
+very unlikely to overflow, but the following truncation to uint32
+would yield the correct result only in a narrow 32-value window just
+below UINT_MAX, if even that.
+
+Fix by using the proper tool, qAddOverflow.
+--- a/src/network/access/http2/hpacktable.cpp
++++ b/src/network/access/http2/hpacktable.cpp
+@@ -27,6 +27,8 @@
+     // 32 octets of overhead."
+ 
+-    const unsigned sum = unsigned(name.size() + value.size());
+-    if (std::numeric_limits<unsigned>::max() - 32 < sum)
++    size_t sum;
++    if (qAddOverflow(size_t(name.size()), size_t(value.size()), &sum))
++        return HeaderSize();
++    if (sum > (std::numeric_limits<unsigned>::max() - 32))
+         return HeaderSize();
+     return HeaderSize(true, quint32(sum + 32));

diff --git a/dev-qt/qtbase/qtbase-6.6.1-r2.ebuild b/dev-qt/qtbase/qtbase-6.6.1-r2.ebuild
new file mode 100644
index 000000000000..5b21d1f773b8
--- /dev/null
+++ b/dev-qt/qtbase/qtbase-6.6.1-r2.ebuild
@@ -0,0 +1,362 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic qt6-build toolchain-funcs
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+declare -A QT6_IUSE=(
+	[global]="+ssl +udev zstd"
+	[core]="icu"
+	[modules]="+concurrent +dbus +gui +network +sql +xml"
+
+	[gui]="
+		+X accessibility eglfs evdev gles2-only +libinput
+		opengl tslib vulkan +widgets
+	"
+	[network]="brotli gssapi libproxy sctp"
+	[sql]="mysql oci8 odbc postgres +sqlite"
+	[widgets]="cups gtk"
+
+	[optfeature]="nls wayland" #810802,864509
+)
+IUSE="${QT6_IUSE[*]}"
+REQUIRED_USE="
+	$(
+		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
+		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
+		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
+		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
+	)
+	accessibility? ( dbus )
+	eglfs? ( opengl )
+	gles2-only? ( opengl )
+	gui? ( || ( X eglfs wayland ) )
+	libinput? ( udev )
+	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
+	test? ( icu sql? ( sqlite ) )
+"
+
+# groups:
+# - global (configure.cmake)
+# - qtcore (src/corelib/configure.cmake)
+# - qtgui (src/gui/configure.cmake)
+# - qtnetwork (src/network/configure.cmake)
+# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
+# - qtsql (src/plugins/sqldrivers/configure.cmake)
+RDEPEND="
+	sys-libs/zlib:=
+	ssl? ( dev-libs/openssl:= )
+	udev? ( virtual/libudev:= )
+	zstd? ( app-arch/zstd:= )
+
+	app-crypt/libb2
+	dev-libs/double-conversion:=
+	dev-libs/glib:2
+	dev-libs/libpcre2:=[pcre16,unicode(+)]
+	icu? ( dev-libs/icu:= )
+
+	dbus? ( sys-apps/dbus )
+	gui? (
+		media-libs/fontconfig
+		media-libs/freetype:2
+		media-libs/harfbuzz:=
+		media-libs/libjpeg-turbo:=
+		media-libs/libpng:=
+		x11-libs/libdrm
+		x11-libs/libxkbcommon[X?]
+		X? (
+			x11-libs/libICE
+			x11-libs/libSM
+			x11-libs/libX11
+			x11-libs/libxcb:=
+			x11-libs/xcb-util-cursor
+			x11-libs/xcb-util-image
+			x11-libs/xcb-util-keysyms
+			x11-libs/xcb-util-renderutil
+			x11-libs/xcb-util-wm
+		)
+		accessibility? ( app-accessibility/at-spi2-core:2 )
+		eglfs? ( media-libs/mesa[gbm(+)] )
+		evdev? ( sys-libs/mtdev )
+		libinput? ( dev-libs/libinput:= )
+		opengl? (
+			gles2-only? ( media-libs/libglvnd )
+			!gles2-only? ( media-libs/libglvnd[X?] )
+		)
+		tslib? ( x11-libs/tslib )
+		widgets? (
+			cups? ( net-print/cups )
+			gtk? (
+				x11-libs/gdk-pixbuf:2
+				x11-libs/gtk+:3
+				x11-libs/pango
+			)
+		)
+	)
+	network? (
+		brotli? ( app-arch/brotli:= )
+		gssapi? ( virtual/krb5 )
+		libproxy? ( net-libs/libproxy )
+	)
+	sql? (
+		mysql? ( dev-db/mysql-connector-c:= )
+		oci8? ( dev-db/oracle-instantclient:=[sdk] )
+		odbc? ( dev-db/unixODBC )
+		postgres? ( dev-db/postgresql:* )
+		sqlite? ( dev-db/sqlite:3 )
+	)
+"
+DEPEND="
+	${RDEPEND}
+	X? ( x11-base/xorg-proto )
+	gui? (
+		vulkan? ( dev-util/vulkan-headers )
+	)
+	network? (
+		sctp? ( net-misc/lksctp-tools )
+	)
+	test? (
+		elibc_musl? ( sys-libs/timezone-data )
+	)
+"
+BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
+PDEPEND="
+	nls? ( ~dev-qt/qttranslations-${PV}:6 )
+	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
+	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
+	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
+	"${FILESDIR}"/${P}-CVE-2023-51714.patch
+)
+
+src_prepare() {
+	qt6-build_src_prepare
+
+	if use test; then
+		# test itself has -Werror=strict-aliasing issues, drop for simplicity
+		sed -e '/add_subdirectory(qsharedpointer)/d' \
+			-i tests/auto/corelib/tools/CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_WITH_PCH=OFF
+
+		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
+		-DINSTALL_BINDIR="${QT6_BINDIR}"
+		-DINSTALL_DATADIR="${QT6_DATADIR}"
+		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
+		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
+		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
+		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
+		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
+		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
+		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
+		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
+		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
+		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
+
+		$(qt_feature ssl openssl)
+		$(qt_feature ssl openssl_linked)
+		$(qt_feature udev libudev)
+		$(qt_feature zstd)
+
+		# qtcore
+		$(qt_feature icu)
+
+		# tools
+		-DQT_FEATURE_androiddeployqt=OFF
+
+		# modules
+		$(qt_feature concurrent)
+		$(qt_feature dbus)
+		$(qt_feature gui)
+		$(qt_feature network)
+		$(qt_feature sql)
+		# trivial, and is often needed (sometimes even when not building tests)
+		-DQT_FEATURE_testlib=ON
+		$(qt_feature xml)
+	)
+
+	use gui && mycmakeargs+=(
+		$(qt_feature X xcb)
+		$(qt_feature X system_xcb_xinput)
+		$(qt_feature X xkbcommon_x11)
+		$(cmake_use_find_package X X11) # needed for truly no automagic
+		$(qt_feature accessibility accessibility_atspi_bridge)
+		$(qt_feature eglfs)
+		$(qt_feature evdev)
+		$(qt_feature evdev mtdev)
+		$(qt_feature libinput)
+		$(qt_feature tslib)
+		$(qt_feature vulkan)
+		$(qt_feature widgets)
+		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
+		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
+	) && use widgets && mycmakeargs+=(
+		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
+		$(qt_feature cups)
+		$(qt_feature gtk gtk3)
+	)
+
+	use network && mycmakeargs+=(
+		$(qt_feature brotli)
+		$(qt_feature gssapi)
+		$(qt_feature libproxy)
+		$(qt_feature sctp)
+		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
+	)
+
+	use sql && mycmakeargs+=(
+		-DQT_FEATURE_sql_db2=OFF # unpackaged
+		-DQT_FEATURE_sql_ibase=OFF # unpackaged
+		-DQT_FEATURE_sql_mimer=OFF # unpackaged
+		$(qt_feature mysql sql_mysql)
+		$(qt_feature oci8 sql_oci)
+		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
+		$(qt_feature odbc sql_odbc)
+		$(qt_feature postgres sql_psql)
+		$(qt_feature sqlite sql_sqlite)
+		$(qt_feature sqlite system_sqlite)
+	)
+
+	if use amd64 || use x86; then
+		# see bug #913400 for explanations
+		local cpufeats=(
+			# list of checked cpu features in configure.cmake
+			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
+			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
+		)
+		# handle odd ones out not matching -m* and macros (keep same order)
+		local cpuflags=( "${cpufeats[@]}" aes sha )
+		local cpufeats+=( aesni shani )
+
+		local -a intrins
+		IFS=' ' read -ra intrins < <(
+			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
+			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
+				#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
+				#include <x86intrin.h>
+				#endif
+				$(printf '__%s__ ' "${cpuflags[@]^^}")
+			EOF
+			assert
+		)
+
+		# do nothing and leave to qtbase if no macros expanded (test failed?)
+		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
+			local -i i
+			for ((i=0; i<${#cpufeats[@]}; i++)); do
+				[[ ${intrins[i]} == __* ]] &&
+					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
+			done
+			mycmakeargs+=( -DTEST_x86intrin=ON )
+		fi
+	fi
+
+	qt6-build_src_configure
+}
+
+src_test() {
+	local -x TZ=UTC
+	local -x LC_TIME=C
+
+	local CMAKE_SKIP_TESTS=(
+		# broken with out-of-source + if qtbase is not already installed
+		tst_moc
+		tst_qmake
+		# needs x11/opengl, we *could* run these but tend to be flaky
+		# when opengl rendering is involved (even if software-only)
+		tst_qopengl{,config,widget,window}
+		tst_qgraphicsview
+		tst_qx11info
+		# fails with network sandbox
+		tst_qdnslookup
+		# fails with sandbox
+		tst_qsharedmemory
+		# typical to lack SCTP support on non-generic kernels
+		tst_qsctpsocket
+		# randomly fails without -j1, and not worth it over this (bug #916181)
+		tst_qfiledialog{,2}
+		# these can be flaky depending on the environment/toolchain
+		tst_qlogging # backtrace log test can easily vary
+		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
+		tst_qprinter # checks system's printers (bug #916216)
+		tst_qstorageinfo # checks mounted filesystems
+		# flaky due to using different test framework and fails with USE=-gui
+		tst_selftests
+		# known failing when using clang+glibc+stdc++, needs looking into
+		tst_qthread
+		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
+		# revdeps tests pass), skip globally to avoid keywording flakiness
+		tst_json
+		tst_qcolorspace
+		tst_qdoublevalidator
+		tst_qglobal
+		tst_qglyphrun
+		tst_qvectornd
+		tst_rcc
+		# similarly, but on armv7 and potentially others (bug #914028)
+		tst_qlineedit
+		tst_qpainter
+		# likewise, known failing on BE arches (bug #914033,914371,918878)
+		tst_qimagereader
+		tst_qimagewriter
+		tst_qpluginloader
+		tst_quuid
+		# partially broken on llvm-musl, needs looking into but skip to have
+		# a baseline for regressions (rest of dev-qt still passes with musl)
+		$(usev elibc_musl '
+			tst_qicoimageformat
+			tst_qimagereader
+			tst_qimage
+		')
+		# fails due to hppa's NaN handling, needs looking into (bug #914371)
+		$(usev hppa '
+			tst_qcborvalue
+			tst_qnumeric
+		')
+		# bug #914033
+		$(usev sparc '
+			tst_qbuffer
+			tst_qprocess
+			tst_qtconcurrentiteratekernel
+		')
+		# note: for linux, upstream only really runs+maintains tests for amd64
+		# https://doc.qt.io/qt-6/supported-platforms.html
+	)
+
+	qt6-build_src_test
+}
+
+src_install() {
+	qt6-build_src_install
+
+	if use test; then
+		local delete_bins=( # need a better way to handle this
+			clientserver copier crashingServer desktopsettingsaware_helper
+			echo fileWriterProcess modal_helper nospace 'one space'
+			paster qcommandlineparser_test_helper qfileopeneventexternal
+			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
+			write-read-write
+		)
+		local delete=( # sigh
+			"${D}${QT6_BINDIR}"/test*
+			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
+		)
+		# using -f given not tracking which tests may be skipped or not
+		rm -rf -- "${delete[@]}" || die
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-04-05 14:37 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-04-05 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     29dcc6a0a24bdd1627161ebea2ce7ca395a98e87
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  5 14:14:46 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 14:36:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29dcc6a0

dev-qt/qtbase: fix .pc files to include dependencies + QSpan fix

wrt bug #928299, please make sure updated to either >=qtbase-6.6.3-r1
or >=6.7.0-r1 before trying chromium again.

May not be the final version for the .pc fix (still in review), but
seems to do what's needed as-is and should do for now. Hopefully
walk libs changes have no unexpected side-effects.

Given revbumping, also backport the QSpan fix in 6.7.0 (not super
important unless a package does -Werror=undef, but while here...)

Closes: https://bugs.gentoo.org/928299
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.6.3-pkgconf-deps.patch   | 35 ++++++++++++++++++++++
 dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch | 29 ++++++++++++++++++
 ...{qtbase-6.6.3.ebuild => qtbase-6.6.3-r1.ebuild} |  1 +
 ...{qtbase-6.7.0.ebuild => qtbase-6.7.0-r1.ebuild} |  2 ++
 4 files changed, 67 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch b/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch
new file mode 100644
index 000000000000..965dade1c133
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.6.3-pkgconf-deps.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/928299
+https://bugreports.qt.io/browse/QTBUG-124135
+https://codereview.qt-project.org/c/qt/qtbase/+/553372
+From: Alexey Edelev <alexey.edelev@qt.io>
+Date: Fri, 05 Apr 2024 14:50:37 +0200
+Subject: [PATCH] Prefer the versioned targets over the namespaceless one when collecting deps
+
+Change the way we collect dependencies in __qt_internal_walk_libs.
+Prefer the versioned Qt targets over the namespaceless. This fixes the
+generating of the pkg-config configs.
+
+Pick-to: 6.5 6.6 6.7
+Task-number: QTBUG-124135
+Change-Id: I660376e122a99b5bc0874f2bc6ccd4d80c9ad453
+--- a/cmake/QtPublicWalkLibsHelpers.cmake
++++ b/cmake/QtPublicWalkLibsHelpers.cmake
+@@ -184,13 +184,13 @@
+             if(lib_target MATCHES "^::@")
+                 continue()
+             elseif(TARGET ${lib_target})
+-                if ("${lib_target}" MATCHES "^Qt::(.*)")
+-                    # If both, Qt::Foo and Foo targets exist, prefer the target name without
++                if(NOT "${lib_target}" MATCHES "^(Qt|${QT_CMAKE_EXPORT_NAMESPACE})::.+")
++                    # If both, Qt::Foo and Foo targets exist, prefer the target name with versioned
+                     # namespace. Which one is preferred doesn't really matter. This code exists to
+                     # avoid ending up with both, Qt::Foo and Foo in our dependencies.
+-                    set(namespaceless_lib_target "${CMAKE_MATCH_1}")
+-                    if(TARGET "${namespaceless_lib_target}")
+-                        set(lib_target ${namespaceless_lib_target})
++                    set(versioned_qt_target "${QT_CMAKE_EXPORT_NAMESPACE}::${lib_target}")
++                    if(TARGET "${versioned_qt_target}")
++                        set(lib_target ${versioned_qt_target})
+                     endif()
+                 endif()
+                 get_target_property(lib_target_type ${lib_target} TYPE)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch b/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
new file mode 100644
index 000000000000..4c2a37cb6c35
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
@@ -0,0 +1,29 @@
+https://bugreports.qt.io/browse/QTBUG-123937
+From 6810220218cbbf2854ecdedb291f7e4a84b31e54 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Wed, 3 Apr 2024 00:47:01 +0200
+Subject: [PATCH] Use ifdef instead of if for __cpp_lib_span
+
+Like the other times it's used in this file
+
+This is causing compilation errors in projects that use -Werror=undef
+
+Fixes: QTBUG-123937
+Change-Id: I0cdd2910755dc9079890011dd8dbc27a6e64793e
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+(cherry picked from commit 699ddcb15b5e981d32ea65d1c1a12f8fa0b06e0d)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+--- a/src/corelib/tools/qspan.h
++++ b/src/corelib/tools/qspan.h
+@@ -297,7 +297,7 @@ public:
+         : QSpanBase(il.begin(), il.size())
+     {}
+ 
+-#if __cpp_lib_span
++#ifdef __cpp_lib_span
+     template <typename S, size_t N, if_qualification_conversion<S> = true>
+     Q_IMPLICIT constexpr QSpanBase(std::span<S, N> other) noexcept
+         : QSpanBase(other.data(), other.size())
+-- 
+2.44.0
+

diff --git a/dev-qt/qtbase/qtbase-6.6.3.ebuild b/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.6.3.ebuild
rename to dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
index 61f586a93393..e0cd4c8e4736 100644
--- a/dev-qt/qtbase/qtbase-6.6.3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
@@ -138,6 +138,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.7.0.ebuild b/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.0.ebuild
rename to dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
index 016279f8fec5..12bb87d5843d 100644
--- a/dev-qt/qtbase/qtbase-6.7.0.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
@@ -139,6 +139,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
+	"${FILESDIR}"/${PN}-6.7.0-qspan-ifdef.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-04-19  7:55 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-04-19  7:55 UTC (permalink / raw
  To: gentoo-commits

commit:     c0a0eb96b61613e339ca96ce55a12bcb31af2efc
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 07:25:48 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Apr 19 07:52:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0a0eb96

dev-qt/qtbase: drop 6.6.2-r1, 6.6.3-r1

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/Manifest                        |   2 -
 dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch |  29 --
 dev-qt/qtbase/files/qtbase-6.6.2-x32abi.patch |  13 -
 dev-qt/qtbase/qtbase-6.6.2-r1.ebuild          | 366 -------------------------
 dev-qt/qtbase/qtbase-6.6.3-r1.ebuild          | 369 --------------------------
 5 files changed, 779 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index ca120302657c..339951b9f97a 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,3 +1 @@
-DIST qtbase-everywhere-src-6.6.2.tar.xz 48689304 BLAKE2B e00f4ac7ede0694b7934612f7dc3acdd50139d385492034c3046625a973d8adbca059e9d4081e248502cab8c673806cdb6b8bc5cee6d9356bbb0a7845db528a2 SHA512 ea343bcf269779a4e078ed8baddfbe6c5ec4a34275c7d72b3f3928da60feece2ddc9ce4a380c6536a4e1654b483cee8918f8ad3038904725d2dd1c653ae83ece
-DIST qtbase-everywhere-src-6.6.3.tar.xz 48784716 BLAKE2B f79e369c31968d026fb50dd64d53931ea28c25bd7eb442806760f733dbcacd868774d1c991d4da80c5eb40e24d75ffaba61b2cb9036fdc2d189f865b22143596 SHA512 cd96903a3947a1f5cf6a3ff21ab0b3209ed421d2a8c45acb34ae5aa7ad0501cb79e26cfa81bc02141d5731ebfa662442f37806e97994332077d963c9e70a5f54
 DIST qtbase-everywhere-src-6.7.0.tar.xz 49314276 BLAKE2B f4ec35fd3c15d56a28e1608dec927eaf34d84c2250405d921adadc16d90ec148f4983024dcf9be1832de91381d18e33fd7578d60d8654469e23530a210618e11 SHA512 72896cc5a677361779f49d60dbdfc33a21d77bd479e0586b0beb03eee2016d613aee56e798143a489431a07a5e7a7db4c7c046105a11b63dd178768f3a7f195a

diff --git a/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch b/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch
deleted file mode 100644
index f8263d10c022..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.5.2-no-glx.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Fixes build with libglvnd[-X].
-
-https://github.com/qt/qtbase/commit/929d9a4ca5c9eb0a590479182471d0bbc81589aa
-From: Yaroslav Isakov <yaroslav.isakov@gmail.com>
-Date: Sat, 8 Jul 2023 22:09:40 +0200
-Subject: [PATCH] Allow OpenGL to be found on X11-less Linux systems (using
- libOpenGL)
-
-Cmake supports finding OpenGL, even if there is no GLX (for glvnd) or
-old-style libGL. This change keeps old behavior, but in case, if
-X11-related OpenGL libraries cannot be found on Linux, it adds logic
-to check for (and link with) libOpenGL, if it is present.
---- a/cmake/FindWrapOpenGL.cmake
-+++ b/cmake/FindWrapOpenGL.cmake
-@@ -47,4 +47,14 @@
-         target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL)
-     endif()
-+elseif(UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "Integrity")
-+    # Requesting only the OpenGL component ensures CMake does not mark the package as
-+    # not found if neither GLX nor libGL are available. This allows finding OpenGL
-+    # on an X11-less Linux system.
-+    find_package(OpenGL ${WrapOpenGL_FIND_VERSION} COMPONENTS OpenGL)
-+    if (OpenGL_FOUND)
-+        set(WrapOpenGL_FOUND ON)
-+        add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
-+        target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::OpenGL)
-+    endif()
- endif()
- 

diff --git a/dev-qt/qtbase/files/qtbase-6.6.2-x32abi.patch b/dev-qt/qtbase/files/qtbase-6.6.2-x32abi.patch
deleted file mode 100644
index 1204dcc5c25c..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.6.2-x32abi.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/925103
---- a/src/corelib/thread/qthread.h
-+++ b/src/corelib/thread/qthread.h
-@@ -166,5 +166,9 @@
- #elif defined(Q_PROCESSOR_X86_64) && ((defined(Q_OS_LINUX) && defined(__GLIBC__)) || defined(Q_OS_FREEBSD))
-     // x86_64 Linux, BSD uses FS
-+# if defined(__ILP32__)
-+    __asm__("mov %%fs:%c1, %0" : "=r" (tid) : "i" (2 * sizeof(void*)) : );
-+# else
-     __asm__("movq %%fs:%c1, %0" : "=r" (tid) : "i" (2 * sizeof(void*)) : );
-+# endif
- #elif defined(Q_PROCESSOR_X86_64) && defined(Q_OS_WIN)
-     // See https://en.wikipedia.org/wiki/Win32_Thread_Information_Block

diff --git a/dev-qt/qtbase/qtbase-6.6.2-r1.ebuild b/dev-qt/qtbase/qtbase-6.6.2-r1.ebuild
deleted file mode 100644
index f842fee2eae4..000000000000
--- a/dev-qt/qtbase/qtbase-6.6.2-r1.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl tslib vulkan +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls wayland" #810802,864509
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
-	"${FILESDIR}"/${PN}-6.6.2-x32abi.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		-DQT_FEATURE_relocatable=OFF #927691
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		# trivial, and is often needed (sometimes even when not building tests)
-		-DQT_FEATURE_testlib=ON
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		-DQT_FEATURE_sql_mimer=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-	)
-
-	if use amd64 || use x86; then
-		# see bug #913400 for explanations
-		local cpufeats=(
-			# list of checked cpu features in configure.cmake
-			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
-			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
-		)
-		# handle odd ones out not matching -m* and macros (keep same order)
-		local cpuflags=( "${cpufeats[@]}" aes sha )
-		local cpufeats+=( aesni shani )
-
-		local -a intrins
-		IFS=' ' read -ra intrins < <(
-			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
-			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				$(printf '__%s__ ' "${cpuflags[@]^^}")
-			EOF
-			assert
-		)
-
-		# do nothing and leave to qtbase if no macros expanded (test failed?)
-		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
-			local -i i
-			for ((i=0; i<${#cpufeats[@]}; i++)); do
-				[[ ${intrins[i]} == __* ]] &&
-					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
-			done
-			mycmakeargs+=( -DTEST_x86intrin=ON )
-		fi
-	fi
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# similarly broken when relocatable=OFF (bug #927691)
-		tst_qapplication
-		tst_qt_cmake_create
-		tst_uic
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# fails with sandbox
-		tst_qsharedmemory
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# randomly fails without -j1, and not worth it over this (bug #916181)
-		tst_qfiledialog{,2}
-		# may randomly hang+timeout, perhaps related to -j as well
-		tst_qtimer
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qprinter # checks system's printers (bug #916216)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing on BE arches (bug #914033,914371,918878)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		tst_quuid # >=6.6.2 had related fixes, needs retesting
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# bug #914033
-		$(usev sparc '
-			tst_qbuffer
-			tst_qprocess
-			tst_qtconcurrentiteratekernel
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}

diff --git a/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild b/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
deleted file mode 100644
index e0cd4c8e4736..000000000000
--- a/dev-qt/qtbase/qtbase-6.6.3-r1.ebuild
+++ /dev/null
@@ -1,369 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl tslib vulkan +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls wayland" #810802,864509
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-glx.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
-	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
-	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		-DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
-
-		-DQT_FEATURE_relocatable=OFF #927691
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		# trivial, and is often needed (sometimes even when not building tests)
-		-DQT_FEATURE_testlib=ON
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		-DQT_FEATURE_sql_mimer=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-	)
-
-	if use amd64 || use x86; then
-		# see bug #913400 for explanations
-		local cpufeats=(
-			# list of checked cpu features in configure.cmake
-			avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
-			f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes
-		)
-		# handle odd ones out not matching -m* and macros (keep same order)
-		local cpuflags=( "${cpufeats[@]}" aes sha )
-		local cpufeats+=( aesni shani )
-
-		local -a intrins
-		IFS=' ' read -ra intrins < <(
-			: "$(test-flags-CXX "${cpuflags[@]/#/-m}")"
-			$(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
-				$(printf '__%s__ ' "${cpuflags[@]^^}")
-			EOF
-			assert
-		)
-
-		# do nothing and leave to qtbase if no macros expanded (test failed?)
-		if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then
-			local -i i
-			for ((i=0; i<${#cpufeats[@]}; i++)); do
-				[[ ${intrins[i]} == __* ]] &&
-					mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF )
-			done
-			mycmakeargs+=( -DTEST_x86intrin=ON )
-		fi
-	fi
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# similarly broken when relocatable=OFF (bug #927691)
-		tst_qapplication
-		tst_qt_cmake_create
-		tst_uic
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# fails with sandbox
-		tst_qsharedmemory
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# randomly fails without -j1, and not worth it over this (bug #916181)
-		tst_qfiledialog{,2}
-		# may randomly hang+timeout, perhaps related to -j as well
-		tst_qtimer
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qprinter # checks system's printers (bug #916216)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing on BE arches (bug #914033,914371,918878)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		tst_quuid # >=6.6.2 had related fixes, needs retesting
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# bug #914033
-		$(usev sparc '
-			tst_qbuffer
-			tst_qprocess
-			tst_qtconcurrentiteratekernel
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-05-02 13:09 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-05-02 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c2fb597e863fb296b5cdaf36e8b258b20c47d4a1
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu May  2 12:24:58 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu May  2 13:08:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2fb597e

dev-qt/qtbase: backport fix for CVE-2024-33861

Bug: https://bugs.gentoo.org/931096
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch | 23 ++++++++++++++++++++++
 ...base-6.7.0-r1.ebuild => qtbase-6.7.0-r2.ebuild} |  1 +
 2 files changed, 24 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch b/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch
new file mode 100644
index 000000000000..0a73d721612b
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/931096
+https://www.qt.io/blog/security-advisory-qstringconverter
+https://codereview.qt-project.org/c/qt/qtbase/+/556191
+--- a/src/corelib/text/qstringconverter.cpp
++++ b/src/corelib/text/qstringconverter.cpp
+@@ -1954,7 +1954,7 @@ struct QStringConverterICU : QStringConverter
+         const void *context;
+         ucnv_getToUCallBack(icu_conv, &action, &context);
+         if (context != state)
+-             ucnv_setToUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
++             ucnv_setToUCallBack(icu_conv, action, state, nullptr, nullptr, &err);
+ 
+         ucnv_toUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
+         // We did reserve enough space:
+@@ -1987,7 +1987,7 @@ struct QStringConverterICU : QStringConverter
+         const void *context;
+         ucnv_getFromUCallBack(icu_conv, &action, &context);
+         if (context != state)
+-             ucnv_setFromUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
++             ucnv_setFromUCallBack(icu_conv, action, state, nullptr, nullptr, &err);
+ 
+         ucnv_fromUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
+         // We did reserve enough space:

diff --git a/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild b/dev-qt/qtbase/qtbase-6.7.0-r2.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
rename to dev-qt/qtbase/qtbase-6.7.0-r2.ebuild
index 23c59f62fc8d..203bcb3c6d6f 100644
--- a/dev-qt/qtbase/qtbase-6.7.0-r1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.0-r2.ebuild
@@ -141,6 +141,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
 	"${FILESDIR}"/${PN}-6.7.0-qspan-ifdef.patch
+	"${FILESDIR}"/${PN}-6.7.0-CVE-2024-33861.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-06-08 13:41 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-06-08 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     a055d29fb97c1bd5b66c26a9ce81481adc43f9c4
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  8 05:41:02 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Jun  8 13:39:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a055d29f

dev-qt/qtbase: drop 6.7.0-r2

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/Manifest                             |   1 -
 .../qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch |  23 --
 dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch |  29 --
 dev-qt/qtbase/qtbase-6.7.0-r2.ebuild               | 351 ---------------------
 4 files changed, 404 deletions(-)

diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest
index 5852d2177d3a..0b37c039b554 100644
--- a/dev-qt/qtbase/Manifest
+++ b/dev-qt/qtbase/Manifest
@@ -1,2 +1 @@
-DIST qtbase-everywhere-src-6.7.0.tar.xz 49314276 BLAKE2B f4ec35fd3c15d56a28e1608dec927eaf34d84c2250405d921adadc16d90ec148f4983024dcf9be1832de91381d18e33fd7578d60d8654469e23530a210618e11 SHA512 72896cc5a677361779f49d60dbdfc33a21d77bd479e0586b0beb03eee2016d613aee56e798143a489431a07a5e7a7db4c7c046105a11b63dd178768f3a7f195a
 DIST qtbase-everywhere-src-6.7.1.tar.xz 49324536 BLAKE2B 5e5a5801c29c1ac541812931cd56709a934a500ce4d5a38e7d3776620cb46db0d25408c22cbf33a7bcc657098c571e501fde14f523a77acba1827edd977d2bc5 SHA512 864bebfc3659907e52b8dc3f62a65d431573ef2bf406a9f71c688229083a2128c5474f75823275d11948be3d031de1d6427acf373f977df9ee9e73a27ef56efb

diff --git a/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch b/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch
deleted file mode 100644
index 0a73d721612b..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.7.0-CVE-2024-33861.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://bugs.gentoo.org/931096
-https://www.qt.io/blog/security-advisory-qstringconverter
-https://codereview.qt-project.org/c/qt/qtbase/+/556191
---- a/src/corelib/text/qstringconverter.cpp
-+++ b/src/corelib/text/qstringconverter.cpp
-@@ -1954,7 +1954,7 @@ struct QStringConverterICU : QStringConverter
-         const void *context;
-         ucnv_getToUCallBack(icu_conv, &action, &context);
-         if (context != state)
--             ucnv_setToUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
-+             ucnv_setToUCallBack(icu_conv, action, state, nullptr, nullptr, &err);
- 
-         ucnv_toUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
-         // We did reserve enough space:
-@@ -1987,7 +1987,7 @@ struct QStringConverterICU : QStringConverter
-         const void *context;
-         ucnv_getFromUCallBack(icu_conv, &action, &context);
-         if (context != state)
--             ucnv_setFromUCallBack(icu_conv, action, &state, nullptr, nullptr, &err);
-+             ucnv_setFromUCallBack(icu_conv, action, state, nullptr, nullptr, &err);
- 
-         ucnv_fromUnicode(icu_conv, &target, targetLimit, &source, sourceLimit, nullptr, flush, &err);
-         // We did reserve enough space:

diff --git a/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch b/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
deleted file mode 100644
index 4c2a37cb6c35..000000000000
--- a/dev-qt/qtbase/files/qtbase-6.7.0-qspan-ifdef.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://bugreports.qt.io/browse/QTBUG-123937
-From 6810220218cbbf2854ecdedb291f7e4a84b31e54 Mon Sep 17 00:00:00 2001
-From: Albert Astals Cid <aacid@kde.org>
-Date: Wed, 3 Apr 2024 00:47:01 +0200
-Subject: [PATCH] Use ifdef instead of if for __cpp_lib_span
-
-Like the other times it's used in this file
-
-This is causing compilation errors in projects that use -Werror=undef
-
-Fixes: QTBUG-123937
-Change-Id: I0cdd2910755dc9079890011dd8dbc27a6e64793e
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-(cherry picked from commit 699ddcb15b5e981d32ea65d1c1a12f8fa0b06e0d)
-Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---- a/src/corelib/tools/qspan.h
-+++ b/src/corelib/tools/qspan.h
-@@ -297,7 +297,7 @@ public:
-         : QSpanBase(il.begin(), il.size())
-     {}
- 
--#if __cpp_lib_span
-+#ifdef __cpp_lib_span
-     template <typename S, size_t N, if_qualification_conversion<S> = true>
-     Q_IMPLICIT constexpr QSpanBase(std::span<S, N> other) noexcept
-         : QSpanBase(other.data(), other.size())
--- 
-2.44.0
-

diff --git a/dev-qt/qtbase/qtbase-6.7.0-r2.ebuild b/dev-qt/qtbase/qtbase-6.7.0-r2.ebuild
deleted file mode 100644
index b3b3f80bb86a..000000000000
--- a/dev-qt/qtbase/qtbase-6.7.0-r2.ebuild
+++ /dev/null
@@ -1,351 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit qt6-build toolchain-funcs
-
-DESCRIPTION="Cross-platform application development framework"
-
-if [[ ${QT6_BUILD_TYPE} == release ]]; then
-	KEYWORDS="amd64 ~arm arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-declare -A QT6_IUSE=(
-	[global]="+ssl +udev zstd"
-	[core]="icu"
-	[modules]="+concurrent +dbus +gui +network +sql +xml"
-
-	[gui]="
-		+X accessibility eglfs evdev gles2-only +libinput
-		opengl renderdoc tslib vulkan wayland +widgets
-	"
-	[network]="brotli gssapi libproxy sctp"
-	[sql]="mysql oci8 odbc postgres +sqlite"
-	[widgets]="cups gtk"
-
-	[optfeature]="nls" #810802
-)
-IUSE="${QT6_IUSE[*]}"
-REQUIRED_USE="
-	$(
-		printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/}
-		printf '%s? ( network ) ' ${QT6_IUSE[network]//+/}
-		printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/}
-		printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/}
-	)
-	accessibility? ( dbus )
-	eglfs? ( opengl )
-	gles2-only? ( opengl )
-	gui? ( || ( X eglfs wayland ) )
-	libinput? ( udev )
-	sql? ( || ( ${QT6_IUSE[sql]//+/} ) )
-	test? ( icu sql? ( sqlite ) )
-"
-
-# groups:
-# - global (configure.cmake)
-# - qtcore (src/corelib/configure.cmake)
-# - qtgui (src/gui/configure.cmake)
-# - qtnetwork (src/network/configure.cmake)
-# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets]
-# - qtsql (src/plugins/sqldrivers/configure.cmake)
-# dlopen: renderdoc
-RDEPEND="
-	sys-libs/zlib:=
-	ssl? ( dev-libs/openssl:= )
-	udev? ( virtual/libudev:= )
-	zstd? ( app-arch/zstd:= )
-
-	app-crypt/libb2
-	dev-libs/double-conversion:=
-	dev-libs/glib:2
-	dev-libs/libpcre2:=[pcre16,unicode(+)]
-	icu? ( dev-libs/icu:= )
-
-	dbus? ( sys-apps/dbus )
-	gui? (
-		media-libs/fontconfig
-		media-libs/freetype:2
-		media-libs/harfbuzz:=
-		media-libs/libjpeg-turbo:=
-		media-libs/libpng:=
-		x11-libs/libdrm
-		x11-libs/libxkbcommon[X?]
-		X? (
-			x11-libs/libICE
-			x11-libs/libSM
-			x11-libs/libX11
-			x11-libs/libxcb:=
-			x11-libs/xcb-util-cursor
-			x11-libs/xcb-util-image
-			x11-libs/xcb-util-keysyms
-			x11-libs/xcb-util-renderutil
-			x11-libs/xcb-util-wm
-		)
-		accessibility? ( app-accessibility/at-spi2-core:2 )
-		eglfs? ( media-libs/mesa[gbm(+)] )
-		evdev? ( sys-libs/mtdev )
-		libinput? ( dev-libs/libinput:= )
-		opengl? (
-			gles2-only? ( media-libs/libglvnd )
-			!gles2-only? ( media-libs/libglvnd[X?] )
-		)
-		renderdoc? ( media-gfx/renderdoc )
-		tslib? ( x11-libs/tslib )
-		widgets? (
-			cups? ( net-print/cups )
-			gtk? (
-				x11-libs/gdk-pixbuf:2
-				x11-libs/gtk+:3
-				x11-libs/pango
-			)
-		)
-	)
-	network? (
-		brotli? ( app-arch/brotli:= )
-		gssapi? ( virtual/krb5 )
-		libproxy? ( net-libs/libproxy )
-	)
-	sql? (
-		mysql? ( dev-db/mysql-connector-c:= )
-		oci8? ( dev-db/oracle-instantclient:=[sdk] )
-		odbc? ( dev-db/unixODBC )
-		postgres? ( dev-db/postgresql:* )
-		sqlite? ( dev-db/sqlite:3 )
-	)
-"
-DEPEND="
-	${RDEPEND}
-	X? ( x11-base/xorg-proto )
-	gui? (
-		vulkan? ( dev-util/vulkan-headers )
-	)
-	network? (
-		sctp? ( net-misc/lksctp-tools )
-	)
-	test? (
-		elibc_musl? ( sys-libs/timezone-data )
-	)
-"
-BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392
-PDEPEND="
-	nls? ( ~dev-qt/qttranslations-${PV}:6 )
-	wayland? ( ~dev-qt/qtwayland-${PV}:6 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.5.2-hppa-forkfd-grow-stack.patch
-	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
-	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
-	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
-	"${FILESDIR}"/${PN}-6.6.3-pkgconf-deps.patch
-	"${FILESDIR}"/${PN}-6.7.0-qspan-ifdef.patch
-	"${FILESDIR}"/${PN}-6.7.0-CVE-2024-33861.patch
-)
-
-src_prepare() {
-	qt6-build_src_prepare
-
-	if use test; then
-		# test itself has -Werror=strict-aliasing issues, drop for simplicity
-		sed -e '/add_subdirectory(qsharedpointer)/d' \
-			-i tests/auto/corelib/tools/CMakeLists.txt || die
-
-		# workaround for __extendhfxf2 being used for tst_qfloat16.cpp
-		# which is unavailable with compiler-rt (assume used if clang)
-		if tc-is-clang; then
-			sed -e '/add_subdirectory(qfloat16)/d' \
-				-i tests/auto/corelib/global/CMakeLists.txt || die
-		fi
-	fi
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DBUILD_WITH_PCH=OFF
-
-		-DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}"
-		-DINSTALL_BINDIR="${QT6_BINDIR}"
-		-DINSTALL_DATADIR="${QT6_DATADIR}"
-		-DINSTALL_DOCDIR="${QT6_DOCDIR}"
-		-DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}"
-		-DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}"
-		-DINSTALL_LIBDIR="${QT6_LIBDIR}"
-		-DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}"
-		-DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}"
-		-DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}"
-		-DINSTALL_QMLDIR="${QT6_QMLDIR}"
-		-DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}"
-		-DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}"
-
-		-DQT_UNITY_BUILD=ON # ~30% faster build, affects other dev-qt/* too
-
-		-DQT_FEATURE_relocatable=OFF #927691
-		$(qt_feature ssl openssl)
-		$(qt_feature ssl openssl_linked)
-		$(qt_feature udev libudev)
-		$(qt_feature zstd)
-
-		# qtcore
-		$(qt_feature icu)
-
-		# tools
-		-DQT_FEATURE_androiddeployqt=OFF
-
-		# modules
-		$(qt_feature concurrent)
-		$(qt_feature dbus)
-		$(qt_feature gui)
-		$(qt_feature network)
-		$(qt_feature sql)
-		# trivial, and is often needed (sometimes even when not building tests)
-		-DQT_FEATURE_testlib=ON
-		$(qt_feature xml)
-	)
-
-	use gui && mycmakeargs+=(
-		$(qt_feature X xcb)
-		$(qt_feature X system_xcb_xinput)
-		$(qt_feature X xkbcommon_x11)
-		$(cmake_use_find_package X X11) # needed for truly no automagic
-		$(qt_feature accessibility accessibility_atspi_bridge)
-		$(qt_feature eglfs)
-		$(qt_feature evdev)
-		$(qt_feature evdev mtdev)
-		$(qt_feature libinput)
-		$(qt_feature renderdoc graphicsframecapture)
-		$(qt_feature tslib)
-		$(qt_feature vulkan)
-		$(qt_feature wayland)
-		$(qt_feature widgets)
-		-DINPUT_opengl=$(usex opengl $(usex gles2-only es2 desktop) no)
-		-DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c
-	) && use widgets && mycmakeargs+=(
-		# note: qtprintsupport is enabled w/ gui+widgets regardless of USE=cups
-		$(qt_feature cups)
-		$(qt_feature gtk gtk3)
-	)
-
-	use network && mycmakeargs+=(
-		$(qt_feature brotli)
-		$(qt_feature gssapi)
-		$(qt_feature libproxy)
-		$(qt_feature sctp)
-		$(usev test -DQT_SKIP_DOCKER_COMPOSE=ON)
-	)
-
-	use sql && mycmakeargs+=(
-		-DQT_FEATURE_sql_db2=OFF # unpackaged
-		-DQT_FEATURE_sql_ibase=OFF # unpackaged
-		-DQT_FEATURE_sql_mimer=OFF # unpackaged
-		$(qt_feature mysql sql_mysql)
-		$(qt_feature oci8 sql_oci)
-		$(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client)
-		$(qt_feature odbc sql_odbc)
-		$(qt_feature postgres sql_psql)
-		$(qt_feature sqlite sql_sqlite)
-		$(qt_feature sqlite system_sqlite)
-	)
-
-	qt6-build_src_configure
-}
-
-src_test() {
-	local -x TZ=UTC
-	local -x LC_TIME=C
-
-	local CMAKE_SKIP_TESTS=(
-		# broken with out-of-source + if qtbase is not already installed
-		tst_moc
-		tst_qmake
-		# similarly broken when relocatable=OFF (bug #927691)
-		tst_qapplication
-		tst_qt_cmake_create
-		tst_uic
-		# needs x11/opengl, we *could* run these but tend to be flaky
-		# when opengl rendering is involved (even if software-only)
-		tst_qopengl{,config,widget,window}
-		tst_qgraphicsview
-		tst_qx11info
-		# fails with network sandbox
-		tst_qdnslookup
-		# fails with sandbox
-		tst_qsharedmemory
-		# typical to lack SCTP support on non-generic kernels
-		tst_qsctpsocket
-		# randomly fails without -j1, and not worth it over this (bug #916181)
-		tst_qfiledialog{,2}
-		# may randomly hang+timeout, perhaps related to -j as well
-		tst_qtimer
-		# these can be flaky depending on the environment/toolchain
-		tst_qlogging # backtrace log test can easily vary
-		tst_q{,raw}font # affected by available fonts / settings (bug #914737)
-		tst_qprinter # checks system's printers (bug #916216)
-		tst_qstorageinfo # checks mounted filesystems
-		# flaky due to using different test framework and fails with USE=-gui
-		tst_selftests
-		# known failing when using clang+glibc+stdc++, needs looking into
-		tst_qthread
-		# partially failing on x86 chroots and seemingly(?) harmless (dev-qt
-		# revdeps tests pass), skip globally to avoid keywording flakiness
-		tst_json
-		tst_qcolorspace
-		tst_qdoublevalidator
-		tst_qglobal
-		tst_qglyphrun
-		tst_qvectornd
-		tst_rcc
-		# similarly, but on armv7 and potentially others (bug #914028)
-		tst_qlineedit
-		tst_qpainter
-		# likewise, known failing on BE arches (bug #914033,914371,918878)
-		tst_qimagereader
-		tst_qimagewriter
-		tst_qpluginloader
-		tst_quuid # >=6.6.2 had related fixes, needs retesting
-		# partially broken on llvm-musl, needs looking into but skip to have
-		# a baseline for regressions (rest of dev-qt still passes with musl)
-		$(usev elibc_musl '
-			tst_qicoimageformat
-			tst_qimagereader
-			tst_qimage
-			tst_qprocess
-		')
-		# fails due to hppa's NaN handling, needs looking into (bug #914371)
-		$(usev hppa '
-			tst_qcborvalue
-			tst_qnumeric
-		')
-		# bug #914033
-		$(usev sparc '
-			tst_qbuffer
-			tst_qprocess
-			tst_qtconcurrentiteratekernel
-		')
-		# note: for linux, upstream only really runs+maintains tests for amd64
-		# https://doc.qt.io/qt-6/supported-platforms.html
-	)
-
-	qt6-build_src_test
-}
-
-src_install() {
-	qt6-build_src_install
-
-	if use test; then
-		local delete_bins=( # need a better way to handle this
-			clientserver copier crashingServer desktopsettingsaware_helper
-			echo fileWriterProcess modal_helper nospace 'one space'
-			paster qcommandlineparser_test_helper qfileopeneventexternal
-			socketprocess syslocaleapp tst_qhashseed_helper 'two space s'
-			write-read-write
-		)
-		local delete=( # sigh
-			"${D}${QT6_BINDIR}"/test*
-			"${delete_bins[@]/#/${D}${QT6_BINDIR}/}"
-		)
-		# using -f given not tracking which tests may be skipped or not
-		rm -rf -- "${delete[@]}" || die
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-13  1:27 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-08-13  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     486b070b0523b91176f5c56f93635de9a15f6a1c
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 21:05:42 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 01:25:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=486b070b

dev-qt/qtbase: fix build with gcc15, incl. for revdeps

Issue is in public headers, so revbump is necessary. Please ensure
update to qtbase-6.7.2-r2 before reporting new bugs while testing
gcc15. Thankfully most normal users should have updated long before
gcc15 is keyworded (and further stabled) so there should be little
need to set lower bounds.

Closes: https://bugs.gentoo.org/937808
Closes: https://bugs.gentoo.org/937809
Closes: https://bugs.gentoo.org/937824
Closes: https://bugs.gentoo.org/937825
Closes: https://bugs.gentoo.org/937828
Closes: https://bugs.gentoo.org/937829
Thanks-to: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch   | 32 ++++++++++++++++++++++
 ...base-6.7.2-r1.ebuild => qtbase-6.7.2-r2.ebuild} |  1 +
 dev-qt/qtbase/qtbase-6.7.9999.ebuild               |  1 +
 dev-qt/qtbase/qtbase-6.8.9999.ebuild               |  1 +
 dev-qt/qtbase/qtbase-6.9999.ebuild                 |  1 +
 5 files changed, 36 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch b/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
new file mode 100644
index 000000000000..64cedb14662a
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-gcc15-odr.patch
@@ -0,0 +1,32 @@
+https://codereview.qt-project.org/c/qt/qtbase/+/582403
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Aug 2024 16:43:05 +0100
+Subject: [PATCH] Fix ODR violation for IsFloatType_v
+
+With recent GCC 15 trunk, I started to see:
+```
+ld: .../kwalletentry.cc.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>';
+	src/runtime/kwalletd/backend/CMakeFiles/KF6WalletBackend.dir/cbc.cc.o:(.rodata+0x0): first defined here
+```
+
+The issue is that constexpr is only implicitly inline for functions or
+static data members [0], so the two constexpr IsFloatType_v definitions
+here cause an ODR violation.
+
+Explicitly mark them as inline constexpr.
+
+[0] http://eel.is/c++draft/dcl.constexpr#1.sentence-3
+--- a/src/corelib/global/qcomparehelpers.h
++++ b/src/corelib/global/qcomparehelpers.h
+@@ -348,9 +348,9 @@
+ 
+ template <typename T>
+-constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
++inline constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
+ 
+ #if QFLOAT16_IS_NATIVE
+ template <>
+-constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
++inline constexpr bool IsFloatType_v<QtPrivate::NativeFloat16Type> = true;
+ #endif
+ 

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r1.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.2-r1.ebuild
rename to dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
index 37e0b5c51a97..3b8705b716fd 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
@@ -146,6 +146,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.7.9999.ebuild b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
index 66720e44d615..e4a66f7137f8 100644
--- a/dev-qt/qtbase/qtbase-6.7.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.8.9999.ebuild b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
index 0f0f5cc3cd3a..9af015d9b088 100644
--- a/dev-qt/qtbase/qtbase-6.8.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.9999.ebuild b/dev-qt/qtbase/qtbase-6.9999.ebuild
index 0f0f5cc3cd3a..9af015d9b088 100644
--- a/dev-qt/qtbase/qtbase-6.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-13  1:27 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-08-13  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ca034bbed6d34c7e87a013a35ac9d72f5f8dc040
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 12 21:22:22 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 01:25:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca034bbe

dev-qt/qtbase: backport float16 fix for systems without sse2

Needs a revbump but it was done in previous commit at same
time for another reason.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.7.2-float16-sse2.patch   | 43 ++++++++++++++++++++++
 dev-qt/qtbase/qtbase-6.7.2-r2.ebuild               |  1 +
 2 files changed, 44 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
new file mode 100644
index 000000000000..a54c9daa42b9
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-float16-sse2.patch
@@ -0,0 +1,43 @@
+Backport from 6.7.3 as it may cause major problems for x86 sse2-less
+systems using gcc14.
+
+https://github.com/qt/qtbase/commit/39fa7e7bef90be2940c5f736935f963e3969e0bd
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sat, 27 Jul 2024 23:03:07 +0300
+Subject: [PATCH] Use _Float16 only when SSE2 is enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The GCC documentation [1] says: “On x86 targets with SSE2 enabled, GCC
+supports half-precision (16-bit) floating point via the _Float16 type”.
+
+On non-SSE2 x86 (such as Debian i386 baseline [2]), __FLT16_MAX__ is
+defined starting with GCC 14 [3], however any non-trivial use of the
+_Float16 type results in an error:
+
+error: operation not permitted on type ‘_Float16’ without option ‘-msse2’
+
+which makes some packages fail to build on i386 architecture [4].
+
+[1]: https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
+[2]: https://wiki.debian.org/ArchitectureSpecificsMemo#i386-1
+[3]: https://gcc.gnu.org/g:9a19fa8b616f83474c35cc5b34a3865073ced829
+[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1076986
+--- a/src/corelib/global/qtypes.h
++++ b/src/corelib/global/qtypes.h
+@@ -264,11 +264,10 @@
+ #  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = decltype(__FLT16_MAX__);
+-#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__)
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__ARM_FP16_FORMAT_IEEE)
+ #  define QFLOAT16_IS_NATIVE        1
+-#  ifdef __ARM_FP16_FORMAT_IEEE
+ using NativeFloat16Type = __fp16;
+-#  else
++#elif defined(Q_CC_GNU_ONLY) && defined(__FLT16_MAX__) && defined(__SSE2__)
++#  define QFLOAT16_IS_NATIVE        1
+ using NativeFloat16Type = _Float16;
+-#  endif
+ #else
+ #  define QFLOAT16_IS_NATIVE        0

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
index 3b8705b716fd..68a5c8f9e4fa 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
@@ -147,6 +147,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
+	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-24  8:54 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-08-24  8:54 UTC (permalink / raw
  To: gentoo-commits

commit:     05e731ced719c201d0107c461e66dc77a6b94063
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 24 08:26:39 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Aug 24 08:54:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e731ce

dev-qt/qtbase: backport fix for QWindowPrivate plasma crashes

Assuming the date given by Qt is not a typo, still over a month
to go before 6.7.3 releases (if at all) so can't count on it.

Straight to stable given seems safe and is only a 1 line change,
does not feel worth re-stabilizing over.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/qtbase-6.7.2-qwindowprivate-crash.patch  | 28 ++++++++++++++++++++++
 ...base-6.7.2-r2.ebuild => qtbase-6.7.2-r3.ebuild} |  1 +
 2 files changed, 29 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
new file mode 100644
index 000000000000..353383921b7f
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qwindowprivate-crash.patch
@@ -0,0 +1,28 @@
+https://bugs.kde.org/show_bug.cgi?id=490791
+https://codereview.qt-project.org/c/qt/qtbase/+/584636
+From: David Edmundson <davidedmundson@kde.org>
+Date: Wed, 31 Jul 2024 11:59:14 +0100
+Subject: [PATCH] QWidget: Store initialScreen as QPointer
+
+A Toplevel QWidget can hold a pointer to the screen where it will
+eventually show contents, before a QWidgetWindow is created which then
+takes precedence.
+
+The screen member of QWindows is always kept up-to-date when a screen is
+removed, but not the contents of a toplevel window. If a widget has
+setScreen called but is never shown, it has potentially dangling pointer
+which can cause issues in the future.
+
+Pick-to: 6.5
+Change-Id: Ia7c80549e8b3c90a75cdde745487e87ecddaca63
+Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
+(cherry picked from commit d67acf94afffde6a71498be6e30447f3acf7558e)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+(cherry picked from commit 6af4e5f604fff40cdb3be40099b8884362806ef4)
+--- a/src/widgets/kernel/qwidget_p.h
++++ b/src/widgets/kernel/qwidget_p.h
+@@ -110,3 +110,3 @@
+     Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen
+-    QScreen *initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
++    QPointer<QScreen> initialScreen; // Screen when passing a QDesktop[Screen]Widget as parent.
+ 

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
rename to dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
index 68a5c8f9e4fa..ff2eb438c253 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r2.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
@@ -148,6 +148,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.2-CVE-2024-39936.patch
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
+	"${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-08-25 17:07 Maciej Mrozowski
  0 siblings, 0 replies; 20+ messages in thread
From: Maciej Mrozowski @ 2024-08-25 17:07 UTC (permalink / raw
  To: gentoo-commits

commit:     46642f1ba7c59a58356e93664741cbfcaad02f54
Author:     Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 16:44:49 2024 +0000
Commit:     Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 17:06:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46642f1b

dev-qt/qtbase: add missing include, bug 938475

Bug: https://bugs.gentoo.org/938475
Signed-off-by: Maciej Mrozowski <reavertm <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch | 11 +++++++++++
 dev-qt/qtbase/qtbase-6.7.2-r3.ebuild                    |  1 +
 2 files changed, 12 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
new file mode 100644
index 000000000000..d010222e09da
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
@@ -0,0 +1,11 @@
+diff '--color=auto' -ruN qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h my/src/corelib/tools/qcontiguouscache.h
+--- qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h	2024-05-07 01:06:44.000000000 +0200
++++ my/src/corelib/tools/qcontiguouscache.h	2024-08-25 18:20:13.958793266 +0200
+@@ -8,6 +8,7 @@
+ #include <QtCore/qassert.h>
+ #include <QtCore/qtclasshelpermacros.h>
+ #include <QtCore/qtcoreexports.h>
++#include <QtCore/qglobal.h>
+ #include <QtCore/qtypeinfo.h>
+ 
+ #include <climits>

diff --git a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
index ff2eb438c253..2782f8186d06 100644
--- a/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.2-r3.ebuild
@@ -149,6 +149,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.2-gcc15-odr.patch
 	"${FILESDIR}"/${PN}-6.7.2-float16-sse2.patch
 	"${FILESDIR}"/${PN}-6.7.2-qwindowprivate-crash.patch
+	"${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-09-03  7:44 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-09-03  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     daf905fe1fc41ee90b3fa9851b9fca858fecb789
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  3 06:39:34 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  3 07:43:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daf905fe

dev-qt/qtbase: forward qcontiguouscache patch to <=6.8

Upstreamed but currently is only in dev branch, and unclear if it will
make it in 6.7.3 or 6.8.0 before release (-rc is not far for 6.8). Not
to forget, add in 6.7.9999 and 6.8.9999 until it fails to apply.

Also scrub & add links.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch | 13 +++++--------
 dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch | 14 ++++++++++++++
 dev-qt/qtbase/qtbase-6.7.9999.ebuild                    |  1 +
 dev-qt/qtbase/qtbase-6.8.9999.ebuild                    |  1 +
 4 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
index d010222e09da..02219feaf681 100644
--- a/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
+++ b/dev-qt/qtbase/files/qtbase-6.7.2-qcontiguouscache.patch
@@ -1,11 +1,8 @@
-diff '--color=auto' -ruN qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h my/src/corelib/tools/qcontiguouscache.h
---- qtbase-everywhere-src-6.7.2/src/corelib/tools/qcontiguouscache.h	2024-05-07 01:06:44.000000000 +0200
-+++ my/src/corelib/tools/qcontiguouscache.h	2024-08-25 18:20:13.958793266 +0200
-@@ -8,6 +8,7 @@
- #include <QtCore/qassert.h>
- #include <QtCore/qtclasshelpermacros.h>
+https://bugs.gentoo.org/938475
+Older version of https://codereview.qt-project.org/c/qt/qtbase/+/585668 for 6.7
+--- a/src/corelib/tools/qcontiguouscache.h
++++ b/src/corelib/tools/qcontiguouscache.h
+@@ -10,2 +10,3 @@
  #include <QtCore/qtcoreexports.h>
 +#include <QtCore/qglobal.h>
  #include <QtCore/qtypeinfo.h>
- 
- #include <climits>

diff --git a/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch b/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch
new file mode 100644
index 000000000000..e5f14e0a1c73
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.8.0-qcontiguouscache.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/938475
+https://codereview.qt-project.org/c/qt/qtbase/+/585668
+From: Sam James <sam@gentoo.org>
+Date: Sun, 25 Aug 2024 17:34:22 +0100
+Subject: [PATCH] QContiguousCache: fix include for qMin
+
+Include `<QtCore/qminmax.h>` for `qMin`. This came up downstream
+in Gentoo at https://bugs.gentoo.org/938475.
+--- a/src/corelib/tools/qcontiguouscache.h
++++ b/src/corelib/tools/qcontiguouscache.h
+@@ -10,2 +10,3 @@
+ #include <QtCore/qtcoreexports.h>
++#include <QtCore/qminmax.h>
+ #include <QtCore/qttypetraits.h>

diff --git a/dev-qt/qtbase/qtbase-6.7.9999.ebuild b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
index b4cd4854a401..85c2de60245c 100644
--- a/dev-qt/qtbase/qtbase-6.7.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.8.9999.ebuild b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
index 3c595f73638f..0f983d79ae6f 100644
--- a/dev-qt/qtbase/qtbase-6.8.9999.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.9999.ebuild
@@ -145,6 +145,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.5.2-no-symlink-check.patch
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
+	"${FILESDIR}"/${PN}-6.8.0-qcontiguouscache.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/
@ 2024-10-08 17:46 Ionen Wolkens
  0 siblings, 0 replies; 20+ messages in thread
From: Ionen Wolkens @ 2024-10-08 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     f4648ae4668c8d700f207f1fe36c5aca218ebc90
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  8 16:20:28 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 17:44:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4648ae4

dev-qt/qtbase: backport fix for QTBUG-125053

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../qtbase/files/qtbase-6.7.3-QTBUG-125053.patch   | 46 ++++++++++++++++++++++
 ...base-6.7.3-r1.ebuild => qtbase-6.7.3-r2.ebuild} |  1 +
 ...{qtbase-6.8.0.ebuild => qtbase-6.8.0-r1.ebuild} |  1 +
 3 files changed, 48 insertions(+)

diff --git a/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch b/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch
new file mode 100644
index 000000000000..fc60e30b62c1
--- /dev/null
+++ b/dev-qt/qtbase/files/qtbase-6.7.3-QTBUG-125053.patch
@@ -0,0 +1,46 @@
+https://bugreports.qt.io/browse/QTBUG-125053
+https://bugreports.qt.io/browse/QTBUG-127340
+https://codereview.qt-project.org/c/qt/qtbase/+/593123
+--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
++++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
+@@ -3396,4 +3396,11 @@
+ void QAbstractItemModel::beginResetModel()
+ {
++    Q_D(QAbstractItemModel);
++    if (d->resetting) {
++        qWarning() << "beginResetModel called on" << this << "without calling endResetModel first";
++        // Warn, but don't return early in case user code relies on the incorrect behavior.
++    }
++
++    d->resetting = true;
+     emit modelAboutToBeReset(QPrivateSignal());
+ }
+@@ -3413,6 +3420,12 @@
+ {
+     Q_D(QAbstractItemModel);
++    if (!d->resetting) {
++        qWarning() << "endResetModel called on" << this << "without calling beginResetModel first";
++        // Warn, but don't return early in case user code relies on the incorrect behavior.
++    }
++
+     d->invalidatePersistentIndexes();
+     resetInternalData();
++    d->resetting = false;
+     emit modelReset(QPrivateSignal());
+ }
+--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
++++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
+@@ -46,4 +46,6 @@
+     ~QAbstractItemModelPrivate();
+ 
++    static const QAbstractItemModelPrivate *get(const QAbstractItemModel *model) { return model->d_func(); }
++
+     void removePersistentIndexData(QPersistentModelIndexData *data);
+     void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
+@@ -116,4 +118,6 @@
+     } persistent;
+ 
++    bool resetting = false;
++
+     static const QHash<int,QByteArray> &defaultRoleNames();
+     static bool isVariantLessThan(const QVariant &left, const QVariant &right,

diff --git a/dev-qt/qtbase/qtbase-6.7.3-r1.ebuild b/dev-qt/qtbase/qtbase-6.7.3-r2.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.7.3-r1.ebuild
rename to dev-qt/qtbase/qtbase-6.7.3-r2.ebuild
index 07859a84c2e5..0769e8d8b6ed 100644
--- a/dev-qt/qtbase/qtbase-6.7.3-r1.ebuild
+++ b/dev-qt/qtbase/qtbase-6.7.3-r2.ebuild
@@ -148,6 +148,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch
 	"${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch
 	"${FILESDIR}"/${PN}-6.7.3-erratic-mouse-input.patch
+	"${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch
 )
 
 src_prepare() {

diff --git a/dev-qt/qtbase/qtbase-6.8.0.ebuild b/dev-qt/qtbase/qtbase-6.8.0-r1.ebuild
similarity index 99%
rename from dev-qt/qtbase/qtbase-6.8.0.ebuild
rename to dev-qt/qtbase/qtbase-6.8.0-r1.ebuild
index 2815b4c801fc..0a2a4876ffe6 100644
--- a/dev-qt/qtbase/qtbase-6.8.0.ebuild
+++ b/dev-qt/qtbase/qtbase-6.8.0-r1.ebuild
@@ -146,6 +146,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.6.1-forkfd-childstack-size.patch
 	"${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch
 	"${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch
+	"${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch
 	"${FILESDIR}"/${PN}-6.8.0-qcontiguouscache.patch
 )
 


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

end of thread, other threads:[~2024-10-08 17:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-09 23:03 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/, dev-qt/qtbase/files/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2024-10-08 17:46 Ionen Wolkens
2024-09-03  7:44 Ionen Wolkens
2024-08-25 17:07 Maciej Mrozowski
2024-08-24  8:54 Ionen Wolkens
2024-08-13  1:27 Ionen Wolkens
2024-08-13  1:27 Ionen Wolkens
2024-06-08 13:41 Ionen Wolkens
2024-05-02 13:09 Ionen Wolkens
2024-04-19  7:55 Ionen Wolkens
2024-04-05 14:37 Ionen Wolkens
2024-01-03 15:52 Ionen Wolkens
2023-12-19 20:33 Ionen Wolkens
2023-11-29  5:36 Ionen Wolkens
2023-09-24 17:22 Ionen Wolkens
2023-07-20 19:41 Jimi Huotari
2023-06-10 13:33 Jimi Huotari
2023-06-02 15:39 Jimi Huotari
2023-05-24  6:52 Jimi Huotari
2023-03-02 19:18 Mike Gilbert

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