As per bug #978995 this happens when an older mysql-server-* package,
e.g. mysql-server-5.1, is purged post-upgrade.

The problem seems to be in dh_apparmor, which added the following to
mysql-server-5.1.postrm:

# Automatically added by dh_apparmor
if [ "$1" = "purge" ]; then
    rm -f "/etc/apparmor.d/disable/usr.sbin.mysqld" || true
    rm -f "/etc/apparmor.d/force-complain/usr.sbin.mysqld" || true
    rm -f "/etc/apparmor.d/local/usr.sbin.mysqld" || true
    rmdir /etc/apparmor.d/local 2>/dev/null || true
fi
# End automatically added section

...which will remove config files which should not be removed as they
continue to be used by mysql-server-5.5.

I'm not sure why dh_apparmor does not install
/etc/apparmor.d/local/[profile] as a dpkg conffile; I suspect if it did
this problem would not occur.  Alternatively, the postrm script already
works around this problem for dh_installinit, and this approach could
also work for dh_apparmor.

** Summary changed:

- Error in AppArmor rule for mysqld
+ mysql-server postrm breaks apparmor profile for later versions on purge

** Also affects: apparmor (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/986892

Title:
  mysql-server postrm breaks apparmor profile for later versions on
  purge

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/986892/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to