aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-08-29 13:16:34 +0200
committerJo-Philipp Wich <jo@mein.io>2018-08-30 11:32:16 +0200
commit3315558870e1b7f8586c2726531e5c98c35093cb (patch)
treec488f771fe4cf8c7dbbd6b1dae5e0c4a47ffa718
parent686c6c5ca7f2a422da08552b8dc872f5012143b6 (diff)
downloadupstream-3315558870e1b7f8586c2726531e5c98c35093cb.tar.gz
upstream-3315558870e1b7f8586c2726531e5c98c35093cb.tar.bz2
upstream-3315558870e1b7f8586c2726531e5c98c35093cb.zip
scripts: bundle-libraries: fix logic flaw
Previous refactoring of the script moved the LDSO detection into a file-not-exists condition, causing onyl the very first executable to get bundled. Solve the problem by unconditionally checking for LDSO again. Fixes: 9030a78a71 ("scripts: bundle-libraries: prevent loading host locales") Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 5ebcd32997b6d10abcd29c8795a598fdcaf4521d)
-rwxr-xr-xscripts/bundle-libraries.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/bundle-libraries.sh b/scripts/bundle-libraries.sh
index 4662b98dee..d3c7206a4d 100755
--- a/scripts/bundle-libraries.sh
+++ b/scripts/bundle-libraries.sh
@@ -156,17 +156,16 @@ for BIN in "$@"; do
dest="$DIR/lib/${token##*/}"
ddir="${dest%/*}"
+ case "$token" in
+ */ld-*.so*) LDSO="${token##*/}" ;;
+ esac
+
[ -f "$token" -a ! -f "$dest" ] && {
_md "$ddir"
_cp "$token" "$dest"
case "$token" in
- *ld-*.so*)
- LDSO="${token##*/}"
- _patch_ldso "$dest"
- ;;
- libc.so.6|*/libc.so.6)
- _patch_glibc "$dest"
- ;;
+ */ld-*.so*) _patch_ldso "$dest" ;;
+ */libc.so.6) _patch_glibc "$dest" ;;
esac
}
;; esac