From 3b40450436db1c927d88dbe7c6bad33f35dd4b1a Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 8 Mar 2017 21:25:32 -0500 Subject: get-win32-tarballs: Rework handling of hashing This pulls out the hashes into a separate file, making them far easier to update. --- mk/get-win32-tarballs.sh | 57 +++++++++++++++++++----------------------------- mk/win32-tarballs.md5sum | 27 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 35 deletions(-) create mode 100644 mk/win32-tarballs.md5sum (limited to 'mk') diff --git a/mk/get-win32-tarballs.sh b/mk/get-win32-tarballs.sh index f43b24e1bf..769beb0dba 100755 --- a/mk/get-win32-tarballs.sh +++ b/mk/get-win32-tarballs.sh @@ -11,10 +11,9 @@ fail() { download_file() { local file_url="$1" - local file_md5="$2" - local dest_file="$3" - local description="$4" - local extra_curl_opts="$5" + local dest_file="$2" + local description="$3" + local extra_curl_opts="$4" local dest_dir="$(dirname $dest_file)" if ! test -f "${dest_file}" @@ -47,7 +46,7 @@ download_file() { if test "$verify" = "1" then - echo "${file_md5} *${dest_file}" | md5sum --quiet -c - || + grep "${dest_file}" mk/win32-tarballs.md5sum | md5sum --quiet -c - || fail "ERROR: ${description} appears to be corrupted, please delete it and try again." fi } @@ -61,23 +60,11 @@ download_mingw() { else local mingw_url="$1" fi - local file_md5sum_x86="$2" - local file_md5sum_x64="$3" - - if ! test "$mingw_arch" = "sources" - then - if test "$mingw_arch" = "i686" - then - local file_md5sum="${file_md5sum_x86}" - else - local file_md5sum="${file_md5sum_x64}" - fi - fi local mingw_toolchain="$(basename $mingw_url)" local mingw_w64="${tarball_dir}/${tarball_dest_dir}/${mingw_toolchain}" - download_file "${mingw_url}" "${file_md5sum}" "${mingw_w64}" "${mingw_toolchain}" + download_file "${mingw_url}" "${mingw_w64}" "${mingw_toolchain}" # Mark the tree as needing updates by deleting the folder if test -d inplace/mingw && test inplace/mingw -ot "$mingw_w64" ; then @@ -87,26 +74,26 @@ download_mingw() { } download_tarballs() { - #local mingw_base_url="http://repo.msys2.org/mingw" - local mingw_base_url="https://downloads.haskell.org/~ghc/mingw" + local mingw_base_url="http://repo.msys2.org/mingw" + #local mingw_base_url="https://downloads.haskell.org/~ghc/mingw" local package_prefix="mingw-w64" local format_url="${mingw_base_url}/${mingw_arch}/${package_prefix}-${mingw_arch}" - download_mingw "${format_url}-crt-git-5.0.0.4795.e3d96cb1-1-any.pkg.tar.xz" "534bb4756482f3271308576cdadfe5dc" "3780a25a6f20eef9b143f47f4b615e39" - download_mingw "${format_url}-winpthreads-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz" "155845f8c897f0c70adee83cfa9ec30c" "ba417ad9fb7cd3ee56e713b2b070adb9" - download_mingw "${format_url}-headers-git-5.0.0.4747.0f8f626-1-any.pkg.tar.xz" "b724d1aaae73c329022ad22374481817" "e8065928b81c9b379286515913eccd68" - download_mingw "${format_url}-libwinpthread-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz" "65b18b67eef3c3d5e5707577dfa8f831" "c280f60a4b80ed6722ce4d9b4f6c550e" - download_mingw "${format_url}-zlib-1.2.8-9-any.pkg.tar.xz" "87c65e9b2930436a75dfd7d459ae98cb" "60c3a388478f411b7a0908441ebeb537" - download_mingw "${format_url}-isl-0.17.1-1-any.pkg.tar.xz" "9fce16db004f00e967eb15efe0cdf86b" "39c8b3b8e56b3b0bdef86cf32f1e09ba" - download_mingw "${format_url}-mpc-1.0.3-2-any.pkg.tar.xz" "719e76fa7a54a8676d2e60af3bb13c45" "df1a7d4050568d83c265ae78c32ef30b" - download_mingw "${format_url}-mpfr-3.1.4.p3-4-any.pkg.tar.xz" "6fdad8f6a522c779932ca4e54e4d7977" "de629f78e908274086a272196c14d37c" - download_mingw "${format_url}-gmp-6.1.1-1-any.pkg.tar.xz" "e8cc05fc566ddc6c16266da9aec2ddd3" "0faa10641da9266ef4cb39a8f6a4fa19" - download_mingw "${format_url}-gcc-libs-6.2.0-2-any.pkg.tar.xz" "e6f74da9dcb856cfe9e1da0ed45732e0" "f523d52a6ad940e1cda2bf3065927bd4" - download_mingw "${format_url}-binutils-2.27-2-any.pkg.tar.xz" "d263d1362dee0c24df80b461eb2ec489" "b1f21340136b75f1660d6ad36bd0768a" - download_mingw "${format_url}-libidn-1.32-3-any.pkg.tar.xz" "9ecd264a3da0f0f6af8b392c1b183a7b" "6f68259e17b68bbf19efc7b4fb5c1968" - download_mingw "${format_url}-gcc-6.2.0-2-any.pkg.tar.xz" "095dc33fb7a1cab5dab982aa57713a96" "303bf95f8e6ac5bc068b2ab95749b8f3" - - download_file "https://github.com/ghc/ghc-tarballs/blob/master/perl/ghc-perl-1.tar.gz?raw=true" "b21d1681b61cf7a024e854096285b02e" "ghc-tarballs/perl/ghc-perl-1.tar.gz" "Windows Perl binary distributions" "--insecure" + download_mingw "${format_url}-crt-git-5.0.0.4795.e3d96cb1-1-any.pkg.tar.xz" + download_mingw "${format_url}-winpthreads-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz" + download_mingw "${format_url}-headers-git-5.0.0.4747.0f8f626-1-any.pkg.tar.xz" + download_mingw "${format_url}-libwinpthread-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz" + download_mingw "${format_url}-zlib-1.2.8-9-any.pkg.tar.xz" + download_mingw "${format_url}-isl-0.17.1-1-any.pkg.tar.xz" + download_mingw "${format_url}-mpc-1.0.3-2-any.pkg.tar.xz" + download_mingw "${format_url}-mpfr-3.1.4.p3-4-any.pkg.tar.xz" + download_mingw "${format_url}-gmp-6.1.1-1-any.pkg.tar.xz" + download_mingw "${format_url}-gcc-libs-6.2.0-2-any.pkg.tar.xz" + download_mingw "${format_url}-binutils-2.27-2-any.pkg.tar.xz" + download_mingw "${format_url}-libidn-1.32-3-any.pkg.tar.xz" + download_mingw "${format_url}-gcc-6.2.0-2-any.pkg.tar.xz" + + download_file "https://github.com/ghc/ghc-tarballs/blob/master/perl/ghc-perl-1.tar.gz?raw=true" "ghc-tarballs/perl/ghc-perl-1.tar.gz" "Windows Perl binary distributions" "--insecure" if ! test "$missing_files" = "0" then diff --git a/mk/win32-tarballs.md5sum b/mk/win32-tarballs.md5sum new file mode 100644 index 0000000000..2ff0f5b3ef --- /dev/null +++ b/mk/win32-tarballs.md5sum @@ -0,0 +1,27 @@ +87c65e9b2930436a75dfd7d459ae98cb ghc-tarballs/mingw-w64/x86/mingw-w64-i686-zlib-1.2.8-9-any.pkg.tar.xz +b724d1aaae73c329022ad22374481817 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-headers-git-5.0.0.4747.0f8f626-1-any.pkg.tar.xz +65b18b67eef3c3d5e5707577dfa8f831 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-libwinpthread-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz +9fce16db004f00e967eb15efe0cdf86b ghc-tarballs/mingw-w64/x86/mingw-w64-i686-isl-0.17.1-1-any.pkg.tar.xz +534bb4756482f3271308576cdadfe5dc ghc-tarballs/mingw-w64/x86/mingw-w64-i686-crt-git-5.0.0.4795.e3d96cb1-1-any.pkg.tar.xz +e6f74da9dcb856cfe9e1da0ed45732e0 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-gcc-libs-6.2.0-2-any.pkg.tar.xz +6fdad8f6a522c779932ca4e54e4d7977 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-mpfr-3.1.4.p3-4-any.pkg.tar.xz +d263d1362dee0c24df80b461eb2ec489 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-binutils-2.27-2-any.pkg.tar.xz +155845f8c897f0c70adee83cfa9ec30c ghc-tarballs/mingw-w64/x86/mingw-w64-i686-winpthreads-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz +095dc33fb7a1cab5dab982aa57713a96 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-gcc-6.2.0-2-any.pkg.tar.xz +9ecd264a3da0f0f6af8b392c1b183a7b ghc-tarballs/mingw-w64/x86/mingw-w64-i686-libidn-1.32-3-any.pkg.tar.xz +e8cc05fc566ddc6c16266da9aec2ddd3 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-gmp-6.1.1-1-any.pkg.tar.xz +719e76fa7a54a8676d2e60af3bb13c45 ghc-tarballs/mingw-w64/x86/mingw-w64-i686-mpc-1.0.3-2-any.pkg.tar.xz +3780a25a6f20eef9b143f47f4b615e39 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-crt-git-5.0.0.4795.e3d96cb1-1-any.pkg.tar.xz +ba417ad9fb7cd3ee56e713b2b070adb9 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-winpthreads-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz +39c8b3b8e56b3b0bdef86cf32f1e09ba ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-isl-0.17.1-1-any.pkg.tar.xz +c280f60a4b80ed6722ce4d9b4f6c550e ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-libwinpthread-git-5.0.0.4741.2c8939a-1-any.pkg.tar.xz +b1f21340136b75f1660d6ad36bd0768a ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-binutils-2.27-2-any.pkg.tar.xz +e8065928b81c9b379286515913eccd68 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-headers-git-5.0.0.4747.0f8f626-1-any.pkg.tar.xz +303bf95f8e6ac5bc068b2ab95749b8f3 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-gcc-6.2.0-2-any.pkg.tar.xz +6f68259e17b68bbf19efc7b4fb5c1968 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-libidn-1.32-3-any.pkg.tar.xz +df1a7d4050568d83c265ae78c32ef30b ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-mpc-1.0.3-2-any.pkg.tar.xz +60c3a388478f411b7a0908441ebeb537 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-zlib-1.2.8-9-any.pkg.tar.xz +f523d52a6ad940e1cda2bf3065927bd4 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-gcc-libs-6.2.0-2-any.pkg.tar.xz +0faa10641da9266ef4cb39a8f6a4fa19 ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-gmp-6.1.1-1-any.pkg.tar.xz +de629f78e908274086a272196c14d37c ghc-tarballs/mingw-w64/x86_64/mingw-w64-x86_64-mpfr-3.1.4.p3-4-any.pkg.tar.xz +b21d1681b61cf7a024e854096285b02e ghc-tarballs/perl/ghc-perl-1.tar.gz -- cgit v1.2.1