From 3e3a6df182bb8485d01d04d4c0b83570806969ed Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Sat, 3 Aug 2024 02:12:10 +0800 Subject: [PATCH] fix openssl download in cross build (#578) --- .github/workflows/build_appimage.sh | 14 +++++++------- .github/workflows/cross_build.sh | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_appimage.sh b/.github/workflows/build_appimage.sh index 96b748062cb..99d29cc563b 100755 --- a/.github/workflows/build_appimage.sh +++ b/.github/workflows/build_appimage.sh @@ -138,8 +138,8 @@ prepare_buildenv() { cmake_binary_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz" cmake_sha256_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-SHA-256.txt" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - cmake_binary_url="https://mirror.ghproxy.com/${cmake_binary_url}" - cmake_sha256_url="https://mirror.ghproxy.com/${cmake_sha256_url}" + cmake_binary_url="https://ghproxy.org/${cmake_binary_url}" + cmake_sha256_url="https://ghproxy.org/${cmake_sha256_url}" fi if [ -f "/usr/src/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz" ]; then cd /usr/src @@ -158,7 +158,7 @@ prepare_buildenv() { ninja_ver="$(retry curl -ksSL --compressed https://ninja-build.org/ \| grep "'The last Ninja release is'" \| sed -r "'s@.*(.+).*@\1@'" \| head -1)" ninja_binary_url="https://github.com/ninja-build/ninja/releases/download/${ninja_ver}/ninja-linux.zip" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - ninja_binary_url="https://mirror.ghproxy.com/${ninja_binary_url}" + ninja_binary_url="https://ghproxy.org/${ninja_binary_url}" fi if [ ! -f "/usr/src/ninja-${ninja_ver}-linux.zip.download_ok" ]; then rm -f "/usr/src/ninja-${ninja_ver}-linux.zip" @@ -176,7 +176,7 @@ prepare_ssl() { echo "openssl version: ${openssl_ver}" openssl_latest_url="https://github.com/openssl/openssl/archive/refs/tags/${openssl_filename}" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - openssl_latest_url="https://mirror.ghproxy.com/${openssl_latest_url}" + openssl_latest_url="https://ghproxy.org/${openssl_latest_url}" fi mkdir -p "/usr/src/openssl-${openssl_ver}/" if [ ! -f "/usr/src/openssl-${openssl_ver}/.unpack_ok" ]; then @@ -265,7 +265,7 @@ prepare_qt() { if [ ! -d "/usr/src/qt6gtk2/" ]; then qt6gtk2_git_url="https://github.com/trialuser02/qt6gtk2.git" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - qt6gtk2_git_url="https://mirror.ghproxy.com/${qt6gtk2_git_url}" + qt6gtk2_git_url="https://ghproxy.org/${qt6gtk2_git_url}" fi retry git clone --depth 1 --recursive "${qt6gtk2_git_url}" "/usr/src/qt6gtk2/" fi @@ -303,7 +303,7 @@ prepare_libtorrent() { echo "libtorrent-rasterbar branch: ${LIBTORRENT_BRANCH}" libtorrent_git_url="https://github.com/arvidn/libtorrent.git" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - libtorrent_git_url="https://mirror.ghproxy.com/${libtorrent_git_url}" + libtorrent_git_url="https://ghproxy.org/${libtorrent_git_url}" fi if [ ! -d "/usr/src/libtorrent-rasterbar-${LIBTORRENT_BRANCH}/" ]; then retry git clone --depth 1 --recursive --shallow-submodules --branch "${LIBTORRENT_BRANCH}" \ @@ -353,7 +353,7 @@ build_appimage() { # build AppImage linuxdeploy_qt_download_url="https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - linuxdeploy_qt_download_url="https://mirror.ghproxy.com/${linuxdeploy_qt_download_url}" + linuxdeploy_qt_download_url="https://ghproxy.org/${linuxdeploy_qt_download_url}" fi [ -x "/tmp/linuxdeployqt-continuous-x86_64.AppImage" ] || retry curl -kSLC- -o /tmp/linuxdeployqt-continuous-x86_64.AppImage "${linuxdeploy_qt_download_url}" chmod -v +x '/tmp/linuxdeployqt-continuous-x86_64.AppImage' diff --git a/.github/workflows/cross_build.sh b/.github/workflows/cross_build.sh index 307837806bb..983b3b38071 100755 --- a/.github/workflows/cross_build.sh +++ b/.github/workflows/cross_build.sh @@ -146,8 +146,8 @@ prepare_cmake() { cmake_binary_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz" cmake_sha256_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-SHA-256.txt" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - cmake_binary_url="https://mirror.ghproxy.com/${cmake_binary_url}" - cmake_sha256_url="https://mirror.ghproxy.com/${cmake_sha256_url}" + cmake_binary_url="https://ghproxy.org/${cmake_binary_url}" + cmake_sha256_url="https://ghproxy.org/${cmake_sha256_url}" fi if [ -f "/usr/src/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz" ]; then cd /usr/src @@ -168,7 +168,7 @@ prepare_ninja() { ninja_ver="$(retry curl -ksSL --compressed https://ninja-build.org/ \| grep "'The last Ninja release is'" \| sed -r "'s@.*(.+).*@\1@'" \| head -1)" ninja_binary_url="https://github.com/ninja-build/ninja/releases/download/${ninja_ver}/ninja-linux.zip" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - ninja_binary_url="https://mirror.ghproxy.com/${ninja_binary_url}" + ninja_binary_url="https://ghproxy.org/${ninja_binary_url}" fi if [ ! -f "/usr/src/ninja-${ninja_ver}-linux.zip.download_ok" ]; then rm -f "/usr/src/ninja-${ninja_ver}-linux.zip" @@ -186,7 +186,7 @@ prepare_zlib() { zlib_ng_latest_url="https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${zlib_ng_latest_tag}.tar.gz" echo "zlib-ng version ${zlib_ng_latest_tag}" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - zlib_ng_latest_url="https://mirror.ghproxy.com/${zlib_ng_latest_url}" + zlib_ng_latest_url="https://ghproxy.org/${zlib_ng_latest_url}" fi if [ ! -f "/usr/src/zlib-ng-${zlib_ng_latest_tag}/.unpack_ok" ]; then mkdir -p "/usr/src/zlib-ng-${zlib_ng_latest_tag}/" @@ -231,13 +231,13 @@ prepare_zlib() { } prepare_ssl() { - openssl_filename="$(retry curl -ksSL --compressed https://www.openssl.org/source/ \| grep -o "'href=\"openssl-3\(\.[0-9]*\)*tar.gz\"'" \| grep -o "'[^\"]*.tar.gz'" \| sort -r \| head -1)" + openssl_filename="$(retry curl -ksSL --compressed https://openssl-library.org/source/ \| grep -o "'>openssl-3\(\.[0-9]*\)*tar.gz<'" \| grep -o "'[^>]*.tar.gz'" \| sort -nr \| head -1)" openssl_ver="$(echo "${openssl_filename}" | sed -r 's/openssl-(.+)\.tar\.gz/\1/')" echo "OpenSSL version ${openssl_ver}" if [ ! -f "/usr/src/openssl-${openssl_ver}/.unpack_ok" ]; then - openssl_download_url="https://github.com/openssl/openssl/archive/refs/tags/${openssl_filename}" + openssl_download_url="https://github.com/openssl/openssl/releases/download/openssl-${openssl_ver}/${openssl_filename}" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - openssl_download_url="https://mirror.ghproxy.com/${openssl_download_url}" + openssl_download_url="https://ghproxy.org/${openssl_download_url}" fi mkdir -p "/usr/src/openssl-${openssl_ver}/" retry curl -kL "${openssl_download_url}" \| tar -zxf - --strip-components=1 -C "/usr/src/openssl-${openssl_ver}/" @@ -333,7 +333,7 @@ prepare_libtorrent() { echo "libtorrent-rasterbar branch: ${LIBTORRENT_BRANCH}" libtorrent_git_url="https://github.com/arvidn/libtorrent.git" if [ x"${USE_CHINA_MIRROR}" = x1 ]; then - libtorrent_git_url="https://mirror.ghproxy.com/${libtorrent_git_url}" + libtorrent_git_url="https://ghproxy.org/${libtorrent_git_url}" fi if [ ! -d "/usr/src/libtorrent-rasterbar-${LIBTORRENT_BRANCH}/" ]; then retry git clone --depth 1 --recursive --shallow-submodules --branch "${LIBTORRENT_BRANCH}" \