common: Fix Spawn portal method not working with UTF-8 files
When the portal's Spawn method is used with the environment cleared,
it's very likely that the "flatpak run" that ends up being run will be
in an environment without UTF-8 support.
If one of the files or directories we try to expose to the sub-sandbox
contains UTF-8/non-ASCII characters, then "flatpak run" would fail with:
error: Invalid byte sequence in conversion input
This is caused by GOption trying to parse the --filesystem option for
flatpak, as, when using the G_OPTION_ARG_CALLBACK argument type, GOption
will split the option name from its value, and try to convert the value
to UTF-8. Which will fail because there's no UTF-8.
It won't however do that if we tell the option parser that the value is
a filename using G_OPTION_FLAG_FILENAME, so set it.
c7bb35d...
by
Phaedrus Leeds <email address hidden>
Merge pull request #4134 from flatpak/trivial-configure-output
trivial: Fix formatting of configure output
e2a2e38...
by
Phaedrus Leeds <email address hidden>
Merge pull request #4130 from RyuzakiKK/xauthlocalhostname
run: Propagate X11 cookies with an address equals to XAUTHLOCALHOSTNAME
af2b8ca...
by
Phaedrus Leeds <email address hidden>
Merge pull request #4133 from RyuzakiKK/unused_vars
Remove unused variables
66c4ef8...
by
Phaedrus Leeds <email address hidden>
trivial: Fix formatting of configure output
0d27b27...
by
Ludovico de Nittis <email address hidden>
run: Remove unused GAsyncResult variable
Signed-off-by: Ludovico de Nittis <email address hidden>
8d9be91...
by
Ludovico de Nittis <email address hidden>
dir: Remove unused AutoPolkitDetails variable
Signed-off-by: Ludovico de Nittis <email address hidden>
d192d1b...
by
Phaedrus Leeds <email address hidden>
Merge pull request #4119 from kalev/G_BEGIN_DECLS-G_END_DECLS
Add G_BEGIN_DECLS/G_END_DECLS to public headers
fd6a3b7...
by
Ludovico de Nittis <email address hidden>
run: Propagate X11 cookies with an address equals to XAUTHLOCALHOSTNAME
OpenSUSE inherits the hostname value from DHCP without updating its X11
authentication cookie, and it keeps the initial value in
`XAUTHLOCALHOSTNAME`.
To avoid breaking the X11 applications, OpenSUSE patches libxcb so that
it also considers the value in `XAUTHLOCALHOSTNAME` as another possible
hostname.
To cope with that behavior we need to check `XAUTHLOCALHOSTNAME` too
and, if we have a cookie with that address, propagate it inside the
container adjusting its address to the canonical hostname
`unames.nodename`.
Fixes: #4043
Signed-off-by: Ludovico de Nittis <email address hidden>