Skip to content

Commit

Permalink
kde-frameworks: version bump 5.26.0
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.0
  • Loading branch information
Michael Palimaka committed Sep 14, 2016
1 parent f9deb4d commit 1f9700e
Show file tree
Hide file tree
Showing 154 changed files with 3,481 additions and 0 deletions.
1 change: 1 addition & 0 deletions kde-frameworks/attica/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST attica-5.23.0.tar.xz 59972 SHA256 8a8cb27734b7efeba2a91adddfdc4863e8d5e7892e70c60afad5a4c09578b549 SHA512 59516c8184785fcd6eee406c9273b9cc1f68a057a615cce190887509ee5f5770c81e95548b7f20db81451291862e0ed940f55a2ebca39f2b26a799ddb89993c6 WHIRLPOOL eccbbb4fcecedeec5bfc965bf66761a39b1c93e1d330c93b0265d46748e94860f183f53d86a3af31a6e9e11f8a2e7c62b00592bd8631baace4b397c509fbbe71
DIST attica-5.25.0.tar.xz 60200 SHA256 951af772a83237d2c0c9a7fede2608101041d2cc13716221c97d9c79cc79e5be SHA512 b68e01a3223ce196390e3768c71e7e18ba6b46a4246eb294e9ee6cc1620c50b44f1315091c3431d082415928636479d4a9cc6797be8dbdc74ad6110564acc493 WHIRLPOOL b4064d903e27f360b1df1546af79bd1c2569971013961d05d483d3f257cd8049b6bba0ab74fd581de3336af60d3cf21ac9f8c3fc280d1651f2e92d8364da99f6
DIST attica-5.26.0.tar.xz 60212 SHA256 8cc602d96a7e650771630e72a7102efdc9c3fb99004ed23f2de2daf9370ae7fc SHA512 54d0fddc8c5f33a906b24feb5006e389778869c15c248ff4170dc4934557c3a6671a3e8434a96cbd897404cea49aa71c65557e15ae7a73ed9df78f5741927f51 WHIRLPOOL 7c6823e1a6682aa2f484583b6dce8a2e8783bfa3a8b7a7ec361d503337e2fd7307f0e969318fac5197fac4ca1c4bd0c0ebcd418f53bb1f82386ac10a057cfd69
17 changes: 17 additions & 0 deletions kde-frameworks/attica/attica-5.26.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit kde5

DESCRIPTION="Framework providing access to Open Collaboration Services"
LICENSE="LGPL-2.1+"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""

RDEPEND="
$(add_qt_dep qtnetwork)
"
DEPEND="${RDEPEND}"
1 change: 1 addition & 0 deletions kde-frameworks/baloo/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST baloo-5.23.0.tar.xz 185060 SHA256 4b32fc91a8f71b4ff5c0d7832ac6da41cdd8ea1a33594e905519565c4bbb6ed6 SHA512 3e0f157c05217c424b5eacb88773e232ce066b3354c37f95e5b5bcecb53250a0551faa3091b942ba9fc26c5905f8929311047fa5c3ef58a4ef57b46d5daa14d5 WHIRLPOOL 88c340f781f4d1c71addc709efddbb3aa20ebb44b062d723938556f6b4642e1223b876b6b0c8d152d0049e55d656962534a13abb1993691b665a1f5b7426d6b2
DIST baloo-5.25.0.tar.xz 186448 SHA256 8fef4b655660d6f2f05a5af794ab578afa2f9be7b665ed0313ce79e654c2b4c5 SHA512 3d5426f3964d563db1a7859b1db94ad74e7262c46762b286f413288f9409802ae6298fb8912d6a52304e68659491896242806cd825a6e539dde5148cbff5f86d WHIRLPOOL 8dc02221a8a09bef3a24b26e4e779d4258f595be1077c93597adf34e65211afecbc0c80af780bf189044ccd905fb343ed43d9101091012374559bf070441e36f
DIST baloo-5.26.0.tar.xz 187444 SHA256 dedd54b468e799cf0fc6e4f69e05659605907a026ec02895fc3bc250ab13f331 SHA512 bec8591648c0e3af7e96e2097725383195fd21fbb7d973738e2ff0caff9fd631b336bccca5ac9d3bc135fda00d2e2edcd9e0d26213f8a0cd1ea88588bc97d2d2 WHIRLPOOL f33b1d5ba9fc2250586f437bc613c3088a18058594f64f80d2b23665c83aa8c15e7167f5cd60dbf8405439e374e55b2a20f92bfb8567c0da17788d47ed75357a
50 changes: 50 additions & 0 deletions kde-frameworks/baloo/baloo-5.26.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

