From 969f456ae063e70310ef1859800a201334d78647 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sun, 27 Jun 2021 19:59:12 +0200 Subject: [PATCH 1/5] Update CMake to 3.20.5 and git to 2.32.0, update install-cmake-binary.sh script Update CMake to 3.20.5 and git to 2.32.0, update install-cmake-binary.sh script Signed-off-by: Bensuperpc --- common.docker | 4 ++-- imagefiles/install-cmake-binary.sh | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/common.docker b/common.docker index 62a36c6..fe03864 100644 --- a/common.docker +++ b/common.docker @@ -1,7 +1,7 @@ WORKDIR /usr/src -ARG GIT_VERSION=2.31.1 -ARG CMAKE_VERSION=3.17.1 +ARG GIT_VERSION=2.32.0 +ARG CMAKE_VERSION=3.20.5 # Image build scripts COPY \ diff --git a/imagefiles/install-cmake-binary.sh b/imagefiles/install-cmake-binary.sh index 9c34087..1cc5304 100755 --- a/imagefiles/install-cmake-binary.sh +++ b/imagefiles/install-cmake-binary.sh @@ -35,11 +35,26 @@ fi cd /usr/src -CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH} -url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz +#Switch to newer version of CMake +#USER=dockbuild #Original user, change it when changed it when there will be a new update of CMake (3.17.1 on June 27, 2021) + +USER=bensuperpc + +OS=Centos7 + +CMAKE_ROOT=cmake-${CMAKE_VERSION}-${OS}-${ARCH} +url=https://github.com/${USER}/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz +url_checksum=https://github.com/${USER}/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz.sha256 + echo "Downloading $url" curl -# -LO $url +echo "Downloading $url_checksum" +curl -# -LO $url_checksum + +#Checksum package +sha256sum -c ${CMAKE_ROOT}.tar.gz.sha256 + tar -xzvf ${CMAKE_ROOT}.tar.gz rm -f ${CMAKE_ROOT}.tar.gz From 479f1c5d6fc793e3467cac907b1424ac19a87f40 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 30 Jun 2021 09:07:19 +0200 Subject: [PATCH 2/5] Add cmake to build from source Add cmake to build from source Signed-off-by: Bensuperpc --- common.docker | 2 +- imagefiles/build-and-install-cmake.sh | 8 +++++--- imagefiles/build-and-install-curl.sh | 2 +- imagefiles/build-and-install-git.sh | 2 +- imagefiles/build-and-install-openssl.sh | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/common.docker b/common.docker index fe03864..be7c39c 100644 --- a/common.docker +++ b/common.docker @@ -23,7 +23,7 @@ RUN \ /buildscripts/build-and-install-openssh.sh && \ /buildscripts/build-and-install-curl.sh && \ /buildscripts/build-and-install-git.sh && \ - /buildscripts/install-cmake-binary.sh $X86_FLAG && \ + /buildscripts/build-and-install-cmake.sh $X86_FLAG && \ /buildscripts/install-liquidprompt-binary.sh && \ PYTHON=$([ -e /opt/python/cp38-cp38/bin/python ] && echo "/opt/python/cp38-cp38/bin/python" || echo "python3") && \ /buildscripts/install-python-packages.sh -python ${PYTHON} && \ diff --git a/imagefiles/build-and-install-cmake.sh b/imagefiles/build-and-install-cmake.sh index 2862710..adb4e7a 100755 --- a/imagefiles/build-and-install-cmake.sh +++ b/imagefiles/build-and-install-cmake.sh @@ -35,8 +35,10 @@ mkdir /usr/src/CMake-build cd /usr/src/CMake-build ${WRAPPER} /usr/src/CMake/bootstrap \ - --parallel=$(grep -c processor /proc/cpuinfo) -${WRAPPER} make -j$(grep -c processor /proc/cpuinfo) + --parallel=$(nproc) \ + -- -DCMAKE_USE_OPENSSL=OFF +${WRAPPER} make -j$(nproc) + mkdir /usr/src/CMake-ssl-build cd /usr/src/CMake-ssl-build @@ -48,7 +50,7 @@ ${WRAPPER} /usr/src/CMake-build/bin/cmake \ -DCMAKE_USE_OPENSSL:BOOL=ON \ -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl \ ../CMake -${WRAPPER} make -j$(grep -c processor /proc/cpuinfo) install +${WRAPPER} make -j$(nproc) install # Cleanup install tree cd /usr/src/cmake-$CMAKE_VERSION diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index cd0393d..bb347ad 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -18,7 +18,7 @@ function do_curl_build { # We do this shared to avoid obnoxious linker issues where git couldn't # link properly. If anyone wants to make this build statically go for it. LIBS=-ldl CFLAGS=-Wl,--exclude-libs,ALL ./configure --with-ssl --disable-static > /dev/null - make > /dev/null + make -j$(nproc) > /dev/null make install > /dev/null } diff --git a/imagefiles/build-and-install-git.sh b/imagefiles/build-and-install-git.sh index 0338857..9d1f249 100755 --- a/imagefiles/build-and-install-git.sh +++ b/imagefiles/build-and-install-git.sh @@ -32,7 +32,7 @@ rm -f git-${GIT_VERSION}.tar.gz pushd git-${GIT_VERSION} ./configure --prefix=/usr/local --with-curl -make +make -j$(nproc) make install popd diff --git a/imagefiles/build-and-install-openssl.sh b/imagefiles/build-and-install-openssl.sh index d0ff582..19a6610 100755 --- a/imagefiles/build-and-install-openssl.sh +++ b/imagefiles/build-and-install-openssl.sh @@ -59,7 +59,7 @@ PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 function do_perl_build { ${WRAPPER} sh Configure -des -Dprefix=/opt/perl > /dev/null - ${WRAPPER} make > /dev/null + ${WRAPPER} make -j$(nproc) > /dev/null ${WRAPPER} make install > /dev/null } @@ -78,7 +78,7 @@ function build_perl { function do_openssl_build { ${WRAPPER} ./config no-shared -fPIC $CONFIG_FLAG --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null - ${WRAPPER} make > /dev/null + ${WRAPPER} make -j$(nproc) > /dev/null ${WRAPPER} make install_sw > /dev/null } From ce521deaebff3f025f8f689e7721dba17da7b637 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 30 Jun 2021 09:07:32 +0200 Subject: [PATCH 3/5] Revert "Update CMake to 3.20.5 and git to 2.32.0, update install-cmake-binary.sh script" This reverts commit 969f456ae063e70310ef1859800a201334d78647. --- common.docker | 4 ++-- imagefiles/install-cmake-binary.sh | 19 ++----------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/common.docker b/common.docker index be7c39c..f453d2d 100644 --- a/common.docker +++ b/common.docker @@ -1,7 +1,7 @@ WORKDIR /usr/src -ARG GIT_VERSION=2.32.0 -ARG CMAKE_VERSION=3.20.5 +ARG GIT_VERSION=2.31.1 +ARG CMAKE_VERSION=3.17.1 # Image build scripts COPY \ diff --git a/imagefiles/install-cmake-binary.sh b/imagefiles/install-cmake-binary.sh index 1cc5304..9c34087 100755 --- a/imagefiles/install-cmake-binary.sh +++ b/imagefiles/install-cmake-binary.sh @@ -35,26 +35,11 @@ fi cd /usr/src -#Switch to newer version of CMake -#USER=dockbuild #Original user, change it when changed it when there will be a new update of CMake (3.17.1 on June 27, 2021) - -USER=bensuperpc - -OS=Centos7 - -CMAKE_ROOT=cmake-${CMAKE_VERSION}-${OS}-${ARCH} -url=https://github.com/${USER}/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz -url_checksum=https://github.com/${USER}/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz.sha256 - +CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH} +url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz echo "Downloading $url" curl -# -LO $url -echo "Downloading $url_checksum" -curl -# -LO $url_checksum - -#Checksum package -sha256sum -c ${CMAKE_ROOT}.tar.gz.sha256 - tar -xzvf ${CMAKE_ROOT}.tar.gz rm -f ${CMAKE_ROOT}.tar.gz From 076faf7ede67037ca240ab55ce470c631410994d Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 30 Jun 2021 09:08:40 +0200 Subject: [PATCH 4/5] Update CMake to 3.20.5 and git to 2.32.0 Update CMake to 3.20.5 and git to 2.32.0 Signed-off-by: Bensuperpc --- common.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.docker b/common.docker index f453d2d..be7c39c 100644 --- a/common.docker +++ b/common.docker @@ -1,7 +1,7 @@ WORKDIR /usr/src -ARG GIT_VERSION=2.31.1 -ARG CMAKE_VERSION=3.17.1 +ARG GIT_VERSION=2.32.0 +ARG CMAKE_VERSION=3.20.5 # Image build scripts COPY \ From eb0c4d8d95ee8ea8fff22e0e7c8429a591821c34 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 30 Jun 2021 15:07:13 +0200 Subject: [PATCH 5/5] Fix CMake error on manylinux1 Fix CMake error on manylinux1 Signed-off-by: Bensuperpc --- common.docker | 2 +- manylinux1-x64/Dockerfile.in | 1 + manylinux1-x86/Dockerfile.in | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common.docker b/common.docker index be7c39c..7ef8a72 100644 --- a/common.docker +++ b/common.docker @@ -23,7 +23,7 @@ RUN \ /buildscripts/build-and-install-openssh.sh && \ /buildscripts/build-and-install-curl.sh && \ /buildscripts/build-and-install-git.sh && \ - /buildscripts/build-and-install-cmake.sh $X86_FLAG && \ + if [ "$CMAKE_BIN" = "true" ]; then CMAKE_VERSION=3.17.1 && /buildscripts/install-cmake-binary.sh $X86_FLAG;else /buildscripts/build-and-install-cmake.sh $X86_FLAG;fi && \ /buildscripts/install-liquidprompt-binary.sh && \ PYTHON=$([ -e /opt/python/cp38-cp38/bin/python ] && echo "/opt/python/cp38-cp38/bin/python" || echo "python3") && \ /buildscripts/install-python-packages.sh -python ${PYTHON} && \ diff --git a/manylinux1-x64/Dockerfile.in b/manylinux1-x64/Dockerfile.in index 4a1f7ea..8d57eb4 100644 --- a/manylinux1-x64/Dockerfile.in +++ b/manylinux1-x64/Dockerfile.in @@ -2,6 +2,7 @@ FROM quay.io/pypa/manylinux1_x86_64:latest MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux1-x64 +ENV CMAKE_BIN true #include "common.manylinux" diff --git a/manylinux1-x86/Dockerfile.in b/manylinux1-x86/Dockerfile.in index 98eacc2..3ba63be 100644 --- a/manylinux1-x86/Dockerfile.in +++ b/manylinux1-x86/Dockerfile.in @@ -2,6 +2,7 @@ FROM quay.io/pypa/manylinux1_i686:latest MAINTAINER Matt McCormick "matt.mccormick@kitware.com" ENV DEFAULT_DOCKCROSS_IMAGE dockcross/manylinux1-x86 +ENV CMAKE_BIN true #include "common.manylinux"