Inspect os-release(5) to see whether we are in a SteamRT container/chroot
Implements most of https://phabricator.collabora.com/T16564 and about half of https://phabricator.collabora.com/T16069.
-
tests: Replace SRT_TEST_ICD_SYSROOT with SRT_TEST_SYSROOT
I'm about to add a second feature that needs to fake a sysroot for test coverage.
-
Add minimal OS information from os-release(5)
This doesn't include information about similar OSs (ID_LIKE), and also does not include a fallback to lsb_release or OS-specific files. However, it's enough to detect Steam Runtime containers.
-
Add support for ID_LIKE os-release(5) field
This one is a bit different because the raw field is a space-separated list. For convenience, srt_system_info_dup_os_id_like() can be asked to include the OS itself, for use in logic like this pseudocode:
for id in info.dup_os_id_like(True): if id in special_cases: special_cases[id].run() break else: do_generic_behaviour()
-
runtime: Use os-release(5) to detect Steam Runtime container/chroot
Instead of inspecting the LD_LIBRARY_PATH runtime with _srt_runtime_check(), we open-code a small partial reimplementation of that function to inspect os-release(5) and provide information about a Steam Runtime container.
Missing things:
-
From T16564: doesn't look at
/overrides
to populateSRT_RUNTIME_ISSUES_NOT_USING_NEWER_HOST_LIBRARIES
. I'm not sure whether that's really worth it, tbh. -
From T16069 (which is out of scope for T16564):
- falling back to
lsb_release
- falling back to
/cc @denittis @jpwhiting