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
0381be8b
Commit
0381be8b
authored
6 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
wrap: Fix LD_PRELOAD for SteamOS libmodeswitch_inhibitor.so
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
700d8747
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pressure-vessel-wrap
+23
-11
23 additions, 11 deletions
pressure-vessel-wrap
with
23 additions
and
11 deletions
pressure-vessel-wrap
+
23
−
11
View file @
0381be8b
...
@@ -271,16 +271,6 @@ if [ -z "$interactive" ]; then
...
@@ -271,16 +271,6 @@ if [ -z "$interactive" ]; then
bwrap_options+
=(
--new-session
)
bwrap_options+
=(
--new-session
)
fi
fi
# Put the caller's LD_PRELOAD and search paths back.
if
[
-n
"
$caller_ld_preload
"
]
;
then
bwrap_options+
=(
--setenv
LD_PRELOAD
"
$caller_ld_preload
"
)
else
bwrap_options+
=(
--unsetenv
LD_PRELOAD
)
fi
if
[
-n
"
$caller_path
"
]
;
then
bwrap_options+
=(
--setenv
PATH
"
$caller_path
"
)
fi
overrides
=
overrides
=
for
t
in
"
${
multiarch_tuples
[@]
}
"
;
do
for
t
in
"
${
multiarch_tuples
[@]
}
"
;
do
...
@@ -613,9 +603,21 @@ fi
...
@@ -613,9 +603,21 @@ fi
# locations
# locations
old_ifs
=
"
$IFS
"
old_ifs
=
"
$IFS
"
IFS
=
:
IFS
=
:
adjusted_ld_preload
=
for
preload
in
$caller_ld_preload
;
do
for
preload
in
$caller_ld_preload
;
do
if
[
-e
"
$preload
"
]
;
then
if
[
-e
"
$preload
"
]
;
then
bwrap_options+
=(
--ro-bind
"
$preload
"
"
$preload
"
)
case
"
$preload
"
in
(
/usr/
*
|
/lib
*
)
# We can't write here, so redirect them to the
# corresponding locations in /run/host
bwrap_options+
=(
--ro-bind
"
$preload
"
"/run/host
$preload
"
)
adjusted_ld_preload
=
"
${
adjusted_ld_preload
:+
"
$adjusted_ld_preload
:"
}
/run/host
$preload
"
;;
(
*
)
bwrap_options+
=(
--ro-bind
"
$preload
"
"
$preload
"
)
adjusted_ld_preload
=
"
${
adjusted_ld_preload
:+
"
$adjusted_ld_preload
:"
}
$preload
"
;;
esac
fi
fi
done
done
IFS
=
"
$old_ifs
"
IFS
=
"
$old_ifs
"
...
@@ -637,6 +639,16 @@ else
...
@@ -637,6 +639,16 @@ else
fi
fi
bwrap_options+
=(
--chdir
"
$PWD
"
)
bwrap_options+
=(
--chdir
"
$PWD
"
)
# Put the caller's LD_PRELOAD and search paths back.
if
[
-n
"
$adjusted_ld_preload
"
]
;
then
bwrap_options+
=(
--setenv
LD_PRELOAD
"
$adjusted_ld_preload
"
)
else
bwrap_options+
=(
--unsetenv
LD_PRELOAD
)
fi
if
[
-n
"
$caller_path
"
]
;
then
bwrap_options+
=(
--setenv
PATH
"
$caller_path
"
)
fi
if
"
$BWRAP
"
--help
|
grep
unshare-uts
>
/dev/null
;
then
if
"
$BWRAP
"
--help
|
grep
unshare-uts
>
/dev/null
;
then
# Set a standard hostname for the container to make it easier
# Set a standard hostname for the container to make it easier
# to see which shell is which
# to see which shell is which
...
...
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