From 83e9afff982e1f191e29cd6549fab29f093ecf03 Mon Sep 17 00:00:00 2001 From: Panos Date: Thu, 11 Nov 2021 00:20:00 +0000 Subject: [PATCH 01/11] Added aarch64 (ARM) wheel builds. Updated CI cfg. --- .circleci/config.yml | 13 +++++++-- ci/build-manylinux.sh | 8 +++++- ci/docker/manylinux/Dockerfile.2014_x86_64 | 33 ++++++++++++++++++++++ ci/docker/manylinux/Dockerfile.aarch64 | 33 ++++++++++++++++++++++ 4 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 ci/docker/manylinux/Dockerfile.2014_x86_64 create mode 100644 ci/docker/manylinux/Dockerfile.aarch64 diff --git a/.circleci/config.yml b/.circleci/config.yml index c9173950..a929338b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,10 +72,10 @@ jobs: command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/* - manylinux: + manylinux-x86_64: machine: image: ubuntu-1604:201903-01 - steps: + steps: &manylinux-steps - checkout - run: name: sdist @@ -112,6 +112,12 @@ jobs: command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* + manylinux2014-aarch64: + machine: + image: ubuntu-2004:202101-01 + resource_class: arm.medium + steps: *manylinux-steps + workflows: version: 2.1 main: @@ -126,13 +132,14 @@ workflows: filters: tags: ignore: /.*/ - - manylinux: + - manylinux-x86_64: &manylinux-wf context: Docker filters: tags: only: /.*/ branches: ignore: /.*/ + - manylinux2014-aarch64: *manylinux-wf - osx: matrix: parameters: diff --git a/ci/build-manylinux.sh b/ci/build-manylinux.sh index ef2a36cf..e8154cd5 100755 --- a/ci/build-manylinux.sh +++ b/ci/build-manylinux.sh @@ -1,12 +1,18 @@ #!/bin/bash -xe docker_tag="parallelssh/ssh-manylinux" +docker_file="ci/docker/manylinux/Dockerfile" rm -rf local build ssh/libssh.* ssh/*.so python ci/appveyor/fix_version.py . +if [[ `uname -m` == "aarch64" ]]; then + docker_tag=${docker_tag}-aarch64 + docker_file=${docker_file}.aarch64 +fi + docker pull $docker_tag || echo -docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag +docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file} if [[ -z "$CIRCLE_PR_NUMBER" ]]; then docker push $docker_tag; fi docker run --rm -v `pwd`:/io $docker_tag /io/ci/build-wheels.sh ls wheelhouse/ diff --git a/ci/docker/manylinux/Dockerfile.2014_x86_64 b/ci/docker/manylinux/Dockerfile.2014_x86_64 new file mode 100644 index 00000000..b9f09dea --- /dev/null +++ b/ci/docker/manylinux/Dockerfile.2014_x86_64 @@ -0,0 +1,33 @@ +FROM quay.io/pypa/manylinux2014_x86_64 + +ENV OPENSSL openssl-1.1.1g +ENV LIBSSH 0.9.5 +ENV SYSTEM_LIBSSH 1 + +RUN yum install zlib-devel cmake3 -y + +ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz +ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz +ADD krb5-1.18.2.tar.xz krb5-1.18.2.tar.xz + +RUN tar -xzf ${OPENSSL}.tar.gz +# Openssl +RUN cd ${OPENSSL} && \ + ./config --prefix=/usr --openssldir=/usr/openssl threads shared && \ + make -j6 && make install + +# Kerberos +RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ + ./configure && \ + make -j6 && \ + make install + +# Libssh +RUN mkdir -p build_libssh && cd build_libssh && \ + cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \ + -DWITH_GSS_API=ON && \ + make -j6 install + +RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-1.18.2.tar.xz + +VOLUME /var/cache diff --git a/ci/docker/manylinux/Dockerfile.aarch64 b/ci/docker/manylinux/Dockerfile.aarch64 new file mode 100644 index 00000000..72bbfe8d --- /dev/null +++ b/ci/docker/manylinux/Dockerfile.aarch64 @@ -0,0 +1,33 @@ +FROM quay.io/pypa/manylinux2014_aarch64 + +ENV OPENSSL openssl-1.1.1g +ENV LIBSSH 0.9.5 +ENV SYSTEM_LIBSSH 1 + +RUN yum install zlib-devel cmake3 -y + +ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz +ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz +ADD krb5-1.18.2.tar.xz krb5-1.18.2.tar.xz + +RUN tar -xzf ${OPENSSL}.tar.gz +# Openssl +RUN cd ${OPENSSL} && \ + ./config --prefix=/usr --openssldir=/usr/openssl threads shared && \ + make -j6 && make install + +# Kerberos +RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ + ./configure && \ + make -j6 && \ + make install + +# Libssh +RUN mkdir -p build_libssh && cd build_libssh && \ + cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \ + -DWITH_GSS_API=ON && \ + make -j6 install + +RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-1.18.2.tar.xz + +VOLUME /var/cache From 5c0e646d2d5b79e27273b126e74c677d31d6bc4e Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 14 Nov 2021 22:28:18 +0000 Subject: [PATCH 02/11] Updated CI cfg --- .circleci/config.yml | 10 +++++----- ci/build-manylinux.sh | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a929338b..91e04a1d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,11 +134,11 @@ workflows: ignore: /.*/ - manylinux-x86_64: &manylinux-wf context: Docker - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ +# filters: +# tags: +# only: /.*/ +# branches: +# ignore: /.*/ - manylinux2014-aarch64: *manylinux-wf - osx: matrix: diff --git a/ci/build-manylinux.sh b/ci/build-manylinux.sh index e8154cd5..ae000245 100755 --- a/ci/build-manylinux.sh +++ b/ci/build-manylinux.sh @@ -1,18 +1,23 @@ #!/bin/bash -xe docker_tag="parallelssh/ssh-manylinux" -docker_file="ci/docker/manylinux/Dockerfile" +docker_files=("ci/docker/manylinux/Dockerfile" "ci/docker/manylinux/Dockerfile.2014_x86_64") rm -rf local build ssh/libssh.* ssh/*.so python ci/appveyor/fix_version.py . if [[ `uname -m` == "aarch64" ]]; then - docker_tag=${docker_tag}-aarch64 - docker_file=${docker_file}.aarch64 + docker_tag=${docker_tag}:aarch64 + docker_files=("ci/docker/manylinux/Dockerfile.aarch64") fi -docker pull $docker_tag || echo -docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file} -if [[ -z "$CIRCLE_PR_NUMBER" ]]; then docker push $docker_tag; fi -docker run --rm -v `pwd`:/io $docker_tag /io/ci/build-wheels.sh -ls wheelhouse/ +for docker_file in ${docker_files[@]}; do + if [[ ${docker_file} == "ci/docker/manylinux/Dockerfile_2014_x86_64" ]]; then + docker_tag = "${docker_tag}:2014_x86_64" + fi + docker pull $docker_tag || echo + docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file} + if [[ -z "$CIRCLE_PR_NUMBER" ]]; then docker push $docker_tag; fi + docker run --rm -v `pwd`:/io $docker_tag /io/ci/build-wheels.sh + ls wheelhouse/ +done From d32b501f5e102da5103471746f6028bfb57b916b Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 21 Nov 2021 21:08:49 +0000 Subject: [PATCH 03/11] Updated CI cfg --- .appveyor.yml | 2 +- .circleci/config.yml | 15 +++++++++------ ci/osx-wheel.sh | 2 +- ci/pyenv-wheel.sh | 45 -------------------------------------------- 4 files changed, 11 insertions(+), 53 deletions(-) delete mode 100755 ci/pyenv-wheel.sh diff --git a/.appveyor.yml b/.appveyor.yml index fc77fc68..e9603517 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,7 +17,7 @@ environment: PYTHON_DEF: "C:\\Python38-x64" PYTHON_VERSION: "3.8" # Python versions to build wheels for - PYTHONVERS: C:\Python36-x64 C:\Python37-x64 C:\Python38-x64 C:\Python39-x64 + PYTHONVERS: C:\Python36-x64 C:\Python37-x64 C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 PYTHON_ARCH: "64" install: diff --git a/.circleci/config.yml b/.circleci/config.yml index 91e04a1d..306c8f29 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,7 +93,7 @@ jobs: - run: name: Deps command: | - sudo apt-get install python-pip + sudo apt-get install python3-pip pip install -U pip pip install twine which twine @@ -144,11 +144,14 @@ workflows: matrix: parameters: xcode_ver: + - "13.1.0" + - "13.0.0" + - "12.5.1" - "11.6.0" - "11.1.0" context: Docker - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ +# filters: +# tags: +# only: /.*/ +# branches: +# ignore: /.*/ diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 537754e4..1135c2cf 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -20,7 +20,7 @@ ls -l wheels/*.whl rm -f /usr/local/lib/libssh* pip3 install -v wheels/*.whl pwd; mkdir -p temp; cd temp; pwd -python3 -c "from ssh.session import Session; Session()" && echo "Import successfull" +python3 -c "from ssh.session import Session; Session()" && echo "Import successful" cd ..; pwd set +x deactivate diff --git a/ci/pyenv-wheel.sh b/ci/pyenv-wheel.sh deleted file mode 100755 index 47ba5024..00000000 --- a/ci/pyenv-wheel.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -xe - -brew install pyenv || brew outdated pyenv || brew upgrade pyenv -pyenv install --list - -export PYENV_VERSION=${PYENV:-3.6.4} -if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then - pyenv install $PYENV_VERSION -fi -pyenv global $PYENV_VERSION -pyenv versions - -set +x -eval "$(pyenv init -)" -set -x - -which python -python -m pip install -U virtualenv -python -m virtualenv -p "$(which python)" venv - -set +x -source venv/bin/activate -set -x - -python -V -python -m pip install -U setuptools pip -pip install -U delocate wheel -pip wheel . -cp /usr/local/lib/libssh* . -delocate-listdeps --all *.whl -delocate-wheel -v *.whl -delocate-listdeps --all *.whl - -ls -l *.whl -rm -f *.dylib -pip install -v *.whl -pwd; mkdir -p temp; cd temp; pwd -python -c "from ssh.session import Session; Session()" && echo "Import successfull" -cd ..; pwd -set +x -deactivate -set -x - -mv -f *.whl wheels/ -ls -lh wheels From 38119977db61c3b8544d7d1b009724029ac7b985 Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 21 Nov 2021 21:12:45 +0000 Subject: [PATCH 04/11] Updated CI cfg --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 306c8f29..5d6ccea4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,8 +94,8 @@ jobs: name: Deps command: | sudo apt-get install python3-pip - pip install -U pip - pip install twine + pip3 install -U pip + pip3 install twine which twine - python/save-cache: key: manylinuxdepsv6-{{ .Branch }}.{{ arch }} From dd5ff8386b34bf232e52dc5b769c79270f308391 Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 21 Nov 2021 21:18:14 +0000 Subject: [PATCH 05/11] Updated CI cfg --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d6ccea4..19433cee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,8 +94,9 @@ jobs: name: Deps command: | sudo apt-get install python3-pip - pip3 install -U pip - pip3 install twine + pyenv global 3.7.0 + pip install -U pip + pip install twine which twine - python/save-cache: key: manylinuxdepsv6-{{ .Branch }}.{{ arch }} From 927ceeeb673f5393a8e6e42470e436afdccd74e6 Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 21 Nov 2021 21:30:48 +0000 Subject: [PATCH 06/11] Updated CI cfg --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 19433cee..b79c882c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,7 +94,7 @@ jobs: name: Deps command: | sudo apt-get install python3-pip - pyenv global 3.7.0 + pyenv global 3.7.0 || pyenv global 3.9.1 pip install -U pip pip install twine which twine @@ -151,8 +151,8 @@ workflows: - "11.6.0" - "11.1.0" context: Docker -# filters: -# tags: -# only: /.*/ -# branches: -# ignore: /.*/ + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ From 1a07f717bbffe33044ba6d1b3235489ea5c1fb6d Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 20 Mar 2022 14:11:18 +0000 Subject: [PATCH 07/11] WIP --- .appveyor.yml | 15 +++++++++++++++ .circleci/config.yml | 15 +++++++++++++++ _setup_libssh.py | 15 +++++++++++++++ ci/build-manylinux.sh | 24 ++++++++++++++++++++---- ci/build-wheels.sh | 20 ++++++++++++++++++-- ci/build_ssh.sh | 16 ++++++++++++++++ ci/osx-wheel.sh | 16 ++++++++++++++++ setup.py | 2 +- 8 files changed, 116 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e9603517..9f689410 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,18 @@ +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA max_jobs: 5 build: parallel: true diff --git a/.circleci/config.yml b/.circleci/config.yml index b79c882c..01b8a23f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,18 @@ +# This file is part of ssh-python. +# Copyright (C) 2017-2021 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA version: 2.1 orbs: diff --git a/_setup_libssh.py b/_setup_libssh.py index e1224146..1f96fa16 100644 --- a/_setup_libssh.py +++ b/_setup_libssh.py @@ -1,3 +1,18 @@ +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA import os from sys import stderr diff --git a/ci/build-manylinux.sh b/ci/build-manylinux.sh index ae000245..96ad39fd 100755 --- a/ci/build-manylinux.sh +++ b/ci/build-manylinux.sh @@ -1,4 +1,20 @@ #!/bin/bash -xe +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + docker_tag="parallelssh/ssh-manylinux" docker_files=("ci/docker/manylinux/Dockerfile" "ci/docker/manylinux/Dockerfile.2014_x86_64") @@ -11,13 +27,13 @@ if [[ `uname -m` == "aarch64" ]]; then docker_files=("ci/docker/manylinux/Dockerfile.aarch64") fi -for docker_file in ${docker_files[@]}; do +for docker_file in "${docker_files[@]}"; do if [[ ${docker_file} == "ci/docker/manylinux/Dockerfile_2014_x86_64" ]]; then - docker_tag = "${docker_tag}:2014_x86_64" + docker_tag="${docker_tag}:2014_x86_64" fi docker pull $docker_tag || echo docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file} - if [[ -z "$CIRCLE_PR_NUMBER" ]]; then docker push $docker_tag; fi - docker run --rm -v `pwd`:/io $docker_tag /io/ci/build-wheels.sh + if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then docker push $docker_tag; fi + docker run --rm -v "$(pwd)":/io $docker_tag /io/ci/build-wheels.sh ls wheelhouse/ done diff --git a/ci/build-wheels.sh b/ci/build-wheels.sh index 304ca7af..8df11faf 100755 --- a/ci/build-wheels.sh +++ b/ci/build-wheels.sh @@ -1,8 +1,24 @@ #!/bin/bash -xe +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + # Compile wheels rm -rf /io/build -for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do +for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do "${PYBIN}/pip" wheel /io/ -w wheelhouse/ done @@ -12,7 +28,7 @@ for whl in wheelhouse/*.whl; do done # Install packages and test -for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do +for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do "${PYBIN}/pip" install ssh-python --no-index -f /io/wheelhouse (cd "$HOME"; "${PYBIN}/python" -c 'from ssh.session import Session; Session()') done diff --git a/ci/build_ssh.sh b/ci/build_ssh.sh index e636dbbf..533f498e 100755 --- a/ci/build_ssh.sh +++ b/ci/build_ssh.sh @@ -1,4 +1,20 @@ #!/bin/bash -xe +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + if [ -d /usr/local/opt/openssl ]; then export OPENSSL_ROOT_DIR=/usr/local/opt/openssl diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 1135c2cf..e525ba0d 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -1,4 +1,20 @@ #!/bin/bash -xe +# This file is part of ssh-python. +# Copyright (C) 2017-2022 Panos Kittenis and contributors. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation, version 2.1. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + pip3 install -U virtualenv python3 -m virtualenv -p "$(which python3)" venv diff --git a/setup.py b/setup.py index c6059a92..fde24df0 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ runtime_library_dirs = ["$ORIGIN/."] if not SYSTEM_LIBSSH else None _lib_dir = os.path.abspath("./local/lib") if not SYSTEM_LIBSSH else "/usr/local/lib" -include_dirs = ["./local/include"] if (ON_WINDOWS or ON_RTD) or \ +include_dirs = ["./local/include", "./libssh/include"] if (ON_WINDOWS or ON_RTD) or \ not SYSTEM_LIBSSH else ["/usr/local/include"] extensions = [ From 84c02bf9c5bd95c7d4e7068b5c6db0ea75a94c8d Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 20 Mar 2022 14:18:01 +0000 Subject: [PATCH 08/11] Updated dockerfiles --- ci/docker/manylinux/Dockerfile | 3 ++- ci/docker/manylinux/Dockerfile.2014_x86_64 | 6 ++++-- ci/docker/manylinux/Dockerfile.aarch64 | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ci/docker/manylinux/Dockerfile b/ci/docker/manylinux/Dockerfile index f3fc5cc7..63488528 100644 --- a/ci/docker/manylinux/Dockerfile +++ b/ci/docker/manylinux/Dockerfile @@ -2,6 +2,7 @@ FROM quay.io/pypa/manylinux2010_x86_64 ENV OPENSSL openssl-1.1.1g ENV LIBSSH 0.9.6 +ENV KRB 1.18.4 ENV SYSTEM_LIBSSH 1 ENV CFLAGS "-g0 -s" @@ -9,7 +10,7 @@ RUN yum install zlib-devel cmake3 -y ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz -ADD krb5-1.18.4.tar.xz krb5-1.18.4.tar.xz +ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz RUN tar -xzf ${OPENSSL}.tar.gz # Openssl diff --git a/ci/docker/manylinux/Dockerfile.2014_x86_64 b/ci/docker/manylinux/Dockerfile.2014_x86_64 index b9f09dea..e38ec7a2 100644 --- a/ci/docker/manylinux/Dockerfile.2014_x86_64 +++ b/ci/docker/manylinux/Dockerfile.2014_x86_64 @@ -1,14 +1,16 @@ FROM quay.io/pypa/manylinux2014_x86_64 ENV OPENSSL openssl-1.1.1g -ENV LIBSSH 0.9.5 +ENV LIBSSH 0.9.6 +ENV KRB 1.18.4 ENV SYSTEM_LIBSSH 1 +ENV CFLAGS "-g0 -s" RUN yum install zlib-devel cmake3 -y ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz -ADD krb5-1.18.2.tar.xz krb5-1.18.2.tar.xz +ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz RUN tar -xzf ${OPENSSL}.tar.gz # Openssl diff --git a/ci/docker/manylinux/Dockerfile.aarch64 b/ci/docker/manylinux/Dockerfile.aarch64 index 72bbfe8d..e6dafd7d 100644 --- a/ci/docker/manylinux/Dockerfile.aarch64 +++ b/ci/docker/manylinux/Dockerfile.aarch64 @@ -1,14 +1,17 @@ FROM quay.io/pypa/manylinux2014_aarch64 ENV OPENSSL openssl-1.1.1g -ENV LIBSSH 0.9.5 +ENV LIBSSH 0.9.6 +ENV KRB 1.18.4 ENV SYSTEM_LIBSSH 1 +ENV CFLAGS "-g0 -s" +RUN yum install epel-release -y RUN yum install zlib-devel cmake3 -y ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz -ADD krb5-1.18.2.tar.xz krb5-1.18.2.tar.xz +ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz RUN tar -xzf ${OPENSSL}.tar.gz # Openssl From 6264419936a815834d48a591a90a0e42f4eb5ecb Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 20 Mar 2022 15:02:10 +0000 Subject: [PATCH 09/11] Updated dockerfiles --- ci/docker/manylinux/Dockerfile | 4 ++-- ci/docker/manylinux/Dockerfile.2014_x86_64 | 8 ++++---- ci/docker/manylinux/Dockerfile.aarch64 | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/docker/manylinux/Dockerfile b/ci/docker/manylinux/Dockerfile index 63488528..2471acf4 100644 --- a/ci/docker/manylinux/Dockerfile +++ b/ci/docker/manylinux/Dockerfile @@ -19,7 +19,7 @@ RUN cd ${OPENSSL} && \ make -j6 && make install_sw # Kerberos -RUN cd krb5-1.18.4.tar.xz/krb5-1.18.4/src && \ +RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \ ./configure && \ make -j6 && \ make install @@ -30,6 +30,6 @@ RUN mkdir -p build_libssh && cd build_libssh && \ -DWITH_GSS_API=ON && \ make -j6 install/strip -RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-1.18.4.tar.xz +RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-${KRB}.tar.xz VOLUME /var/cache diff --git a/ci/docker/manylinux/Dockerfile.2014_x86_64 b/ci/docker/manylinux/Dockerfile.2014_x86_64 index e38ec7a2..d3243755 100644 --- a/ci/docker/manylinux/Dockerfile.2014_x86_64 +++ b/ci/docker/manylinux/Dockerfile.2014_x86_64 @@ -16,10 +16,10 @@ RUN tar -xzf ${OPENSSL}.tar.gz # Openssl RUN cd ${OPENSSL} && \ ./config --prefix=/usr --openssldir=/usr/openssl threads shared && \ - make -j6 && make install + make -j6 && make install_sw # Kerberos -RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ +RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \ ./configure && \ make -j6 && \ make install @@ -28,8 +28,8 @@ RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ RUN mkdir -p build_libssh && cd build_libssh && \ cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \ -DWITH_GSS_API=ON && \ - make -j6 install + make -j6 install/strip -RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-1.18.2.tar.xz +RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-${KRB}.tar.xz VOLUME /var/cache diff --git a/ci/docker/manylinux/Dockerfile.aarch64 b/ci/docker/manylinux/Dockerfile.aarch64 index e6dafd7d..735e7874 100644 --- a/ci/docker/manylinux/Dockerfile.aarch64 +++ b/ci/docker/manylinux/Dockerfile.aarch64 @@ -17,10 +17,10 @@ RUN tar -xzf ${OPENSSL}.tar.gz # Openssl RUN cd ${OPENSSL} && \ ./config --prefix=/usr --openssldir=/usr/openssl threads shared && \ - make -j6 && make install + make -j6 && make install_sw # Kerberos -RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ +RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \ ./configure && \ make -j6 && \ make install @@ -29,8 +29,8 @@ RUN cd krb5-1.18.2.tar.xz/krb5-1.18.2/src && \ RUN mkdir -p build_libssh && cd build_libssh && \ cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \ -DWITH_GSS_API=ON && \ - make -j6 install + make -j6 install/strip -RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-1.18.2.tar.xz +RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-${KRB}.tar.xz VOLUME /var/cache From c6f9ad9aca2f0f56b2c7c213487e5a99fa5a6c68 Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 20 Mar 2022 15:14:55 +0000 Subject: [PATCH 10/11] WIP --- .circleci/config.yml | 10 +++++----- ci/build-manylinux.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01b8a23f..4c113dbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,8 +166,8 @@ workflows: - "11.6.0" - "11.1.0" context: Docker - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ +# filters: +# tags: +# only: /.*/ +# branches: +# ignore: /.*/ diff --git a/ci/build-manylinux.sh b/ci/build-manylinux.sh index 96ad39fd..8b04b342 100755 --- a/ci/build-manylinux.sh +++ b/ci/build-manylinux.sh @@ -22,7 +22,7 @@ docker_files=("ci/docker/manylinux/Dockerfile" "ci/docker/manylinux/Dockerfile.2 rm -rf local build ssh/libssh.* ssh/*.so python ci/appveyor/fix_version.py . -if [[ `uname -m` == "aarch64" ]]; then +if [[ $(uname -m) == "aarch64" ]]; then docker_tag=${docker_tag}:aarch64 docker_files=("ci/docker/manylinux/Dockerfile.aarch64") fi From a9ad0ea2cea2b986024cad62c90488e11ab711a1 Mon Sep 17 00:00:00 2001 From: Panos Date: Sun, 20 Mar 2022 15:25:06 +0000 Subject: [PATCH 11/11] Updated OSX targets --- .circleci/config.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c113dbc..8dee7b07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,11 +150,11 @@ workflows: ignore: /.*/ - manylinux-x86_64: &manylinux-wf context: Docker -# filters: -# tags: -# only: /.*/ -# branches: -# ignore: /.*/ + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ - manylinux2014-aarch64: *manylinux-wf - osx: matrix: @@ -163,11 +163,9 @@ workflows: - "13.1.0" - "13.0.0" - "12.5.1" - - "11.6.0" - - "11.1.0" context: Docker -# filters: -# tags: -# only: /.*/ -# branches: -# ignore: /.*/ + filters: + tags: + only: /.*/ + branches: + ignore: /.*/