[Webkit-unassigned] [Bug 219325] [WPE][GTK] flatpak-spawn subsandbox clears environment variables, breaks EphyPermissionsManager

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 25 00:25:35 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=219325

Alexander Larsson <alexl at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexl at redhat.com

--- Comment #3 from Alexander Larsson <alexl at redhat.com> ---
I don't quite understand this. The spawned process will start with either an empty env (--clear-env), or the host env, and on top of that will be whatever was passed via --env (although, it might be nice to have a --forward-env options that just took the env from the parent of the flatpak-spawn call). 

However, it should still set the $XDG_DATA_HOME env var. That is set irregardless of what env the process starts from. And, in my testing this seems to work:

[alex at greebo ~]$ flatpak run --command=bash org.gnome.gedit
[�� org.gnome.gedit ~]$ export XDG_DATA_FOO=FOO
[�� org.gnome.gedit ~]$ export | grep XDG_DATA_
declare -x XDG_DATA_DIRS="/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share"
declare -x XDG_DATA_FOO="FOO"
declare -x XDG_DATA_HOME="/home/alex/.var/app/org.gnome.gedit/data"
[�� org.gnome.gedit ~]$ flatpak-spawn --env=XDG_DATA_BAR=BAR bash -c export | grep XDG_DATA_
declare -x XDG_DATA_BAR="BAR"
declare -x XDG_DATA_DIRS="/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share"
declare -x XDG_DATA_HOME="/home/alex/.var/app/org.gnome.gedit/data"
[�� org.gnome.gedit ~]$ export XDG_DATA_HOME=/foo/bar
[�� org.gnome.gedit ~]$ flatpak-spawn --env=XDG_DATA_BAR=BAR bash -c export | grep XDG_DATA_
declare -x XDG_DATA_BAR="BAR"
declare -x XDG_DATA_DIRS="/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share"
declare -x XDG_DATA_HOME="/home/alex/.var/app/org.gnome.gedit/data"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210125/dfa1de77/attachment-0001.htm>


More information about the webkit-unassigned mailing list