Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
8f18e3c0
Commit
8f18e3c0
authored
5 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
wrap: Make it clearer what we are doing when manipulating ld.so
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
8663d6d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/wrap.c
+24
-3
24 additions, 3 deletions
src/wrap.c
with
24 additions
and
3 deletions
src/wrap.c
+
24
−
3
View file @
8f18e3c0
...
...
@@ -1140,7 +1140,10 @@ bind_runtime (FlatpakBwrap *bwrap,
g_autofree
gchar
*
real_path_in_host
=
NULL
;
g_autofree
gchar
*
real_path_in_runtime
=
NULL
;
g_debug
(
"Making host ld.so visible in container"
);
real_path_in_host
=
flatpak_canonicalize_filename
(
ld_so
);
g_debug
(
"Host path: %s -> %s"
,
ld_so
,
real_path_in_host
);
g_clear_pointer
(
&
temp_bwrap
,
flatpak_bwrap_free
);
...
...
@@ -1158,9 +1161,21 @@ bind_runtime (FlatpakBwrap *bwrap,
if
(
real_path_in_runtime
==
NULL
)
return
FALSE
;
if
(
runtime_is_usr
||
g_str_has_prefix
(
real_path_in_runtime
,
"/usr/"
))
g_debug
(
"Container path: %s -> %s"
,
ld_so
,
real_path_in_runtime
);
if
(
runtime_is_usr
)
{
g_debug
(
"Runtime is just /usr anyway"
);
g_debug
(
"Mounting %s on %s"
,
real_path_in_host
,
real_path_in_runtime
);
flatpak_bwrap_add_args
(
bwrap
,
"--ro-bind"
,
real_path_in_host
,
real_path_in_runtime
,
NULL
);
}
else
if
(
g_str_has_prefix
(
real_path_in_runtime
,
"/usr/"
))
{
g_debug
(
"Path in runtime starts with /usr already"
);
g_debug
(
"Mounting %s on %s"
,
real_path_in_host
,
real_path_in_runtime
);
flatpak_bwrap_add_args
(
bwrap
,
"--ro-bind"
,
real_path_in_host
,
real_path_in_runtime
,
...
...
@@ -1168,9 +1183,13 @@ bind_runtime (FlatpakBwrap *bwrap,
}
else
{
/* /lib, /lib64 are just going to be symlinks anyway */
/* We assume that /lib, /lib64 are just going to be
* symlinks anyway.
*
* TODO: Support for non-merged-/usr runtimes? */
g_autofree
gchar
*
usr_path_in_runtime
=
NULL
;
g_debug
(
"Assuming runtime is merged-/usr"
);
usr_path_in_runtime
=
g_build_filename
(
"/usr"
,
real_path_in_runtime
,
NULL
);
...
...
@@ -1180,6 +1199,8 @@ bind_runtime (FlatpakBwrap *bwrap,
NULL
);
}
g_debug
(
"Making host locale data visible in container"
);
if
(
g_file_test
(
"/usr/lib/locale"
,
G_FILE_TEST_EXISTS
))
flatpak_bwrap_add_args
(
bwrap
,
"--ro-bind"
,
"/usr/lib/locale"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment