tests: add test for snapd.session-agent.socket symlinks
Rename "debs-have-built-using" to a more generic "debs" test
and also test there that the symlink for snapd.session-agent.socket
in the package points to the right place. There was a bug in
the packaging that resulted in a bad symlink of the form:
```
$ dpkg -c snapd_2.40+git1432.803f873~ubuntu18.04.1_amd64.deb |grep snapd.session-agent.socket
-rw-r--r-- root/root 152 2019-08-15 16:16 ./usr/lib/systemd/user/snapd.session-agent.socket
lrwxrwxrwx root/root 0 2019-08-15 16:16 ./usr/lib/systemd/user/sockets.target.wants/snapd.session-agent.socket -> /snapd.session-agent.socket
```
This commit ensures this won't regress.
packaging: fix symlink for snapd.session-agent.socket
The dh_link man-page says that relative syntax is not supported
when describing the source/target in snapd.links. This PR
converts it to absolute names and dh_link will convert it back
to a (short) relative symlink.
It also updates the debian packaging to include the link. It was
forgoten there it seems.
This should fix a failure the broken symlink we currently see
in the snapd snap that prevents the snapd snap from getting
updated.
interfaces/mount: discard mount ns on backend Remove
When a snap is removed each security backend is asked to remove the
security profiles associated with the snap in question. For the mount
backend that would just remove the desired mount namespace profile.
While this part worked correctly there was more to be done. The system
may still have the preserved mount namespace as well as the actual
applied (current) mount profiles that exist therein.
In a case where a snap was installed but the installation failed because
of a hook issue, the system would be left in a state where an existing
mount namespace would be left behind.