Merge branch 'master' into f16

Conflicts:
	kdelibs.spec
This commit is contained in:
Rex Dieter 2011-10-04 13:53:27 -05:00
commit 12c8e1938b
2 changed files with 83 additions and 55 deletions

View File

@ -1,5 +1,5 @@
From 1ce984bda1bb6a06f237240069a9f3a554cbbf37 Mon Sep 17 00:00:00 2001 From 89e4767148110a5566e463a03b3ed594276b7da0 Mon Sep 17 00:00:00 2001
Message-Id: <1ce984bda1bb6a06f237240069a9f3a554cbbf37.1313890335.git.kevin.kofler@chello.at> Message-Id: <89e4767148110a5566e463a03b3ed594276b7da0.1317166378.git.kevin.kofler@chello.at>
From: Kevin Kofler <kevin.kofler@chello.at> From: Kevin Kofler <kevin.kofler@chello.at>
Date: Wed, 17 Aug 2011 04:54:37 +0200 Date: Wed, 17 Aug 2011 04:54:37 +0200
Subject: [PATCH] Implement automatic scanning of source code for required Subject: [PATCH] Implement automatic scanning of source code for required
@ -20,11 +20,11 @@ fill in X-Plasma-RequiredDataEngines manually. (Please note that the list is
expected to be comma-separated.) expected to be comma-separated.)
--- ---
plasma/CMakeLists.txt | 15 ++++ plasma/CMakeLists.txt | 15 ++++
plasma/depextractor/depextractor.cpp | 115 +++++++++++++++++++++++++++++++++ plasma/depextractor/depextractor.cpp | 125 +++++++++++++++++++++++++++++++++
plasma/package.cpp | 11 +++ plasma/package.cpp | 11 +++
plasma/private/componentinstaller.cpp | 68 +++++++++++++++++++ plasma/private/componentinstaller.cpp | 71 +++++++++++++++++++
plasma/private/componentinstaller_p.h | 17 +++++- plasma/private/componentinstaller_p.h | 17 ++++-
5 files changed, 225 insertions(+), 1 deletions(-) 5 files changed, 238 insertions(+), 1 deletions(-)
diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt
index f929967..9a760ef 100644 index f929967..9a760ef 100644
@ -58,10 +58,10 @@ index f929967..9a760ef 100644
+endif(NOT PLASMA_NO_PACKAGEKIT) +endif(NOT PLASMA_NO_PACKAGEKIT)
diff --git a/plasma/depextractor/depextractor.cpp b/plasma/depextractor/depextractor.cpp diff --git a/plasma/depextractor/depextractor.cpp b/plasma/depextractor/depextractor.cpp
new file mode 100644 new file mode 100644
index 0000000..221b88b index 0000000..c489de7
--- /dev/null --- /dev/null
+++ b/plasma/depextractor/depextractor.cpp +++ b/plasma/depextractor/depextractor.cpp
@@ -0,0 +1,115 @@ @@ -0,0 +1,125 @@
+/* Plasma Data Engine dependency extractor +/* Plasma Data Engine dependency extractor
+ Copyright (C) 2011 Kevin Kofler <kevin.kofler@chello.at> + Copyright (C) 2011 Kevin Kofler <kevin.kofler@chello.at>
+ +
@ -92,6 +92,21 @@ index 0000000..221b88b
+ +
+#include "private/componentinstaller_p.h" +#include "private/componentinstaller_p.h"
+ +
+static QString scriptingApi(const QString &desktopFile)
+{
+ KDesktopFile desktop(desktopFile);
+ KConfigGroup desktopGroup = desktop.desktopGroup();
+ if (desktopGroup.readEntry("X-KDE-ServiceTypes", QStringList())
+ .contains("Plasma/ScriptEngine")
+ || desktopGroup.readEntry("ServiceTypes", QStringList())
+ .contains("Plasma/ScriptEngine")) {
+ /* Script engines are always written in C++. Their X-Plasma-API is the
+ API they export, not the language they're written in. */
+ return QString();
+ }
+ return desktopGroup.readEntry("X-Plasma-API", QString());
+}
+
+static void writeDataEngineDependencies(const QStringList &deps, +static void writeDataEngineDependencies(const QStringList &deps,
+ const QString &desktopFile) + const QString &desktopFile)
+{ +{
@ -105,16 +120,13 @@ index 0000000..221b88b
+{ +{
+ KAboutData aboutData("plasma-dataengine-depextractor", QByteArray(), + KAboutData aboutData("plasma-dataengine-depextractor", QByteArray(),
+ ki18n("Plasma Data Engine dependency extractor"), + ki18n("Plasma Data Engine dependency extractor"),
+ "1", + "2",
+ ki18n("Plasma Data Engine dependency extractor")); + ki18n("Plasma Data Engine dependency extractor"));
+ aboutData.addAuthor(ki18n("Kevin Kofler"), ki18n("Author"), + aboutData.addAuthor(ki18n("Kevin Kofler"), ki18n("Author"),
+ "kevin.kofler@chello.at"); + "kevin.kofler@chello.at");
+ +
+ KCmdLineArgs::init(argc, argv, &aboutData); + KCmdLineArgs::init(argc, argv, &aboutData);
+ KCmdLineOptions options; + KCmdLineOptions options;
+ options.add("a")
+ .add("api <name>",
+ ki18n("Sets the name of the scripting API/language"));
+ options.add("+[path]", + options.add("+[path]",
+ ki18n("Source path (default: .)")); + ki18n("Source path (default: .)"));
+ options.add("+[file]", + options.add("+[file]",
@ -129,10 +141,7 @@ index 0000000..221b88b
+ +
+ int exitCode = 0; + int exitCode = 0;
+ +
+ QString api, path, desktopFile; + QString path, desktopFile;
+ if (args->isSet("api")) {
+ api = args->getOption("api");
+ }
+ int argCount = args->count(); + int argCount = args->count();
+ switch (argCount) { + switch (argCount) {
+ case 0: + case 0:
@ -159,12 +168,13 @@ index 0000000..221b88b
+ +
+ if (!exitCode) { + if (!exitCode) {
+ if (QFileInfo(desktopFile).isRelative()) + if (QFileInfo(desktopFile).isRelative())
+ desktopFile = QDir(path).filePath(desktopFile); + desktopFile = QDir(path).absoluteFilePath(desktopFile);
+ +
+ if (QFileInfo(desktopFile).exists()) { + if (QFileInfo(desktopFile).exists()) {
+ writeDataEngineDependencies(Plasma::ComponentInstaller::self() + writeDataEngineDependencies(Plasma::ComponentInstaller::self()
+ ->extractDataEngineDependencies(path, + ->extractDataEngineDependencies(
+ api), + path,
+ scriptingApi(desktopFile)),
+ desktopFile); + desktopFile);
+ } else { + } else {
+ QTextStream err(stderr, QIODevice::WriteOnly | QIODevice::Text); + QTextStream err(stderr, QIODevice::WriteOnly | QIODevice::Text);
@ -200,7 +210,7 @@ index 0a45c87..131f204 100644
QStringList knownDataEngines = DataEngineManager::self()->listAllEngines(meta.application()); QStringList knownDataEngines = DataEngineManager::self()->listAllEngines(meta.application());
foreach (const QString &requiredDataEngine, requiredDataEngines) { foreach (const QString &requiredDataEngine, requiredDataEngines) {
diff --git a/plasma/private/componentinstaller.cpp b/plasma/private/componentinstaller.cpp diff --git a/plasma/private/componentinstaller.cpp b/plasma/private/componentinstaller.cpp
index 870667f..2c8c2dd 100644 index 870667f..087d1c6 100644
--- a/plasma/private/componentinstaller.cpp --- a/plasma/private/componentinstaller.cpp
+++ b/plasma/private/componentinstaller.cpp +++ b/plasma/private/componentinstaller.cpp
@@ -28,6 +28,10 @@ @@ -28,6 +28,10 @@
@ -228,7 +238,7 @@ index 870667f..2c8c2dd 100644
QStringList resources; QStringList resources;
resources.append(searchString); resources.append(searchString);
packageKit.asyncCall(QLatin1String("InstallResources"), (unsigned int) wid, packageKit.asyncCall(QLatin1String("InstallResources"), (unsigned int) wid,
@@ -100,4 +108,64 @@ void ComponentInstaller::installMissingComponent(const QString &type, @@ -100,4 +108,67 @@ void ComponentInstaller::installMissingComponent(const QString &type,
#endif #endif
} }
@ -251,6 +261,9 @@ index 870667f..2c8c2dd 100644
+ nameFilters.append("*.hxx"); + nameFilters.append("*.hxx");
+ nameFilters.append("*.hh"); + nameFilters.append("*.hh");
+ nameFilters.append("*.H"); + nameFilters.append("*.H");
+ } else if (api == "declarativeappletscript") {
+ nameFilters.append("*.qml");
+ searchRegExp = QRegExp("(?:^\\s*engine:\\s*|dataEngine *\\( *)\"([^\"]+)\"");
+ } else if (api == "javascript") { + } else if (api == "javascript") {
+ nameFilters.append("*.js"); + nameFilters.append("*.js");
+ } else if (api == "python") { + } else if (api == "python") {
@ -329,5 +342,5 @@ index f85cbb6..d0d9c75 100644
/** /**
* Default constructor. The singleton method self() is the * Default constructor. The singleton method self() is the
-- --
1.7.4.4 1.7.6.2

View File

@ -20,7 +20,7 @@
Summary: KDE Libraries Summary: KDE Libraries
Version: 4.7.1 Version: 4.7.1
Release: 2%{?dist}.1 Release: 6%{?dist}
Name: kdelibs Name: kdelibs
Epoch: 6 Epoch: 6
@ -147,51 +147,51 @@ Conflicts: kile < 2.1-0.9
Conflicts: rkward < 0.5.4 Conflicts: rkward < 0.5.4
BuildRequires: qt4-devel >= %{qt4_ver} BuildRequires: qt4-devel >= %{qt4_ver}
BuildRequires: qt4-webkit-devel BuildRequires: pkgconfig(QtWebKit)
%{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}} %{?_qt4_version:Requires: qt4%{?_isa} >= %{_qt4_version}}
Requires: xdg-utils Requires: xdg-utils
Requires: redhat-menus Requires: redhat-menus
Requires(post): /sbin/ldconfig Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig Requires(postun): /sbin/ldconfig
BuildRequires: alsa-lib-devel
BuildRequires: attica-devel >= %{attica_ver}
BuildRequires: automoc4 >= 0.9.88 BuildRequires: automoc4 >= 0.9.88
BuildRequires: avahi-devel
BuildRequires: bison flex BuildRequires: bison flex
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: cmake >= 2.6.4 BuildRequires: cmake >= 2.6.4
BuildRequires: cups-devel cups BuildRequires: cups-devel cups
BuildRequires: enchant-devel
BuildRequires: gamin-devel
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: giflib-devel BuildRequires: giflib-devel
BuildRequires: grantlee-devel BuildRequires: grantlee-devel
BuildRequires: herqq-devel BuildRequires: herqq-devel
BuildRequires: jasper-devel
BuildRequires: krb5-devel BuildRequires: krb5-devel
BuildRequires: libacl-devel libattr-devel BuildRequires: libacl-devel libattr-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxslt-devel libxml2-devel
BuildRequires: libudev-devel
BuildRequires: libutempter-devel BuildRequires: libutempter-devel
BuildRequires: OpenEXR-devel BuildRequires: pkgconfig(alsa)
BuildRequires: openssl-devel BuildRequires: pkgconfig(avahi-core)
BuildRequires: pcre-devel BuildRequires: pkgconfig(dbusmenu-qt)
BuildRequires: phonon-devel >= %{phonon_ver} BuildRequires: pkgconfig(enchant)
BuildRequires: polkit-qt-devel >= 0.98.1 BuildRequires: pkgconfig(gamin)
BuildRequires: qca2-devel BuildRequires: pkgconfig(jasper)
BuildRequires: shared-desktop-ontologies-devel >= %{shared_desktop_ontologies_ver} BuildRequires: pkgconfig(libattica) >= %{attica_ver}
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libstreams) >= %{strigi_ver}
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(OpenEXR)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(phonon) >= %{phonon_ver}
BuildRequires: pkgconfig(polkit-qt-1)
BuildRequires: pkgconfig(qca2)
BuildRequires: pkgconfig(shared-desktop-ontologies) >= %{shared_desktop_ontologies_ver}
BuildRequires: pkgconfig(soprano) >= %{soprano_ver}
BuildRequires: shared-mime-info BuildRequires: shared-mime-info
BuildRequires: soprano-devel >= %{soprano_ver}
BuildRequires: strigi-devel >= %{strigi_ver}
BuildRequires: xz-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: dbusmenu-qt-devel
# extra X deps (seemingly needed and/or checked-for by most kde4 buildscripts) # extra X deps (seemingly needed and/or checked-for by most kde4 buildscripts)
%define x_deps libSM-devel libXcomposite-devel libXdamage-devel libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel libXv-devel libXxf86misc-devel #define x_deps libSM-devel libXcomposite-devel libXdamage-devel libxkbfile-devel libXpm-devel libXScrnSaver-devel libXtst-devel libXv-devel libXxf86misc-devel
%define x_deps pkgconfig(sm) pkgconfig(xcomposite) pkgconfig(xdamage) pkgconfig(xkbfile) pkgconfig(xpm) pkgconfig(xscrnsaver) pkgconfig(xtst) pkgconfig(xv) pkgconfig(xxf86misc)
%{?x_deps:BuildRequires: %{x_deps}} %{?x_deps:BuildRequires: %{x_deps}}
Requires: udisks upower Requires: udisks upower
@ -236,23 +236,24 @@ Summary: Header files for compiling KDE 4 applications
Obsoletes: webkitkde-devel < 0.0.6 Obsoletes: webkitkde-devel < 0.0.6
%endif %endif
Provides: plasma-devel = %{version}-%{release} Provides: plasma-devel = %{version}-%{release}
Provides: nepomuk-devel = %{version}-%{release}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: kdelibs4-devel < %{version}-%{release} Obsoletes: kdelibs4-devel < %{version}-%{release}
Provides: kdelibs4-devel = %{version}-%{release} Provides: kdelibs4-devel = %{version}-%{release}
%{?_isa:Provides: kdelibs4-devel%{?_isa} = %{version}-%{release}} %{?_isa:Provides: kdelibs4-devel%{?_isa} = %{version}-%{release}}
Requires: attica-devel >= %{attica_ver}
Requires: automoc4 >= 0.9.88 Requires: automoc4 >= 0.9.88
Requires: cmake >= 2.6.4 Requires: cmake >= 2.6.4
Requires: openssl-devel Requires: pkgconfig(libattica) >= %{attica_ver}
Requires: phonon-devel Requires: pkgconfig(openssl)
Provides: nepomuk-devel = %{version}-%{release} Requires: pkgconfig(phonon)
# considered part of nepomuk-devel # considered part of nepomuk-devel
Requires: shared-desktop-ontologies-devel soprano-devel Requires: pkgconfig(shared-desktop-ontologies) pkgconfig(soprano)
Requires: qt4-devel Requires: qt4-devel
Requires: qt4-webkit-devel Requires: pkgconfig(QtWebKit)
# do we really still need all these below? -- Rex # do we really still need all these below? -- Rex
Requires: strigi-devel Requires: pkgconfig(libstreams)
Requires: bzip2-devel gamin-devel libacl-devel Requires: pkgconfig(gamin)
Requires: bzip2-devel libacl-devel
%{?x_deps:Requires: %{x_deps}} %{?x_deps:Requires: %{x_deps}}
%description devel %description devel
@ -465,6 +466,7 @@ rm -rf %{buildroot}
%{_kde4_appsdir}/kcharselect/ %{_kde4_appsdir}/kcharselect/
%{_kde4_appsdir}/kcm_componentchooser/ %{_kde4_appsdir}/kcm_componentchooser/
%{_kde4_appsdir}/kconf_update/ %{_kde4_appsdir}/kconf_update/
%{_kde4_appsdir}/kdewidgets/
%{_kde4_appsdir}/khtml/ %{_kde4_appsdir}/khtml/
%{_kde4_appsdir}/kjava/ %{_kde4_appsdir}/kjava/
%{_kde4_appsdir}/knewstuff/ %{_kde4_appsdir}/knewstuff/
@ -547,7 +549,6 @@ rm -rf %{buildroot}
%endif %endif
%{_kde4_bindir}/kde4-doxygen.sh %{_kde4_bindir}/kde4-doxygen.sh
%{_kde4_appsdir}/cmake/ %{_kde4_appsdir}/cmake/
%{_kde4_appsdir}/kdewidgets/
%{_kde4_includedir}/* %{_kde4_includedir}/*
%{_kde4_libdir}/kde4/devel/ %{_kde4_libdir}/kde4/devel/
@ -565,9 +566,23 @@ rm -rf %{buildroot}
%changelog %changelog
* Tue Oct 04 2011 Lukas Tinkl <ltinkl@redhat.com> - 4.7.1-2 * Tue Oct 04 2011 Lukas Tinkl <ltinkl@redhat.com> - 4.7.1-6
- Resolves #743056 - CVE-2011-3365 kdelibs: input validation failure in KSSL - Resolves #743056 - CVE-2011-3365 kdelibs: input validation failure in KSSL
* Wed Sep 28 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.1-5
- -devel: s/pkgconfig(attica)/pkgconfig(libattica)/
* Tue Sep 27 2011 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.7.1-4
- updated Plasma data engine dependency extraction patch:
- added support for declarativeappletscript QML code
- plasma-dataengine-depextractor command-line tool:
- make sure we pass an absolute path to KDesktopFile
- autodetect the API/language used, drop --api command-line argument
* Thu Sep 22 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.1-3
- pkgconfig-style deps
- move kde4_appsdir/kdewidgets to main pkg (pairs with kdewidgets designer plugin)
* Fri Sep 02 2011 Than Ngo <than@redhat.com> - 4.7.1-1 * Fri Sep 02 2011 Than Ngo <than@redhat.com> - 4.7.1-1
- 4.7.1 - 4.7.1