Skip to content
Snippets Groups Projects
Commit 67b855f6 authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Pass --library-knowledge to capsule-capture-libs if possible


For runtimes that support it, this gives us a way to override library
comparisons. In particular, we can make sure libgcc_s.so.1 is compared
by its version-definitions and symbols. (T16561, T16562)

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent b7cd7183
Branches
Tags
No related merge requests found
...@@ -24,7 +24,7 @@ Architecture: amd64 i386 ...@@ -24,7 +24,7 @@ Architecture: amd64 i386
Multi-Arch: foreign Multi-Arch: foreign
Depends: Depends:
bubblewrap, bubblewrap,
libcapsule-tools-relocatable, libcapsule-tools-relocatable (>= 0.20200707.0~),
python3 (>= 3.5) | python3.5, python3 (>= 3.5) | python3.5,
steam-runtime-tools-bin, steam-runtime-tools-bin,
${misc:Depends}, ${misc:Depends},
...@@ -41,8 +41,8 @@ Package: pressure-vessel-libs-amd64 ...@@ -41,8 +41,8 @@ Package: pressure-vessel-libs-amd64
Architecture: amd64 Architecture: amd64
Multi-Arch: foreign Multi-Arch: foreign
Depends: Depends:
libcapsule-tools-relocatable, libcapsule-tools-relocatable (>= 0.20200707.0~),
libsteam-runtime-tools-0-helpers, libsteam-runtime-tools-0-helpers (>= 0.20200707.0~),
${misc:Depends}, ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
Description: Steam container launcher - cross-architecture dependencies Description: Steam container launcher - cross-architecture dependencies
...@@ -54,8 +54,8 @@ Package: pressure-vessel-libs-i386 ...@@ -54,8 +54,8 @@ Package: pressure-vessel-libs-i386
Architecture: i386 Architecture: i386
Multi-Arch: foreign Multi-Arch: foreign
Depends: Depends:
libcapsule-tools-relocatable, libcapsule-tools-relocatable (>= 0.20200707.0~),
libsteam-runtime-tools-0-helpers, libsteam-runtime-tools-0-helpers (>= 0.20200707.0~),
${misc:Depends}, ${misc:Depends},
${shlibs:Depends}, ${shlibs:Depends},
Description: Steam container launcher - cross-architecture dependencies Description: Steam container launcher - cross-architecture dependencies
......
...@@ -53,6 +53,7 @@ struct _PvRuntime ...@@ -53,6 +53,7 @@ struct _PvRuntime
gchar *tools_dir; gchar *tools_dir;
PvBwrapLock *runtime_lock; PvBwrapLock *runtime_lock;
gchar *libcapsule_knowledge;
gchar *mutable_parent; gchar *mutable_parent;
gchar *mutable_sysroot; gchar *mutable_sysroot;
gchar *tmpdir; gchar *tmpdir;
...@@ -752,6 +753,14 @@ pv_runtime_initable_init (GInitable *initable, ...@@ -752,6 +753,14 @@ pv_runtime_initable_init (GInitable *initable,
self->runtime_usr = g_strdup (self->runtime_files); self->runtime_usr = g_strdup (self->runtime_files);
} }
self->libcapsule_knowledge = g_build_filename (self->runtime_usr,
"lib", "steamrt",
"libcapsule-knowledge.keyfile",
NULL);
if (!g_file_test (self->libcapsule_knowledge, G_FILE_TEST_EXISTS))
g_clear_pointer (&self->libcapsule_knowledge, g_free);
return TRUE; return TRUE;
} }
...@@ -782,6 +791,7 @@ pv_runtime_finalize (GObject *object) ...@@ -782,6 +791,7 @@ pv_runtime_finalize (GObject *object)
pv_runtime_cleanup (self); pv_runtime_cleanup (self);
g_free (self->bubblewrap); g_free (self->bubblewrap);
g_free (self->libcapsule_knowledge);
glnx_close_fd (&self->mutable_parent_fd); glnx_close_fd (&self->mutable_parent_fd);
g_free (self->mutable_parent); g_free (self->mutable_parent);
glnx_close_fd (&self->mutable_sysroot_fd); glnx_close_fd (&self->mutable_sysroot_fd);
...@@ -1033,6 +1043,11 @@ pv_runtime_get_capsule_capture_libs (PvRuntime *self, ...@@ -1033,6 +1043,11 @@ pv_runtime_get_capsule_capture_libs (PvRuntime *self,
"--provider", "/", "--provider", "/",
NULL); NULL);
if (self->libcapsule_knowledge)
flatpak_bwrap_add_args (ret,
"--library-knowledge", self->libcapsule_knowledge,
NULL);
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment