!18 update to upstream version 5.88.0
Merge pull request !18 from pei-jiankang/master
This commit is contained in:
commit
5661e386c0
@ -1,127 +0,0 @@
|
|||||||
From e7e85401bc4e092cd2b2d4e6a1dca2736002faa5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: tanyulong <tanyulong@kylinos.cn>
|
|
||||||
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 <utime.h>
|
|
||||||
#endif
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
-#include <unistd.h> // gethostname
|
|
||||||
+#include <unistd.h> // 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 <cstdlib>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
-#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 <unistd.h>
|
|
||||||
-#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
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
kconfig-5.88.0.tar.xz
Normal file
BIN
kconfig-5.88.0.tar.xz
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
%global framework kconfig
|
%global framework kconfig
|
||||||
|
%{!?docs: %global docs 1}
|
||||||
|
|
||||||
# uncomment to enable bootstrap mode
|
# uncomment to enable bootstrap mode
|
||||||
#global bootstrap 1
|
#global bootstrap 1
|
||||||
@ -8,24 +9,27 @@
|
|||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
%ifnarch ppc64 s390x
|
%ifnarch ppc64 s390x
|
||||||
%if 0%{?fedora} < 29
|
%if 0%{?fedora} < 29
|
||||||
%global python 1
|
%global python_bindings 1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
#endif
|
#endif
|
||||||
|
%if 0%{?flatpak}
|
||||||
|
%global docs 0
|
||||||
|
%endif
|
||||||
%global tests 1
|
%global tests 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# use ninja instead of make
|
# use ninja instead of make
|
||||||
%global ninja 1
|
%global ninja 1
|
||||||
|
|
||||||
Name: kf5-%{framework}
|
Name: kf5-%{framework}
|
||||||
Version: 5.55.0
|
Version: 5.88.0
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system
|
Summary: KDE Frameworks 5 Tier 1 addon with advanced configuration system
|
||||||
|
|
||||||
License: GPLv2+ and LGPLv2+ and MIT
|
License: GPLv2+ and LGPLv2+ and MIT
|
||||||
URL: https://cgit.kde.org/%{framework}.git
|
URL: https://invent.kde.org/frameworks/%{framework}
|
||||||
|
|
||||||
%global majmin %(echo %{version} | cut -d. -f1-2)
|
%global majmin %(echo %{version} | cut -d. -f1-2)
|
||||||
%global revision %(echo %{version} | cut -d. -f3)
|
%global revision %(echo %{version} | cut -d. -f3)
|
||||||
@ -34,8 +38,8 @@ URL: https://cgit.kde.org/%{framework}.git
|
|||||||
%else
|
%else
|
||||||
%global stable stable
|
%global stable stable
|
||||||
%endif
|
%endif
|
||||||
Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz
|
Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz
|
||||||
patch0: 0001-CVE-2019-14744.patch
|
|
||||||
## upstream patches
|
## upstream patches
|
||||||
|
|
||||||
## upstreamable patches
|
## upstreamable patches
|
||||||
@ -52,7 +56,7 @@ BuildRequires: pkgconfig(Qt5Xml)
|
|||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
BuildRequires: qt5-qttools-devel
|
BuildRequires: qt5-qttools-devel
|
||||||
|
|
||||||
%if 0%{?python}
|
%if 0%{?python_bindings}
|
||||||
%if 0%{?fedora} && 0%{?fedora} < 27
|
%if 0%{?fedora} && 0%{?fedora} < 27
|
||||||
BuildRequires: bundled(python2-clang) >= 4.0.1
|
BuildRequires: bundled(python2-clang) >= 4.0.1
|
||||||
%else
|
%else
|
||||||
@ -63,15 +67,15 @@ BuildRequires: clang-devel
|
|||||||
BuildRequires: python2-PyQt5-devel
|
BuildRequires: python2-PyQt5-devel
|
||||||
BuildRequires: python3-PyQt5-devel
|
BuildRequires: python3-PyQt5-devel
|
||||||
%else
|
%else
|
||||||
Obsoletes: python2-pykf5-%{framework} < %{version}-%{release}
|
Obsoletes: python2-pykf5-%{framework} < %{version}-%{release}
|
||||||
Obsoletes: python3-pykf5-%{framework} < %{version}-%{release}
|
Obsoletes: python3-pykf5-%{framework} < %{version}-%{release}
|
||||||
Obsoletes: pykf5-%{framework}-devel < %{version}-%{release}
|
Obsoletes: pykf5-%{framework}-devel < %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?tests}
|
%if 0%{?tests}
|
||||||
BuildRequires: dbus-x11
|
BuildRequires: dbus-x11
|
||||||
BuildRequires: time
|
BuildRequires: time
|
||||||
BuildRequires: xorg-x11-server-Xvfb
|
BuildRequires: xorg-x11-server-Xvfb
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: kf5-filesystem >= %{majmin}
|
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
|
automatically initialized from the configuration and automatically propagate
|
||||||
their changes to their respective configuration files.
|
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}
|
%package -n python2-pykf5-%{framework}
|
||||||
Summary: Python2 bindings for %{framework}
|
Summary: Python2 bindings for %{framework}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
@ -128,11 +146,11 @@ BuildArch: noarch
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{framework}-%{version} -p1
|
%autosetup -n %{framework}-%{version} -p1
|
||||||
## %patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%if 0%{?python:1}
|
%if 0%{?python_bindings:1}
|
||||||
PYTHONPATH=%{_datadir}/ECM/python
|
PYTHONPATH=%{_datadir}/ECM/python
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
%endif
|
%endif
|
||||||
@ -140,6 +158,11 @@ export PYTHONPATH
|
|||||||
mkdir %{_target_platform}
|
mkdir %{_target_platform}
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%{cmake_kf5} .. \
|
%{cmake_kf5} .. \
|
||||||
|
%if 0%{?flatpak}
|
||||||
|
%{?docs:-DBUILD_QCH:BOOL=OFF} \
|
||||||
|
%else
|
||||||
|
%{?docs:-DBUILD_QCH:BOOL=ON} \
|
||||||
|
%endif
|
||||||
%{?ninja:-G Ninja} \
|
%{?ninja:-G Ninja} \
|
||||||
%{?tests:-DBUILD_TESTING:BOOL=ON}
|
%{?tests:-DBUILD_TESTING:BOOL=ON}
|
||||||
popd
|
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
|
## cant use %%ninja_test here for some reason, doesn't inherit env vars from xvfb or dbus -- rex
|
||||||
xvfb-run -a \
|
xvfb-run -a \
|
||||||
%if 0%{?ninja}
|
%if 0%{?ninja}
|
||||||
ninja test -v -C %{_target_platform} ||:
|
ninja test %{?_smp_mflags} -v -C redhat-linux-build ||:
|
||||||
%else
|
%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
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc DESIGN README.md TODO
|
%doc DESIGN README.md TODO
|
||||||
%license COPYING.LIB
|
%license LICENSES/*.txt
|
||||||
|
|
||||||
%ldconfig_scriptlets core
|
%ldconfig_scriptlets core
|
||||||
|
|
||||||
%files core -f kconfig5_qt.lang
|
%files core -f kconfig5_qt.lang
|
||||||
|
%{_kf5_datadir}/qlogging-categories5/%{framework}*
|
||||||
%{_kf5_bindir}/kreadconfig5
|
%{_kf5_bindir}/kreadconfig5
|
||||||
%{_kf5_bindir}/kwriteconfig5
|
%{_kf5_bindir}/kwriteconfig5
|
||||||
%{_kf5_libdir}/libKF5ConfigCore.so.*
|
%{_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_KConfigCore.pri
|
||||||
%{_kf5_archdatadir}/mkspecs/modules/qt_KConfigGui.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}
|
%files -n python2-pykf5-%{framework}
|
||||||
%{python2_sitearch}/PyKF5/
|
%{python2_sitearch}/PyKF5/
|
||||||
|
|
||||||
@ -215,6 +245,9 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 13 2022 pei-jiankang<peijiankang@kylinos.com> - 5.88.0-1
|
||||||
|
- update to upstream version 5.88.0
|
||||||
|
|
||||||
* Wen Jul 07 2021 tanyulong<tanyulong@kylinos.cn> -5.55.0-2
|
* Wen Jul 07 2021 tanyulong<tanyulong@kylinos.cn> -5.55.0-2
|
||||||
- fix kf5-kconfig project
|
- fix kf5-kconfig project
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user