-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pressure vessel] missing host environment variables to filter out #612
Comments
As you say, we expect to be picking these up from the container runtime and not from the host system. The vast majority of distributions install these libraries in such a way that their compiled-in default paths will find their data files, and therefore the environment variables aren't set in practice. I would recommend that approach to OS builders rather than relying on an increasingly large set of environment variables inheriting down through the whole process hierarchy: that way, the environment variables only need to be set if you're doing something special (like debugging a specific issue using a temporary locally-modified library). Is your distribution (what distribution is that? does it have a name?) installing its normal production versions of these libraries into a location outside the usual
This one is not so simple. We'll often pick up the host's copy of libX11 as a dependency of the graphics drivers, which could mean that in principle we should be using the host's XLOCALEDIR too (possibly with adjustments for Because of the way library dependency relationships work, if your graphics drivers depend on libX11 (which in practice they will), we must use either the host's or the container's libX11, whichever one is newer - we don't get a choice about this. As with the other libraries, the vast majority of distributions install libX11 in such a way that its defaults will find locale files, and therefore XLOCALEDIR is not set in practice. Is your distribution installing it into a location outside the usual
I'd have to check the dependency graph to have a better idea of whether we're likely to pick this up as a dependency of the graphics driver stack (in which case it's like libX11) or not (in which case it's like libasound). Either way, it would get the same handling as one of the libraries described above. |
Basically, if the container uses its own version of a lib, it will have to filter out such type of environment variables in order to use its own location, and indeed, some are "shared" in the x11 realm. But it means components in the container should be audited regarding this issue. |
The "heavy" steam runtime the steamwebhelper is using should set those environment variables to point on the locations of its own data files. |
This is related to the usage of the pressure vessel in dota2:
Since the pressure vessel is providing its own libs with their own data files located in the container, some environment variables from the host should be filtered out:
libX11/libxkbcommon-x11:XLOCALEDIR
libasound(alsa-lib):ALSA_CONFIG_DIR
libthai(text shapping):LIBTHAI_DICTDIR
It seems there are some more for libxkbcommon(-x11):XKB_CONFIG_ROOT (dunno if it is for wayland and x11 though).
Ofc, many of those data files could be customized using user specific or system specific files (~/.asoundrc /etc/xkb ...), namely if upstream changes the format or some significant content, that would make the container data files not compatible anymore.
I did not inventory all the software packages from the container, but that should be done to avoid wrong path definitions from the host environment variables propagating into the container.
The text was updated successfully, but these errors were encountered: