[OpenWrt-Devel] [PATCH] Add download mirrors for tools from GNU Savannah (bug #15184)

Hannu Nyman hannu.nyman at iki.fi
Mon Oct 6 16:35:51 EDT 2014


John Crispin wrote at Mon Oct 6 22:04:07 CEST 2014:
 > can you make this work like @SF_NET and then make a second patch to fix
 > up all other users to use the @SAVANNAH syntax ?

Patch v2:
I defined a new download method @SAVANNAH in include/download.mk and 
scripts/download.pl,
and converted quilt and qemu to use that method.

Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>

-------------- next part --------------
Index: include/download.mk
===================================================================
--- include/download.mk	(revision 42806)
+++ include/download.mk	(working copy)
@@ -11,7 +11,7 @@
 define dl_method
 $(strip \
   $(if $(2),$(2), \
-    $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% ftp://% http://% https://% file://%,$(1)),default, \
+    $(if $(filter @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
       $(if $(filter git://%,$(1)),git, \
         $(if $(filter svn://%,$(1)),svn, \
           $(if $(filter cvs://%,$(1)),cvs, \
Index: scripts/download.pl
===================================================================
--- scripts/download.pl	(revision 42806)
+++ scripts/download.pl	(working copy)
@@ -157,6 +157,11 @@
 		push @mirrors, "ftp://ftp.belnet.be/mirror/ftp.gnu.org/gnu/$1";
 		push @mirrors, "ftp://ftp.mirror.nl/pub/mirror/gnu/$1";
 		push @mirrors, "http://mirror.switch.ch/ftp/mirror/gnu/$1";
+	} elsif ($mirror =~ /^\@SAVANNAH\/(.+)$/) {
+		push @mirrors, "http://download.savannah.gnu.org/releases/$1";
+		push @mirrors, "http://nongnu.uib.no/$1";
+		push @mirrors, "http://ftp.igh.cnrs.fr/pub/nongnu/$1";
+		push @mirrors, "http://download-mirror.savannah.gnu.org/releases/$1";
 	} elsif ($mirror =~ /^\@KERNEL\/(.+)$/) {
 		my @extra = ( $1 );
 		if ($filename =~ /linux-\d+\.\d+(?:\.\d+)?-rc/) {
Index: tools/qemu/Makefile
===================================================================
--- tools/qemu/Makefile	(revision 42806)
+++ tools/qemu/Makefile	(working copy)
@@ -10,7 +10,7 @@
 PKG_VERSION:=0.14.1
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/qemu/
+PKG_SOURCE_URL:=@SAVANNAH/qemu
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MD5SUM:=b6c713a8db638e173af53a62d5178640
 
Index: tools/quilt/Makefile
===================================================================
--- tools/quilt/Makefile	(revision 42806)
+++ tools/quilt/Makefile	(working copy)
@@ -10,7 +10,7 @@
 PKG_VERSION:=0.63
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/$(PKG_NAME)
+PKG_SOURCE_URL:=@SAVANNAH/quilt
 PKG_MD5SUM:=c0ef4beb58a6fa72563b955e70624b6e
 
 include $(INCLUDE_DIR)/host-build.mk
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list