mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-24 07:38:15 -05:00
Expose /var/usrlocal if "--filesystem=host" is specified.
As /usr/local points to ../var/usrlocal on Silverblue, /run/host/usr/local was previously a broken link inside the sandbox. This patch checks if /var/usrlocal exists and bind-mounts it to /run/host/var/usrlocal. See bug #4010.
This commit is contained in:
committed by
Alexander Larsson
parent
9311ae9b4d
commit
3aaea7d206
@@ -385,6 +385,13 @@ flatpak_exports_append_bwrap_args (FlatpakExports *exports,
|
||||
flatpak_bwrap_add_args (bwrap,
|
||||
os_bind_mode, "/usr", "/run/host/usr", NULL);
|
||||
|
||||
/* /usr/local points to ../var/usrlocal on ostree systems,
|
||||
so bind-mount that too. */
|
||||
if (flatpak_exports_stat_in_host (exports, "/var/usrlocal", &buf, 0, NULL) &&
|
||||
S_ISDIR (buf.st_mode))
|
||||
flatpak_bwrap_add_args (bwrap,
|
||||
os_bind_mode, "/var/usrlocal", "/run/host/var/usrlocal", NULL);
|
||||
|
||||
for (i = 0; flatpak_abs_usrmerged_dirs[i] != NULL; i++)
|
||||
{
|
||||
const char *subdir = flatpak_abs_usrmerged_dirs[i];
|
||||
|
||||
Reference in New Issue
Block a user