AppArmor complains about missing local/usr.sbin.mysqld file

Bug #616417 reported by alaperrot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Fix Released
Low
Jamie Strandboge

Bug Description

When (re)starting the AppArmor service, it complains about missing local/usr.sbin.mysqld file:

 * Starting AppArmor profiles
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 40: Could not open 'local/usr.sbin.mysqld'
                                                                                                       [fail]
invoke-rc.d: initscript apparmor, action "start" failed.
 * Reloading AppArmor profiles
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 40: Could not open 'local/usr.sbin.mysqld'
                                                                                                       [fail]
invoke-rc.d: initscript apparmor, action "reload" failed.

Creating an empty /etc/apparmor.d/local/usr.sbin.mysqld file makes AppArmor happy.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mysql-server-5.1 5.1.49-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-14.20-generic 2.6.35
Uname: Linux 2.6.35-14-generic x86_64
Architecture: amd64
Date: Wed Aug 11 18:18:15 2010
ProcEnviron:
 LANGUAGE=fr_FR:fr:en_GB:en
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: mysql-5.1

Related branches

Revision history for this message
alaperrot (alaperrot) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for using Ubuntu and reporting a bug.

What version of apparmor do you have installed?
$ dpkg -l|grep apparmor

Changed in mysql-5.1 (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
status: New → Incomplete
Revision history for this message
alaperrot (alaperrot) wrote :

It is apparmor package 2.5.1~pre1393-0ubuntu4 (the current one in Maverick repository).

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Can you attach your /var/log/apt/term.log?

Revision history for this message
alaperrot (alaperrot) wrote :

Here is the term.log file, do you need an older one (term.log.*.gz) ?

Changed in mysql-5.1 (Ubuntu):
importance: Undecided → Low
status: Incomplete → Triaged
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Can you give the output of:
$ dpkg -l|grep mysql

Changed in mysql-5.1 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Steve Beattie (sbeattie) wrote :

Jamie: I'm able to reproduce this on Maverick. Here's the output you requested:

$ dpkg -l | grep mysql
ii libdbd-mysql-perl 4.016-1 Perl5 database interface to the MySQL database
ii libmysqlclient16 5.1.49-1ubuntu2 MySQL database client library
ii mysql-client-5.1 5.1.49-1ubuntu2 MySQL database client binaries
ii mysql-client-core-5.1 5.1.49-1ubuntu2 MySQL database core client binaries
ii mysql-common 5.1.49-1ubuntu2 MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server-5.1 5.1.49-1ubuntu2 MySQL database server binaries and system database setup
ii mysql-server-core-5.1 5.1.49-1ubuntu2 MySQL database server binaries
ii mysql-testsuite 5.1.49-1ubuntu2 MySQL testsuite

(It's the resulting set of packages that were installed by doing apt-get install mysql-server-5.1 mysql-testsuite.)

Revision history for this message
alaperrot (alaperrot) wrote :

dpkg -l | grep mysql

ii libdbd-mysql-perl 4.016-1 Perl5 database interface to the MySQL database
ii libmysqlclient16 5.1.49-1ubuntu2 MySQL database client library
ii libqt4-sql-mysql 4:4.7.0~beta2-0ubuntu4 Qt 4 MySQL database driver
ii mysql-client 5.1.49-1ubuntu2 MySQL database client (metapackage depending on the latest version)
ii mysql-client-5.1 5.1.49-1ubuntu2 MySQL database client binaries
ii mysql-client-core-5.1 5.1.49-1ubuntu2 MySQL database core client binaries
ii mysql-common 5.1.49-1ubuntu2 MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.1.49-1ubuntu2 MySQL database server (metapackage depending on the latest version)
ii mysql-server-5.1 5.1.49-1ubuntu2 MySQL database server binaries and system database setup
ii mysql-server-core-5.1 5.1.49-1ubuntu2 MySQL database server binaries
ii php5-mysql 5.3.3-1ubuntu3 MySQL module for php5

Steve Beattie (sbeattie)
Changed in mysql-5.1 (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks, I'll look into it.

Changed in mysql-5.1 (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Steve Beattie (sbeattie) wrote :

Umm, surely this is the problem:

]$ dpkg -L apparmor | grep local
/etc/apparmor.d/local
/etc/apparmor.d/local/README

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

Ah, no, you've been pushing the generation of local/ files into the postinst packages with the profiles themselves. The issue is that mysql-server-5.1's postinst doesn't contain the dh_apparmor generated bits to create it.

(Can dh_apparmor be used here? The mysqld apparmor policy is reloaded as part of the mysqld upstart conf, I don't think we want it also reloaded directly during the postinst.)

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I am going to guess that you guys have amd64 or at least non-i386. The amd64 postinst did not include the lastest debhelper bits to create the local/usr.sbin.mysqld file. This will be fixed in the next upload.

Changed in mysql-5.1 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
alaperrot (alaperrot) wrote :

Yes, I use the amd64 variant of Kubuntu, as mentioned in bug report:

Uname: Linux 2.6.35-14-generic x86_64
Architecture: amd64

Thanks for taking care of this bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.1 - 5.1.49-1ubuntu3

---------------
mysql-5.1 (5.1.49-1ubuntu3) maverick; urgency=low

  * debian/control: Build-Depends on debhelper 7.4.20ubuntu6, which has a
    fix that prevented debhelper from creating the necessary output in
    postinst (LP: #616417)
 -- Jamie Strandboge <email address hidden> Wed, 11 Aug 2010 15:08:12 -0500

Changed in mysql-5.1 (Ubuntu):
status: Triaged → Fix Released
Changed in mysql-5.1 (Ubuntu):
status: Fix Released → In Progress
Changed in mysql-5.1 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.1 - 5.1.49-1ubuntu4

---------------
mysql-5.1 (5.1.49-1ubuntu4) maverick; urgency=low

  * debian/rules: doy. Put dh_apparmor in binary-arch so more than just
    i386 has the benefit of AppArmor protection, really fixing LP: #616417
 -- Jamie Strandboge <email address hidden> Thu, 12 Aug 2010 07:11:57 -0500

Changed in mysql-5.1 (Ubuntu):
status: Fix Committed → Fix Released
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.