diff --git a/debian/control b/debian/control index 4ce5d1819e8eacd797eb92844167006ab6a851f3..b302c4437a050a7c31f4fab58664321f23857944 100644 --- a/debian/control +++ b/debian/control @@ -139,7 +139,7 @@ Architecture: amd64 i386 Multi-Arch: foreign Depends: bubblewrap, - libcapsule-tools-relocatable (>= 0.20200707.0~), + libcapsule-tools-relocatable (>= 0.20201120.0), python3 (>= 3.5) | python3.5, steam-runtime-tools-bin, ${misc:Depends}, @@ -157,7 +157,7 @@ Section: libs Architecture: amd64 Multi-Arch: foreign Depends: - libcapsule-tools-relocatable (>= 0.20200707.0~), + libcapsule-tools-relocatable (>= 0.20201120.0), libsteam-runtime-tools-0-helpers, ${misc:Depends}, ${shlibs:Depends}, @@ -171,7 +171,7 @@ Section: libs Architecture: i386 Multi-Arch: foreign Depends: - libcapsule-tools-relocatable (>= 0.20200707.0~), + libcapsule-tools-relocatable (>= 0.20201120.0), libsteam-runtime-tools-0-helpers, ${misc:Depends}, ${shlibs:Depends}, diff --git a/pressure-vessel/runtime.c b/pressure-vessel/runtime.c index d1b5da6ef7071b254dafe39a75312db1bf14eef3..8278bca1dd6bd756fb3c84fd8bc01049402dfba7 100644 --- a/pressure-vessel/runtime.c +++ b/pressure-vessel/runtime.c @@ -1217,6 +1217,8 @@ pv_runtime_get_capsule_capture_libs (PvRuntime *self, RuntimeArchitecture *arch) { const gchar *ld_library_path; + g_autofree gchar *remap_usr = NULL; + g_autofree gchar *remap_lib = NULL; FlatpakBwrap *ret = pv_bwrap_copy (self->container_access_adverb); /* If we have a custom "LD_LIBRARY_PATH", we want to preserve @@ -1225,10 +1227,21 @@ pv_runtime_get_capsule_capture_libs (PvRuntime *self, if (ld_library_path != NULL) flatpak_bwrap_set_env (ret, "LD_LIBRARY_PATH", ld_library_path, TRUE); + /* Every symlink that starts with exactly /usr/ */ + remap_usr = g_strjoin (NULL, "/usr/", "=", + self->provider_in_container_namespace, + "/usr/", NULL); + + /* Every symlink that starts with /lib, e.g. /lib64 */ + remap_lib = g_strjoin (NULL, "/lib", "=", + self->provider_in_container_namespace, + "/lib", NULL); + flatpak_bwrap_add_args (ret, arch->capsule_capture_libs, "--container", self->container_access, - "--link-target", self->provider_in_container_namespace, + "--remap-link-prefix", remap_usr, + "--remap-link-prefix", remap_lib, "--provider", self->provider_in_current_namespace, NULL);