diff --git a/.travis.yml b/.travis.yml index e812d198..6e0e97c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,10 @@ jobs: env: POLICY="manylinux_2_28" PLATFORM="s390x" - arch: ppc64le env: POLICY="manylinux_2_28" PLATFORM="ppc64le" + - arch: arm64-graviton2 + virt: vm + group: edge + env: POLICY="manylinux_2_31" PLATFORM="armv7l" - arch: arm64-graviton2 virt: vm group: edge diff --git a/build.sh b/build.sh index 6197367f..24de530e 100755 --- a/build.sh +++ b/build.sh @@ -48,6 +48,11 @@ elif [ "${POLICY}" == "manylinux_2_28" ]; then DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-12/root" PREPEND_PATH="${DEVTOOLSET_ROOTPATH}/usr/bin:" LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst" +elif [ "${POLICY}" == "manylinux_2_31" ]; then + BASEIMAGE="ubuntu:20.04" + DEVTOOLSET_ROOTPATH= + PREPEND_PATH= + LD_LIBRARY_PATH_ARG= elif [ "${POLICY}" == "manylinux_2_34" ]; then BASEIMAGE="almalinux:9" DEVTOOLSET_ROOTPATH="/opt/rh/gcc-toolset-13/root" diff --git a/docker/build_scripts/build-cpython.sh b/docker/build_scripts/build-cpython.sh index a913760f..06be2304 100755 --- a/docker/build_scripts/build-cpython.sh +++ b/docker/build_scripts/build-cpython.sh @@ -50,7 +50,9 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] ; then export TCLTK_LIBS="-ltk8.6 -ltcl8.6" fi -if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then +if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "manylinux_armv7l" ]; then + CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=armv7l-unknown-linux-gnueabihf" +elif [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=arm-linux-musleabihf" fi diff --git a/docker/build_scripts/build-openssl.sh b/docker/build_scripts/build-openssl.sh index 0b564f3d..faee4781 100755 --- a/docker/build_scripts/build-openssl.sh +++ b/docker/build_scripts/build-openssl.sh @@ -31,6 +31,8 @@ fi if [ "${OS_ID_LIKE}" = "rhel" ];then manylinux_pkg_remove openssl-devel +elif [ "${OS_ID_LIKE}" = "debian" ];then + manylinux_pkg_remove libssl-dev elif [ "${OS_ID_LIKE}" = "alpine" ]; then manylinux_pkg_remove openssl-dev fi diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index 7e0f37f4..43c8a768 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -19,6 +19,8 @@ else PACKAGE_MANAGER=dnf elif command -v yum >/dev/null 2>&1; then PACKAGE_MANAGER=yum + elif command -v apt-get >/dev/null 2>&1; then + PACKAGE_MANAGER=apt else echo "unsupported image" exit 1 @@ -28,6 +30,7 @@ fi OS_ID_LIKE=$(. /etc/os-release; echo "${ID} ${ID_LIKE:-}") case "${OS_ID_LIKE}" in *rhel*) OS_ID_LIKE=rhel;; + *debian) OS_ID_LIKE=debian;; *alpine*) OS_ID_LIKE=alpine;; *) echo "unsupported image"; exit 1;; esac @@ -88,6 +91,9 @@ function manylinux_pkg_install { yum -y install "$@" elif [ "${PACKAGE_MANAGER}" = "dnf" ]; then dnf -y install --allowerasing "$@" + elif [ "${PACKAGE_MANAGER}" = "apt" ]; then + DEBIAN_FRONTEND=noninteractive apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends "$@" elif [ "${PACKAGE_MANAGER}" = "apk" ]; then apk add --no-cache "$@" else @@ -100,6 +106,8 @@ function manylinux_pkg_remove { yum erase -y "$@" elif [ "${PACKAGE_MANAGER}" = "dnf" ];then dnf erase -y "$@" + elif [ "${PACKAGE_MANAGER}" = "apt" ];then + DEBIAN_FRONTEND=noninteractive apt-get remove -y "$@" elif [ "${PACKAGE_MANAGER}" = "apk" ]; then apk del "$@" else @@ -114,6 +122,9 @@ function manylinux_pkg_clean { elif [ "${PACKAGE_MANAGER}" = "dnf" ]; then dnf clean all rm -rf /var/cache/dnf + elif [ "${PACKAGE_MANAGER}" = "apt" ]; then + DEBIAN_FRONTEND=noninteractive apt-get clean -qq + rm -rf /var/lib/apt/lists/* elif [ "${PACKAGE_MANAGER}" = "apk" ]; then : else diff --git a/docker/build_scripts/finalize.sh b/docker/build_scripts/finalize.sh index 915f3a5a..e07a5a4c 100755 --- a/docker/build_scripts/finalize.sh +++ b/docker/build_scripts/finalize.sh @@ -83,6 +83,7 @@ pipx upgrade-shared --pip-args="--no-index --find-links=/tmp/pinned-wheels" for TOOL_PATH in $(find ${MY_DIR}/requirements-tools -type f); do TOOL=$(basename ${TOOL_PATH}) case ${AUDITWHEEL_PLAT}-${TOOL} in + manylinux*_armv7l-swig|manylinux*_armv7l-cmake) apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y ${TOOL};; musllinux*_s390x-uv) continue;; # uv doesn't provide musl s390x wheels due to Rust issues *) pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL};; esac diff --git a/docker/build_scripts/install-build-packages.sh b/docker/build_scripts/install-build-packages.sh index 99de5582..043f759f 100755 --- a/docker/build_scripts/install-build-packages.sh +++ b/docker/build_scripts/install-build-packages.sh @@ -22,6 +22,8 @@ if [ "${OS_ID_LIKE}" = "rhel" ]; then else COMPILE_DEPS="${COMPILE_DEPS} libidn2-devel tk-devel" fi +elif [ "${OS_ID_LIKE}" == "debian" ]; then + COMPILE_DEPS="libbz2-dev libncurses-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-headers-generic" elif [ "${OS_ID_LIKE}" == "alpine" ]; then COMPILE_DEPS="bzip2-dev ncurses-dev readline-dev tk-dev gdbm-dev libpcap-dev xz-dev openssl openssl-dev keyutils-dev krb5-dev libcom_err libidn-dev curl-dev util-linux-dev libffi-dev linux-headers" else diff --git a/docker/build_scripts/install-runtime-packages.sh b/docker/build_scripts/install-runtime-packages.sh index dbf91a3e..4b3695ef 100755 --- a/docker/build_scripts/install-runtime-packages.sh +++ b/docker/build_scripts/install-runtime-packages.sh @@ -34,6 +34,8 @@ source $MY_DIR/build_utils.sh # MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install) if [ "${OS_ID_LIKE}" == "rhel" ]; then MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel zlib-devel expat-devel" +elif [ "${OS_ID_LIKE}" == "debian" ]; then + MANYLINUX_DEPS="libc6-dev libglib2.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libice-dev libsm-dev zlib1g-dev libexpat1-dev libssl-dev" elif [ "${OS_ID_LIKE}" == "alpine" ]; then MANYLINUX_DEPS="musl-dev libstdc++ glib-dev libx11-dev libxext-dev libxrender-dev mesa-dev libice-dev libsm-dev zlib-dev expat-dev" else @@ -53,6 +55,13 @@ if [ "${OS_ID_LIKE}" == "rhel" ]; then # for graalpy RUNTIME_DEPS="${RUNTIME_DEPS} libxcrypt-compat" fi +elif [ "${OS_ID_LIKE}" == "debian" ]; then + RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses6 libreadline8 tk libgdbm6 libdb5.3 libpcap0.8 liblzma5 libkeyutils1 libkrb5-3 libcom-err2 libidn2-0 libcurl4 uuid" + if [ "${AUDITWHEEL_POLICY}" == "manylinux_2_31" ]; then + RUNTIME_DEPS="${RUNTIME_DEPS} libffi7 libssl1.1" + else + RUNTIME_DEPS="${RUNTIME_DEPS} libffi8 libssl3" + fi elif [ "${OS_ID_LIKE}" == "alpine" ]; then RUNTIME_DEPS="zlib bzip2 expat ncurses-libs readline tk gdbm db xz openssl keyutils-libs krb5-libs libcom_err libidn2 libcurl libuuid libffi" else @@ -110,6 +119,9 @@ elif [ "${OS_ID_LIKE}" == "rhel" ]; then if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm" fi +elif [ "${OS_ID_LIKE}" == "debian" ]; then + TOOLCHAIN_DEPS="binutils gcc g++ gfortran" + BASETOOLS="${BASETOOLS} gpg gpg-agent hardlink hostname locales xz-utils" elif [ "${OS_ID_LIKE}" == "alpine" ]; then TOOLCHAIN_DEPS="binutils gcc g++ gfortran" BASETOOLS="${BASETOOLS} gnupg util-linux shadow tar" diff --git a/docker/build_scripts/update-system-packages.sh b/docker/build_scripts/update-system-packages.sh index d07e9687..2d44ecd7 100755 --- a/docker/build_scripts/update-system-packages.sh +++ b/docker/build_scripts/update-system-packages.sh @@ -20,6 +20,9 @@ if [ "${PACKAGE_MANAGER}" == "yum" ]; then fi elif [ "${PACKAGE_MANAGER}" == "dnf" ]; then dnf -y upgrade +elif [ "${PACKAGE_MANAGER}" == "apt" ]; then + DEBIAN_FRONTEND=noninteractive apt-get update -qq + DEBIAN_FRONTEND=noninteractive apt-get upgrade -qq -y elif [ "${PACKAGE_MANAGER}" == "apk" ]; then apk upgrade --no-cache else @@ -30,7 +33,7 @@ manylinux_pkg_clean fixup-mirrors # do we want to update locales ? -if [ "${OS_ID_LIKE}" == "rhel" ]; then +if [ "${OS_ID_LIKE}" == "rhel" ] || [ "${OS_ID_LIKE}" == "debian" ]; then LOCALE_ARCHIVE=/usr/lib/locale/locale-archive TIMESTAMP_FILE=${LOCALE_ARCHIVE}.ml.timestamp if [ ! -f ${TIMESTAMP_FILE} ] || [ ${LOCALE_ARCHIVE} -nt ${TIMESTAMP_FILE} ]; then @@ -38,12 +41,16 @@ if [ "${OS_ID_LIKE}" == "rhel" ]; then localedef -i en_US -f UTF-8 en_US.UTF-8 # if we updated glibc, we need to strip locales again... - if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then - localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive - fi - if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then - mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl - build-locale-archive --install-langs="en_US.utf8" + if [ "${OS_ID_LIKE}" == "rhel" ]; then + if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then + localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive + fi + if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then + mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl + build-locale-archive --install-langs="en_US.utf8" + fi + elif [ "${OS_ID_LIKE}" == "debian" ]; then + update-locale LANG=en_US.UTF-8 fi touch ${TIMESTAMP_FILE} fi