mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Adjust patchelf interpreter in installs to use full path. (#12666)
* Adjust patchelf interpreter in installs to use full path. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * suggested changes Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
83d036c208
commit
6027f3800c
16
install.sh
16
install.sh
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
CREW_INSTALLER_VERSION=2025061101
|
||||
CREW_INSTALLER_VERSION=2025082901
|
||||
# Exit on fail.
|
||||
set -eE
|
||||
|
||||
@@ -151,6 +151,16 @@ if [[ "${ARCH}" = "x86_64" ]] && [[ -f "/lib/ld-2.23.so" ]]; then
|
||||
PREFIX_CMD="linux32 env LD_LIBRARY_PATH=${CREW_PREFIX}/lib${CREW_LIB_SUFFIX}:/usr/lib${CREW_LIB_SUFFIX}:/lib${CREW_LIB_SUFFIX}"
|
||||
fi
|
||||
|
||||
PATCHELF_INTERPRETER="${CREW_PREFIX}/bin/ld.so"
|
||||
case "${ARCH}" in
|
||||
x86_64)
|
||||
PATCHELF_INTERPRETER="${CREW_PREFIX}/opt/glibc-libs/ld-linux-x86-64.so.2"
|
||||
;;
|
||||
aarch64|armv7l|armv8l)
|
||||
PATCHELF_INTERPRETER="${CREW_PREFIX}/opt/glibc-libs/ld-linux-armhf.so.3"
|
||||
;;
|
||||
esac
|
||||
|
||||
: "${CREW_PY_VER:=3.13}"
|
||||
CREW_NPROC="$(nproc)"
|
||||
export CREW_NPROC
|
||||
@@ -263,7 +273,7 @@ else
|
||||
# Get linux32 as early as possible.
|
||||
[[ -n "${PREFIX_CMD}" ]] && BOOTSTRAP_PACKAGES+=' util_linux'
|
||||
BOOTSTRAP_PACKAGES+=' libxcrypt upx patchelf lz4 zlib xzutils zlib_ng crew_mvdir ncurses readline bash gcc_lib ca_certificates libyaml openssl gmp findutils psmisc'
|
||||
[[ "${ARCH}" == 'i686' ]] || BOOTSTRAP_PACKAGES+=' uutils_coreutils'
|
||||
[[ "${ARCH}" == 'i686' ]] || BOOTSTRAP_PACKAGES+=' uutils_coreutils'
|
||||
fi
|
||||
|
||||
if [[ -n "${CHROMEOS_RELEASE_CHROME_MILESTONE}" ]]; then
|
||||
@@ -422,7 +432,7 @@ function extract_install () {
|
||||
if [[ -d /usr/local/opt/glibc-libs ]]; then
|
||||
if command -v patchelf &> /dev/null; then
|
||||
echo_intra "Running patchelf on ${1}..."
|
||||
grep '/usr/local/bin' < filelist | xargs -P "$(nproc)" -n1 patchelf --set-interpreter "${CREW_PREFIX}/bin/ld.so" 2> /dev/null || true
|
||||
grep '/usr/local/bin' < filelist | xargs -P "$(nproc)" -n1 patchelf --set-interpreter "${PATCHELF_INTERPRETER}" 2> /dev/null || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user