Doesn't work reliably with Steam Library on case-insensitive filesystems
https://github.com/ValveSoftware/steam-runtime/issues/326 involves a user whose Steam library is a case-insensitive directory on an ext4 filesystem, using @krisman's recent kernel work.
There are two related issues:
-
If we only bind-mount the game itself into the container, then we can find that using
pressure-vessel-launch --directory
to change into its directory doesn't work, because the directory returned by$(pwd)
and the directory that we created in the container differ by case. -
If we try to work around the first issue by mounting a larger directory read-only into the container, then we can find that mounting the actual game rw doesn't work, because we ask bwrap to mount it with one case combination, but it reads back a different case combination from /proc/self/mountinfo and cannot recognise them as being the same.
We might be able to fix this by trying even harder to canonicalize paths: instead of just using realpath()
, open the directory as a fd (let's say it's 42), look at /proc/self/fd/42
with readlink(2)
, and if they only differ by case, tell bwrap
to mount the case combination we got back from readlink(2)
instead of the case combination we originally wanted to use.
I expect we'd want to do this in either FlatpakExports
or adjust_exports()
.