A common issue with snap is that the embedded fontconfig library
does not match the version on the host. This may lead to very
slow startup times of applications because the fontconfig caches
must be generated on first-run. This is bad user experience.
This PR is a very simplistic fix that will generate the two most
common versions of fontconfig caches on package install/refresh.
The fc-cache command is extremly quick (0m0,020s on my system)
if the caches are up-to-date so it seems to be fine to just run
it always.
There are various more options:
- run fc-cache only for classic and desktop snaps
- do not (ab)use link-snap but instead we could:
a) implement a fontconfig security backend
b) add a fontconfig specific task
- a virtual hook (but it would need to run unconfined)
I'm happy about suggestions how to make this more elaborate if
desired.
cmd/snap: add nanosleep to blacklisted syscalls when running with --strace (#6155)
* cmd/snap: add nanosleep to blacklisted syscalls when running with --strace
Strace was observed to block on nanosleep when using `snap run --strace` with an
app from snap built using core18 base on a 4.19.1 kernel host. This is how it
looked like:
snap-update-ns: fix trailing slash bug on trespassing error
The trespassing detector is handled unclean paths, belonging to
subsequently growing substring of the constructed path. Such paths can
easily end with a trailing slash.