Akonadi server should not expect specific mysql server process name
ClosedPublic

Authored by lukaskaras on Apr 17 2020, 7:36 AM.

Details

Summary

On Kubuntu, Akonadi is using /usr/sbin/mysqld-akonadi as mysql server. It is symlink to /usr/sbin/mysqld, but in /proc filesystem it is named as mysqld-akonadi...

Akonadi should not expect specific executable name, but should evaluate it from mMysqldPath variable. Moreover, process names in /proc filesystem is trimmed to 15 characters on Linux.

Test Plan

Stop Akonadi

Create symlink /usr/sbin/mysqld-akonadi to /usr/sbin/mysqld, start that process

/usr/sbin/mysqld-akonadi --defaults-file=$HOME/.local/share/akonadi/mysql.conf --datadir=$HOME/.local/share/akonadi/db_data/ --socket=/run/user/$UID/akonadi/mysql.socket --pid-file=/run/user/$UID/akonadi/mysql.pid

Update akonadi server configuration ~/.config/akonadi/akonadiserverrc :

[QMYSQL]
ServerPath=/usr/sbin/mysqld-akonadi

Start akonadi

Akonadi server should re-use existing mysql server...

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
lukaskaras created this revision.Apr 17 2020, 7:36 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 17 2020, 7:36 AM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
lukaskaras requested review of this revision.Apr 17 2020, 7:36 AM
dvratil accepted this revision.Apr 18 2020, 10:42 AM
dvratil added a subscriber: dvratil.

Thanks for the patch, Lukáši :-)

src/server/storage/dbconfigmysql.cpp
325

Make it const please.

This revision is now accepted and ready to land.Apr 18 2020, 10:42 AM
This revision was automatically updated to reflect the committed changes.
knauss added a subscriber: knauss.Apr 21 2020, 6:19 PM

@lukaskaras: this whole foo with mysqld-akonadi is not needed anymore. Me as the maintainer of Debian packages I investigate the situation and found this proper solution with AppArmor rules, so I could removed the mysqld-akonadi workaround.

The patch still correct, though. The assumption that the process is always called simply mysqld is wrong.

The patch still correct, though. The assumption that the process is always called simply mysqld is wrong.

This for sure ;)