1 |
commit: 0d2f5ff0189b776ae2665383af28cdc79e16df86 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 12 13:23:24 2017 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 12 13:47:37 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde-sunset.git/commit/?id=0d2f5ff0 |
7 |
|
8 |
kde-apps/akonadi: import from main tree |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
11 |
|
12 |
.../akonadi/akonadi-1.13.1_pre20160203-r1.ebuild | 126 +++++++++++++++++++++ |
13 |
.../files/akonadi-1.13.0-mysql56-crash.patch | 20 ++++ |
14 |
.../akonadi/files/akonadi-1.13.1-mysql.conf.patch | 38 +++++++ |
15 |
.../files/akonadi-17.03.80-mysql56-crash.patch | 40 +++++++ |
16 |
kde-apps/akonadi/metadata.xml | 4 + |
17 |
5 files changed, 228 insertions(+) |
18 |
|
19 |
diff --git a/kde-apps/akonadi/akonadi-1.13.1_pre20160203-r1.ebuild b/kde-apps/akonadi/akonadi-1.13.1_pre20160203-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 0000000..bdc92a8 |
22 |
--- /dev/null |
23 |
+++ b/kde-apps/akonadi/akonadi-1.13.1_pre20160203-r1.ebuild |
24 |
@@ -0,0 +1,126 @@ |
25 |
+# Copyright 1999-2017 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+ |
30 |
+if [[ ${PV} = *_pre* ]]; then |
31 |
+ # KDE quickgit https certificate issue |
32 |
+ # COMMIT_ID="18ed37d89b8185ac15a8bfe245de8a88d17f2c64" |
33 |
+ # SRC_URI="https://quickgit.kde.org/?p=${PN}.git&a=snapshot&h=${COMMIT_ID}&fmt=tgz -> ${P}.tar.gz" |
34 |
+ SRC_URI="https://dev.gentoo.org/~johu/distfiles/${P}.tar.gz" |
35 |
+ S="${WORKDIR}/${PN}" |
36 |
+else |
37 |
+ SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.bz2" |
38 |
+fi |
39 |
+inherit cmake-utils |
40 |
+ |
41 |
+DESCRIPTION="The server part of Akonadi" |
42 |
+HOMEPAGE="https://pim.kde.org/akonadi" |
43 |
+ |
44 |
+LICENSE="LGPL-2.1" |
45 |
+SLOT="4" |
46 |
+KEYWORDS="amd64 ~arm x86" |
47 |
+IUSE="+mysql postgres sqlite test" |
48 |
+ |
49 |
+REQUIRED_USE="|| ( sqlite mysql postgres )" |
50 |
+ |
51 |
+CDEPEND=" |
52 |
+ dev-libs/boost:= |
53 |
+ >=dev-qt/qtcore-4.8.5:4 |
54 |
+ >=dev-qt/qtdbus-4.8.5:4 |
55 |
+ >=dev-qt/qtgui-4.8.5:4 |
56 |
+ >=dev-qt/qtsql-4.8.5:4[mysql?,postgres?] |
57 |
+ >=dev-qt/qttest-4.8.5:4 |
58 |
+ x11-misc/shared-mime-info |
59 |
+ sqlite? ( dev-db/sqlite:3 ) |
60 |
+" |
61 |
+DEPEND="${CDEPEND} |
62 |
+ dev-libs/libxslt |
63 |
+ >=dev-util/automoc-0.9.88 |
64 |
+ test? ( sys-apps/dbus ) |
65 |
+" |
66 |
+RDEPEND="${CDEPEND} |
67 |
+ mysql? ( virtual/mysql ) |
68 |
+ postgres? ( dev-db/postgresql[server] ) |
69 |
+" |
70 |
+ |
71 |
+RESTRICT="test" |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}/${PN}-1.13.0-mysql56-crash.patch" |
75 |
+ "${FILESDIR}/${PN}-1.13.1-mysql.conf.patch" |
76 |
+) |
77 |
+ |
78 |
+pkg_pretend() { |
79 |
+ if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc; then |
80 |
+ [[ $(gcc-major-version) -lt 4 ]] || \ |
81 |
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) \ |
82 |
+ && die "Sorry, but gcc-4.6 and earlier won't work (see bug #520102)." |
83 |
+ fi |
84 |
+} |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ # Set default storage backend in order: MySQL, SQLite PostgreSQL |
88 |
+ # reverse driver check to keep the order |
89 |
+ if use postgres; then |
90 |
+ DRIVER="QPSQL" |
91 |
+ AVAILABLE+=" ${DRIVER}" |
92 |
+ fi |
93 |
+ |
94 |
+ if use sqlite; then |
95 |
+ DRIVER="QSQLITE3" |
96 |
+ AVAILABLE+=" ${DRIVER}" |
97 |
+ fi |
98 |
+ |
99 |
+ if use mysql; then |
100 |
+ DRIVER="QMYSQL" |
101 |
+ AVAILABLE+=" ${DRIVER}" |
102 |
+ fi |
103 |
+ |
104 |
+ # Notify about MySQL is recommend by upstream |
105 |
+ if use sqlite || has_version "<${CATEGORY}/${P}[sqlite]"; then |
106 |
+ ewarn |
107 |
+ ewarn "We strongly recommend you change your Akonadi database backend to MySQL in your" |
108 |
+ ewarn "user configuration. This is the backend recommended by KDE upstream. PostgreSQL" |
109 |
+ ewarn "is also known to work very well but requires manual dump and import on major" |
110 |
+ ewarn "upgrades of the DB." |
111 |
+ ewarn "You can select the backend in your ~/.config/akonadi/akonadiserverrc." |
112 |
+ ewarn "Available drivers are:${AVAILABLE}" |
113 |
+ ewarn |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ local mycmakeargs=( |
119 |
+ -DINSTALL_QSQLITE_IN_QT_PREFIX=ON |
120 |
+ -DWITH_SOPRANO=FALSE |
121 |
+ -DAKONADI_BUILD_TESTS=$(usex test) |
122 |
+ -DAKONADI_BUILD_QSQLITE=$(usex sqlite) |
123 |
+ -DQT5_BUILD=OFF |
124 |
+ ) |
125 |
+ |
126 |
+ cmake-utils_src_configure |
127 |
+} |
128 |
+ |
129 |
+src_test() { |
130 |
+ export $(dbus-launch) |
131 |
+ cmake-utils_src_test |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ # Who knows, maybe it accidentally fixes our permission issues |
136 |
+ cat <<-EOF > "${T}"/akonadiserverrc |
137 |
+[%General] |
138 |
+Driver=${DRIVER} |
139 |
+EOF |
140 |
+ insinto /usr/share/config/akonadi |
141 |
+ doins "${T}"/akonadiserverrc |
142 |
+ |
143 |
+ cmake-utils_src_install |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ elog "${DRIVER} has been set as your default akonadi storage backend." |
148 |
+ elog "You can override it in your ~/.config/akonadi/akonadiserverrc." |
149 |
+ elog "Available drivers are: ${AVAILABLE}" |
150 |
+} |
151 |
|
152 |
diff --git a/kde-apps/akonadi/files/akonadi-1.13.0-mysql56-crash.patch b/kde-apps/akonadi/files/akonadi-1.13.0-mysql56-crash.patch |
153 |
new file mode 100644 |
154 |
index 0000000..2049618 |
155 |
--- /dev/null |
156 |
+++ b/kde-apps/akonadi/files/akonadi-1.13.0-mysql56-crash.patch |
157 |
@@ -0,0 +1,20 @@ |
158 |
+diff -aruN akonadi-1.13.0.old/server/src/storage/dbconfigmysql.cpp akonadi-1.13.0/server/src/storage/dbconfigmysql.cpp |
159 |
+--- akonadi-1.13.0.old/server/src/storage/dbconfigmysql.cpp 2014-08-10 06:38:58.000000000 -0400 |
160 |
++++ akonadi-1.13.0/server/src/storage/dbconfigmysql.cpp 2015-01-08 15:08:36.906134212 -0500 |
161 |
+@@ -76,6 +76,7 @@ |
162 |
+ << QLatin1String( "/usr/local/sbin" ) |
163 |
+ << QLatin1String( "/usr/local/libexec" ) |
164 |
+ << QLatin1String( "/usr/libexec" ) |
165 |
++ << QLatin1String( "/usr/share/mysql/scripts" ) |
166 |
+ << QLatin1String( "/opt/mysql/libexec" ) |
167 |
+ << QLatin1String( "/opt/local/lib/mysql5/bin" ) |
168 |
+ << QLatin1String( "/opt/mysql/sbin" ); |
169 |
+@@ -278,7 +279,7 @@ |
170 |
+ // first run, some MySQL versions need a mysql_install_db run for that |
171 |
+ const QString confFile = XdgBaseDirs::findResourceFile( "config", QLatin1String( "akonadi/mysql-global.conf" ) ); |
172 |
+ if ( QDir( dataDir ).entryList( QDir::NoDotAndDotDot | QDir::AllEntries ).isEmpty() && !mMysqlInstallDbPath.isEmpty() ) { |
173 |
+- const QStringList arguments = QStringList() << QString::fromLatin1( "--force" ) << QString::fromLatin1( "--defaults-file=%1" ).arg( confFile ) << QString::fromLatin1( "--datadir=%1/" ).arg( dataDir ); |
174 |
++ const QStringList arguments = QStringList() << QString::fromLatin1( "--force" ) << QString::fromLatin1( "--defaults-file=%1" ).arg( confFile ) << QString::fromLatin1( "--datadir=%1/" ).arg( dataDir ) << QString::fromLatin1( "--basedir=/usr" ) ; |
175 |
+ QProcess::execute( mMysqlInstallDbPath, arguments ); |
176 |
+ } |
177 |
+ |
178 |
|
179 |
diff --git a/kde-apps/akonadi/files/akonadi-1.13.1-mysql.conf.patch b/kde-apps/akonadi/files/akonadi-1.13.1-mysql.conf.patch |
180 |
new file mode 100644 |
181 |
index 0000000..a090636 |
182 |
--- /dev/null |
183 |
+++ b/kde-apps/akonadi/files/akonadi-1.13.1-mysql.conf.patch |
184 |
@@ -0,0 +1,38 @@ |
185 |
+From: Daniel Vrátil <dvratil@×××.org> |
186 |
+Date: Tue, 16 Feb 2016 17:26:22 +0000 |
187 |
+Subject: Drop mysql.conf option removed in MySQL 5.7 |
188 |
+X-Git-Url: http://quickgit.kde.org/?p=akonadi.git&a=commitdiff&h=9a9f7eaa38023f70c6fa85a87359a487ccf7a48c |
189 |
+--- |
190 |
+Drop mysql.conf option removed in MySQL 5.7 |
191 |
+ |
192 |
+innodb_additional_mem_pool_size option has been deprecated in MySQL 5.6 |
193 |
+and removed in 5.7 so MySQL will no longer start it the option is present |
194 |
+in mysql.conf. |
195 |
+ |
196 |
+The option still seems to be supported by MariaDB, but the default value |
197 |
+we had in the mysql.conf was below the minimum allowed value, so the harm |
198 |
+in removing the option for MariaDB should be minimal. |
199 |
+ |
200 |
+If options supported by MySQL and MariaDB begin to diverge more in the future |
201 |
+we might consider having separate config files for each database. |
202 |
+ |
203 |
+* 2016-02-21: Adjusted path for 1.13 branch |
204 |
+--- |
205 |
+ |
206 |
+ |
207 |
+--- a/server/src/storage/mysql-global.conf |
208 |
++++ b/server/src/storage/mysql-global.conf |
209 |
+@@ -37,9 +37,9 @@ |
210 |
+ # use InnoDB for transactions and better crash recovery |
211 |
+ default_storage_engine=innodb |
212 |
+ |
213 |
+-# memory pool InnoDB uses to store data dictionary information and other internal data structures (default:1M) |
214 |
+-# Deprecated in MySQL >= 5.6.3 |
215 |
+-innodb_additional_mem_pool_size=1M |
216 |
++# memory pool InnoDB uses to store data dictionary information and other internal data structures (default:8M) |
217 |
++# Deprecated in MySQL >= 5.6.3, removed in 5.7 (works in MariaDB) |
218 |
++# innodb_additional_mem_pool_size=8M |
219 |
+ |
220 |
+ # memory buffer InnoDB uses to cache data and indexes of its tables (default:128M) |
221 |
+ # Larger values means less I/O |
222 |
+ |
223 |
|
224 |
diff --git a/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch b/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch |
225 |
new file mode 100644 |
226 |
index 0000000..0b5e381 |
227 |
--- /dev/null |
228 |
+++ b/kde-apps/akonadi/files/akonadi-17.03.80-mysql56-crash.patch |
229 |
@@ -0,0 +1,40 @@ |
230 |
+Gentoo-bug: 530012 |
231 |
+ |
232 |
+diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp |
233 |
+index 50421714d..dfae09c20 100644 |
234 |
+--- a/src/server/storage/dbconfigmysql.cpp |
235 |
++++ b/src/server/storage/dbconfigmysql.cpp |
236 |
+@@ -81,6 +81,7 @@ bool DbConfigMysql::init(QSettings &settings) |
237 |
+ << QStringLiteral("/usr/local/sbin") |
238 |
+ << QStringLiteral("/usr/local/libexec") |
239 |
+ << QStringLiteral("/usr/libexec") |
240 |
++ << QStringLiteral("/usr/share/mysql/scripts") |
241 |
+ << QStringLiteral("/opt/mysql/libexec") |
242 |
+ << QStringLiteral("/opt/local/lib/mysql5/bin") |
243 |
+ << QStringLiteral("/opt/mysql/sbin"); |
244 |
+@@ -511,7 +512,7 @@ bool DbConfigMysql::initializeMariaDBDatabase(const QString &confFile, const QSt |
245 |
+ return 0 == execute(mMysqlInstallDbPath, { |
246 |
+ QStringLiteral("--defaults-file=%1").arg(confFile), |
247 |
+ QStringLiteral("--force"), |
248 |
+- QStringLiteral("--basedir=%1").arg(baseDir), |
249 |
++ QStringLiteral("--basedir=/usr"), |
250 |
+ QStringLiteral("--datadir=%1/").arg(dataDir) |
251 |
+ }); |
252 |
+ } |
253 |
+@@ -525,6 +526,7 @@ bool DbConfigMysql::initializeMySQL5_7_6Database(const QString &confFile, const |
254 |
+ return 0 == execute(mMysqldPath, { |
255 |
+ QStringLiteral("--defaults-file=%1").arg(confFile), |
256 |
+ QStringLiteral("--initialize"), |
257 |
++ QStringLiteral("--basedir=/usr"), |
258 |
+ QStringLiteral("--datadir=%1/").arg(dataDir) |
259 |
+ }); |
260 |
+ } |
261 |
+@@ -539,7 +541,7 @@ bool DbConfigMysql::initializeMySQLDatabase(const QString &confFile, const QStri |
262 |
+ // Don't use --force, it has been removed in MySQL 5.7.5 |
263 |
+ return 0 == execute(mMysqlInstallDbPath, { |
264 |
+ QStringLiteral("--defaults-file=%1").arg(confFile), |
265 |
+- QStringLiteral("--basedir=%1").arg(baseDir), |
266 |
++ QStringLiteral("--basedir=/usr"), |
267 |
+ QStringLiteral("--datadir=%1/").arg(dataDir) |
268 |
+ }); |
269 |
+ } |
270 |
|
271 |
diff --git a/kde-apps/akonadi/metadata.xml b/kde-apps/akonadi/metadata.xml |
272 |
new file mode 100644 |
273 |
index 0000000..097975e |
274 |
--- /dev/null |
275 |
+++ b/kde-apps/akonadi/metadata.xml |
276 |
@@ -0,0 +1,4 @@ |
277 |
+<?xml version="1.0" encoding="UTF-8"?> |
278 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
279 |
+<pkgmetadata> |
280 |
+</pkgmetadata> |