KDE_TEST="forceoptional"
VIRTUALX_REQUIRED="test"
inherit kde5

DESCRIPTION="Framework for searching and managing metadata"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""

DEPEND="
$(add_frameworks_dep kconfig)
$(add_frameworks_dep kcoreaddons)
$(add_frameworks_dep kcrash)
$(add_frameworks_dep kdbusaddons)
$(add_frameworks_dep kfilemetadata)
$(add_frameworks_dep ki18n)
$(add_frameworks_dep kidletime)
$(add_frameworks_dep kio)
$(add_frameworks_dep solid)
$(add_qt_dep qtdbus)
$(add_qt_dep qtdeclarative)
$(add_qt_dep qtgui)
$(add_qt_dep qtwidgets)
>=dev-db/lmdb-0.9.17
"
RDEPEND="${DEPEND}
!kde-base/baloo:4[-minimal(-)]
"

PATCHES=(
"${FILESDIR}/${P}-runtime-crash.patch"
"${FILESDIR}/${P}-size-limit.patch"
"${FILESDIR}/${P}-zerotimestamp-crash.patch"
"${FILESDIR}/${P}-thread-safety.patch"
"${FILESDIR}/${P}-dont-corrupt.patch"
)

pkg_postinst() {
kde5_pkg_postinst
if use x86; then
ewarn "The baloo index size limit for 32-bit is 1GB. For large homes, exclude"
ewarn "subdirectories in System Settings / Search to avoid random segfaults."
ewarn "For more information, visit: https://bugs.kde.org/show_bug.cgi?id=364475"
fi
}
193 changes: 193 additions & 0 deletions kde-frameworks/baloo/files/baloo-5.26.0-dont-corrupt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
From: Christoph Cullmann <[email protected]>
Date: Sun, 11 Sep 2016 21:36:27 +0000
Subject: Open baloo lmdb database read-only beside in baloo_file/baloo_file_extractor + balooctl (for some commands) + unit tests
X-Git-Url: http://quickgit.kde.org/?p=baloo.git&a=commitdiff&h=02047b524a176da447d8c96e15c7e2abae8339ae
---
Open baloo lmdb database read-only beside in baloo_file/baloo_file_extractor + balooctl (for some commands) + unit tests

At the moment, any application that uses baloo can corrupt the db.
Now, only the things that need to write to it open it with read-write.
This only works as long as the library exposes only read-only things like Query/...

REVIEW: 128892
---


--- a/src/engine/database.cpp
+++ b/src/engine/database.cpp
@@ -79,7 +79,7 @@
}
QFileInfo indexInfo(dir, QStringLiteral("index"));

