Bug 492676

Summary: Incomplete dependencies of KMail
Product: [KDE Neon] neon Reporter: Kevin Krammer <krammer>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs-null>
Status: REPORTED ---    
Severity: normal CC: jr, neon-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: ZIP of a working /etc/appamor.d

Description Kevin Krammer 2024-09-05 11:02:45 UTC
SUMMARY

Installed a new system from image neon-user-20240902-1039.iso and then proceeded to install further packages, one of them being kmail, using

$> apt install kmail

It fails to start because Akonadi can't start MariaDB

$> akonadictl start                                                                                                                                                                       :(
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl:    done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)                                                                                                             
kevin@hephaistos ~ % org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Did not find MySQL server default configuration (mysql-global.conf)
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

Had to manually install akonadi-backend-mysql

$> apt install akonadi-backend-mysql

Now it fails at AppArmor

Sep 05 12:41:06 hephaistos audit[16311]: AVC apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=16311 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"
Sep 05 12:41:06 hephaistos kernel: kauditd_printk_skb: 50 callbacks suppressed
Sep 05 12:41:06 hephaistos kernel: audit: type=1400 audit(1725532866.769:249): apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=16311 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"
Sep 05 12:41:06 hephaistos kernel: audit: type=1400 audit(1725532866.770:250): apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=16312 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"
Sep 05 12:41:06 hephaistos audit[16312]: AVC apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=16312 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"

Kmail works nicely on a similar system that has been installed last year and upgrade since then (same machine, other SSD)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon 6.0
KDE Plasma Version: 6.1.4
KDE Frameworks Version:  6.5.0
Qt Version: 6.7.2

Addition observations:

* the new system as /etc/apparmor.d/usr.bin.akonadiserver the old one does not. According to dpkg this is providex by kpim6-akonadi. Will need to check on the old system later

* Both have same /etc/apparmor.d/local/usr.bin.akonadiserver which according to the new system's dpkg is not provided by any package to maybe generated?

* Both have same /etc/apparmor.d/mariadbd_akonadi and /etc/apparmor.d/mysqld_akonadi
Comment 1 Kevin Krammer 2024-09-05 13:55:48 UTC
I just realized that I might have used aptitude, not apt, to install KMail on the old system.
Since is has generally better dependency resolution this might explain why I did not have to install akonadi-backend-mysql there.

Still doesn't explain why AppArmor is (once again?) interfering with startup.
Comment 2 Kevin Krammer 2024-10-20 15:32:51 UTC
Created attachment 175056 [details]
ZIP of a working /etc/appamor.d

Tried again with neon-user-20241020-0745.iso and the AppArmor setup is still broken.

Okt 20 16:32:26 hephaistos kernel: audit: type=1400 audit(1729434746.182:135): apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=4572 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"
Okt 20 16:32:26 hephaistos kernel: audit: type=1400 audit(1729434746.182:136): apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/bin/mariadb-install-db" pid=4573 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"
Okt 20 16:32:26 hephaistos kernel: audit: type=1400 audit(1729434746.182:137): apparmor="DENIED" operation="exec" class="file" info="profile transition not found" error=-13 profile="/usr/bin/akonadiserver" name="/usr/sbin/mariadbd" pid=4574 comm="akonadiserver" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0 target="mariadbd_akonadi"

Attaching a ZIP of the /etc/apparmor.d of my other installation where this is working.
Extracting that on a newly installed system (and rebooting) allows Akonadi to start