summaryrefslogtreecommitdiff
path: root/dev-qt/qtcore
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2015-10-30 04:05:51 +1100
committerMichael Palimaka <kensington@gentoo.org>2015-11-01 01:29:09 +1100
commit2f38ee0ac7e073edbf0018b93b78e035081ff595 (patch)
treebe0dec6066b33a2d21f925858d4ec8626c9f7d0d /dev-qt/qtcore
parenta478b783f8e4f536a13a7d07b1f6242f77bea7c1 (diff)
downloadgentoo-2f38ee0ac7e073edbf0018b93b78e035081ff595.tar.gz
gentoo-2f38ee0ac7e073edbf0018b93b78e035081ff595.tar.xz
dev-qt: remove 4.8.5
Diffstat (limited to 'dev-qt/qtcore')
-rw-r--r--dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch114
-rw-r--r--dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch124
-rw-r--r--dev-qt/qtcore/qtcore-4.8.5-r2.ebuild178
3 files changed, 0 insertions, 416 deletions
diff --git a/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch b/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch
deleted file mode 100644
index c472d4212ff..00000000000
--- a/dev-qt/qtcore/files/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 512a1ce0698d370c313bb561bbf078935fa0342e Mon Sep 17 00:00:00 2001
-From: Mitch Curtis <mitch.curtis@digia.com>
-Date: Thu, 7 Nov 2013 09:36:29 +0100
-Subject: Disallow deep or widely nested entity references.
-
-Nested references with a depth of 2 or greater will fail. References
-that partially expand to greater than 1024 characters will also fail.
-
-This is a backport of 46a8885ae486e238a39efa5119c2714f328b08e4.
-
-Change-Id: I0c2e1fa13d6ccb5f88641dae2ed3f28bfdeaf609
-Reviewed-by: Richard J. Moore <rich@kde.org>
-Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-
-diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
-index a1777c5..3904632 100644
---- a/src/xml/sax/qxml.cpp
-+++ b/src/xml/sax/qxml.cpp
-@@ -424,6 +424,10 @@ private:
- int stringValueLen;
- QString emptyStr;
-
-+ // The limit to the amount of times the DTD parsing functions can be called
-+ // for the DTD currently being parsed.
-+ int dtdRecursionLimit;
-+
- const QString &string();
- void stringClear();
- void stringAddC(QChar);
-@@ -492,6 +496,7 @@ private:
- void unexpectedEof(ParseFunction where, int state);
- void parseFailed(ParseFunction where, int state);
- void pushParseState(ParseFunction function, int state);
-+ bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage);
-
- Q_DECLARE_PUBLIC(QXmlSimpleReader)
- QXmlSimpleReader *q_ptr;
-@@ -2759,6 +2764,7 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader)
- useNamespacePrefixes = false;
- reportWhitespaceCharData = true;
- reportEntities = false;
-+ dtdRecursionLimit = 2;
- }
-
- QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate()
-@@ -5018,6 +5024,11 @@ bool QXmlSimpleReaderPrivate::parseDoctype()
- }
- break;
- case Mup:
-+ if (dtdRecursionLimit > 0 && parameterEntities.size() > dtdRecursionLimit) {
-+ reportParseError(QString::fromLatin1(
-+ "DTD parsing exceeded recursion limit of %1.").arg(dtdRecursionLimit));
-+ return false;
-+ }
- if (!parseMarkupdecl()) {
- parseFailed(&QXmlSimpleReaderPrivate::parseDoctype, state);
- return false;
-@@ -6627,6 +6638,37 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq()
- return false;
- }
-
-+bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage)
-+{
-+ const QString value = string();
-+ QMap<QString, int> referencedEntityCounts;
-+ foreach (QString entityName, entities.keys()) {
-+ for (int i = 0; i < value.size() && i != -1; ) {
-+ i = value.indexOf(entityName, i);
-+ if (i != -1) {
-+ // The entityName we're currently trying to find
-+ // was matched in this string; increase our count.
-+ ++referencedEntityCounts[entityName];
-+ i += entityName.size();
-+ }
-+ }
-+ }
-+
-+ foreach (QString entityName, referencedEntityCounts.keys()) {
-+ const int timesReferenced = referencedEntityCounts[entityName];
-+ const QString entityValue = entities[entityName];
-+ if (entityValue.size() * timesReferenced > 1024) {
-+ if (errorMessage) {
-+ *errorMessage = QString::fromLatin1("The XML entity \"%1\""
-+ "expands too a string that is too large to process when "
-+ "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced);
-+ }
-+ return true;
-+ }
-+ }
-+ return false;
-+}
-+
- /*
- Parse a EntityDecl [70].
-
-@@ -6721,6 +6763,15 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
- switch (state) {
- case EValue:
- if ( !entityExist(name())) {
-+ QString errorMessage;
-+ if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) {
-+ // The entity at entityName is entityValue.size() characters
-+ // long in its unexpanded form, and was mentioned timesReferenced times,
-+ // resulting in a string that would be greater than 1024 characters.
-+ reportParseError(errorMessage);
-+ return false;
-+ }
-+
- entities.insert(name(), string());
- if (declHnd) {
- if (!declHnd->internalEntityDecl(name(), string())) {
---
-1.8.5.2
-
diff --git a/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch b/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch
deleted file mode 100644
index 03ef64f22d8..00000000000
--- a/dev-qt/qtcore/files/CVE-2013-4549-02-fully-expand-entities.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From cecceb0cdd87482124a73ecf537f3445d68be13e Mon Sep 17 00:00:00 2001
-From: Mitch Curtis <mitch.curtis@digia.com>
-Date: Tue, 12 Nov 2013 13:44:56 +0100
-Subject: Fully expand entities to ensure deep or widely nested ones fail
- parsing
-
-With 512a1ce0698d370c313bb561bbf078935fa0342e, we failed when parsing
-entities whose partially expanded size was greater than 1024
-characters. That was not enough, so now we fully expand all entities.
-
-This is a backport of f1053d94f59f053ce4acad9320df14f1fbe4faac.
-
-Change-Id: I41dd6f4525c63e82fd320a22d19248169627f7e0
-Reviewed-by: Richard J. Moore <rich@kde.org>
-
-diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
-index 3904632..befa801 100644
---- a/src/xml/sax/qxml.cpp
-+++ b/src/xml/sax/qxml.cpp
-@@ -426,7 +426,9 @@ private:
-
- // The limit to the amount of times the DTD parsing functions can be called
- // for the DTD currently being parsed.
-- int dtdRecursionLimit;
-+ static const int dtdRecursionLimit = 2;
-+ // The maximum amount of characters an entity value may contain, after expansion.
-+ static const int entityCharacterLimit = 1024;
-
- const QString &string();
- void stringClear();
-@@ -496,7 +498,7 @@ private:
- void unexpectedEof(ParseFunction where, int state);
- void parseFailed(ParseFunction where, int state);
- void pushParseState(ParseFunction function, int state);
-- bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage);
-+ bool isExpandedEntityValueTooLarge(QString *errorMessage);
-
- Q_DECLARE_PUBLIC(QXmlSimpleReader)
- QXmlSimpleReader *q_ptr;
-@@ -2764,7 +2766,6 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader)
- useNamespacePrefixes = false;
- reportWhitespaceCharData = true;
- reportEntities = false;
-- dtdRecursionLimit = 2;
- }
-
- QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate()
-@@ -6638,30 +6639,43 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq()
- return false;
- }
-
--bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage)
-+bool QXmlSimpleReaderPrivate::isExpandedEntityValueTooLarge(QString *errorMessage)
- {
-- const QString value = string();
-- QMap<QString, int> referencedEntityCounts;
-- foreach (QString entityName, entities.keys()) {
-- for (int i = 0; i < value.size() && i != -1; ) {
-- i = value.indexOf(entityName, i);
-- if (i != -1) {
-- // The entityName we're currently trying to find
-- // was matched in this string; increase our count.
-- ++referencedEntityCounts[entityName];
-- i += entityName.size();
-+ QMap<QString, int> literalEntitySizes;
-+ // The entity at (QMap<QString,) referenced the entities at (QMap<QString,) (int>) times.
-+ QMap<QString, QMap<QString, int> > referencesToOtherEntities;
-+ QMap<QString, int> expandedSizes;
-+
-+ // For every entity, check how many times all entity names were referenced in its value.
-+ foreach (QString toSearch, entities.keys()) {
-+ // The amount of characters that weren't entity names, but literals, like 'X'.
-+ QString leftOvers = entities.value(toSearch);
-+ // How many times was entityName referenced by toSearch?
-+ foreach (QString entityName, entities.keys()) {
-+ for (int i = 0; i < leftOvers.size() && i != -1; ) {
-+ i = leftOvers.indexOf(QString::fromLatin1("&%1;").arg(entityName), i);
-+ if (i != -1) {
-+ leftOvers.remove(i, entityName.size() + 2);
-+ // The entityName we're currently trying to find was matched in this string; increase our count.
-+ ++referencesToOtherEntities[toSearch][entityName];
-+ }
- }
- }
-+ literalEntitySizes[toSearch] = leftOvers.size();
- }
-
-- foreach (QString entityName, referencedEntityCounts.keys()) {
-- const int timesReferenced = referencedEntityCounts[entityName];
-- const QString entityValue = entities[entityName];
-- if (entityValue.size() * timesReferenced > 1024) {
-+ foreach (QString entity, referencesToOtherEntities.keys()) {
-+ expandedSizes[entity] = literalEntitySizes[entity];
-+ foreach (QString referenceTo, referencesToOtherEntities.value(entity).keys()) {
-+ const int references = referencesToOtherEntities.value(entity).value(referenceTo);
-+ // The total size of an entity's value is the expanded size of all of its referenced entities, plus its literal size.
-+ expandedSizes[entity] += expandedSizes[referenceTo] * references + literalEntitySizes[referenceTo] * references;
-+ }
-+
-+ if (expandedSizes[entity] > entityCharacterLimit) {
- if (errorMessage) {
-- *errorMessage = QString::fromLatin1("The XML entity \"%1\""
-- "expands too a string that is too large to process when "
-- "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced);
-+ *errorMessage = QString::fromLatin1("The XML entity \"%1\" expands too a string that is too large to process (%2 characters > %3).");
-+ *errorMessage = (*errorMessage).arg(entity).arg(expandedSizes[entity]).arg(entityCharacterLimit);
- }
- return true;
- }
-@@ -6764,10 +6778,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
- case EValue:
- if ( !entityExist(name())) {
- QString errorMessage;
-- if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) {
-- // The entity at entityName is entityValue.size() characters
-- // long in its unexpanded form, and was mentioned timesReferenced times,
-- // resulting in a string that would be greater than 1024 characters.
-+ if (isExpandedEntityValueTooLarge(&errorMessage)) {
- reportParseError(errorMessage);
- return false;
- }
---
-1.8.5.2
-
diff --git a/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
deleted file mode 100644
index d1dacc5bb49..00000000000
--- a/dev-qt/qtcore/qtcore-4.8.5-r2.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit qt4-build
-
-DESCRIPTION="Cross-platform application development framework"
-SLOT="4"
-if [[ ${QT4_BUILD_TYPE} == live ]]; then
- KEYWORDS=""
-else
- KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-fi
-IUSE="+glib iconv icu qt3support ssl"
-
-DEPEND="
- sys-libs/zlib
- glib? ( dev-libs/glib:2 )
- icu? ( >=dev-libs/icu-49:= )
- ssl? ( dev-libs/openssl:0 )
- !dev-qt/qttranslations:4
- !<x11-libs/cairo-1.10.2-r2
-"
-RDEPEND="${DEPEND}"
-PDEPEND="
- qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support] )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
- "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
- "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
- "${FILESDIR}/CVE-2013-4549-01-disallow-deep-or-widely-nested-entity-refs.patch"
- "${FILESDIR}/CVE-2013-4549-02-fully-expand-entities.patch"
-)
-
-pkg_setup() {
- QT4_TARGET_DIRECTORIES="
- src/tools/bootstrap
- src/tools/moc
- src/tools/rcc
- src/tools/uic
- src/corelib
- src/xml
- src/network
- src/plugins/codecs
- tools/linguist/lconvert
- tools/linguist/lrelease
- tools/linguist/lupdate"
-
- QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
- include
- src/plugins/plugins.pro
- src/plugins/qpluginbase.pri
- src/src.pro
- src/3rdparty/des
- src/3rdparty/harfbuzz
- src/3rdparty/md4
- src/3rdparty/md5
- src/3rdparty/sha1
- src/3rdparty/easing
- src/3rdparty/zlib_dependency.pri
- src/declarative
- src/gui
- src/script
- tools/shared
- tools/linguist/shared
- translations"
-
- qt4-build_pkg_setup
-}
-
-src_prepare() {
- # Don't pre-strip, bug 235026
- for i in kr jp cn tw; do
- echo "CONFIG+=nostrip" >> "${S}"/src/plugins/codecs/${i}/${i}.pro
- done
-
- qt4-build_src_prepare
-
- # bug 172219
- sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
- "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CXXFLAGS failed"
- sed -i -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
- "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix LDFLAGS failed"
-
- # bug 427782
- sed -i -e "/^CPPFLAGS/s/-g//" \
- "${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CPPFLAGS failed"
- sed -i -e "s/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/" \
- -e "s/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/" \
- "${S}/configure" || die "sed configure setBootstrapVariable failed"
-}
-
-src_configure() {
- myconf+="
- -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
- -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
- -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
- -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
- -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
- -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
- $(qt_use glib)
- $(qt_use iconv)
- $(qt_use icu)
- $(use ssl && echo -openssl-linked || echo -no-openssl)
- $(qt_use qt3support)"
-
- qt4-build_src_configure
-}
-
-src_install() {
- dobin bin/{qmake,moc,rcc,uic,lconvert,lrelease,lupdate}
-
- install_directories src/{corelib,xml,network,plugins/codecs}
-
- emake INSTALL_ROOT="${D}" install_mkspecs
-
- # install private headers
- insinto "${QTHEADERDIR#${EPREFIX}}"/QtCore/private
- find "${S}"/src/corelib -type f -name "*_p.h" -exec doins {} +
-
- # use freshly built libraries
- local DYLD_FPATH=
- [[ -d "${S}"/lib/QtCore.framework ]] \
- && DYLD_FPATH=$(for x in "${S}"/lib/*.framework; do echo -n ":$x"; done)
- DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
- LD_LIBRARY_PATH="${S}/lib" \
- "${S}"/bin/lrelease translations/*.ts \
- || die "generating translations failed"
- insinto "${QTTRANSDIR#${EPREFIX}}"
- doins translations/*.qm
-
- setqtenv
- fix_library_files
-
- # List all the multilib libdirs
- local libdirs=
- for libdir in $(get_all_libdirs); do
- libdirs+=":${EPREFIX}/usr/${libdir}/qt4"
- done
-
- cat <<-EOF > "${T}"/44qt4
- LDPATH="${libdirs:1}"
- EOF
- doenvd "${T}"/44qt4
-
- dodir "${QTDATADIR#${EPREFIX}}"/mkspecs/gentoo
- mv "${D}/${QTDATADIR}"/mkspecs/qconfig.pri "${D}${QTDATADIR}"/mkspecs/gentoo \
- || die "failed to move qconfig.pri"
-
- # Framework hacking
- if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]]; then
- # TODO: do this better
- sed -i -e '2a#include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
- "${D}${QTLIBDIR}"/QtCore.framework/Headers/qconfig.h \
- || die "sed for qconfig.h failed."
- dosym "${QTHEADERDIR#${EPREFIX}}"/Gentoo "${QTLIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo
- else
- sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \
- "${D}${QTHEADERDIR}"/QtCore/qconfig.h \
- "${D}${QTHEADERDIR}"/Qt/qconfig.h \
- || die "sed for qconfig.h failed"
- fi
-
- QCONFIG_DEFINE="QT_ZLIB"
- install_qconfigs
-
- # remove .la files
- prune_libtool_files
-
- keepdir "${QTSYSCONFDIR#${EPREFIX}}"
-
- # Framework magic
- fix_includes
-}