Clean up old mount-control host-hunspell in post-refresh too
This is a temporary measure likely needed only for the users of
'nightly' and 'beta' who had their Firefox snap updated and the
old host-hunspell mount-control plug disconnected without proper
unmounting and cleanup of the mount point.
Restore disconnect-plug-host-hunspell hook and host-hunspell declaration
We need this to be able to unmount the existing mount point for the
last time, otherwise removal of the Firefox snap fails halfway through
with this error:
error: cannot perform the following tasks:
- Remove data for snap "firefox" (4111) (unlinkat /var/snap/firefox/common/host-hunspell/en_US.dic: read-only file system)
snap, hooks: make host-hunspell a system-files interface
The host-hunspell plug was a mount-control interface, which means that the snap
could request snapd to set up a mount from/to a specific location. The problem
is that the mount is visible in the host mount namespace, i.e. the mounts
created a system wide. The mount-control interface was really intended to be
used in Ubuntu Core oriented scenarios, when for instance a gadget mounts some
external storage at a system wide location.
The particular care of the Firefox snap only really needs access to the hunspell
dictionaries on the host. In this case a system-files interface allowing access
to /usr/share/hunspell inside the host filesystem (exposed to the snap mount ns
at /var/lib/snapd/hostfs) will be sufficient.
This will fix issues like LP#2059195
Signed-off-by: Maciej Borzecki <email address hidden>
aa18856...
by
GitHub Actions <email address hidden>