From e32f154860b00baf176b0661e21bc4c2848a815c Mon Sep 17 00:00:00 2001 From: Tim Snyder Date: Tue, 4 May 2021 00:48:31 +0000 Subject: [PATCH] avoid git.qemu.org git.qemu.org seems to be down or under heavy load. Latest qemu seems to have changed it's .gitmodules to use gitlab. Since we're using a github.com mirror, when cloning qemu use rewrite rules to use github instead of git.qemu.org. Also install the rewrite rules recursively into the local config of qemu and it's submodules so that any further git commands done interactively by the user will also use github. --- scripts/build-toolchains.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index f4d208492a..edc626966b 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -155,7 +155,17 @@ module_all riscv-tests --prefix="${RISCV}/riscv${XLEN}-unknown-elf" --with-xlen= CC= CXX= SRCDIR="$(pwd)/toolchains" module_all libgloss --prefix="${RISCV}/riscv${XLEN}-unknown-elf" --host=riscv${XLEN}-unknown-elf if [ -z "$IGNOREQEMU" ] ; then -SRCDIR="$(pwd)/toolchains" module_all qemu --prefix="${RISCV}" --target-list=riscv${XLEN}-softmmu + echo "=> Starting qemu build" + dir="$(pwd)/toolchains/qemu" + echo "==> Initializing qemu submodule" + #since we don't want to use the global config we init passing rewrite config in to the command + git -c url.https://github.com/qemu.insteadOf=https://git.qemu.org/git submodule update --init --recursive "$dir" + echo "==> Applying url-rewriting to avoid git.qemu.org" + # and once the clones exist, we recurse through them and set the rewrite + # in the local config so that any further commands by the user have the rewrite. uggh. git, why you so ugly? + git -C "$dir" config --local url.https://github.com/qemu.insteadOf https://git.qemu.org/git + git -C "$dir" submodule foreach --recursive 'git config --local url.https://github.com/qemu.insteadOf https://git.qemu.org/git' + SRCDIR="$(pwd)/toolchains" module_build qemu --prefix="${RISCV}" --target-list=riscv${XLEN}-softmmu fi # make Dromajo