extra apps and locales
Robert McQueen
rob at endlessm.com
Wed Feb 15 18:35:30 UTC 2017
Hi there,
We have a Flatpak for VLC (https://github.com/endlessm/vlc-flatpak/)
where we're downloading some pre-compiled Linux binaries (for Debian
jessie, because our runtime is based on that) and unpacking the /usr
from the .debs into /app/extra.
The app works fine, but doesn't find it's locales - because the binaries
are compiled assuming prefix is /usr, so it's looking in
/usr/share/locale for it's .mo files. The gettext command line tool
accepts a TEXTDOMAINDIR environment variable, but glibc's bindtextdomain
call doesn't respect this environment variable - it just takes the
arguments provided which are compiled in to the calling binary.
I think with everything else (Spotify, Skype, Chrome, Dropbox, etc)
we've packaged to date using Flatpak extra data, we've been lucky that
they all don't use gettext - but I think this problem will apply to
everything that uses gettext and isn't built with the /app or /app/extra
prefix.
In some other cases, we've patched some libraries like GStreamer in the
Flatpak runtime, to eg have a different search path for plugins, but
patching glibc (in both the fd.o runtime & also in the Endless OS
runtime, where a large part is shared with the system's ostree) seems
like a very large sledgehammer to crack this nut.
If we could do a bind-mount of /app/extra/share/locale to
/usr/share/locale inside the sandbox at runtime, that would fix this,
but that's only available in build sandboxes.
Any other ideas?
Cheers,
Rob
P.S. Ironically / unfortunately, our old implementation of so-called
"external apps" which worked with a GNOME Software ran outside of
flatpak and download the .deb (or whatever) files and checked them in to
a local repo as flatpak runtime extensions, so the /usr prefix was
preserved and we wouldn't have had this issue. But we just ripped all
that out... d'oh...
........................................................................
Robert McQueen | +1.415.413.4159 | Endless <http://endlessm.com/>
More information about the xdg-app
mailing list