Accepting request 490333 from KDE:Applications
KDE Applications 17.04.0 final OBS-URL: https://build.opensuse.org/request/show/490333 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/akonadi-server?expand=0&rev=27
This commit is contained in:
commit
935f5fecde
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:fc48a200c27331d5a9ac6bfb8d7d61f3c4240f133bb23c996c78493f24644b03
|
|
||||||
size 1037568
|
|
3
akonadi-17.04.0.tar.xz
Normal file
3
akonadi-17.04.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:962f7694ff67e32b965a07da282d2af7a0777353b11f537c147c8777b03901d4
|
||||||
|
size 1301104
|
@ -1,3 +1,47 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 16 10:44:43 CEST 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 17.04.0
|
||||||
|
* New feature release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/announce-applications-17.04.0.php
|
||||||
|
- Changes since 17.03.90:
|
||||||
|
* Remove unused variable
|
||||||
|
* Remove compile warning
|
||||||
|
* Update search query from CollectionModifyJob
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 12 20:25:10 CEST 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 17.03.90
|
||||||
|
* New bugfix release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/announce-applications-17.04-rc.php
|
||||||
|
- Changes since 17.03.80:
|
||||||
|
* Fix some -Wdocumentation warnings
|
||||||
|
* Fix redefinition of QAddConst
|
||||||
|
* Port some foreach code
|
||||||
|
* ResourceBase: cancelTask() when PrepareItemsRetrieval job returns 0 items
|
||||||
|
* Handle nested exceptions during error handling
|
||||||
|
* Improve some ETM warnings
|
||||||
|
* abi::__forced_unwind is only part of gnu's libstc++.
|
||||||
|
* Remove unused include
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 30 05:28:34 UTC 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Drop upstreamed patch: handle-mysql-process-crashes-gracefully.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Mar 25 23:10:05 CET 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 17.03.80
|
||||||
|
* New feature release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/announce-applications-17.03.80.php
|
||||||
|
- Changes since 16.12.3:
|
||||||
|
* Too many changes to list here
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 9 18:07:28 UTC 2017 - alarrosa@suse.com
|
Thu Mar 9 18:07:28 UTC 2017 - alarrosa@suse.com
|
||||||
|
|
||||||
|
@ -16,21 +16,21 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_without lang
|
||||||
|
|
||||||
%define rname akonadi
|
%define rname akonadi
|
||||||
%define kf5_version 5.26.0
|
|
||||||
# Latest stable Applications (e.g. 16.08 in KA, but 16.12.3 in KUA)
|
|
||||||
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
|
|
||||||
Name: akonadi-server
|
Name: akonadi-server
|
||||||
Version: 16.12.3
|
Version: 17.04.0
|
||||||
Release: 0
|
Release: 0
|
||||||
|
%define kf5_version 5.26.0
|
||||||
|
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
|
||||||
|
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
|
||||||
Summary: PIM Storage Service
|
Summary: PIM Storage Service
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
Group: System/GUI/KDE
|
Group: System/GUI/KDE
|
||||||
Url: http://akonadi-project.org
|
Url: http://akonadi-project.org
|
||||||
Source: %{rname}-%{version}.tar.xz
|
Source: %{rname}-%{version}.tar.xz
|
||||||
Source99: akonadi-server-rpmlintrc
|
Source99: akonadi-server-rpmlintrc
|
||||||
# PATCH-FIX-UPSTREAM handle-mysql-process-crashes-gracefully.patch
|
|
||||||
Patch0: handle-mysql-process-crashes-gracefully.patch
|
|
||||||
%if 0%{?suse_version} > 1325
|
%if 0%{?suse_version} > 1325
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
%else
|
%else
|
||||||
@ -78,6 +78,7 @@ Obsoletes: akonadi5 < %{version}
|
|||||||
Provides: akonadi5 = %{version}
|
Provides: akonadi5 = %{version}
|
||||||
# Needed for users of unstable repositories
|
# Needed for users of unstable repositories
|
||||||
Obsoletes: akonadi < %{version}
|
Obsoletes: akonadi < %{version}
|
||||||
|
Recommends: %{name}-lang
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} > 1320
|
%if 0%{?suse_version} > 1320
|
||||||
Obsoletes: akonadi-runtime < %{version}
|
Obsoletes: akonadi-runtime < %{version}
|
||||||
@ -167,9 +168,12 @@ Provides: libKF5AkonadiPrivate-devel = %{version}
|
|||||||
This package contains development files of Akonadi, the KDE PIM storage
|
This package contains development files of Akonadi, the KDE PIM storage
|
||||||
service.
|
service.
|
||||||
|
|
||||||
|
%if %{with lang}
|
||||||
|
%lang_package
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{rname}-%{version}
|
%setup -q -n %{rname}-%{version}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir}
|
%cmake_kf5 -d build -- -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE -DQT_PLUGINS_DIR=%{_kf5_plugindir}
|
||||||
@ -177,6 +181,9 @@ service.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%kf5_makeinstall -C build
|
%kf5_makeinstall -C build
|
||||||
|
%if %{with lang}
|
||||||
|
%find_lang %{name} --with-man --all-name
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
@ -267,4 +274,9 @@ service.
|
|||||||
%{_libdir}/libKF5AkonadiXml.so
|
%{_libdir}/libKF5AkonadiXml.so
|
||||||
%{_libdir}/qt5/mkspecs/modules/qt_AkonadiXml.pri
|
%{_libdir}/qt5/mkspecs/modules/qt_AkonadiXml.pri
|
||||||
|
|
||||||
|
%if %{with lang}
|
||||||
|
%files lang -f %{name}.lang
|
||||||
|
%doc COPYING*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,196 +0,0 @@
|
|||||||
From 4c5ca9bf32e5a9d569e83f66a439c65d8939a540 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Koller <kollix@aon.at>
|
|
||||||
Date: Sat, 21 Jan 2017 12:11:14 +0100
|
|
||||||
Subject: handle mysql process crashes gracefully
|
|
||||||
|
|
||||||
This patch checks if the mysqld stops unexpectedly when it was started
|
|
||||||
from akonadiserver and tells the latter to quit when a
|
|
||||||
stopped mysqld was discovered.
|
|
||||||
Also in this case the local socket file is removed so that
|
|
||||||
a restart can work without problem.
|
|
||||||
REVIEW: 129264
|
|
||||||
---
|
|
||||||
src/server/storage/dbconfigmysql.cpp | 69 +++++++++++++++++++++++++++++++++---
|
|
||||||
src/server/storage/dbconfigmysql.h | 11 ++++--
|
|
||||||
2 files changed, 72 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
|
|
||||||
index 0962ccb..7631890 100644
|
|
||||||
--- a/src/server/storage/dbconfigmysql.cpp
|
|
||||||
+++ b/src/server/storage/dbconfigmysql.cpp
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#include <QSqlDriver>
|
|
||||||
#include <QSqlError>
|
|
||||||
#include <QSqlQuery>
|
|
||||||
+#include <QCoreApplication>
|
|
||||||
|
|
||||||
using namespace Akonadi;
|
|
||||||
using namespace Akonadi::Server;
|
|
||||||
@@ -190,6 +191,8 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
const QString dataDir = StandardDirs::saveDir("data", QStringLiteral("db_data"));
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
const QString socketDirectory = Utils::preferredSocketDirectory(StandardDirs::saveDir("data", QStringLiteral("db_misc")));
|
|
||||||
+ const QString socketFile = QStringLiteral("%1/mysql.socket").arg(socketDirectory);
|
|
||||||
+ const QString pidFileName = QStringLiteral("%1/mysql.pid").arg(socketDirectory);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// generate config file
|
|
||||||
@@ -289,6 +292,39 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
qCCritical(AKONADISERVER_LOG) << "MySQL cannot deal with a socket path this long. Path was: " << socketDirectory;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // If mysql.socket file exists, check if also the server process is still running,
|
|
||||||
+ // else we can safely remove the socket file (cleanup after a system crash, etc.)
|
|
||||||
+ QFile pidFile(pidFileName);
|
|
||||||
+ if (QFile::exists(socketFile) && pidFile.open(QIODevice::ReadOnly)) {
|
|
||||||
+ qCDebug(AKONADISERVER_LOG) << "Found a mysqld pid file, checking whether the server is still running...";
|
|
||||||
+ QByteArray pid = pidFile.readLine().trimmed();
|
|
||||||
+ QFile proc(QString::fromLatin1("/proc/" + pid + "/stat"));
|
|
||||||
+ // Check whether the process with the PID from pidfile still exists and whether
|
|
||||||
+ // it's actually still mysqld or, whether the PID has been recycled in the meanwhile.
|
|
||||||
+ bool serverIsRunning = false;
|
|
||||||
+ if (proc.open(QIODevice::ReadOnly)) {
|
|
||||||
+ const QByteArray stat = proc.readAll();
|
|
||||||
+ const QList<QByteArray> stats = stat.split(' ');
|
|
||||||
+ if (stats.count() > 1) {
|
|
||||||
+ // Make sure the PID actually belongs to mysql process
|
|
||||||
+ if (stats[1] == "(mysqld)") {
|
|
||||||
+ // Yup, our mysqld is actually running, so pretend we started the server
|
|
||||||
+ // and try to connect to it
|
|
||||||
+ qCWarning(AKONADISERVER_LOG) << "mysqld for Akonadi is already running, trying to connect to it.";
|
|
||||||
+ serverIsRunning = true;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ proc.close();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!serverIsRunning) {
|
|
||||||
+ qCDebug(AKONADISERVER_LOG) << "No mysqld process with specified PID is running. Removing the pidfile and starting a new instance...";
|
|
||||||
+ pidFile.close();
|
|
||||||
+ pidFile.remove();
|
|
||||||
+ QFile::remove(socketFile);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// synthesize the mysqld command
|
|
||||||
@@ -296,14 +332,15 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
arguments << QStringLiteral("--defaults-file=%1/mysql.conf").arg(akDir);
|
|
||||||
arguments << QStringLiteral("--datadir=%1/").arg(dataDir);
|
|
||||||
#ifndef Q_OS_WIN
|
|
||||||
- arguments << QStringLiteral("--socket=%1/mysql.socket").arg(socketDirectory);
|
|
||||||
+ arguments << QStringLiteral("--socket=%1").arg(socketFile);
|
|
||||||
+ arguments << QStringLiteral("--pid-file=%1").arg(pidFileName);
|
|
||||||
#else
|
|
||||||
arguments << QString::fromLatin1("--shared-memory");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// If mysql.socket file does not exists, then we must start the server,
|
|
||||||
// otherwise we reconnect to it
|
|
||||||
- if (!QFile::exists(QStringLiteral("%1/mysql.socket").arg(socketDirectory))) {
|
|
||||||
+ if (!QFile::exists(socketFile)) {
|
|
||||||
// move mysql error log file out of the way
|
|
||||||
const QFileInfo errorLog(dataDir + QDir::separator() + QLatin1String("mysql.err"));
|
|
||||||
if (errorLog.exists()) {
|
|
||||||
@@ -348,9 +385,11 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
- #ifndef Q_OS_WIN
|
|
||||||
+ connect(mDatabaseProcess, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
|
|
||||||
+ this, &DbConfigMysql::processFinished);
|
|
||||||
+
|
|
||||||
+#ifndef Q_OS_WIN
|
|
||||||
// wait until mysqld has created the socket file (workaround for QTBUG-47475 in Qt5.5.0)
|
|
||||||
- QString socketFile = QStringLiteral("%1/mysql.socket").arg(socketDirectory);
|
|
||||||
int counter = 50; // avoid an endless loop in case mysqld terminated
|
|
||||||
while ((counter-- > 0) && !QFileInfo::exists(socketFile)) {
|
|
||||||
QThread::msleep(100);
|
|
||||||
@@ -358,7 +397,6 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
qCDebug(AKONADISERVER_LOG) << "Found mysql.socket file, reconnecting to the database";
|
|
||||||
- mDatabaseProcess = new QProcess();
|
|
||||||
}
|
|
||||||
|
|
||||||
const QLatin1String initCon("initConnection");
|
|
||||||
@@ -378,7 +416,7 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
if (opened) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (mDatabaseProcess->waitForFinished(500)) {
|
|
||||||
+ if (mDatabaseProcess && mDatabaseProcess->waitForFinished(500)) {
|
|
||||||
qCCritical(AKONADISERVER_LOG) << "Database process exited unexpectedly during initial connection!";
|
|
||||||
qCCritical(AKONADISERVER_LOG) << "executable:" << mMysqldPath;
|
|
||||||
qCCritical(AKONADISERVER_LOG) << "arguments:" << arguments;
|
|
||||||
@@ -459,12 +497,33 @@ bool DbConfigMysql::startInternalServer()
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void DbConfigMysql::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
|
||||||
+{
|
|
||||||
+ Q_UNUSED(exitCode);
|
|
||||||
+ Q_UNUSED(exitStatus);
|
|
||||||
+
|
|
||||||
+ qCCritical(AKONADISERVER_LOG) << "database server stopped unexpectedly";
|
|
||||||
+
|
|
||||||
+#ifndef Q_OS_WIN
|
|
||||||
+ // when the server stopped unexpectedly, make sure to remove the stale socket file since otherwise
|
|
||||||
+ // it can not be started again
|
|
||||||
+ const QString socketDirectory = Utils::preferredSocketDirectory(StandardDirs::saveDir("data", QStringLiteral("db_misc")));
|
|
||||||
+ const QString socketFile = QStringLiteral("%1/mysql.socket").arg(socketDirectory);
|
|
||||||
+ QFile::remove(socketFile);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ QCoreApplication::quit();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void DbConfigMysql::stopInternalServer()
|
|
||||||
{
|
|
||||||
if (!mDatabaseProcess) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ disconnect(mDatabaseProcess, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
|
|
||||||
+ this, &DbConfigMysql::processFinished);
|
|
||||||
+
|
|
||||||
// first, try the nicest approach
|
|
||||||
if (!mCleanServerShutdownCommand.isEmpty()) {
|
|
||||||
QProcess::execute(mCleanServerShutdownCommand);
|
|
||||||
diff --git a/src/server/storage/dbconfigmysql.h b/src/server/storage/dbconfigmysql.h
|
|
||||||
index 27841e8..a25f28b 100644
|
|
||||||
--- a/src/server/storage/dbconfigmysql.h
|
|
||||||
+++ b/src/server/storage/dbconfigmysql.h
|
|
||||||
@@ -21,14 +21,16 @@
|
|
||||||
#define DBCONFIGMYSQL_H
|
|
||||||
|
|
||||||
#include "dbconfig.h"
|
|
||||||
-
|
|
||||||
-class QProcess;
|
|
||||||
+#include <QObject>
|
|
||||||
+#include <QProcess>
|
|
||||||
|
|
||||||
namespace Akonadi {
|
|
||||||
namespace Server {
|
|
||||||
|
|
||||||
-class DbConfigMysql : public DbConfig
|
|
||||||
+class DbConfigMysql : public QObject, public DbConfig
|
|
||||||
{
|
|
||||||
+ Q_OBJECT
|
|
||||||
+
|
|
||||||
public:
|
|
||||||
DbConfigMysql();
|
|
||||||
|
|
||||||
@@ -75,6 +77,9 @@ public:
|
|
||||||
/// reimpl
|
|
||||||
void initSession(const QSqlDatabase &database) Q_DECL_OVERRIDE;
|
|
||||||
|
|
||||||
+private Q_SLOTS:
|
|
||||||
+ void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
||||||
+
|
|
||||||
private:
|
|
||||||
int parseCommandLineToolsVersion() const;
|
|
||||||
|
|
||||||
--
|
|
||||||
cgit v0.11.2
|
|
Loading…
Reference in New Issue
Block a user