From 343a97e50dac38daac7b588795f654518833bdc5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 12 Nov 2022 03:42:43 +0100 Subject: [PATCH] Stop building manylinux1 container images Fixes https://github.com/ansible/pylibssh/issues/324 --- .../build-manylinux-container-images.yml | 4 --- build-scripts/build-manylinux-wheels.sh | 3 -- .../manylinux-container-image/Dockerfile | 13 +++----- .../activate-userspace-tools.sh | 16 ---------- .../install-userspace-tools.sh | 32 ------------------- .../install_libffi.sh | 29 ----------------- .../install_libssh.sh | 3 -- .../manylinux-container-image/install_zlib.sh | 27 ---------------- 8 files changed, 4 insertions(+), 123 deletions(-) delete mode 100755 build-scripts/manylinux-container-image/activate-userspace-tools.sh delete mode 100755 build-scripts/manylinux-container-image/install-userspace-tools.sh delete mode 100755 build-scripts/manylinux-container-image/install_libffi.sh delete mode 100755 build-scripts/manylinux-container-image/install_zlib.sh diff --git a/.github/workflows/build-manylinux-container-images.yml b/.github/workflows/build-manylinux-container-images.yml index cc1760b5d..5946beca2 100644 --- a/.github/workflows/build-manylinux-container-images.yml +++ b/.github/workflows/build-manylinux-container-images.yml @@ -45,10 +45,6 @@ jobs: - 2014 - _2_24 # PEP 600 include: - - IMAGE: - ARCH: x86_64 - QEMU_ARCH: amd64 - YEAR: 1 - IMAGE: ARCH: x86_64 QEMU_ARCH: amd64 diff --git a/build-scripts/build-manylinux-wheels.sh b/build-scripts/build-manylinux-wheels.sh index 1d7365166..8bdff6ffe 100755 --- a/build-scripts/build-manylinux-wheels.sh +++ b/build-scripts/build-manylinux-wheels.sh @@ -16,7 +16,6 @@ THIS_SCRIPT_DIR_PATH=$(dirname "$(readlink -m $(type -p "${0}"))") IMAGE_SCRIPTS_DIR_PATH="${THIS_SCRIPT_DIR_PATH}/manylinux-container-image" source "${IMAGE_SCRIPTS_DIR_PATH}/get-static-deps-dir.sh" -source "${IMAGE_SCRIPTS_DIR_PATH}/activate-userspace-tools.sh" SRC_DIR=/io GIT_DIR="${SRC_DIR}/.git" @@ -59,8 +58,6 @@ MANYLINUX_TAG="$( # Avoid creation of __pycache__/*.py[c|o] export PYTHONDONTWRITEBYTECODE=1 -import_userspace_tools - PIP_GLOBAL_ARGS= if [ -n "$DEBUG" ] then diff --git a/build-scripts/manylinux-container-image/Dockerfile b/build-scripts/manylinux-container-image/Dockerfile index 82c93a677..af67973b8 100644 --- a/build-scripts/manylinux-container-image/Dockerfile +++ b/build-scripts/manylinux-container-image/Dockerfile @@ -9,10 +9,9 @@ ADD update-packages.sh /root/update-packages.sh RUN ./update-packages.sh ADD build_utils.sh /root/build_utils.sh -ADD install_perl.sh /root/install_perl.sh -RUN ./install_perl.sh "${RELEASE}" -ADD install_libffi.sh /root/install_libffi.sh -RUN ./install_libffi.sh "${RELEASE}" +#ADD install_perl.sh /root/install_perl.sh +#RUN ./install_perl.sh "${RELEASE}" +#RUN apt update && apt install -y perl && apt clean ADD install_openssl.sh /root/install_openssl.sh ADD openssl-version.sh /root/openssl-version.sh RUN ./install_openssl.sh "${RELEASE}" @@ -21,14 +20,10 @@ ADD install_virtualenv.sh /root/install_virtualenv.sh RUN ./install_virtualenv.sh # \pylibssh -ADD install-userspace-tools.sh /root/install-userspace-tools.sh -ADD activate-userspace-tools.sh /root/activate-userspace-tools.sh -RUN ./install-userspace-tools.sh ADD make-static-deps-dir.sh /root/make-static-deps-dir.sh ADD get-static-deps-dir.sh /root/get-static-deps-dir.sh RUN ./make-static-deps-dir.sh -ADD install_zlib.sh /root/install_zlib.sh -RUN ./install_zlib.sh +RUN apt update && apt install -y cmake && apt clean ADD install_libssh.sh /root/install_libssh.sh RUN ./install_libssh.sh "${LIBSSH_VERSION}" # /pylibssh diff --git a/build-scripts/manylinux-container-image/activate-userspace-tools.sh b/build-scripts/manylinux-container-image/activate-userspace-tools.sh deleted file mode 100755 index bd2fcad8e..000000000 --- a/build-scripts/manylinux-container-image/activate-userspace-tools.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -xe - -USERSPACE_LOCAL_BIN_PATH="${HOME}/.local/bin" -USERSPACE_VENV_PATH="${HOME}/.tools-venv" -USERSPACE_VENV_BIN_PATH="${USERSPACE_VENV_PATH}/bin" - -PATH="${USERSPACE_VENV_BIN_PATH}:${USERSPACE_LOCAL_BIN_PATH}:${PATH}" - -function import_userspace_tools { - export USERSPACE_VENV_PATH - export USERSPACE_VENV_BIN_PATH - export PATH -} - -export import_userspace_tools diff --git a/build-scripts/manylinux-container-image/install-userspace-tools.sh b/build-scripts/manylinux-container-image/install-userspace-tools.sh deleted file mode 100755 index ebca1e645..000000000 --- a/build-scripts/manylinux-container-image/install-userspace-tools.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -x - -set -Eeuo pipefail - -source activate-userspace-tools.sh -import_userspace_tools - -ARCH=$(uname -m) -PYTHON_INTERPRETER=/opt/python/cp39-cp39/bin/python -VIRTUALENV_PYTHON_BIN="${USERSPACE_VENV_BIN_PATH}/python" -VIRTUALENV_PIP_BIN="${VIRTUALENV_PYTHON_BIN} -m pip" - -TOOLS_PKGS=auditwheel -if [ "${ARCH}" == "x86_64" ] -then - TOOLS_PKGS="${TOOLS_PKGS} cmake" -fi - -# Avoid creation of __pycache__/*.py[c|o] -export PYTHONDONTWRITEBYTECODE=1 - ->&2 echo ->&2 echo ->&2 echo ============================================================================ ->&2 echo Installing build deps into a dedicated venv at "'${USERSPACE_VENV_PATH}'"... ->&2 echo ============================================================================ ->&2 echo -"${PYTHON_INTERPRETER}" -m venv "${USERSPACE_VENV_PATH}" -${VIRTUALENV_PIP_BIN} install -U pip-with-requires-python -${VIRTUALENV_PIP_BIN} install -U setuptools wheel -${VIRTUALENV_PIP_BIN} install ${TOOLS_PKGS} diff --git a/build-scripts/manylinux-container-image/install_libffi.sh b/build-scripts/manylinux-container-image/install_libffi.sh deleted file mode 100755 index f1910f8e6..000000000 --- a/build-scripts/manylinux-container-image/install_libffi.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -xe - -unset RELEASE - -# Get script directory -MY_DIR=$(dirname "${BASH_SOURCE[0]}") - -# Get build utilities -source $MY_DIR/build_utils.sh - -LIBFFI_SHA256="72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056" -LIBFFI_VERSION="3.3" - -fetch_source "libffi_${LIBFFI_VERSION}.orig.tar.gz" "https://mirrors.ocf.berkeley.edu/debian/pool/main/libf/libffi" -check_sha256sum "libffi_${LIBFFI_VERSION}.orig.tar.gz" ${LIBFFI_SHA256} -tar zxf libffi_${LIBFFI_VERSION}.orig.tar.gz - -pushd libffi*/ -if [[ "$1" =~ '^manylinux1_.*$' ]]; then - PATH=/opt/perl/bin:$PATH - STACK_PROTECTOR_FLAGS="-fstack-protector --param=ssp-buffer-size=4" -else - STACK_PROTECTOR_FLAGS="-fstack-protector-strong" -fi -./configure CFLAGS="-g -O2 $STACK_PROTECTOR_FLAGS -Wformat -Werror=format-security" -make install -popd -rm -rf libffi* diff --git a/build-scripts/manylinux-container-image/install_libssh.sh b/build-scripts/manylinux-container-image/install_libssh.sh index f323c9e2e..071650d7d 100755 --- a/build-scripts/manylinux-container-image/install_libssh.sh +++ b/build-scripts/manylinux-container-image/install_libssh.sh @@ -81,9 +81,6 @@ git clone \ https://git.libssh.org/projects/${LIB_NAME}.git \ "${LIB_CLONE_DIR}" -source activate-userspace-tools.sh -import_userspace_tools - mkdir -pv "${LIB_BUILD_DIR}" pushd "${LIB_BUILD_DIR}" # For some reason, libssh has to be compiled as a shared object. diff --git a/build-scripts/manylinux-container-image/install_zlib.sh b/build-scripts/manylinux-container-image/install_zlib.sh deleted file mode 100755 index 663cc737a..000000000 --- a/build-scripts/manylinux-container-image/install_zlib.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -xe - -unset RELEASE - -# Get script directory -MY_DIR=$(dirname "${BASH_SOURCE[0]}") - -# Get build utilities -source $MY_DIR/build_utils.sh -source get-static-deps-dir.sh - -ZLIB_SHA256="91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9" -ZLIB_VERSION="1.2.12" - -fetch_source "zlib-${ZLIB_VERSION}.tar.gz" "https://www.zlib.net" -check_sha256sum "zlib-${ZLIB_VERSION}.tar.gz" ${ZLIB_SHA256} -tar zxf "zlib-${ZLIB_VERSION}.tar.gz" - -pushd "zlib-${ZLIB_VERSION}" -export CFLAGS="-fPIC" -STATIC_DEPS_PREFIX="$(get_static_deps_dir)" -./configure --static --prefix="${STATIC_DEPS_PREFIX}" -make -j libz.a -make install -popd -rm -rf "zlib-${ZLIB_VERSION}"