From c871b6dd4e78113d7c566a06f15241711b4ca58b Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 13 Dec 2023 00:19:11 +0100 Subject: [PATCH] Hash-check buildbot dependencies --- .github/workflows/build.yml | 6 ++---- util/buildbot/buildwin32.sh | 25 +++++++++++++------------ util/buildbot/buildwin64.sh | 25 +++++++++++++------------ util/buildbot/common.sh | 1 + util/buildbot/download_toolchain.sh | 15 +++++++++++++++ util/buildbot/sha256sums.txt | 26 ++++++++++++++++++++++++++ 6 files changed, 70 insertions(+), 28 deletions(-) create mode 100755 util/buildbot/download_toolchain.sh create mode 100644 util/buildbot/sha256sums.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52f9890d8..446aa1e1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,8 +170,7 @@ jobs: - name: Install compiler run: | sudo apt-get update && sudo apt-get install -y gettext - wget http://minetest.kitsunemimi.pw/mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz - sudo tar -xaf mingw.tar.xz -C /usr + sudo ./util/buildbot/download_toolchain.sh i686 /usr - name: Build run: | @@ -191,8 +190,7 @@ jobs: - name: Install compiler run: | sudo apt-get update && sudo apt-get install -y gettext - wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz - sudo tar -xaf mingw.tar.xz -C /usr + sudo ./util/buildbot/download_toolchain.sh x86_64 /usr - name: Build run: | diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index a7012d2b8..62dc964a4 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -37,18 +37,19 @@ mkdir -p $libdir # this distinction should be gotten rid of next time cd $libdir -download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32.zip" irrlicht-$irrlicht_version.zip -download "http://minetest.kitsunemimi.pw/zlib-$zlib_version-win32.zip" -download "http://minetest.kitsunemimi.pw/zstd-$zstd_version-win32.zip" -download "http://minetest.kitsunemimi.pw/libogg-$ogg_version-win32.zip" -download "http://minetest.kitsunemimi.pw/dw2/libvorbis-$vorbis_version-win32.zip" -download "http://minetest.kitsunemimi.pw/curl-$curl_version-win32.zip" -download "http://minetest.kitsunemimi.pw/gettext-$gettext_version-win32.zip" -download "http://minetest.kitsunemimi.pw/freetype-$freetype_version-win32.zip" -download "http://minetest.kitsunemimi.pw/sqlite3-$sqlite3_version-win32.zip" -download "http://minetest.kitsunemimi.pw/luajit-$luajit_version-win32.zip" -download "http://minetest.kitsunemimi.pw/dw2/libleveldb-$leveldb_version-win32.zip" leveldb-$leveldb_version.zip -download "http://minetest.kitsunemimi.pw/openal-soft-$openal_version-win32.zip" +libhost="http://minetest.kitsunemimi.pw" +download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32.zip" irrlicht-$irrlicht_version-win32.zip +download "$libhost/zlib-$zlib_version-win32.zip" +download "$libhost/zstd-$zstd_version-win32.zip" +download "$libhost/libogg-$ogg_version-win32.zip" +download "$libhost/dw2/libvorbis-$vorbis_version-win32.zip" +download "$libhost/curl-$curl_version-win32.zip" +download "$libhost/gettext-$gettext_version-win32.zip" +download "$libhost/freetype-$freetype_version-win32.zip" +download "$libhost/sqlite3-$sqlite3_version-win32.zip" +download "$libhost/luajit-$luajit_version-win32.zip" +download "$libhost/dw2/libleveldb-$leveldb_version-win32.zip" leveldb-$leveldb_version-win32.zip +download "$libhost/openal-soft-$openal_version-win32.zip" # Set source dir, downloading Minetest as needed get_sources diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index 1a9953c36..afe73cb9b 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -34,18 +34,19 @@ irrlicht_version=$(cat $topdir/../../misc/irrlichtmt_tag.txt) mkdir -p $libdir cd $libdir -download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win64.zip" irrlicht-$irrlicht_version.zip -download "http://minetest.kitsunemimi.pw/zlib-$zlib_version-win64.zip" -download "http://minetest.kitsunemimi.pw/zstd-$zstd_version-win64.zip" -download "http://minetest.kitsunemimi.pw/libogg-$ogg_version-win64.zip" -download "http://minetest.kitsunemimi.pw/libvorbis-$vorbis_version-win64.zip" -download "http://minetest.kitsunemimi.pw/curl-$curl_version-win64.zip" -download "http://minetest.kitsunemimi.pw/gettext-$gettext_version-win64.zip" -download "http://minetest.kitsunemimi.pw/freetype-$freetype_version-win64.zip" -download "http://minetest.kitsunemimi.pw/sqlite3-$sqlite3_version-win64.zip" -download "http://minetest.kitsunemimi.pw/luajit-$luajit_version-win64.zip" -download "http://minetest.kitsunemimi.pw/libleveldb-$leveldb_version-win64.zip" leveldb-$leveldb_version.zip -download "http://minetest.kitsunemimi.pw/openal-soft-$openal_version-win64.zip" +libhost="http://minetest.kitsunemimi.pw" +download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win64.zip" irrlicht-$irrlicht_version-win64.zip +download "$libhost/zlib-$zlib_version-win64.zip" +download "$libhost/zstd-$zstd_version-win64.zip" +download "$libhost/libogg-$ogg_version-win64.zip" +download "$libhost/libvorbis-$vorbis_version-win64.zip" +download "$libhost/curl-$curl_version-win64.zip" +download "$libhost/gettext-$gettext_version-win64.zip" +download "$libhost/freetype-$freetype_version-win64.zip" +download "$libhost/sqlite3-$sqlite3_version-win64.zip" +download "$libhost/luajit-$luajit_version-win64.zip" +download "$libhost/libleveldb-$leveldb_version-win64.zip" leveldb-$leveldb_version-win64.zip +download "$libhost/openal-soft-$openal_version-win64.zip" # Set source dir, downloading Minetest as needed get_sources diff --git a/util/buildbot/common.sh b/util/buildbot/common.sh index 4d0cc08b0..cd365d35a 100644 --- a/util/buildbot/common.sh +++ b/util/buildbot/common.sh @@ -23,6 +23,7 @@ download () { [ -d "./$foldername" ] && return 0 wget "$url" -c -O "./$filename" + sha256sum -w -c <(grep -F "$filename" "$topdir/sha256sums.txt") if [ "$extract" = "unzip" ]; then unzip -o "$filename" -d "$foldername" elif [ "$extract" = "unzip_nofolder" ]; then diff --git a/util/buildbot/download_toolchain.sh b/util/buildbot/download_toolchain.sh new file mode 100755 index 000000000..f6283979e --- /dev/null +++ b/util/buildbot/download_toolchain.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [[ -z "$1" || -z "$2" ]]; then + echo "Usage: $0 " + exit 1 +fi + +ver=11.2.0 +os=ubuntu20.04 +name="mingw-w64-${1}_${ver}_${os}.tar.xz" +wget "http://minetest.kitsunemimi.pw/$name" -O "$name" +sha256sum -w -c <(grep -F "$name" "$topdir/sha256sums.txt") +tar -xaf "$name" -C "$2" +rm -f "$name" diff --git a/util/buildbot/sha256sums.txt b/util/buildbot/sha256sums.txt new file mode 100644 index 000000000..30cc44716 --- /dev/null +++ b/util/buildbot/sha256sums.txt @@ -0,0 +1,26 @@ +e85ac83dd884a6716fdf048af1d8a4978ff4aa925471148f88c7c3430a9e2b05 curl-8.0.1-win32.zip +babed7c963bba7867412d9a905d5732a9cefefed401e05194903be08801c2182 curl-8.0.1-win64.zip +d6d7b0cf4d547f38ed54b0ff60a4b302b4184bd69fb580fc998410d87244939e freetype-2.12.1-win32.zip +dc6ecbb67b59a0662f21ca49a84fbf4bb0af9fedbc621983c4c0832fbddcc845 freetype-2.12.1-win64.zip +59236564f072baddac3e123927c50856d3147698cdd07fd08308a0eceb6f8679 gettext-0.20.2-win32.zip +4b11cc8211a6408b41d2342f927200f8f01b305cbcf9fb2398b5e7d204c42918 gettext-0.20.2-win64.zip +be02f4c0afc9e713d23182ec7782102a2d6c62fb4c2566832cdba0541437efc4 irrlicht-1.9.0mt13-win32.zip +6dca6dc23f6511da585874f3ec7bbda06e75d9de96c5a272e23a11a46b143262 irrlicht-1.9.0mt13-win64.zip +429e23c9a4a425c04db5b17e1361d4ce9ddd588e8fda062f5c485db1657e1b53 leveldb-1.23-win32.zip +82121b595d39b8e63c524e04c6ff247a904a76c278c0f42936e2bca63ff910a0 leveldb-1.23-win64.zip +23b467388aaa6e1a437b189dd54ecc7de7e47a734972d69abad874c558caa33c libogg-1.3.5-win32.zip +55f11b1fb26be5bc31e16fb282b0481938f306d0d4351048d82121cae1f0a254 libogg-1.3.5-win64.zip +d3f2de1d6f14c937bbcccf82f09ba583b3ad6925d30f6cddc096fcaa80ab3c03 libvorbis-1.3.7-win32.zip +b7722da388b17fdc216c00c97d9306b71c06dc49b173d43ef783fe0511739f2c libvorbis-1.3.7-win64.zip +79b9c3a9fc83a006721f1c78482729578d87f72b15c5440d28ba8f054655466b luajit-20230221-win32.zip +22f0f0ca95ff142fcd57237fa3e34797bb0f0d6789bf078b9c50941a9e4b739a luajit-20230221-win64.zip +704817351dc54a5a4bb3b35db9316f4ff1b073b231b5f8dbbc3b4ff2f3e30fbe mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz +d85ec9a7debe470ebeaa002af0a2843b83d40405d2a45fcc586c19f179362aab mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz +e4385c73c497ae90f28199002035fb369c7fa94ac93676949f92a1539a607941 openal-soft-1.23.0-win32.zip +643cdac87f0f1b7a06266df233e8d21119839b8fa3b9d6b4274b51e075a3ac11 openal-soft-1.23.0-win64.zip +d595396b60f31fe53d2b598c1677d633e407c175585a676bfc0d13d6cc239336 sqlite3-3.41.2-win32.zip +9aabc9545c1a7d39956c51e84239adbd05283218f451a3a846b080b713ad7661 sqlite3-3.41.2-win64.zip +e9bab0a6fe07bcf6c5a8ff171dd63983e67f3aefd9b8f38e88bf20a3dc44678f zlib-1.2.13-win32.zip +9f3d4fd89958081917d2fdcaab1bbc947e3fb070d8b39a48d9cf11269dd52c24 zlib-1.2.13-win64.zip +4ccbc8ac5830b06362d495ca65cd4687a76514bd103b5506b54a4b62ce0402f7 zstd-1.5.5-win32.zip +20dac9cedbaba40de5a5c0608a62d1885cbf63d055cca619289081e14d32290d zstd-1.5.5-win64.zip