[openwrt/openwrt] download: add mirror alias for Debian

LEDE Commits lede-commits at lists.infradead.org
Fri Feb 26 14:43:38 EST 2021


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9a9cf40dd968f409cf36c9537e79438d35322d95

commit 9a9cf40dd968f409cf36c9537e79438d35322d95
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sat Feb 20 21:17:26 2021 +0100

    download: add mirror alias for Debian
    
    Add an alias for Debian packages and download them from the Debian
    mirror redirector.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 include/download.mk                       | 2 +-
 package/firmware/amd64-microcode/Makefile | 2 +-
 package/firmware/intel-microcode/Makefile | 2 +-
 package/system/ca-certificates/Makefile   | 2 +-
 scripts/download.pl                       | 4 ++++
 tools/fakeroot/Makefile                   | 2 +-
 tools/mklibs/Makefile                     | 2 +-
 7 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index c69d84939c..4bf055e611 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 @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+      $(if $(filter @OPENWRT @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/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile
index cf21aba569..e0051ab8c0 100644
--- a/package/firmware/amd64-microcode/Makefile
+++ b/package/firmware/amd64-microcode/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=20191218
 PKG_RELEASE:=1
 
 PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/
+PKG_SOURCE_URL:=@DEBIAN/pool/non-free/a/amd64-microcode/
 PKG_HASH:=f469b79348097c5f04641b67a39d0ee5a2a1916c9556281626c04f2275d4132d
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile
index b3c3674f87..e8ae7bff58 100644
--- a/package/firmware/intel-microcode/Makefile
+++ b/package/firmware/intel-microcode/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=20200616
 PKG_RELEASE:=1
 
 PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/i/intel-microcode/
+PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/
 PKG_HASH:=bcc3b81c452fe4649a948c022475d76c1cdfbb730f36749a082f412f1406a3b9
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index 2b5f96b206..46bd871ccb 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 PKG_MAINTAINER:=
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
+PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates
 PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
 PKG_INSTALL:=1
 
diff --git a/scripts/download.pl b/scripts/download.pl
index 772982d1f2..a1d80e9b42 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -196,6 +196,10 @@ foreach my $mirror (@ARGV) {
 		}
 	} elsif ($mirror =~ /^\@OPENWRT$/) {
 		# use OpenWrt source server directly
+	} elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) {
+		push @mirrors, "https://ftp.debian.org/debian/$1";
+		push @mirrors, "https://mirror.leaseweb.com/debian/$1";
+		push @mirrors, "https://mirror.netcologne.de/debian/$1";
 	} elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
 		push @mirrors, "https://mirror.netcologne.de/apache.org/$1";
 		push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1";
diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile
index e9daa4b6ad..61bc27b90e 100644
--- a/tools/fakeroot/Makefile
+++ b/tools/fakeroot/Makefile
@@ -9,7 +9,7 @@ PKG_VERSION:=1.25.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/f/fakeroot
+PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
 PKG_HASH:=8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
diff --git a/tools/mklibs/Makefile b/tools/mklibs/Makefile
index 48b1eace40..7c9ffffbad 100644
--- a/tools/mklibs/Makefile
+++ b/tools/mklibs/Makefile
@@ -10,7 +10,7 @@ PKG_NAME:=mklibs
 PKG_VERSION:=0.1.44
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mklibs/
+PKG_SOURCE_URL:=@DEBIAN/pool/main/m/mklibs/
 PKG_HASH:=3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2
 
 HOST_FIXUP:=autoreconf



More information about the lede-commits mailing list