From: Fredrik Fornwall Date: Sun, 8 Jan 2017 09:53:36 +0000 (-0500) Subject: termux-tools: Unset LD_LIBRARY_PATH in wrappers X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/c9379a3ed83a3c783699d9a684a76f72625234b3 termux-tools: Unset LD_LIBRARY_PATH in wrappers Previously the wrappers assumed that if /system/bin/linker64 that LD_LIBRARY_PATH should be set to /system/lib64. This seems to not always be the case (see #192) and hopefully the system binaries should work without LD_LIBRARY_PATH being set, so we just unset it before calling the system binary. --- diff --git a/packages/termux-tools/build.sh b/packages/termux-tools/build.sh index 4753fed0..ce49f30d 100644 --- a/packages/termux-tools/build.sh +++ b/packages/termux-tools/build.sh @@ -1,23 +1,18 @@ TERMUX_PKG_HOMEPAGE=https://termux.com/ TERMUX_PKG_DESCRIPTION="Basic system tools for Termux" -TERMUX_PKG_VERSION=0.33 +TERMUX_PKG_VERSION=0.34 TERMUX_PKG_PLATFORM_INDEPENDENT=yes termux_step_make_install () { # Remove LD_LIBRARY_PATH from environment to avoid conflicting - # with system libraries that am may link against. + # with system libraries that system binaries may link against: for tool in am df getprop logcat ping ping6 ip pm settings; do WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool echo '#!/bin/sh' > $WRAPPER_FILE - - # Some of these tools (am,dalvikvm,?) requires LD_LIBRARY_PATH setup on at least some devices: - echo 'if [ -f /system/bin/linker64 ]; then BITS=64; else BITS=; fi' >> $WRAPPER_FILE - echo -n 'LD_LIBRARY_PATH=/system/lib$BITS ' >> $WRAPPER_FILE - + echo 'unset LD_LIBRARY_PATH' >> $WRAPPER_FILE # Some tools require having /system/bin/app_process in the PATH, # at least am&pm on a Nexus 6p running Android 6.0: echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE - echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE chmod +x $TERMUX_PREFIX/bin/$tool done