- if (mode == OpenDatabase && !indexInfo.exists()) {
+ if ((mode != CreateDatabase) && !indexInfo.exists()) {
return false;
}

@@ -117,7 +117,7 @@

// The directory needs to be created before opening the environment
QByteArray arr = QFile::encodeName(indexInfo.absoluteFilePath());
- rc = mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT, 0664);
+ rc = mdb_env_open(m_env, arr.constData(), MDB_NOSUBDIR | MDB_NOMEMINIT | ((mode == ReadOnlyDatabase) ? MDB_RDONLY : 0), 0664);
if (rc) {
mdb_env_close(m_env);
m_env = nullptr;
@@ -136,7 +136,7 @@
// Individual Databases
//
MDB_txn* txn;
- if (mode == OpenDatabase) {
+ if (mode != CreateDatabase) {
int rc = mdb_txn_begin(m_env, NULL, MDB_RDONLY, &txn);
Q_ASSERT_X(rc == 0, "Database::transaction ro begin", mdb_strerror(rc));
if (rc) {

--- a/src/engine/database.h
+++ b/src/engine/database.h
@@ -49,8 +49,20 @@
* Database open mode
*/
enum OpenMode {
+ /**
+ * Create + open read-write dabase.
+ */
CreateDatabase,
- OpenDatabase
+
+ /**
+ * Read-Write Database, only works if database exists.
+ */
+ ReadWriteDatabase,
+
+ /**
+ * Read-Only Database, only works if database exists.
+ */
+ ReadOnlyDatabase
};

/**

--- a/src/file/extractor/app.cpp
+++ b/src/file/extractor/app.cpp
@@ -55,7 +55,7 @@
void App::slotNewInput()
{
Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadWriteDatabase)) {
qCritical() << "Failed to open the database";
exit(1);
}

--- a/src/lib/file.cpp
+++ b/src/lib/file.cpp
@@ -96,7 +96,7 @@
}

Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadOnlyDatabase)) {
return false;
}


--- a/src/lib/searchstore.cpp
+++ b/src/lib/searchstore.cpp
@@ -48,7 +48,7 @@
: m_db(0)
{
m_db = globalDatabaseInstance();
- if (!m_db->open(Database::OpenDatabase)) {
+ if (!m_db->open(Database::ReadOnlyDatabase)) {
m_db = 0;
}


--- a/src/lib/taglistjob.cpp
+++ b/src/lib/taglistjob.cpp
@@ -46,7 +46,7 @@
void TagListJob::start()
{
Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadOnlyDatabase)) {
setError(UserDefinedError);
setErrorText(QStringLiteral("Failed to open the database"));
emitResult();

--- a/src/qml/experimental/monitor.cpp
+++ b/src/qml/experimental/monitor.cpp
@@ -126,7 +126,7 @@
void Monitor::fetchTotalFiles()
{
Baloo::Database *db = Baloo::globalDatabaseInstance();
- if (db->open(Baloo::Database::OpenDatabase)) {
+ if (db->open(Baloo::Database::ReadOnlyDatabase)) {
Baloo::Transaction tr(db, Baloo::Transaction::ReadOnly);
m_totalFiles = tr.size();
m_filesIndexed = tr.size() - tr.phaseOneSize();

--- a/src/tools/balooctl/main.cpp
+++ b/src/tools/balooctl/main.cpp
@@ -191,7 +191,7 @@
}

Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadWriteDatabase)) {
out << "Baloo Index could not be opened\n";
return 1;
}
@@ -230,7 +230,7 @@
}

Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadWriteDatabase)) {
out << "Baloo Index could not be opened\n";
return 1;
}
@@ -260,7 +260,7 @@

if (command == QStringLiteral("indexSize")) {
Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadOnlyDatabase)) {
out << "Baloo Index could not be opened\n";
return 1;
}
@@ -311,7 +311,7 @@

if (command == QStringLiteral("checkDb")) {
Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadOnlyDatabase)) {
out << "Baloo Index could not be opened\n";
return 1;
}

--- a/src/tools/balooctl/statuscommand.cpp
+++ b/src/tools/balooctl/statuscommand.cpp
@@ -56,7 +56,7 @@
}

Database *db = globalDatabaseInstance();
- if (!db->open(Database::OpenDatabase)) {
+ if (!db->open(Database::ReadOnlyDatabase)) {
out << i18n("Baloo Index could not be opened") << endl;
return 1;
}

--- a/src/tools/balooshow/main.cpp
+++ b/src/tools/balooshow/main.cpp
@@ -101,7 +101,7 @@
QString text;

Baloo::Database *db = Baloo::globalDatabaseInstance();
- if (!db->open(Baloo::Database::OpenDatabase)) {
+ if (!db->open(Baloo::Database::ReadOnlyDatabase)) {
stream << i18n("The Baloo index could not be opened. Please run \"balooctl status\" to see if Baloo is enabled and working.")
<< endl;
return 1;

41 changes: 41 additions & 0 deletions kde-frameworks/baloo/files/baloo-5.26.0-runtime-crash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From: Christoph Cullmann <[email protected]>
Date: Thu, 08 Sep 2016 22:00:40 +0000
Subject: fix baloo_file crash with corrupted database
X-Git-Url: http://quickgit.kde.org/?p=baloo.git&a=commitdiff&h=a03b0caa4ca1fbfc249bfc0c2730aac340bbf929
---
fix baloo_file crash with corrupted database

CHANGELOG: Handle corruption of index database for baloo_file, try to recreate the database or abort if that fails.

REVIEW: 128865
---


--- a/src/file/main.cpp
+++ b/src/file/main.cpp
@@ -82,7 +82,23 @@
QFile::remove(path + "/index-lock");

Baloo::Database *db = Baloo::globalDatabaseInstance();
- db->open(Baloo::Database::CreateDatabase);
+
+ /**
+ * try to open, if that fails, try to unlink the index db and retry
+ */
+ if (!db->open(Baloo::Database::CreateDatabase)) {
+ // delete old stuff, set to initial run!
+ qWarning() << "Failed to create database, removing corrupted database.";
+ QFile::remove(path + "/index");
+ QFile::remove(path + "/index-lock");
+ indexerConfig.setInitialRun(true);
+
+ // try to create now after cleanup, if still no works => fail
+ if (!db->open(Baloo::Database::CreateDatabase)) {
+ qWarning() << "Failed to create database after deleting corrupted one.";
+ return 1;
+ }
+ }

Baloo::MainHub hub(db, &indexerConfig);
return app.exec();

Loading

0 comments on commit 1f9700e

Please sign in to comment.