mirror of
				https://github.com/bensuperpc/dockcross.git
				synced 2025-10-30 23:56:23 +01:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
			update-lin
			...
			add_shellc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8a765dd273 | |||
| 317b741420 | |||
| 4d2bf9be44 | |||
| 347749e2ba | |||
| fd27bd07cf | |||
| 8769b048bf | |||
| e5fee6a82f | |||
| 97482d0814 | 
							
								
								
									
										12
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @@ -18,7 +18,17 @@ jobs: | |||||||
|     name: base |     name: base | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v2 |       - name: "Checkout Code" | ||||||
|  |         uses: actions/checkout@v2.3.4 | ||||||
|  |         with: | ||||||
|  |           submodules: 'recursive' | ||||||
|  |           fetch-depth: 0 | ||||||
|  |       - name: Run ShellCheck | ||||||
|  |         uses: ludeeus/action-shellcheck@master | ||||||
|  |         with: | ||||||
|  |           severity: error | ||||||
|  |         env: | ||||||
|  |           SHELLCHECK_OPTS: -s bash | ||||||
|       - name: build |       - name: build | ||||||
|         run: make base |         run: make base | ||||||
|       - name: test |       - name: test | ||||||
|   | |||||||
| @@ -29,31 +29,31 @@ fi | |||||||
|  |  | ||||||
| cd /usr/src | cd /usr/src | ||||||
|  |  | ||||||
| git clone https://gitlab.kitware.com/cmake/cmake.git CMake -b v$CMAKE_VERSION --depth 1 | git clone https://gitlab.kitware.com/cmake/cmake.git CMake -b "v$CMAKE_VERSION" --depth 1 | ||||||
|  |  | ||||||
| mkdir /usr/src/CMake-build | mkdir /usr/src/CMake-build | ||||||
| cd /usr/src/CMake-build | cd /usr/src/CMake-build | ||||||
|  |  | ||||||
| ${WRAPPER} /usr/src/CMake/bootstrap \ | "${WRAPPER}" /usr/src/CMake/bootstrap \ | ||||||
|   --parallel=$(nproc) \ |   --parallel="$(nproc)" \ | ||||||
|   -- -DCMAKE_USE_OPENSSL=OFF |   -- -DCMAKE_USE_OPENSSL=OFF | ||||||
| ${WRAPPER} make -j$(nproc) | "${WRAPPER}" make -j"$(nproc)" | ||||||
|  |  | ||||||
|  |  | ||||||
| mkdir /usr/src/CMake-ssl-build | mkdir /usr/src/CMake-ssl-build | ||||||
| cd /usr/src/CMake-ssl-build | cd /usr/src/CMake-ssl-build | ||||||
|  |  | ||||||
| ${WRAPPER} /usr/src/CMake-build/bin/cmake \ | "${WRAPPER}" /usr/src/CMake-build/bin/cmake \ | ||||||
|   -DCMAKE_BUILD_TYPE:STRING=Release \ |   -DCMAKE_BUILD_TYPE:STRING=Release \ | ||||||
|   -DBUILD_TESTING:BOOL=OFF \ |   -DBUILD_TESTING:BOOL=OFF \ | ||||||
|   -DCMAKE_INSTALL_PREFIX:PATH=/usr/src/cmake-$CMAKE_VERSION \ |   -DCMAKE_INSTALL_PREFIX:PATH="/usr/src/cmake-$CMAKE_VERSION" \ | ||||||
|   -DCMAKE_USE_OPENSSL:BOOL=ON \ |   -DCMAKE_USE_OPENSSL:BOOL=ON \ | ||||||
|   -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl \ |   -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl \ | ||||||
|   ../CMake |   ../CMake | ||||||
| ${WRAPPER} make -j$(nproc) install | "${WRAPPER}" make -j"$(nproc)" install | ||||||
|  |  | ||||||
| # Cleanup install tree | # Cleanup install tree | ||||||
| cd /usr/src/cmake-$CMAKE_VERSION | cd "/usr/src/cmake-$CMAKE_VERSION" | ||||||
| rm -rf doc man | rm -rf doc man | ||||||
|  |  | ||||||
| # Install files | # Install files | ||||||
| @@ -69,7 +69,7 @@ file( | |||||||
| list(GET status 0 error_code) | list(GET status 0 error_code) | ||||||
| list(GET status 1 error_msg) | list(GET status 1 error_msg) | ||||||
| if(error_code) | if(error_code) | ||||||
|   message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}") |   message(FATAL_ERROR "error: Failed to download \${url} - \${error_msg}") | ||||||
| else() | else() | ||||||
|   message(STATUS "CMake: HTTPS download works") |   message(STATUS "CMake: HTTPS download works") | ||||||
| endif() | endif() | ||||||
|   | |||||||
| @@ -18,20 +18,20 @@ function do_curl_build { | |||||||
|     # We do this shared to avoid obnoxious linker issues where git couldn't |     # 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. |     # 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 |     LIBS=-ldl CFLAGS=-Wl,--exclude-libs,ALL ./configure --with-ssl --disable-static > /dev/null | ||||||
|     make -j$(nproc) > /dev/null |     make -j"$(nproc)" > /dev/null | ||||||
|     make install > /dev/null |     make install > /dev/null | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| function build_curl { | function build_curl { | ||||||
|     local curl_fname=$1 |     local curl_fname=$1 | ||||||
|     check_var ${curl_fname} |     check_var "${curl_fname}" | ||||||
|     local curl_sha256=$2 |     local curl_sha256=$2 | ||||||
|     check_var ${curl_sha256} |     check_var "${curl_sha256}" | ||||||
|     check_var ${CURL_DOWNLOAD_URL} |     check_var "${CURL_DOWNLOAD_URL}" | ||||||
|     curl -fsSLO ${CURL_DOWNLOAD_URL}/${curl_fname}.tar.gz |     curl -fsSLO "${CURL_DOWNLOAD_URL}/${curl_fname}.tar.gz" | ||||||
|     check_sha256sum ${curl_fname}.tar.gz ${curl_sha256} |     check_sha256sum "${curl_fname}.tar.gz ${curl_sha256}" | ||||||
|     tar -zxf ${curl_fname}.tar.gz |     tar -zxf "${curl_fname}.tar.gz" | ||||||
|     (cd curl-*/ && do_curl_build) |     (cd curl-*/ && do_curl_build) | ||||||
|     rm -rf curl-* |     rm -rf curl-* | ||||||
| } | } | ||||||
|   | |||||||
| @@ -27,18 +27,18 @@ url="https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar | |||||||
| echo "Downloading $url" | echo "Downloading $url" | ||||||
| curl -# -LO $url | curl -# -LO $url | ||||||
|  |  | ||||||
| tar xvzf git-${GIT_VERSION}.tar.gz  --no-same-owner | tar xvzf "git-${GIT_VERSION}.tar.gz" --no-same-owner | ||||||
| rm -f git-${GIT_VERSION}.tar.gz | rm -f "git-${GIT_VERSION}.tar.gz" | ||||||
|  |  | ||||||
| pushd git-${GIT_VERSION} | pushd "git-${GIT_VERSION}" | ||||||
| ./configure --prefix=/usr/local --with-curl | ./configure --prefix=/usr/local --with-curl | ||||||
| make -j$(nproc) | make -j"$(nproc)" | ||||||
| make install | make install | ||||||
| popd | popd | ||||||
|  |  | ||||||
| ldconfig | ldconfig | ||||||
|  |  | ||||||
| rm -rf git-${GIT_VERSION} | rm -rf "git-${GIT_VERSION}" | ||||||
|  |  | ||||||
| # turn the detached message off | # turn the detached message off | ||||||
| git config --global advice.detachedHead false | git config --global advice.detachedHead false | ||||||
|   | |||||||
| @@ -58,48 +58,48 @@ PERL_HASH=03b693901cd8ae807231b1787798cf1f2e0b8a56218d07b7da44f784a7caeb2c | |||||||
| PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 | PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 | ||||||
|  |  | ||||||
| function do_perl_build { | function do_perl_build { | ||||||
|     ${WRAPPER} sh Configure -des -Dprefix=/opt/perl > /dev/null |     "${WRAPPER}" sh Configure -des -Dprefix=/opt/perl > /dev/null | ||||||
|     ${WRAPPER} make -j$(nproc) > /dev/null |     "${WRAPPER}" make -j"$(nproc)" > /dev/null | ||||||
|     ${WRAPPER} make install > /dev/null |     "${WRAPPER}" make install > /dev/null | ||||||
| } | } | ||||||
|  |  | ||||||
| function build_perl { | function build_perl { | ||||||
|     local perl_fname=$1 |     local perl_fname=$1 | ||||||
|     check_var ${perl_fname} |     check_var "${perl_fname}" | ||||||
|     local perl_sha256=$2 |     local perl_sha256=$2 | ||||||
|     check_var ${perl_sha256} |     check_var "${perl_sha256}" | ||||||
|     check_var ${PERL_DOWNLOAD_URL} |     check_var "${PERL_DOWNLOAD_URL}" | ||||||
|     curl -fsSLO ${PERL_DOWNLOAD_URL}/${perl_fname}.tar.gz |     curl -fsSLO "${PERL_DOWNLOAD_URL}/${perl_fname}.tar.gz" | ||||||
|     check_sha256sum ${perl_fname}.tar.gz ${perl_sha256} |     check_sha256sum "${perl_fname}.tar.gz" "${perl_sha256}" | ||||||
|     tar -xzf ${perl_fname}.tar.gz |     tar -xzf "${perl_fname}.tar.gz" | ||||||
|     (cd ${perl_fname} && do_perl_build) |     (cd "${perl_fname}" && do_perl_build) | ||||||
|     rm -rf ${perl_fname} ${perl_fname}.tar.gz |     rm -rf "${perl_fname}" "${perl_fname}.tar.gz" | ||||||
| } | } | ||||||
|  |  | ||||||
| function do_openssl_build { | function do_openssl_build { | ||||||
|     ${WRAPPER} ./config no-shared -fPIC $CONFIG_FLAG --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null |     "${WRAPPER}" ./config no-shared -fPIC "$CONFIG_FLAG" --prefix=/usr/local/ssl --openssldir=/usr/local/ssl > /dev/null | ||||||
|     ${WRAPPER} make -j$(nproc) > /dev/null |     "${WRAPPER}" make -j"$(nproc)" > /dev/null | ||||||
|     ${WRAPPER} make install_sw > /dev/null |     "${WRAPPER}" make install_sw > /dev/null | ||||||
| } | } | ||||||
|  |  | ||||||
| function build_openssl { | function build_openssl { | ||||||
|     local openssl_fname=$1 |     local openssl_fname=$1 | ||||||
|     check_var ${openssl_fname} |     check_var "${openssl_fname}" | ||||||
|     local openssl_sha256=$2 |     local openssl_sha256=$2 | ||||||
|     check_var ${openssl_sha256} |     check_var "${openssl_sha256}" | ||||||
|     check_var ${OPENSSL_DOWNLOAD_URL} |     check_var" ${OPENSSL_DOWNLOAD_URL}" | ||||||
|     curl -fsSLO ${OPENSSL_DOWNLOAD_URL}/${openssl_fname}.tar.gz |     curl -fsSLO "${OPENSSL_DOWNLOAD_URL}/${openssl_fname}.tar.gz" | ||||||
|     check_sha256sum ${openssl_fname}.tar.gz ${openssl_sha256} |     check_sha256sum "${openssl_fname}.tar.gz" "${openssl_sha256}" | ||||||
|     tar -xzf ${openssl_fname}.tar.gz |     tar -xzf "${openssl_fname}.tar.gz" | ||||||
|     (cd ${openssl_fname} && PATH=/opt/perl/bin:${PATH} do_openssl_build) |     (cd "${openssl_fname}" && PATH="/opt/perl/bin:${PATH}" do_openssl_build) | ||||||
|     rm -rf ${openssl_fname} ${openssl_fname}.tar.gz |     rm -rf "${openssl_fname}" "${openssl_fname}.tar.gz" | ||||||
|     # Cleanup install tree |     # Cleanup install tree | ||||||
|     rm -rf /usr/ssl/man |     rm -rf /usr/ssl/man | ||||||
| } | } | ||||||
|  |  | ||||||
| cd /usr/src | cd /usr/src | ||||||
| build_perl $PERL_ROOT $PERL_HASH | build_perl "$PERL_ROOT" "$PERL_HASH" | ||||||
| build_openssl $OPENSSL_ROOT $OPENSSL_HASH | build_openssl "$OPENSSL_ROOT" "$OPENSSL_HASH" | ||||||
|  |  | ||||||
| # Delete PERL | # Delete PERL | ||||||
| rm -rf /opt/perl | rm -rf /opt/perl | ||||||
|   | |||||||
| @@ -1,42 +0,0 @@ | |||||||
| #!/usr/bin/env bash |  | ||||||
|  |  | ||||||
| # |  | ||||||
| # Configure, build and install python |  | ||||||
| # |  | ||||||
| # Usage: |  | ||||||
| # |  | ||||||
| #  build-and-install-python.sh [-version 3.9.5] |  | ||||||
| # needed packages : libncurses5-dev libgdbm-dev libnss3-dev  |  | ||||||
| #   libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev |  | ||||||
|  |  | ||||||
| PYTHON_VERSION=3.9.5 |  | ||||||
| while [ $# -gt 0 ]; do |  | ||||||
|   case "$1" in |  | ||||||
|     -version|-v) |  | ||||||
|       PYTHON_VERSION=$2 |  | ||||||
|       shift |  | ||||||
|       ;;& |  | ||||||
|     *) |  | ||||||
|       echo "Usage: Usage: ${0##*/} [-version 3.9.5]" |  | ||||||
|       exit 1 |  | ||||||
|       ;; |  | ||||||
|   esac |  | ||||||
|   shift |  | ||||||
| done |  | ||||||
|  |  | ||||||
| # Download |  | ||||||
| wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz |  | ||||||
| tar xvf Python-${PYTHON_VERSION}.tgz |  | ||||||
| # Configure, build and install |  | ||||||
| cd Python-${PYTHON_VERSION} |  | ||||||
| # Disable --enable-shared --enable-optimizations --prefix=/usr/local/python-${PYTHON_VERSION} |  | ||||||
| ./configure --with-ensurepip=install |  | ||||||
| make -j$(nproc)  |  | ||||||
| make install #altinstall |  | ||||||
|  |  | ||||||
| ln -s /usr/local/bin/python3 /usr/local/bin/python |  | ||||||
| ln -s /usr/local/bin/pip3 /usr/local/bin/pip |  | ||||||
|  |  | ||||||
| # Clean |  | ||||||
| cd .. |  | ||||||
| rm -rf Python-${PYTHON_VERSION} |  | ||||||
| @@ -4,4 +4,4 @@ | |||||||
| # dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is | # dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is | ||||||
| # always set in this context | # always set in this context | ||||||
|  |  | ||||||
| exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@" | exec /usr/bin/ccmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${CMAKE_TOOLCHAIN_FILE}" "$@" | ||||||
|   | |||||||
| @@ -19,4 +19,4 @@ case $1 in | |||||||
|  |  | ||||||
| esac | esac | ||||||
|  |  | ||||||
| exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@" | exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${CMAKE_TOOLCHAIN_FILE}" "$@" | ||||||
|   | |||||||
| @@ -6,11 +6,11 @@ DEFAULT_DOCKCROSS_IMAGE=dockcross/base  # DO NOT MOVE THIS LINE (see entrypoint. | |||||||
| # Helpers | # Helpers | ||||||
| # | # | ||||||
| err() { | err() { | ||||||
|     echo -e >&2 ERROR: $@\\n |     echo -e ">&2 ERROR: $*\\n" | ||||||
| } | } | ||||||
|  |  | ||||||
| die() { | die() { | ||||||
|     err $@ |     err "$@" | ||||||
|     exit 1 |     exit 1 | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -19,7 +19,7 @@ has() { | |||||||
|     local kind=$1 |     local kind=$1 | ||||||
|     local name=$2 |     local name=$2 | ||||||
|  |  | ||||||
|     type -t $kind:$name | grep -q function |     type -t "$kind:$name" | grep -q function | ||||||
| } | } | ||||||
|  |  | ||||||
| # If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative") | # If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative") | ||||||
| @@ -37,24 +37,24 @@ fi | |||||||
| # Command handlers | # Command handlers | ||||||
| # | # | ||||||
| command:update-image() { | command:update-image() { | ||||||
|     $OCI_EXE pull $FINAL_IMAGE |     $OCI_EXE pull "$FINAL_IMAGE" | ||||||
| } | } | ||||||
|  |  | ||||||
| help:update-image() { | help:update-image() { | ||||||
|     echo Pull the latest $FINAL_IMAGE . |     echo Pull the latest "$FINAL_IMAGE" . | ||||||
| } | } | ||||||
|  |  | ||||||
| command:update-script() { | command:update-script() { | ||||||
|     if cmp -s <( $OCI_EXE run --rm $FINAL_IMAGE ) $0; then |     if cmp -s <( "$OCI_EXE" run --rm "$FINAL_IMAGE" ) "$0"; then | ||||||
|         echo $0 is up to date |         echo "$0" is up to date | ||||||
|     else |     else | ||||||
|         echo -n Updating $0 '... ' |         echo -n Updating "$0" '... ' | ||||||
|         $OCI_EXE run --rm $FINAL_IMAGE > $0 && echo ok |         "$OCI_EXE" run --rm "$FINAL_IMAGE" > "$0" && echo ok | ||||||
|     fi |     fi | ||||||
| } | } | ||||||
|  |  | ||||||
| help:update-image() { | help:update-image() { | ||||||
|     echo Update $0 from $FINAL_IMAGE . |     echo Update "$0" from "$FINAL_IMAGE" . | ||||||
| } | } | ||||||
|  |  | ||||||
| command:update() { | command:update() { | ||||||
| @@ -63,18 +63,18 @@ command:update() { | |||||||
| } | } | ||||||
|  |  | ||||||
| help:update() { | help:update() { | ||||||
|     echo Pull the latest $FINAL_IMAGE, and then update $0 from that. |     echo "Pull the latest $FINAL_IMAGE, and then update $0 from that." | ||||||
| } | } | ||||||
|  |  | ||||||
| command:help() { | command:help() { | ||||||
|     if [[ $# != 0 ]]; then |     if [[ $# != 0 ]]; then | ||||||
|         if ! has command $1; then |         if ! has command "$1"; then | ||||||
|             err \"$1\" is not an dockcross command |             err \"$1\" is not an dockcross command | ||||||
|             command:help |             command:help | ||||||
|         elif ! has help $1; then |         elif ! has help "$1"; then | ||||||
|             err No help found for \"$1\" |             err No help found for \"$1\" | ||||||
|         else |         else | ||||||
|             help:$1 |             help:"$1" | ||||||
|         fi |         fi | ||||||
|     else |     else | ||||||
|         cat >&2 <<ENDHELP |         cat >&2 <<ENDHELP | ||||||
| @@ -133,7 +133,7 @@ while [[ $# != 0 ]]; do | |||||||
|             ;; |             ;; | ||||||
|         -*) |         -*) | ||||||
|             err Unknown option \"$1\" |             err Unknown option \"$1\" | ||||||
|             command:help |             command:help $1 | ||||||
|             exit |             exit | ||||||
|             ;; |             ;; | ||||||
|  |  | ||||||
| @@ -246,11 +246,11 @@ if [[ $rm_exit_code != 0 ]]; then | |||||||
|     : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/ |     : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/ | ||||||
|   else |   else | ||||||
|     echo "$rm_output" |     echo "$rm_output" | ||||||
|     exit $rm_exit_code |     exit "$rm_exit_code" | ||||||
|   fi |   fi | ||||||
| fi | fi | ||||||
|  |  | ||||||
| exit $run_exit_code | exit "$run_exit_code" | ||||||
|  |  | ||||||
| ################################################################################ | ################################################################################ | ||||||
| # | # | ||||||
|   | |||||||
| @@ -37,16 +37,16 @@ if [[ -n $BUILDER_UID ]] && [[ -n $BUILDER_GID ]]; then | |||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     # Enable passwordless sudo capabilities for the user |     # Enable passwordless sudo capabilities for the user | ||||||
|     chown root:$BUILDER_GID $(which gosu) |     chown root:"$BUILDER_GID" "$(which gosu)" | ||||||
|     chmod +s $(which gosu); sync |     chmod +s "$(which gosu)"; sync | ||||||
|  |  | ||||||
|     # Execute project specific pre execution hook |     # Execute project specific pre execution hook | ||||||
|     if [[ -e /work/.dockcross ]]; then |     if [[ -e /work/.dockcross ]]; then | ||||||
|        gosu $BUILDER_UID:$BUILDER_GID /work/.dockcross |        gosu "$BUILDER_UID:$BUILDER_GID" /work/.dockcross | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
|     # Run the command as the specified user/group. |     # Run the command as the specified user/group. | ||||||
|     exec gosu $BUILDER_UID:$BUILDER_GID "$@" |     exec gosu "$BUILDER_UID:$BUILDER_GID" "$@" | ||||||
| else | else | ||||||
|     # Just run the command as root. |     # Just run the command as root. | ||||||
|     exec "$@" |     exec "$@" | ||||||
|   | |||||||
| @@ -35,15 +35,15 @@ fi | |||||||
|  |  | ||||||
| cd /usr/src | cd /usr/src | ||||||
|  |  | ||||||
| CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH} | CMAKE_ROOT="cmake-${CMAKE_VERSION}-Centos5-${ARCH}" | ||||||
| url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz | url="https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz" | ||||||
| echo "Downloading $url" | echo "Downloading $url" | ||||||
| curl -# -LO $url | curl -# -LO "$url" | ||||||
|  |  | ||||||
| tar -xzvf ${CMAKE_ROOT}.tar.gz | tar -xzvf "${CMAKE_ROOT}.tar.gz" | ||||||
| rm -f ${CMAKE_ROOT}.tar.gz | rm -f "${CMAKE_ROOT}.tar.gz" | ||||||
|  |  | ||||||
| cd ${CMAKE_ROOT} | cd "${CMAKE_ROOT}" | ||||||
|  |  | ||||||
| rm -rf doc man | rm -rf doc man | ||||||
| rm -rf bin/cmake-gui | rm -rf bin/cmake-gui | ||||||
|   | |||||||
| @@ -73,7 +73,7 @@ cd crosstool-ng | |||||||
| git fetch --tags | git fetch --tags | ||||||
|  |  | ||||||
| # checkout  | # checkout  | ||||||
| git checkout ${REV} | git checkout "${REV}" | ||||||
|  |  | ||||||
| if [ ${REV} = "crosstool-ng-1.23.0" ]; then | if [ ${REV} = "crosstool-ng-1.23.0" ]; then | ||||||
|   patch scripts/build/companion_libs/210-expat.sh -i /dockcross/crosstool-ng-expat.patch |   patch scripts/build/companion_libs/210-expat.sh -i /dockcross/crosstool-ng-expat.patch | ||||||
| @@ -89,7 +89,7 @@ BOOTSTRAP_PREFIX="${CTNG}/prefix" | |||||||
| ./bootstrap | ./bootstrap | ||||||
| ./configure \ | ./configure \ | ||||||
|   --prefix "${BOOTSTRAP_PREFIX}" |   --prefix "${BOOTSTRAP_PREFIX}" | ||||||
| make -j$(nproc) | make -j"$(nproc)" | ||||||
| make install | make install | ||||||
|  |  | ||||||
| ## | ## | ||||||
|   | |||||||
| @@ -14,12 +14,13 @@ if ! command -v gpg &> /dev/null; then | |||||||
| fi | fi | ||||||
|  |  | ||||||
| GOSU_VERSION=1.12 | GOSU_VERSION=1.12 | ||||||
| dpkgArch=$(if test $(uname -m) = "x86_64"; then echo amd64; else echo i386; fi) | dpkgArch=$(if test "$(uname -m)" = "x86_64"; then echo amd64; else echo i386; fi) | ||||||
| url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}" | url="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}" | ||||||
| url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc" | url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${dpkgArch}.asc" | ||||||
|  |  | ||||||
| # download and verify the signature | # download and verify the signature | ||||||
| export GNUPGHOME="$(mktemp -d)" | GNUPGHOME=$(mktemp -d) | ||||||
|  | export GNUPGHOME | ||||||
|  |  | ||||||
| gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ | gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ | ||||||
| gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ | gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ | ||||||
|   | |||||||
| @@ -24,10 +24,10 @@ cd /tmp | |||||||
| # 3.6 or later | # 3.6 or later | ||||||
| curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py | curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py | ||||||
| #curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py | #curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py | ||||||
| ${PYTHON} get-pip.py --ignore-installed | "${PYTHON}" get-pip.py --ignore-installed | ||||||
| rm get-pip.py | rm get-pip.py | ||||||
|  |  | ||||||
| ${PYTHON} -m pip install --upgrade --ignore-installed setuptools | "${PYTHON}" -m pip install --upgrade --ignore-installed setuptools | ||||||
| ${PYTHON} -m pip install --ignore-installed conan | "${PYTHON}" -m pip install --ignore-installed conan | ||||||
| # Purge cache to save space: https://stackoverflow.com/questions/37513597/is-it-safe-to-delete-cache-pip-directory | # Purge cache to save space: https://stackoverflow.com/questions/37513597/is-it-safe-to-delete-cache-pip-directory | ||||||
| ${PYTHON} -m pip cache purge | "${PYTHON}" -m pip cache purge | ||||||
|   | |||||||
| @@ -13,12 +13,12 @@ function check_var { | |||||||
| # Copied from https://github.com/pypa/manylinux/blob/master/docker/build_scripts/build_utils.sh | # Copied from https://github.com/pypa/manylinux/blob/master/docker/build_scripts/build_utils.sh | ||||||
| function check_sha256sum { | function check_sha256sum { | ||||||
|     local fname=$1 |     local fname=$1 | ||||||
|     check_var ${fname} |     check_var "${fname}" | ||||||
|     local sha256=$2 |     local sha256=$2 | ||||||
|     check_var ${sha256} |     check_var "${sha256}" | ||||||
|  |  | ||||||
|     echo "${sha256}  ${fname}" > ${fname}.sha256 |     echo "${sha256}  ${fname}" > "${fname}.sha256" | ||||||
|     sha256sum -c ${fname}.sha256 |     sha256sum -c "${fname}.sha256" | ||||||
|     rm -f ${fname}.sha256 |     rm -f "${fname}.sha256" | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user