dangling symlinks in /var/lib/apparmor/clicks

Bug #1227681 reported by Jamie Strandboge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

People have reported dangling symlinks in /var/lib/apparmor/clicks. click-apparmor will just skip them so this isn't a problem users will see, but should be fixed nonetheless. This definitely happens on upgrades.

Eg:

When ubuntu-sdk-1310-api-demos 0.2 is installed I have:
$ ls -l /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json
lrwxrwxrwx 1 root root 112 Sep 18 15:29 /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json -> /opt/click.ubuntu.com/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos/0.2/ubuntu-sdk-1310-api-demos.json
$ grep policy_version /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json
  "policy_version": 1.0

then I run:
$ sudo click install --user=$USER --force-missing-framework ./net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_0.3_all.click
$ ls -l /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json
lrwxrwxrwx 1 root root 112 Sep 18 15:29 /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json -> /opt/click.ubuntu.com/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos/0.2/ubuntu-sdk-1310-api-demos.json
$ grep policy_version /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json
grep: /var/lib/apparmor/clicks/net.launchpad.ubuntu-security.ubuntu-sdk-1310-api-demos_ubuntu-sdk-1310-api-demos_0.2.json: No such file or directory

Related branches

Colin Watson (cjwatson)
Changed in click (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

FYI, this also happens on click unregister:
$ sudo click unregister --user=$USER com.wellsb.blackjack-app 0.0.1

$ ls /var/lib/apparmor/clicks/com.wellsb.blackjack-app_blackjack-app_0.0.1.json
/var/lib/apparmor/clicks/com.wellsb.blackjack-app_blackjack-app_0.0.1.json

Colin Watson (cjwatson)
Changed in click (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package click - 0.4.7

---------------
click (0.4.7) saucy; urgency=low

  * Run system hooks when removing a package from the file system
    (LP: #1227681).
  * If a hook symlink is already correct, don't unnecessarily remove and
    recreate it.
  * Improve "click hook install-system" and "click hook install-user" to
    remove any stale symlinks they find, and to run Exec commands only once
    per hook. This significantly speeds up system and session startup when
    lots of applications are installed (LP: #1227604).
  * Rename "click hook install-system" and "click hook install-user" to
    "click hook run-system" and "click hook run-user" respectively, to
    better fit their semantics. (I expect these commands only to have been
    used internally by click's own Upstart jobs.)
  * Filter version control metadata and editor backup files out of binary
    packages in "click build" (LP: #1223640).
 -- Colin Watson <email address hidden> Fri, 20 Sep 2013 18:07:13 +0100

Changed in click (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.