Skip to content
Snippets Groups Projects

Draft: Integration test for smcv's pending branches

Open Simon McVittie requested to merge wip/smcv/staging into main
1 unresolved thread
Compare and
1 file
+ 17
0
Compare changes
  • Side-by-side
  • Inline
+ 17
0
@@ -74,6 +74,7 @@ struct _PvRuntime
SrtFileLock *runtime_lock;
GStrv original_environ;
GString *gconv_path;
gchar *libcapsule_knowledge; /* relative to runtime_files */
gchar *runtime_abi_json;
gchar *variable_dir;
@@ -707,6 +708,7 @@ pv_runtime_init (PvRuntime *self)
{
self->any_libc_from_provider = FALSE;
self->all_libc_from_provider = FALSE;
self->gconv_path = g_string_new ("");
self->overrides_fd = -1;
self->runtime_files_fd = -1;
self->variable_dir_fd = -1;
@@ -1870,6 +1872,7 @@ pv_runtime_finalize (GObject *object)
pv_runtime_cleanup (self);
g_free (self->bubblewrap);
g_string_free (self->gconv_path, TRUE);
g_free (self->libcapsule_knowledge);
g_strfreev (self->original_environ);
glnx_close_fd (&self->overrides_fd);
@@ -5538,6 +5541,13 @@ pv_runtime_collect_libc_family (PvRuntime *self,
gconv_dir_in_provider,
SRT_RESOLVE_FLAGS_MUST_BE_DIRECTORY, NULL))
{
/* We'll use the path we got it from as the mount point, so make
* sure that location ends up in GCONV_PATH, in case the path
* hard-coded into glibc doesn't match the place we found it.
* For example Void Linux has /usr/lib64 -> lib, so we use
* /usr/lib/gconv, but the hard-coded path is actually
* /usr/lib64/gconv (steamrt/tasks#477, steam-runtime#680) */
pv_search_path_append (self->gconv_path, gconv_dir_in_provider);
g_hash_table_add (gconv_in_provider, g_steal_pointer (&gconv_dir_in_provider));
found = TRUE;
}
@@ -5571,6 +5581,7 @@ pv_runtime_collect_libc_family (PvRuntime *self,
gconv_dir_in_provider,
SRT_RESOLVE_FLAGS_MUST_BE_DIRECTORY, NULL))
{
pv_search_path_append (self->gconv_path, gconv_dir_in_provider);
g_hash_table_add (gconv_in_provider, g_steal_pointer (&gconv_dir_in_provider));
found = TRUE;
}
@@ -7975,6 +7986,12 @@ pv_runtime_set_search_paths (PvRuntime *self,
* the ld.so.cache for better robustness before launching the
* actual game */
_srt_env_overlay_set (container_env, "LD_LIBRARY_PATH", ld_library_path);
/* In rare cases the gconv search path hard-coded into glibc might not
* match the mount points we used, which are based on the realpath()
* of the directory */
if (self->gconv_path->len > 0)
_srt_env_overlay_set (container_env, "GCONV_PATH", self->gconv_path->str);
}
gboolean
Loading