- Jun 17, 2020
-
-
Simon McVittie authored
More preparation for !26 See merge request steam/pressure-vessel!52
-
- Jun 16, 2020
-
-
Simon McVittie authored
SteamOS 2 'brewmaster' only has this. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will be used to delete libraries from the runtime if their SONAME is the same as a library that we brought in from outside, to avoid conflicts when precedence gets mixed up. A manual test is included. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This gives us a way to traverse paths in the sysroot, without accidentally following a symbolic link that leads outside. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we're running locale-gen on the host system, we might as well just run it, without wrapping bwrap around it. This requires the new --output-dir option in p-v-locale-gen. To stay consistent, also move from bwrap --chdir DIR to p-v-locale-gen --output-dir DIR in the case where we still need to use bwrap. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If the runtime is already "the right shape", then we don't need to use bwrap to mount it on /usr and populate a suitable tmpfs root filesystem. We need to do this if we want to support being run from inside a Flatpak, because we can't run bwrap inside Flatpak. It might also speed up accesses to suitable runtimes, because we won't waste time invoking extra bwrap processes. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
flatpak_canonicalize_filename() only does a syntactic normalization, eliminating ./ and similar constructs; it does not resolve symbolic links. We need to use the realpath() of the 64-bit dynamic linker, because otherwise, when we start replacing the dynamic linker in the container with a symlink into /run/host, the host system might have a symlink /lib64/ld-linux-x86-64.so.2 pointing outside /lib64, for example to /lib/ld-linux-x86-64-2.30.so. Then we'd get: runtime's ld-linux-x86-64.so.2 -> /run/host/lib64/ld-linux-x86-64.so.2 -> /lib/ld-linux-x86-64-2.30.so -> does not necessarily exist inside container Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
As noted in the comment, the order matters. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This was using bwrap to make ${libdir}/dri available on /run/host/${libdir}/dri, in order to run the equivalent of: ln -fns /run/host/${libdir}/dri/* /overrides/lib/${tuple}/dri/ Instead of using the shell wildcard '*' to implement readdir(), let's just call readdir(${libdir}/dri) ourselves, and fix up the symlink targets to point into /run/host/${libdir}/dri. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The PATH from outside the container doesn't really make sense inside the container, because the directory hierarchy could be totally different (particularly on unusual host systems like GoboLinux and Exherbo). Resetting it also makes sure we don't pick up local installations in ~/bin or ~/.local/bin, which could have dependencies that are unsatisfied in the container. Conversely, the PATH from the host might not include everything we need in the container. If the host system is an OS that only supports merged-/usr use, like Arch Linux, then it might not have both /usr/bin and /bin in the PATH - but if the container is not merged /usr, like a scout SDK sysroot, then we'll need both. This approximately matches Flatpak's behaviour: by default it resets PATH to /app/bin:/usr/bin (because it puts app-specific content in /app and can assume that its runtimes are always merged-/usr). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will make it easier to install a new pressure-vessel build into a relocatable directory hierarchy for testing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Workaround for T21931. Fully fixing this is low-priority, because we have been removing libldap dependencies anyway. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 15, 2020
-
-
Simon McVittie authored
tests: Add an integration test for running in a container See merge request steam/pressure-vessel!50
-
- Jun 12, 2020
-
-
Simon McVittie authored
This requires resources external to pressure-vessel, and makes some assumptions about the container - but that's OK, because the first significant user of pressure-vessel is Steam Runtime 1 'scout', which is not exactly a moving target. We also do some of these checks in various OSs' virtual machines when we build Steam Runtime releases, but having this in-tree with the pressure-vessel source should shorten the testing cycle. See the doc-comment in tests/containers.py for usage. At the moment all tests require a working version of bubblewrap, but current/future work in the direction of pre-preparing a modified runtime on disk should mean that we can do a subset of these tests even if we cannot run bubblewrap. In particular, if we can do that inside a Docker container, that will make it a lot easier for CI to validate our assumptions on non-Debian-derived host operating systems. Attentive reviewers will notice that there's infrastructure here to be able to skip generating locales, but it isn't yet used. It will be used when we have more variations on the theme of "enter a scout container and run inside-scout.py", to avoid the time cost of generating locales every time - but at the moment we only have two runs, so the time taken to generate locales is not problematic. This test is a bit slow, and it's going to get slower as we add more thorough testing, so increase its timeout away from the Meson default. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The result of this setup will be the same every time, so there isn't much point in repeating it. When we add tests with time-consuming setup like running steam-runtime-system-info, we'll only want to do that once. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we're passing it across a container boundary, relative paths are going to get error-prone. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
At the moment the Python-based tests rely on being run under prove(1) so that their TAP output is parsed, but I'm about to add a test that enters a container and runs another test script inside the container, and using TAP for that is less obvious. Don't rely on our stdout being parsed as TAP. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This enables us to use --srcdir=$(pwd) when running from a git checkout. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
It'll be easier to set up a test environment if we default to the prefix into which we normally package it. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In particular this detects the mishandling of an invalid --env-if-host option. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
BaseTest and test_main are factored out from cheap-copy.py. MyCompletedProcess and run_subprocess are taken from the SteamLinuxRuntime unit tests, and will be used in later test additions. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
As we move towards using dirfds for path resolution inside runtimes, the risk of leaking a significant number of fds increases, so we should make sure our tests check for that. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we try to redefine g_test_skip(), and so does libglnx, then we fight. Including libglnx first worked, because our redefinition was conditional on it not already having been redefined; but including our redefinition first didn't work, because libglnx's redefinition is only conditional on the GLib version number. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This lets us hold a fd to the parent directory open and resolve paths relative to it (see openat(2)). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
At some point while I was designing this, the @path was a directory, but it ended up being a file. Fixes: 8b531350 "wrap: Add API for a bubblewrap-compatible fcntl lock" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If /tmp and /var/tmp are in fact both on the root filesystem, then this test will still pass but will not be particularly meaningful. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Rather than saying "but what if they are on different filesystems?" we might as well just make it work optimally fast either way, since the author of libglnx has already done the hard part for us. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
It isn't particularly important either way, but there's no real reason not to. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is one of the slower parts of the whole process, and not all games (or automated tests) even need it. 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>
-
- Jun 09, 2020
-
-
Simon McVittie authored
fdio: Be const-correct for struct stat See merge request GNOME/libglnx!16
-
- Jun 03, 2020
-
-
Simon McVittie authored
Fix warnings from QA checks (mypy etc.) See merge request steam/pressure-vessel!48
-
Simon McVittie authored
No functional changes; this just catches up with my local changes having been upstreamed successfully. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We don't modify this struct (if non-NULL), so it can be const. In particular, this is helpful if calling glnx_file_copy_at() from nftw() to implement the equivalent of `cp -a --reflink=auto`. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
README: update link to libgsystem See merge request GNOME/libglnx!15
-
- Jun 01, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-