Apparmor mysqld-akonadi profile error

Bug #271643 reported by laksdjfaasdf
10
Affects Status Importance Assigned to Milestone
akonadi (Ubuntu)
Fix Released
Undecided
Harald Sitter

Bug Description

Installing the akonadi-server package causes apparmor policy loading to report a failure when reloading policy, due to a repeated variable declaration in the mysql-akonadi apparmor policy.

After an update from Hardy 8.04.1 to Intrepid Alpha 2008-09-17:

MySQL server did not startup any more. I had apparmor installed and had no problems till dist upgrade:

Version:

Architecture: i386
Version: 2.3+1289-0ubuntu3
Replaces: apparmor-parser
Depends: libc6 (>= 2.8~20080505), upstart-compat-sysv (>= 0.3.9-6) | sysvinit (>= 2.86.ds1-56ubuntu3)
Suggests: apparmor-profiles, apparmor-docs
Filename: pool/main/a/apparmor/apparmor_2.3+1289-0ubuntu3_i386.deb

Error message:

Richte mysql-server-5.0 ein (5.0.67-0ubuntu5) ...
 * Stopping MySQL database server mysqld [ OK ]
Reloading AppArmor profiles 'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
 Skipping profile /etc/apparmor.d/usr.sbin.mysqld-akonadi.dpkg-new
: Warning.
'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 * Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.

Expectation:

MySQL server should start

What happened:

It did not start

Related branches

Revision history for this message
Mathias Gug (mathiaz) wrote :

/etc/apparmor.d/usr.sbin.mysqld-akonadi is shipped by akonadi-server. Reassigning to that package.

Revision history for this message
icorbett (icorbett) wrote :

I am also seeing a problem related to this however it does not seem to be affecting MySQL for me. Reloading AppArmor generates this error.

$ sudo /etc/init.d/apparmor reload
Reloading AppArmor profiles 'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
: Failed.

So far as I can tell this is not affecting AppArmor's ability to run but it is certainly preventing it from "protecting" akonadi-server as it should.

Revision history for this message
Martin (martin-zdila) wrote :

Setting up akonadi-server (1.0.0-0ubuntu3) ...
Reloading AppArmor profiles Skipping profile /etc/apparmor.d/usr.sbin.cupsd.dpkg-old
'HOME' is already defined
AppArmor parser error in /etc/apparmor.d/usr.sbin.mysqld-akonadi at line 64: variable @{HOME} was previously declared
 Profile /etc/apparmor.d/usr.sbin.mysqld-akonadi failed to load
: Failed.
invoke-rc.d: initscript apparmor, action "force-reload" failed.
Unknown media type in type 'all/all'

Unknown media type in type 'all/allfiles'

Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

Unknown media type in type 'fonts/package'

Unknown media type in type 'interface/x-winamp-skin'

Revision history for this message
Bruce Miller (brm0423) wrote :

I have the same error.

Revision history for this message
Steve Beattie (sbeattie) wrote :

This error is because the mysql-akonadi profile contains both a definition for the @{HOME} variable directly and the inclusion of tunables/global, which in turn includes tunables/home where @{HOME} is also defined. Once defined in apparmor policy, a variable cannot be redefined, though it can be extended e.g. "@{HOME} += /some/other/path/" is valid. Given that both definitions are the same, the mysql-akonadi profile just honor the setting defined in tunables/home since a system administrator would edit that location first if they were to use alternate locations for home directories.

Attached is a debdiff that fixes the issue.

Changed in akonadi:
status: New → In Progress
Steve Beattie (sbeattie)
description: updated
Revision history for this message
Steve Beattie (sbeattie) wrote :

Harald, any chance you can push the fix for this?

Revision history for this message
Harald Sitter (apachelogger) wrote :

On it.

Changed in akonadi:
assignee: nobody → apachelogger
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package akonadi - 1.0.0-0ubuntu4

---------------
akonadi (1.0.0-0ubuntu4) intrepid; urgency=low

  * Fix duplicated variable in akonadiserver apparmor profile
    (LP: #271643)

 -- Steve Beattie <email address hidden> Mon, 06 Oct 2008 20:53:43 -0700

Changed in akonadi:
status: In Progress → Fix Released
Revision history for this message
Harald Sitter (apachelogger) wrote :

Also backported to the KDE 4 hardy ppa.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.