diff --git a/build.sh b/build.sh index c9a5e30c..70b6e12e 100755 --- a/build.sh +++ b/build.sh @@ -36,9 +36,9 @@ if [ "${POLICY}" == "manylinux2010" ]; then DEVTOOLSET_ROOTPATH="/opt/rh/devtoolset-8/root" PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:" if [ "${PLATFORM}" == "i686" ]; then - LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib" + LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst" else - LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" + LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64" fi elif [ "${POLICY}" == "manylinux2014" ]; then if [ "${PLATFORM}" == "s390x" ]; then @@ -49,9 +49,9 @@ elif [ "${POLICY}" == "manylinux2014" ]; then DEVTOOLSET_ROOTPATH="/opt/rh/devtoolset-9/root" PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:" if [ "${PLATFORM}" == "i686" ]; then - LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib" + LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst" else - LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib" + LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64" fi elif [ "${POLICY}" == "manylinux_2_24" ]; then BASEIMAGE="${MULTIARCH_PREFIX}debian:9" diff --git a/docker/build_scripts/install-runtime-packages.sh b/docker/build_scripts/install-runtime-packages.sh index b0bf5e62..481244d5 100755 --- a/docker/build_scripts/install-runtime-packages.sh +++ b/docker/build_scripts/install-runtime-packages.sh @@ -124,3 +124,10 @@ fi # and since it's also needed in the finalize step, everything's # centralized in this script to avoid code duplication LC_ALL=C ${MY_DIR}/update-system-packages.sh + +# we'll be removing libcrypt.so.1 later on +# this is needed to ensure the new one will be found +# as LD_LIBRARY_PATH does not seem enough. +# c.f. https://github.com/pypa/manylinux/issues/1022 +echo "/usr/local/lib" > /etc/ld.so.conf.d/manylinux.conf +ldconfig diff --git a/tests/run_tests.sh b/tests/run_tests.sh index cad79905..7f008989 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -6,6 +6,17 @@ set -exuo pipefail # Get script directory MY_DIR=$(dirname "${BASH_SOURCE[0]}") +if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then + PACKAGE_MANAGER=yum +elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then + export DEBIAN_FRONTEND=noninteractive + PACKAGE_MANAGER=apt + apt-get update -qq +else + echo "Unsupported policy: '${AUDITWHEEL_POLICY}'" + exit 1 +fi + for PYTHON in /opt/python/*/bin/python; do # Smoke test to make sure that our Pythons work, and do indeed detect as @@ -23,3 +34,17 @@ patchelf --version git --version cmake --version swig -version + +# check libcrypt.so.1 can be loaded by some system packages, +# as LD_LIBRARY_PATH might not be enough. +# c.f. https://github.com/pypa/manylinux/issues/1022 +if [ "${PACKAGE_MANAGER}" == "yum" ]; then + yum -y install openssh-clients +elif [ "${PACKAGE_MANAGER}" == "apt" ]; then + apt-get install -qq -y --no-install-recommends openssh-client +else + echo "Unsupported package manager: '${PACKAGE_MANAGER}'" + exit 1 +fi +eval "$(ssh-agent)" +eval "$(ssh-agent -k)"