From d6a6d8fb377a1c3f901ffb2e42fbbbb3559c634c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 27 Sep 2022 05:34:47 -0400 Subject: [PATCH] import qt5-qttools-5.15.3-3.el9 --- .gitignore | 2 +- .qt5-qttools.metadata | 2 +- ...ttools-fix-data-files-path-for-tests.patch | 213 ++++++++++++++++++ SPECS/qt5-qttools.spec | 38 +++- 4 files changed, 249 insertions(+), 6 deletions(-) create mode 100644 SOURCES/qttools-fix-data-files-path-for-tests.patch diff --git a/.gitignore b/.gitignore index f2dbb22..adcb5a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/qttools-everywhere-src-5.15.2.tar.xz +SOURCES/qttools-everywhere-opensource-src-5.15.3.tar.xz diff --git a/.qt5-qttools.metadata b/.qt5-qttools.metadata index 0f6f23c..6b68781 100644 --- a/.qt5-qttools.metadata +++ b/.qt5-qttools.metadata @@ -1 +1 @@ -ae92f651b1b029bd6f55fc8888134d73d8ad19be SOURCES/qttools-everywhere-src-5.15.2.tar.xz +5ebd5b921ab4133f00eaf786e7d3ef79f9a1442c SOURCES/qttools-everywhere-opensource-src-5.15.3.tar.xz diff --git a/SOURCES/qttools-fix-data-files-path-for-tests.patch b/SOURCES/qttools-fix-data-files-path-for-tests.patch new file mode 100644 index 0000000..ebe75bb --- /dev/null +++ b/SOURCES/qttools-fix-data-files-path-for-tests.patch @@ -0,0 +1,213 @@ +diff --git a/tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.cpp b/tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.cpp +index 039ea2f..514578a 100644 +--- a/tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.cpp ++++ b/tests/auto/qhelpcontentmodel/tst_qhelpcontentmodel.cpp +@@ -84,12 +84,12 @@ private: + void tst_QHelpContentModel::init() + { + // defined in profile +- QString path = QLatin1String(SRCDIR); ++ QString path = QFINDTESTDATA("data/"); + +- m_colFile = path + QLatin1String("/data/col.qhc"); ++ m_colFile = path + QLatin1String("col.qhc"); + if (QFile::exists(m_colFile)) + QDir::current().remove(m_colFile); +- if (!QFile::copy(path + "/data/collection.qhc", m_colFile)) ++ if (!QFile::copy(path + "collection.qhc", m_colFile)) + QFAIL("Cannot copy file!"); + QFile f(m_colFile); + f.setPermissions(QFile::WriteUser|QFile::ReadUser); +diff --git a/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp b/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp +index ba2b153..7f42a8e 100644 +--- a/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp ++++ b/tests/auto/qhelpenginecore/tst_qhelpenginecore.cpp +@@ -81,14 +81,14 @@ private: + void tst_QHelpEngineCore::init() + { + // defined in profile +- m_path = QLatin1String(SRCDIR); ++ m_path = QFINDTESTDATA("data/"); + + m_path = QFileInfo(m_path).absoluteFilePath(); + +- m_colFile = m_path + QLatin1String("/data/col.qhc"); ++ m_colFile = m_path + QLatin1String("col.qhc"); + if (QFile::exists(m_colFile)) + QDir::current().remove(m_colFile); +- if (!QFile::copy(m_path + "/data/collection.qhc", m_colFile)) ++ if (!QFile::copy(m_path + "collection.qhc", m_colFile)) + QFAIL("Cannot copy file!"); + QFile f(m_colFile); + f.setPermissions(QFile::WriteUser|QFile::ReadUser); +@@ -111,7 +111,7 @@ void tst_QHelpEngineCore::setCollectionFile() + QHelpEngineCore help(m_colFile, 0); + QCOMPARE(help.collectionFile(), QFileInfo(m_colFile).absoluteFilePath()); + +- QString col1File = m_path + QLatin1String("/data/collection1.qhc"); ++ QString col1File = m_path + QLatin1String("collection1.qhc"); + help.setCollectionFile(col1File); + QCOMPARE(help.collectionFile(), QFileInfo(col1File).absoluteFilePath()); + +@@ -125,7 +125,7 @@ void tst_QHelpEngineCore::copyCollectionFile() + QHelpEngineCore help(m_colFile, 0); + QCOMPARE(help.collectionFile(), QFileInfo(m_colFile).absoluteFilePath()); + +- QString copiedFile = m_path + QLatin1String("/collectionCopy.qhc"); ++ QString copiedFile = m_path + QLatin1String("collectionCopy.qhc"); + if (QFile::exists(copiedFile)) + QDir::current().remove(copiedFile); + +@@ -165,7 +165,7 @@ void tst_QHelpEngineCore::copyCollectionFile() + while (m_query->next()) { + if (i == 0) { + QCOMPARE(m_query->value(0).toString(), QString("trolltech.com.3-3-8.qmake")); +- QCOMPARE(m_query->value(1).toString(), QString("data/qmake-3.3.8.qch")); ++ QCOMPARE(m_query->value(1).toString(), QString("qmake-3.3.8.qch")); + } + ++i; + } +@@ -179,9 +179,9 @@ void tst_QHelpEngineCore::copyCollectionFile() + + void tst_QHelpEngineCore::namespaceName() + { +- QCOMPARE(QHelpEngineCore::namespaceName(m_path + "/data/qmake-3.3.8.qch"), ++ QCOMPARE(QHelpEngineCore::namespaceName(m_path + "qmake-3.3.8.qch"), + QString("trolltech.com.3-3-8.qmake")); +- QCOMPARE(QHelpEngineCore::namespaceName(m_path + "/data/linguist-3.3.8.qch"), ++ QCOMPARE(QHelpEngineCore::namespaceName(m_path + "linguist-3.3.8.qch"), + QString("trolltech.com.3-3-8.linguist")); + } + +@@ -206,11 +206,11 @@ void tst_QHelpEngineCore::registerDocumentation() + { + QHelpEngineCore c(m_colFile); + QCOMPARE(c.setupData(), true); +- c.registerDocumentation(m_path + "/data/qmake-3.3.8.qch"); ++ c.registerDocumentation(m_path + "qmake-3.3.8.qch"); + QCOMPARE(c.registeredDocumentations().count(), 1); +- c.registerDocumentation(m_path + "/data/qmake-3.3.8.qch"); ++ c.registerDocumentation(m_path + "qmake-3.3.8.qch"); + QCOMPARE(c.registeredDocumentations().count(), 1); +- c.registerDocumentation(m_path + "/data/linguist-3.3.8.qch"); ++ c.registerDocumentation(m_path + "linguist-3.3.8.qch"); + QCOMPARE(c.registeredDocumentations().count(), 2); + } + +@@ -248,9 +248,9 @@ void tst_QHelpEngineCore::documentationFileName() + QHelpEngineCore c(m_colFile); + QCOMPARE(c.setupData(), true); + QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.3-3-8.qmake")), +- QString(m_path + "/data/qmake-3.3.8.qch")); ++ QString(m_path + "qmake-3.3.8.qch")); + QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.1.0.0.test")), +- QString(m_path + "/data/test.qch")); ++ QString(m_path + "test.qch")); + QCOMPARE(c.documentationFileName(QLatin1String("trolltech.com.empty")), + QString()); + } +@@ -367,7 +367,7 @@ void tst_QHelpEngineCore::fileData() + QCOMPARE(ba.size(), 0); + ba = help.fileData(QUrl("qthelp://trolltech.com.1.0.0.test/testFolder/test.html")); + QTextStream s(ba, QIODevice::ReadOnly|QIODevice::Text); +- QFile f(m_path + "/data/test.html"); ++ QFile f(m_path + "test.html"); + if (!f.open(QIODevice::ReadOnly|QIODevice::Text)) + QFAIL("Cannot open original file!"); + QTextStream ts(&f); +@@ -433,9 +433,9 @@ void tst_QHelpEngineCore::setAutoSaveFilter() + + void tst_QHelpEngineCore::metaData() + { +- QCOMPARE(QHelpEngineCore::metaData(m_path + "/data/test.qch", "author").toString(), ++ QCOMPARE(QHelpEngineCore::metaData(m_path + "test.qch", "author").toString(), + QString("Digia Plc and/or its subsidiary(-ies)")); +- QCOMPARE(QHelpEngineCore::metaData(m_path + "/data/test.qch", "notExisting").isValid(), ++ QCOMPARE(QHelpEngineCore::metaData(m_path + "test.qch", "notExisting").isValid(), + false); + } + +diff --git a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp +index 47a879d..99f4615 100644 +--- a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp ++++ b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp +@@ -57,8 +57,8 @@ private: + + void tst_QHelpGenerator::initTestCase() + { +- QString path = QLatin1String(SRCDIR); +- m_outputFile = path + QLatin1String("/data/test.qch"); ++ QString path = QFINDTESTDATA("data/"); ++ m_outputFile = path + QLatin1String("test.qch"); + if (QFile::exists(m_outputFile)) { + QDir d; + if (!d.remove(m_outputFile)) +@@ -69,9 +69,9 @@ void tst_QHelpGenerator::initTestCase() + void tst_QHelpGenerator::generateHelp() + { + // defined in profile +- QString path = QLatin1String(SRCDIR); ++ QString path = QFINDTESTDATA("data/"); + +- QString inputFile(path + "/data/test.qhp"); ++ QString inputFile(path + "test.qhp"); + QHelpProjectData data; + if (!data.readData(inputFile)) + QFAIL("Cannot read qthp file!"); +@@ -194,17 +194,17 @@ void tst_QHelpGenerator::checkMetaData() + void tst_QHelpGenerator::generateTwice() + { + // defined in profile +- QString path = QLatin1String(SRCDIR); ++ QString path = QFINDTESTDATA("data/"); + +- QString inputFile(path + "/data/test.qhp"); ++ QString inputFile(path + "test.qhp"); + QHelpProjectData data; + if (!data.readData(inputFile)) + QFAIL("Cannot read qhp file!"); + + HelpGenerator generator1; + HelpGenerator generator2; +- QString outputFile1 = path + QLatin1String("/data/test1.qch"); +- QString outputFile2 = path + QLatin1String("/data/test2.qch"); ++ QString outputFile1 = path + QLatin1String("test1.qch"); ++ QString outputFile2 = path + QLatin1String("test2.qch"); + QCOMPARE(generator1.generate(&data, outputFile1), true); + QCOMPARE(generator2.generate(&data, outputFile2), true); + +diff --git a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp +index 713c229..65ee62f 100644 +--- a/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp ++++ b/tests/auto/qhelpindexmodel/tst_qhelpindexmodel.cpp +@@ -84,12 +84,12 @@ private: + + void tst_QHelpIndexModel::init() + { +- QString path = QLatin1String(SRCDIR); ++ QString path = QFINDTESTDATA("data/"); + +- m_colFile = path + QLatin1String("/data/col.qhc"); ++ m_colFile = path + QLatin1String("col.qhc"); + if (QFile::exists(m_colFile)) + QDir::current().remove(m_colFile); +- if (!QFile::copy(path + "/data/collection.qhc", m_colFile)) ++ if (!QFile::copy(path + "collection.qhc", m_colFile)) + QFAIL("Cannot copy file!"); + QFile f(m_colFile); + f.setPermissions(QFile::WriteUser|QFile::ReadUser); +diff --git a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp +index a09135d..d59a3fc 100644 +--- a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp ++++ b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp +@@ -52,8 +52,8 @@ private: + + void tst_QHelpProjectData::initTestCase() + { +- const QString path = QLatin1String(SRCDIR); +- m_inputFile = path + QLatin1String("/data/test.qhp"); ++ const QString path = QFINDTESTDATA("data/"); ++ m_inputFile = path + QLatin1String("test.qhp"); + } + + void tst_QHelpProjectData::readData() diff --git a/SPECS/qt5-qttools.spec b/SPECS/qt5-qttools.spec index da5d64b..9d90530 100644 --- a/SPECS/qt5-qttools.spec +++ b/SPECS/qt5-qttools.spec @@ -11,13 +11,13 @@ Summary: Qt5 - QtTool components Name: qt5-qttools -Version: 5.15.2 -Release: 11%{?dist} +Version: 5.15.3 +Release: 3%{?dist} License: LGPLv3 or LGPLv2 Url: http://www.qt.io %global majmin %(echo %{version} | cut -d. -f1-2) -Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz +Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz # help lrelease/lupdate use/prefer qmake-qt5 # https://bugzilla.redhat.com/show_bug.cgi?id=1009893 @@ -30,6 +30,10 @@ Patch4: qttools-opensource-src-5.7-add-libatomic.patch # https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package Patch5: 0001-Link-against-libclang-cpp.so-instead-of-the-clang-co.patch +%if 0%{?build_tests} +Patch100: qttools-fix-data-files-path-for-tests.patch +%endif + ## upstream patches Source20: assistant.desktop @@ -188,6 +192,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %endif %patch5 -p1 -b .libclang-cpp +%if 0%{?build_tests} +%patch100 -p1 -b .fix-data-files-path-for-tests +%endif %build %{qmake_qt5} \ @@ -203,7 +210,18 @@ Requires: %{name}%{?_isa} = %{version}-%{release} make install INSTALL_ROOT=%{buildroot} %if 0%{?build_tests} -%qt5_install_tests +# FIXME: qttools is special case and we cannot use qt5_install_tests macro as +# it skips many data files used by qttools unit tests +#qt5_install_tests +mkdir -p %{buildroot}%{_qt5_libdir}/qt5 +find ./tests -not -path '*/\.*' -type d | while read LINE +do + mkdir -p "%{buildroot}%{_qt5_libdir}/qt5/$LINE" +done +find ./tests -not -path '*/\.*' -not -name 'uic_wrapper.sh' -not -name 'Makefile' -not -name 'target_wrapper.sh' -type f | while read LINE +do + cp -r --parents "$LINE" %{buildroot}%{_qt5_libdir}/qt5/ +done %endif # Add desktop files, --vendor=... helps avoid possible conflicts with qt3/qt4 @@ -501,6 +519,18 @@ fi %endif %changelog +* Thu May 19 2022 Jan Grulich - 5.15.3-3 +- Rebuild (LLVM-14) + Resolves: bz#2061054 + +* Wed Apr 20 2022 Jan Grulich - 5.15.3-2 +- Fix unit tests used by gating + Resolves: bz#2061370 + +* Mon Mar 28 2022 Jan Grulich - 5.15.3-1 +- 5.15.3 + Resolves: bz#2061370 + * Fri Dec 17 2021 Jan Grulich - 5.15.2-11 - Rebuild (LLVM13) Resolves: bz#2001129