Add dev-qt from an older version of the gentoo repo
Qt5 has been removed, we restore it since we still use it.
This commit is contained in:
6
dev-qt/qtxml/Manifest
Normal file
6
dev-qt/qtxml/Manifest
Normal file
@ -0,0 +1,6 @@
|
||||
AUX qtxml-5.15.16-CVE-2025-30348.patch 6107 BLAKE2B 8ab8bc0dfd9adacfec736259cf88519f12eb9dfae815838b4cf2e73e20854885f724081488194768a958d4646b6fdadf6cfa9fd28b652bfb5108af729a430043 SHA512 a351976aca39e5b52a2acad8c8a59df49584b73e3d591b18c68125f2bb96debfdbb5954502c59043be03f21e062fcb0956f84e6680ab0f8cfa1e2d967c428b6d
|
||||
DIST qtbase-5.15-gentoo-patchset-6.tar.xz 8288 BLAKE2B ad9695a528345dd3b8e9ce72b7bdfe8f744f16685a567bbc7862ba6c28e5a426260cb0b73e2573cb3a6f16f1785786898ffb44c90f5d75354b97e5756c7573db SHA512 97bc4d5375e1750a5578439ff320ee2e5e929df1dafe56b4e86f2de8ad26c91dc4002e45ad75d9f936347d49b9f54c0c42f8fc2cb7dfd4f54bf08a210b3bc720
|
||||
DIST qtbase-5.15.18-gentoo-kde-1.tar.xz 450532 BLAKE2B 172732fe6a2f7dd4718b224d8a8ba7b182ded24f74ee38545d20a17364757153b399cae82b40f425e72b2587ec432f024868078edfe95280242211a040ddd9f6 SHA512 e0257171cf723cb6208a06f28fc95fa07d1239ea9dd3daa79d362146aa53e008398c9e1d95443b84d6d71b835a3f010b957e748f3ec23b77a588d6b372fd0c47
|
||||
DIST qtbase-everywhere-opensource-src-5.15.18.tar.xz 51492796 BLAKE2B a02f13f2ae8d3994fe5e3fa5b3751cb2981c3203cc4f3859dd4398d6a62101772885acb0c7b1f830ba8e9fbdd64ecfdb2a6074bfedd1bd372b4fc9ceb747467d SHA512 d39c831e6f3ddcd6a50f103ff60a0700b451f137782249508b7447a80066e3e9259c9b5038e6077ccf8df06b6afefec232c3c4dd331d85765089c92571708206
|
||||
EBUILD qtxml-5.15.18.ebuild 518 BLAKE2B e71204d5146384be83cf72d6135785e1c84262e5371ad8f05781756fb3e1adc79e4a9dcfa47617defbc79507c6234017cd50722ef844b66e7a88699130db805a SHA512 a48109b6d60b3457a9a4a4f2cfc17fedd525d394ace73f4d5763ecc7ac6ce8c305d5f527e753e62ed2de9bf7822ee774bae07724eefa268ab1c52bd0340536e7
|
||||
MISC metadata.xml 482 BLAKE2B 651a49dc4a07f5e5a9c21990868e666d98acdea7d7b0b2c0e4c98eafc3da72c803d380e4abda30f33250f7bbd7654df713833ccdddcb975cbad6f92e488f643b SHA512 192c670abd7da29645513bf1d9297d942efdc49f5cf170861e7689fda47f51daa47f10c7c81c3b045366e0259179c6839ff7747197c9d792e8d0fd1a5818973e
|
||||
156
dev-qt/qtxml/files/qtxml-5.15.16-CVE-2025-30348.patch
Normal file
156
dev-qt/qtxml/files/qtxml-5.15.16-CVE-2025-30348.patch
Normal file
@ -0,0 +1,156 @@
|
||||
From 16918c1df3e709df2a97281e3825d94c84edb668 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
||||
Date: Tue, 06 Aug 2024 22:39:44 +0200
|
||||
Subject: [PATCH] XML/QDom: speedup encodeText()
|
||||
|
||||
The code copied the whole string, then replaced parts inline, at
|
||||
the cost of relocating everything beyond, at each replacement.
|
||||
Instead, copy character by character (in chunks where possible)
|
||||
and append replacements as we skip what they replace.
|
||||
|
||||
Manual conflict resolution for 6.5:
|
||||
- This is a manual cherry-pick. The original change was only
|
||||
picked to 6.8, but the quadratic behavior is present in Qt 5, too.
|
||||
- Changed Task-number to Fixes: because this is the real fix;
|
||||
the QString change, 315210de916d060c044c01e53ff249d676122b1b,
|
||||
was unrelated to the original QTBUG-127549.
|
||||
|
||||
Manual conflcit resolution for 5.15:
|
||||
- Kept/re-added QTextCodec::canEncode() check
|
||||
- Ported from Qt 6 to 5, to wit:
|
||||
- qsizetype -> int
|
||||
- QStringView::first/sliced(n) -> left/mid(n)
|
||||
(these functions are clearly called in-range, so the widened
|
||||
contract of the Qt 5 functions doesn't matter)
|
||||
- Ported from C++17- and C++14-isms to C++11:
|
||||
- replaced polymorphic lambda with a normal one (this requires
|
||||
rewriting the !canEncode() branch to use QByteArray/QLatin1String
|
||||
instead of QString)
|
||||
- As a drive-by, corrected the indentation of the case labels to
|
||||
horizontally align existing code (and follow Qt style)
|
||||
|
||||
Fixes: QTBUG-127549
|
||||
Change-Id: I368482859ed0c4127f1eec2919183711b5488ada
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
||||
(cherry picked from commit 2ce08e3671b8d18b0284447e5908ce15e6e8f80f)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
(cherry picked from commit 225e235cf966a44af23dbe9aaaa2fd20ab6430ee)
|
||||
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
||||
(cherry picked from commit 905a5bd421efff6a1d90b6140500d134d32ca745)
|
||||
---
|
||||
|
||||
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
|
||||
index 872221c..bf70477 100644
|
||||
--- a/src/xml/dom/qdom.cpp
|
||||
+++ b/src/xml/dom/qdom.cpp
|
||||
@@ -3676,59 +3676,67 @@
|
||||
const QTextCodec *const codec = s.codec();
|
||||
Q_ASSERT(codec);
|
||||
#endif
|
||||
- QString retval(str);
|
||||
- int len = retval.length();
|
||||
- int i = 0;
|
||||
+ QString retval;
|
||||
+ int start = 0;
|
||||
+ auto appendToOutput = [&](int cur, QLatin1String replacement)
|
||||
+ {
|
||||
+ if (start < cur) {
|
||||
+ retval.reserve(str.size() + replacement.size());
|
||||
+ retval.append(QStringView(str).left(cur).mid(start));
|
||||
+ }
|
||||
+ // Skip over str[cur], replaced by replacement
|
||||
+ start = cur + 1;
|
||||
+ retval.append(replacement);
|
||||
+ };
|
||||
|
||||
- while (i < len) {
|
||||
- const QChar ati(retval.at(i));
|
||||
-
|
||||
- if (ati == QLatin1Char('<')) {
|
||||
- retval.replace(i, 1, QLatin1String("<"));
|
||||
- len += 3;
|
||||
- i += 4;
|
||||
- } else if (encodeQuotes && (ati == QLatin1Char('"'))) {
|
||||
- retval.replace(i, 1, QLatin1String("""));
|
||||
- len += 5;
|
||||
- i += 6;
|
||||
- } else if (ati == QLatin1Char('&')) {
|
||||
- retval.replace(i, 1, QLatin1String("&"));
|
||||
- len += 4;
|
||||
- i += 5;
|
||||
- } else if (ati == QLatin1Char('>') && i >= 2 && retval[i - 1] == QLatin1Char(']') && retval[i - 2] == QLatin1Char(']')) {
|
||||
- retval.replace(i, 1, QLatin1String(">"));
|
||||
- len += 3;
|
||||
- i += 4;
|
||||
- } else if (performAVN &&
|
||||
- (ati == QChar(0xA) ||
|
||||
- ati == QChar(0xD) ||
|
||||
- ati == QChar(0x9))) {
|
||||
- const QString replacement(QLatin1String("&#x") + QString::number(ati.unicode(), 16) + QLatin1Char(';'));
|
||||
- retval.replace(i, 1, replacement);
|
||||
- i += replacement.length();
|
||||
- len += replacement.length() - 1;
|
||||
- } else if (encodeEOLs && ati == QChar(0xD)) {
|
||||
- retval.replace(i, 1, QLatin1String("
")); // Replace a single 0xD with a ref for 0xD
|
||||
- len += 4;
|
||||
- i += 5;
|
||||
- } else {
|
||||
+ const int len = str.size();
|
||||
+ for (int cur = 0; cur < len; ++cur) {
|
||||
+ switch (const char16_t ati = str[cur].unicode()) {
|
||||
+ case u'<':
|
||||
+ appendToOutput(cur, QLatin1String("<"));
|
||||
+ break;
|
||||
+ case u'"':
|
||||
+ if (encodeQuotes)
|
||||
+ appendToOutput(cur, QLatin1String("""));
|
||||
+ break;
|
||||
+ case u'&':
|
||||
+ appendToOutput(cur, QLatin1String("&"));
|
||||
+ break;
|
||||
+ case u'>':
|
||||
+ if (cur >= 2 && str[cur - 1] == u']' && str[cur - 2] == u']')
|
||||
+ appendToOutput(cur, QLatin1String(">"));
|
||||
+ break;
|
||||
+ case u'\r':
|
||||
+ if (performAVN || encodeEOLs)
|
||||
+ appendToOutput(cur, QLatin1String("
")); // \r == 0x0d
|
||||
+ break;
|
||||
+ case u'\n':
|
||||
+ if (performAVN)
|
||||
+ appendToOutput(cur, QLatin1String("
")); // \n == 0x0a
|
||||
+ break;
|
||||
+ case u'\t':
|
||||
+ if (performAVN)
|
||||
+ appendToOutput(cur, QLatin1String("	")); // \t == 0x09
|
||||
+ break;
|
||||
+ default:
|
||||
#if QT_CONFIG(textcodec)
|
||||
if(codec->canEncode(ati))
|
||||
- ++i;
|
||||
+ ; // continue
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// We have to use a character reference to get it through.
|
||||
- const ushort codepoint(ati.unicode());
|
||||
- const QString replacement(QLatin1String("&#x") + QString::number(codepoint, 16) + QLatin1Char(';'));
|
||||
- retval.replace(i, 1, replacement);
|
||||
- i += replacement.length();
|
||||
- len += replacement.length() - 1;
|
||||
+ const QByteArray replacement = "&#x" + QByteArray::number(uint{ati}, 16) + ';';
|
||||
+ appendToOutput(cur, QLatin1String{replacement});
|
||||
}
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
-
|
||||
- return retval;
|
||||
+ if (start > 0) {
|
||||
+ retval.append(QStringView(str).left(len).mid(start));
|
||||
+ return retval;
|
||||
+ }
|
||||
+ return str;
|
||||
}
|
||||
|
||||
void QDomAttrPrivate::save(QTextStream& s, int, int) const
|
||||
17
dev-qt/qtxml/metadata.xml
Normal file
17
dev-qt/qtxml/metadata.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>qt@gentoo.org</email>
|
||||
<name>Gentoo Qt Project</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://bugreports.qt.io/</bugs-to>
|
||||
<doc>https://doc.qt.io/</doc>
|
||||
</upstream>
|
||||
<slots>
|
||||
<subslots>
|
||||
Must only be used by packages that are known to use private parts of the Qt API.
|
||||
</subslots>
|
||||
</slots>
|
||||
</pkgmetadata>
|
||||
29
dev-qt/qtxml/qtxml-5.15.18.ebuild
Normal file
29
dev-qt/qtxml/qtxml-5.15.18.ebuild
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
if [[ ${PV} != *9999* ]]; then
|
||||
QT5_KDEPATCHSET_REV=1
|
||||
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv x86"
|
||||
fi
|
||||
|
||||
QT5_MODULE="qtbase"
|
||||
inherit qt5-build
|
||||
|
||||
DESCRIPTION="Implementation of SAX and DOM for the Qt5 framework"
|
||||
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="=dev-qt/qtcore-${QT5_PV}*:5="
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( =dev-qt/qtnetwork-${QT5_PV}* )
|
||||
"
|
||||
|
||||
QT5_TARGET_SUBDIRS=(
|
||||
src/xml
|
||||
)
|
||||
|
||||
QT5_GENTOO_PRIVATE_CONFIG=(
|
||||
:xml
|
||||
)
|
||||
Reference in New Issue
Block a user