There is an Apparmor profile used by debian,ubuntu, kdeneon and it would make sense to have that in KDE akonadi git for common good and easier maintainance. The cmake could have a switch -DAPPARMOR=true which would set -DMYSQLD_EXECUTABLE:STRING=/usr/sbin/mysqld-akonadi it would make -DMYSQLD_EXECUTABLE:STRING=/usr/sbin/mysqld-akonadi a symlink to /usr/sbin/mysql it would install the apparmor profile and do whatever dh_apparmor does to add an extra link and reload it https://packaging.neon.kde.org/kde/akonadi.git/tree/debian/usr.sbin.mysqld-akonadi?h=Neon/unstable contact Jamie S from canonical for help
Well no, it doesn't make sense for the other distributions. Distro specific hacks shall be added by distributions
(In reply to Christophe Giboudeaux from comment #1) > Well no, it doesn't make sense for the other distributions. > > Distro specific hacks shall be added by distributions You are right Distro specific hacks should not enter upstream. But this bug report is about getting AppArmor profile into upstream. I now found a solution to get rid of this symlink and we are able to express everything, we need in Apparmor directly, by using the Px to have a decidated mysql prfile for akonadi.
Upps forgotten the link to Differential: https://phabricator.kde.org/D23908
"mysqld-akonadi" *is* a distro hack
(In reply to Christophe Giboudeaux from comment #4) > "mysqld-akonadi" *is* a distro hack Have you looked at the Differential? There mysqld_akonadi is just a name for a mysqld profile, that is used by Akonadi, that has nothing to do with any Distribution. The initial comment from Jonathan had another distro hack with symlink. But having different profiles for one application is a common thing done in AppArmor and this is needed. As a mysqld runs globally needs other permissions than the instance created by Akonadi.
Well, it's still only useful for debian and its various forks (ubuntu, neon...)
(In reply to Christophe Giboudeaux from comment #6) > Well, it's still only useful for debian and its various forks (ubuntu, > neon...) No - it is useful for everyone who is using AppArmor or pinpoint me to parts, that are distro specific, so I can fix those parts.
Closing as the relevant phabricator diff was merged