- Dec 15, 2020
-
-
Ludovico de Nittis authored
Previously we used the empty directory as an indicator that the capture of the library failed, but this worked only if we always started with an empty directory. And this is not the case when we are not using a subdir. For this reason, even if the capture of a library failed, we didn't set its "kinds" to "NONEXISTENT", and this could have leaded to errors like having duplicated Vulkan implicit layer JSON for the same name and different "library_path", one pointing to the correct ABI and the other to the wrong one. Fixes: #45 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Dec 14, 2020
-
-
Simon McVittie authored
This means we use all the search paths that steam-runtime-tools knows about, and in particular we respect LIBGL_DRIVERS_PATH and a Slackware-specific path. It also means we stop collecting "extra" drivers, which is potentially dangerous, as justified in the previous commit. Resolves: https://github.com/ValveSoftware/steam-runtime/issues/318 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 11, 2020
-
-
Simon McVittie authored
We can make life easier for the VA-API and VDPAU driver loaders by trying to put everything in one directory, as we already do for DRI. We might as well do the same for Vulkan and EGL, where the names we choose are completely arbitrary anyway. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Instead of building a list of drivers and then converting it into a search path, we can build the search path as we go. The only side-effect is that previously we interleaved x86_64 and i386 paths, but now we put all the x86_64 paths before all the i386 paths. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Because capsule-capture-libs doesn't overwrite existing symbolic links, in the unlikely event that s2tc exists in more than one directory in the search path, we want to look at the highest-precedence first. The reversed order was correct for the current implementation of collecting DRI drivers, but not for s2tc. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This hasn't been true since af22427b. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If /tmp is a symlink in the current execution environment, then when we ask bwrap to bind-mount /tmp/pressure-vessel-wrap.XXXXXX/overrides over itself, it will try to create the parent directory /tmp, and fail because there's a symlink in the way. Canonicalize the path and use that instead. Partially addresses https://github.com/ValveSoftware/steam-runtime/issues/321 (symlinks "above" the home directory have the same problem, but are harder to fix). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 10, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This brings it in line with the other code path here, which tolerates containers that are single-architecture. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The Vulkan and EGL JSON manifests are more similar than they are different, so let's handle them through the same code (which I already factored out into smaller functions). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Instead of having a function to make a list of Vulkan layers and/or ICDs available, let's have a function to act on a single layer or ICD. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
srt_vulkan_layer_get_json_path() and srt_vulkan_icd_get_json_path() return paths relative to the SrtSystemInfo's sysroot (the graphics driver provider), which might be the root filesystem, but might equally be /run/host when we're running inside Flatpak. Rename this variable accordingly. We were already using it correctly: the third argument to pv_runtime_take_from_provider() is a path in the provider sysroot. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Paths derived from self->overrides are valid in the current execution environment, but if we're running in a Flatpak environment, that's not the host. Rename them accordingly. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 09, 2020
-
-
Simon McVittie authored
Since !173, we have been able to create symbolic links to graphics drivers anywhere on the filesystem, but that didn't mean the graphics driver would necessarily be usable, because the directory containing it would not necessarily be visible in the container. Add these directories to the list of directories to be "exported". Manual test (Debian on on Intel hardware, adjust as required for others): * Modify /usr/share/vulkan/icd.d/intel_icd.i686.json to use /opt/moved-from-usr/lib/i386-linux-gnu/libvulkan_intel.so * Move the real i386 libvulkan_intel.so to that location * ./run --verbose -- steam-runtime-system-info 2>&1 | tee container.log Resolves: #29 Resolves: https://github.com/ValveSoftware/steam-runtime/issues/313 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 04, 2020
-
-
Simon McVittie authored
Some OS distributions, notably Exherbo, don't put /usr/bin in their PATH. This means we can't safely use their PATH to invoke standard tools inside the container. Bypass this by setting the PATH without using env(1). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 03, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In particular, when using a SDK runtime, we need to delete overridden 32-bit libraries from /lib32 as well as /lib/i386-linux-gnu. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We return the library directories in most-important-first order here, because that seems like the one that makes most sense (and matches LD_LIBRARY_PATH). When we go looking for DRI drivers, we actually want to take the least important first, but iteration over a GPtrArray in reverse order is easy. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If /lib and /usr/lib are the same file, there's no need to iterate over both. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
Vulkan meta-layers doesn't have the `library_path` field in their manifests. For this reason we need to separately handle them because otherwise our assertions about `library_path` not being NULL will fail, like the one in `collect_vulkan_layers()`. This fixes the issue reported on https://github.com/ValveSoftware/steam-runtime/issues/306 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
We need to do this after we have captured glibc-related libraries, otherwise they won't be taken into account while deleting their overridden equivalents. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Since glibc 2.26, the ${PLATFORM} for x86_64 can expand to "haswell" or "xeon_phi" in addition to "x86_64". To make it clearer what's going on, stop pretending that library paths based on ${PLATFORM} have anything to do with multiarch tuples. Instead, create symlinks like /overrides/lib/platform-haswell -> x86_64-linux-gnu and /overrides/lib/platform-i686 -> i386-linux-gnu. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
Currently the Vulkan layer loader does not support having multiple layer manifests with the same "name" field. This can be a problem when you want to support multiple ABIs. For this reason some layers, like vkBasalt, use a "library_path" with just the filename of the library. In this way, at execution time, the correct library will be chosen automatically. To expand the special tokens LIB, PLATFORM and ORIGIN we dlopened the layers. But instead of always doing it, now we dlopen layers only if they actually contain at least one of those tokens. In this way we can speed up the whole process a little bit and also keep basenames as is, so that their correct library can still be chosen automatically at execution time. Partial addresses #39 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Nov 30, 2020
-
-
Ludovico de Nittis authored
In case a user is experiencing some problems he might try to disable the import of Vulkan layers to better isolate the issue he is facing. Fixes: #37 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Nov 20, 2020
-
-
Ludovico de Nittis authored
Using the new "--remap-link-prefix" option we can now avoid breaking symlinks because not available under `/run/host`. Fixes: #29 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Nov 18, 2020
-
-
Ludovico de Nittis authored
When we use the provider graphics stack we also try to collect the available Vulkan layers, similarly to what we already do for ICDs. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Nov 17, 2020
-
-
Simon McVittie authored
If we can't delete a file because it doesn't exist, then ... job done? In practice this happens because the runtime copy is merged-/usr, so /lib and /usr/lib are in fact the same place. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we want to deal with strange operating systems that use a non-standard filename for ld.so.cache, we'll have to special-case it. There's little extra cost to doing this because we already need to understand how ld.so.cache works, to be able to generate our own with different search paths. In situations where we just want a quick container to be able to inspect the runtime, we can deal with this by mounting all of /etc read-only. For the final container, we already iterate over all the files in the runtime's /etc, which will "naturally" include ld.so.cache and alternatives. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is a step towards searching all the necessary places for unusual distributions like Exherbo (see https://github.com/ValveSoftware/steam-runtime/issues/230 ), and gives us an obvious extension point for adding more multilib directories. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Oct 26, 2020
-
-
Ludovico de Nittis authored
At this stage we expect to have `LD_LIBRARY_PATH` set to the `SYSTEM_LD_LIBRARY_PATH` of `steam.sh`. This means that we should treat the `LD_LIBRARY_PATH` entries as OS-level search path too. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
If necessary, in runtime.c we should access the original environment instead of the global one, because it might have been edited. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-