diff --git a/0001-CVE-2019-14744.patch b/0001-CVE-2019-14744.patch deleted file mode 100644 index 28250fb..0000000 --- a/0001-CVE-2019-14744.patch +++ /dev/null @@ -1,127 +0,0 @@ -From e7e85401bc4e092cd2b2d4e6a1dca2736002faa5 Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Wed, 7 Jul 2021 15:19:28 +0800 -Subject: [PATCH] CVE-2019-14744 - ---- - autotests/kconfigtest.cpp | 10 ++-------- - docs/options.md | 15 +++++---------- - src/core/kconfig.cpp | 37 +------------------------------------ - 3 files changed, 8 insertions(+), 54 deletions(-) - -diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp -index 64c6223..4d97c56 100644 ---- a/autotests/kconfigtest.cpp -+++ b/autotests/kconfigtest.cpp -@@ -38,7 +38,7 @@ - #include - #endif - #ifndef Q_OS_WIN --#include // gethostname -+#include // getuid - #endif - - KCONFIGGROUP_DECLARE_ENUM_QOBJECT(KConfigTest, Testing) -@@ -545,14 +545,8 @@ void KConfigTest::testPath() - QCOMPARE(group.readPathEntry("withBraces", QString()), QString("file://" + HOMEPATH)); - QVERIFY(group.hasKey("URL")); - QCOMPARE(group.readEntry("URL", QString()), QString("file://" + HOMEPATH)); --#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) -- // I don't know if this will work on windows -- // This test hangs on OS X - QVERIFY(group.hasKey("hostname")); -- char hostname[256]; -- QVERIFY(::gethostname(hostname, sizeof(hostname)) == 0); -- QCOMPARE(group.readEntry("hostname", QString()), QString::fromLatin1(hostname)); --#endif -+ QCOMPARE(group.readEntry("hostname", QString()), QStringLiteral("(hostname)")); // the $ got removed because empty var name - QVERIFY(group.hasKey("noeol")); - QCOMPARE(group.readEntry("noeol", QString()), QString("foo")); - -diff --git a/docs/options.md b/docs/options.md -index fab22e1..8cd73f8 100644 ---- a/docs/options.md -+++ b/docs/options.md -@@ -66,19 +66,14 @@ environment variables (and `XDG_CONFIG_HOME` in particular). - - Shell Expansion - --------------- -- --If an entry is marked with `$e`, environment variables and shell commands will --be expanded. -- -+If an entry is marked with `$e`, environment variables will be expanded. -+ - Name[$e]=$USER -- Host[$e]=$(hostname) - - When the "Name" entry is read `$USER` will be replaced with the value of the --`$USER` environment variable, and `$(hostname)` will be replaced with the output --of the `hostname` command. -- --Note that the application will replace `$USER` and `$(hostname)` with their --respective expanded values after saving. To prevent this combine the `$e` option -+`$USER` environment variable. -+Note that the application will replace `$USER` with its -+expanded value after saving. To prevent this combine the `$e` option - with `$i` (immmutable) option. For example: - - Name[$ei]=$USER -diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp -index bc2871c..f9a3381 100644 ---- a/src/core/kconfig.cpp -+++ b/src/core/kconfig.cpp -@@ -28,19 +28,6 @@ - #include - #include - --#ifdef _MSC_VER --static inline FILE *popen(const char *cmd, const char *mode) --{ -- return _popen(cmd, mode); --} --static inline int pclose(FILE *stream) --{ -- return _pclose(stream); --} --#else --#include --#endif -- - #include "kconfigbackend_p.h" - #include "kconfiggroup.h" - -@@ -183,29 +170,7 @@ QString KConfigPrivate::expandString(const QString &value) - int nDollarPos = aValue.indexOf(QLatin1Char('$')); - while (nDollarPos != -1 && nDollarPos + 1 < aValue.length()) { - // there is at least one $ -- if (aValue[nDollarPos + 1] == QLatin1Char('(')) { -- int nEndPos = nDollarPos + 1; -- // the next character is not $ -- while ((nEndPos <= aValue.length()) && (aValue[nEndPos] != QLatin1Char(')'))) { -- nEndPos++; -- } -- nEndPos++; -- QString cmd = aValue.mid(nDollarPos + 2, nEndPos - nDollarPos - 3); -- -- QString result; -- --// FIXME: wince does not have pipes --#ifndef _WIN32_WCE -- FILE *fs = popen(QFile::encodeName(cmd).data(), "r"); -- if (fs) { -- QTextStream ts(fs, QIODevice::ReadOnly); -- result = ts.readAll().trimmed(); -- pclose(fs); -- } --#endif -- aValue.replace(nDollarPos, nEndPos - nDollarPos, result); -- nDollarPos += result.length(); -- } else if (aValue[nDollarPos + 1] != QLatin1Char('$')) { -+ if (aValue[nDollarPos + 1] != QLatin1Char('$')) { - int nEndPos = nDollarPos + 1; - // the next character is not $ - QStringRef aVarName; --- -2.23.0 - diff --git a/kconfig-5.55.0.tar.xz b/kconfig-5.55.0.tar.xz deleted file mode 100644 index cd5313a..0000000 Binary files a/kconfig-5.55.0.tar.xz and /dev/null differ diff --git a/kconfig-5.88.0.tar.xz b/kconfig-5.88.0.tar.xz new file mode 100644 index 0000000..721bddd Binary files /dev/null and b/kconfig-5.88.0.tar.xz differ diff --git a/kf5-kconfig.spec b/kf5-kconfig.spec index dfec614..be43be3 100644 --- a/kf5-kconfig.spec +++ b/kf5-kconfig.spec @@ -1,4 +1,5 @@ %global framework kconfig +%{!?docs: %global docs 1} # uncomment to enable bootstrap mode #global bootstrap 1 @@ -8,24 +9,27 @@ %if 0%{?fedora} %ifnarch ppc64 s390x %if 0%{?fedora} < 29 -%global python 1 +%global python_bindings 1 %endif %endif %endif #endif +%if 0%{?flatpak} +%global docs 0 +%endif %global tests 1 %endif # use ninja instead of make %global ninja 1 -Name: kf5-%{framework} -Version: 5.55.0 -Release: 2 -Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system +Name: kf5-%{framework} +Version: 5.88.0 +Release: 1 +Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system -License: GPLv2+ and LGPLv2+ and MIT -URL: https://cgit.kde.org/%{framework}.git +License: GPLv2+ and LGPLv2+ and MIT +URL: https://invent.kde.org/frameworks/%{framework} %global majmin %(echo %{version} | cut -d. -f1-2) %global revision %(echo %{version} | cut -d. -f3) @@ -34,8 +38,8 @@ URL: https://cgit.kde.org/%{framework}.git %else %global stable stable %endif -Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz -patch0: 0001-CVE-2019-14744.patch +Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz + ## upstream patches ## upstreamable patches @@ -52,7 +56,7 @@ BuildRequires: pkgconfig(Qt5Xml) BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel -%if 0%{?python} +%if 0%{?python_bindings} %if 0%{?fedora} && 0%{?fedora} < 27 BuildRequires: bundled(python2-clang) >= 4.0.1 %else @@ -63,15 +67,15 @@ BuildRequires: clang-devel BuildRequires: python2-PyQt5-devel BuildRequires: python3-PyQt5-devel %else -Obsoletes: python2-pykf5-%{framework} < %{version}-%{release} -Obsoletes: python3-pykf5-%{framework} < %{version}-%{release} -Obsoletes: pykf5-%{framework}-devel < %{version}-%{release} +Obsoletes: python2-pykf5-%{framework} < %{version}-%{release} +Obsoletes: python3-pykf5-%{framework} < %{version}-%{release} +Obsoletes: pykf5-%{framework}-devel < %{version}-%{release} %endif %if 0%{?tests} -BuildRequires: dbus-x11 -BuildRequires: time -BuildRequires: xorg-x11-server-Xvfb +BuildRequires: dbus-x11 +BuildRequires: time +BuildRequires: xorg-x11-server-Xvfb %endif Requires: kf5-filesystem >= %{majmin} @@ -105,7 +109,21 @@ KConfigGui provides a way to hook widgets to the configuration so that they are automatically initialized from the configuration and automatically propagate their changes to their respective configuration files. -%if 0%{?python} +%if 0%{?docs} +%package doc +Summary: API documentation for %{name} +BuildRequires: doxygen +BuildRequires: qt5-qdoc +BuildRequires: qt5-qhelpgenerator +BuildRequires: qt5-qtbase-doc +BuildRequires: make +Requires: kf5-filesystem +BuildArch: noarch +%description doc +%{summary}. +%endif + +%if 0%{?python_bindings} %package -n python2-pykf5-%{framework} Summary: Python2 bindings for %{framework} Requires: %{name} = %{version}-%{release} @@ -128,11 +146,11 @@ BuildArch: noarch %prep %autosetup -n %{framework}-%{version} -p1 -## %patch0 -p1 + %build -%if 0%{?python:1} +%if 0%{?python_bindings:1} PYTHONPATH=%{_datadir}/ECM/python export PYTHONPATH %endif @@ -140,6 +158,11 @@ export PYTHONPATH mkdir %{_target_platform} pushd %{_target_platform} %{cmake_kf5} .. \ + %if 0%{?flatpak} + %{?docs:-DBUILD_QCH:BOOL=OFF} \ + %else + %{?docs:-DBUILD_QCH:BOOL=ON} \ + %endif %{?ninja:-G Ninja} \ %{?tests:-DBUILD_TESTING:BOOL=ON} popd @@ -167,20 +190,21 @@ export CTEST_OUTPUT_ON_FAILURE=1 ## cant use %%ninja_test here for some reason, doesn't inherit env vars from xvfb or dbus -- rex xvfb-run -a \ %if 0%{?ninja} -ninja test -v -C %{_target_platform} ||: +ninja test %{?_smp_mflags} -v -C redhat-linux-build ||: %else -make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: +make test %{?_smp_mflags} -C redhat-linux-build ARGS="--output-on-failure --timeout 300" ||: %endif %endif %files %doc DESIGN README.md TODO -%license COPYING.LIB +%license LICENSES/*.txt %ldconfig_scriptlets core %files core -f kconfig5_qt.lang +%{_kf5_datadir}/qlogging-categories5/%{framework}* %{_kf5_bindir}/kreadconfig5 %{_kf5_bindir}/kwriteconfig5 %{_kf5_libdir}/libKF5ConfigCore.so.* @@ -202,7 +226,13 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: %{_kf5_archdatadir}/mkspecs/modules/qt_KConfigCore.pri %{_kf5_archdatadir}/mkspecs/modules/qt_KConfigGui.pri -%if 0%{?python} +%if 0%{?docs} +%files doc +%{_qt5_docdir}/KF5Config.qch +%{_qt5_docdir}/KF5Config.tags +%endif + +%if 0%{?python_bindings} %files -n python2-pykf5-%{framework} %{python2_sitearch}/PyKF5/ @@ -215,6 +245,9 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: %changelog +* Thu Jan 13 2022 pei-jiankang - 5.88.0-1 +- update to upstream version 5.88.0 + * Wen Jul 07 2021 tanyulong -5.55.0-2 - fix kf5-kconfig project