- Oct 24, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Improve collection of os-release(5) info See merge request !613
-
Ludovico de Nittis authored
Distinguish between direct I/O and sysroots See merge request !612
-
- Oct 23, 2023
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Now that we correctly read the emulated /etc/os-release in a FEX-Emu environment, we should also report the real OS somewhere. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Previously, s-r-system-info would inspect the live system looking for host OS information, even if it was meant to be parsing a JSON report and not looking at any live data. This needs to be fixed before we can add diagnostic messages to the OS info part of the JSON report, otherwise diagnostic messages from failing to find information about the host OS would become part of the loaded and re-serialized report, causing the round-trip test to fail. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In the load/save round-trip test, this requires re-saving the file with --verbose, otherwise these fields will be lost. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In a subsequent commit this will let us serialize additional fields. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Unlike SrtOsRelease and its accessors in SrtSystemInfo, this keeps track of everything we might want to add to the JSON report: all os-release(5) fields (not just the important ones), the source path from which we got the information, and any diagnostic messages we logged while collecting it. Because this is a separate object, it'll be more suitable for representing the various contexts that might have an os-release(5). When using FEX-Emu and pressure-vessel, we can have up to four os-release(5) files: the one that is read by native ARM code, the one in the interpreter root pseudo-overlayfs that is read by x86 code, the one that would be read by native ARM code outside the pressure-vessel container, and the one that would be read by x86 code outside the pressure-vessel container. Representing these as four objects with the same API will result in much less duplication. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We will want this in order to be able to report whether we have found the "right" os-release when running under FEX-Emu. steamrt/tasks#342 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In future we'll want to track the complete set of fields, not just the ones we have high-level accessors for. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will make it easier to unit-test. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will make it easier to convert SrtOsRelease into an object that can store arbitrary fields. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Superseded by _srt_sysroot_load(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This prevents symlinks from inadvertently "escaping" from the sysroot, while also doing the right thing to take into account FEX-Emu's pseudo-overlayfs. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can use this as a replacement for most uses of _srt_file_test_in_sysroot(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
As with previous commits, this means we get the right answer when running under FEX-Emu. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is intentionally not using a SrtSysroot, because for some callers we are listing contents relative to a path that is not, technically, a sysroot. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When running under FEX-Emu this means we will find the same version of ld.so that a naive x86 process would, taking into account FEX-Emu's pseudo-overlayfs. The output path even includes the FEX rootfs prefix, which is a nice bonus when using this as a diagnostic tool. steamrt/tasks#348 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When running under FEX-Emu this means we will find the same /etc/os-release that a naive x86 process would, taking into account FEX-Emu's pseudo-overlayfs. steamrt/tasks#342 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
No functional change intended, this is just bundling the (path, fd) pair into an object. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is similar to (and should eventually replace) _srt_file_get_contents_in_sysroot(), but will use direct I/O if appropriate, for better FEX-Emu compatibility. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This means we will find the same DRI, VA-API and VDPAU modules that the actual loader libraries would find, taking into account FEX-Emu's pseudo-overlayfs. steamrt/tasks#347 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
No functional change intended, this is just passing around the (path, sysroot) pair as a single object. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Unlike _srt_resolve_in_sysroot, this has a direct code path, which opens files in a more naive way while acting on the real system root. This allows frameworks like FEX-Emu to adjust filesystem resolution via its pseudo-overlay "rootfs". When working with a non-trivial sysroot, we continue to use _srt_resolve_in_sysroot() as before. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This currently assumes that sysroot = `/` is synonymous with using direct I/O for access to the sysroot. There is no difference yet, but there will be in a future commit. This also forces us to be more careful about tracking whether the sysroot was opened successfully: if it wasn't, self->sysroot will now be null, and we have to cope with that. A small functional change in this commit is that the given sysroot was previously opened with O_NOFOLLOW, so the last path component was required to be a non-symlink. Now it follows symlinks, including "magic symlinks" like /proc/self/root. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This keeps track of whether the sysroot is "direct", meaning that we can use a more naive approach to I/O while acting on the real system root. This allows frameworks like FEX-Emu to adjust filesystem resolution via its pseudo-overlay "rootfs". Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Oct 20, 2023
-
-
Ludovico de Nittis authored
Preparations for introducing a sysroot object See merge request !611
-
- Oct 19, 2023
-
-
Simon McVittie authored
I can't reproduce this locally, but on CI, it seems like some of these could be compiled before the header had been generated. Fix that. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This lets us skip a malloc/free cycle in a couple of places. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Otherwise, we could find ourselves in a situation where srt_system_info_check_container() calls ensure_container_info() and then finds that there is, in fact, no container_info object. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
dispose should be idempotent, and should free all refcounted GObjects, allowing it to be used to break reference cycles. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
It's generally good to separate out miscellaneous utilities that do and don't have an external dependency; and if we don't do this, it seems that an apparently unrelated bit of refactoring (making SrtVirtualizationInfo no longer use _srt_file_get_contents_in_sysroot()) will fail to build with scout toolchains for whatever reason, with a missing link reference to libelf symbols, even though -lelf appears on the link line. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-