From cd25afbc7e718cdaceabb38d536d76ce8507c98c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sun, 11 Dec 2022 13:44:25 +0800 Subject: [PATCH] scripts/download.pl: update mirrors Signed-off-by: Tianling Shen (cherry picked from commit 3d37d7b1c0c823feea90c4cf632710ff83d87ce6) --- include/download.mk | 2 +- scripts/download.pl | 28 +++++++++++++++++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/include/download.mk b/include/download.mk index 4b419851d0..99a3e0140d 100644 --- a/include/download.mk +++ b/include/download.mk @@ -27,7 +27,7 @@ define dl_method $(strip \ $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)), $(if $(2),$(2), \ - $(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/scripts/download.pl b/scripts/download.pl index 86e9950f05..e27265eb6d 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -206,11 +206,21 @@ foreach my $mirror (@ARGV) { # use OpenWrt source server directly } elsif ($mirror =~ /^\@IMMORTALWRT$/) { # use ImmortalWrt source server directly + } elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) { + push @mirrors, "https://mirrors.tencent.com/debian/$1"; + push @mirrors, "https://mirrors.aliyun.com/debian/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/debian/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/debian/$1"; + push @mirrors, "https://ftp.debian.org/debian/$1"; + push @mirrors, "https://mirror.leaseweb.com/debian/$1"; + push @mirrors, "https://mirror.netcologne.de/debian/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/debian/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/debian/$1" } elsif ($mirror =~ /^\@APACHE\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/apache/$1"; push @mirrors, "https://mirrors.aliyun.com/apache/$1"; - # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; - # push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1"; push @mirrors, "https://mirror.netcologne.de/apache.org/$1"; push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1"; @@ -234,9 +244,8 @@ foreach my $mirror (@ARGV) { } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "https://mirrors.tencent.com/gnu/$1"; push @mirrors, "https://mirrors.aliyun.com/gnu/$1"; - # push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; - # push @mirrors, "https://mirrors.cqu.edu.cn/gnu/$1"; - # push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; + push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1"; push @mirrors, "https://mirror.netcologne.de/gnu/$1"; push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1"; @@ -261,8 +270,11 @@ foreach my $mirror (@ARGV) { push @extra, "$extra[0]/longterm/v$1"; } foreach my $dir (@extra) { - # push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir"; + push @mirrors, "https://mirror.iscas.ac.cn/kernel.org/$dir"; + push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir"; + push @mirrors, "https://mirror.nju.edu.cn/kernel.org/$dir"; push @mirrors, "https://cdn.kernel.org/pub/$dir"; + push @mrirors, "https://ftp.jaist.ac.jp/pub/Linux/kernel.org/$dir"; push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir"; push @mirrors, "https://mirrors.mit.edu/kernel/$dir"; push @mirrors, "http://ftp.nara.wide.ad.jp/pub/kernel.org/$dir"; @@ -271,7 +283,9 @@ foreach my $mirror (@ARGV) { push @mirrors, "ftp://www.mirrorservice.org/sites/ftp.kernel.org/pub/$dir"; } } elsif ($mirror =~ /^\@GNOME\/(.+)$/) { - push @mirrors, "https://mirrors.ustc.edu.cn/gnome/sources/$1"; + push @mirrors, "https://mirrors.ustc.edu.cn/gnome/sources/$1"; + push @mirrors, "https://mirror.nju.edu.cn/gnome/$1"; + push @mirrors, "https://download.gnome.org/sources/$1"; push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnome/sources/$1"; push @mirrors, "http://ftp.acc.umu.se/pub/GNOME/sources/$1"; push @mirrors, "http://ftp.kaist.ac.kr/gnome/sources/$1";