From f1917ce2b3af6737d70c9da2ea680ce3658cbecd Mon Sep 17 00:00:00 2001 From: Arcadiy Ivanov Date: Mon, 9 Sep 2024 11:59:38 -0400 Subject: [PATCH] Move patch elf later --- patches/0-patch.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patches/0-patch.patch b/patches/0-patch.patch index 160936e..3b43554 100644 --- a/patches/0-patch.patch +++ b/patches/0-patch.patch @@ -43,7 +43,7 @@ index d59ae7b..b76ec6d 100755 docker push ${TAG}:${BUILD_ID2} docker push ${TAG}:latest diff --git a/docker/build_scripts/build-cpython.sh b/docker/build_scripts/build-cpython.sh -index ea7485a..dd046f6 100755 +index ea7485a..8749ba7 100755 --- a/docker/build_scripts/build-cpython.sh +++ b/docker/build_scripts/build-cpython.sh @@ -35,11 +35,16 @@ mkdir -p ${PREFIX}/lib @@ -64,16 +64,16 @@ index ea7485a..dd046f6 100755 if [ "${CPYTHON_VERSION}" == "3.6.15" ]; then # https://github.com/python/cpython/issues/89863 # gcc-12+ uses these 2 flags in -O2 but they were only enabled in -O3 with gcc-11 -@@ -66,6 +71,9 @@ fi - LDFLAGS_NODIST="${MANYLINUX_LDFLAGS}" \ - --prefix=${PREFIX} ${CONFIGURE_ARGS} > /dev/null - make > /dev/null -+if [ "${2:-}" == "shared" -o "${3:-}" == "shared" ]; then -+ patchelf --force-rpath --set-rpath '$ORIGIN/../lib' /Python-${CPYTHON_VERSION}/python -+fi +@@ -69,6 +74,9 @@ make > /dev/null make install > /dev/null popd rm -rf Python-${CPYTHON_VERSION} Python-${CPYTHON_VERSION}.tgz Python-${CPYTHON_VERSION}.tgz.asc ++if [ "${2:-}" == "shared" -o "${3:-}" == "shared" ]; then ++ patchelf --force-rpath --set-rpath '$ORIGIN/../lib' ${PREFIX}/bin/python3 ++fi + + if [ "${OPENSSL_PREFIX}" != "" ]; then + rm -rf ${OPENSSL_PREFIX}/bin ${OPENSSL_PREFIX}/include ${OPENSSL_PREFIX}/lib/pkgconfig ${OPENSSL_PREFIX}/lib/*.so @@ -79,3 +87,6 @@ clean_pyc ${PREFIX} # Strip ELF files found in ${PREFIX} @@ -121,7 +121,7 @@ index 94bb921..3af3ff4 100755 + ln -s ${PREFIX}/bin/python /usr/local/bin/${PY_IMPL}${PY_VER}${PY_GIL} +fi diff --git a/docker/build_scripts/install-runtime-packages.sh b/docker/build_scripts/install-runtime-packages.sh -index 402021a..9218689 100755 +index 402021a..61f0edc 100755 --- a/docker/build_scripts/install-runtime-packages.sh +++ b/docker/build_scripts/install-runtime-packages.sh @@ -56,7 +56,7 @@ else