aa-status in apparmor-2.10 depends on python3-apparmor

Bug #1480492 reported by Steve Beattie
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)

Bug Description

The apparmor 2.10-0ubuntu1 package did not migrate from wily-proposed due to the content-hub autopkgtests failing. This turned out to be due to the dh_apparmor postinst snippet failing to load the content-hub test apparmor profiles because aa-status failed to run due to python3-apparmor not being installed. The dependency was added in the apparmor 2.10 cycle due to wanting to get fancier tracebacks that contain more diagnostic information when errors occur. In a minimal ubuntu environment, python-utils and python3-apparmor are not installed by default (which is also why aa-status is included in the main apparmor package).

There are a couple of possible short term solutions to this:

1) make the apparmor package depend on python3-apparmor
2) make aa-status function even when python3-apparmor isn't installed, either by reverting the added import entirely, or catching the exception and continuing even when it fails.

Long term, aa-status could be re-written (again), this time in C to help minimal environments become even more minimal by getting rid of the dependency on python.

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

Here is a proposed patch that makes aa-status(8) keep working if python3-apparmor is not available, but uses the fancier exception handling if it is available.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "aa-status-dont_require_python3-apparmor.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

This bug was fixed in the package apparmor - 2.10-0ubuntu2

apparmor (2.10-0ubuntu2) wily; urgency=medium

  * debian/patches/aa-status-dont_require_python3-apparmor.patch:
    make aa-status(8) work even when python3-apparmor is not installed,
    otherwise dh_apparmor postinst snippets can fail (LP: #1480492)
  * debian/control: make apparmor-utils depend on the same package
    version of python3-apparmor

 -- Steve Beattie <email address hidden> Fri, 31 Jul 2015 16:35:03 -0700

Changed in apparmor (Ubuntu):
status: New → Fix Released
Revision history for this message
Tyler Hicks (tyhicks) wrote :

The fix for this issue was committed upstream as revno 3391 and was included in the 2.11 Beta 1 (2.10.95) release.

Changed in apparmor:
milestone: none → 2.11
status: New → Fix Committed
Christian Boltz (cboltz)
Changed in apparmor:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers