summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-31 18:27:27 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-31 18:27:27 (GMT)
commit6bfe4b1550a1d4153c63aa480b37691d57fbd386 (patch)
treeab8c369e9653da603947bdfdd3dd703e8ff57649
parentef2e479e1d4540b3a563d6c0099138f3e7932f01 (diff)
Transform LAN_MIRROR into plain MIRROR:
- it does not have to be in the LAN - offer mirror preference over upstream - if selected, the mirror will be scanned before upstream servers - if not selected, upstream servers will be scanned before the mirror - I've set up such an internet-accessible mirror - uClibc snapshot available - MPFR releases available (the MPFR site is down from time to time) - update all samples to use my mirror as a failover /trunk/scripts/functions | 45 16 29 0 +++++-------- /trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/sh4-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-elf/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 8 7 1 0 ++ /trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/armeb-unknown-linux-gnueabi/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 8 7 1 0 ++ /trunk/samples/i686-nptl-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 8 7 1 0 ++ /trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/i586-geode-linux-uclibc/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-405-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 8 7 1 0 ++ /trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/arm-unknown-eabi/crosstool.config | 8 7 1 0 ++ /trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/samples/powerpc-860-linux-gnu/crosstool.config | 8 7 1 0 ++ /trunk/config/global/download.in | 42 25 17 0 +++++++----- 27 files changed, 216 insertions(+), 71 deletions(-)
-rw-r--r--config/global/download.in46
-rw-r--r--samples/alphaev56-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/arm-unknown-eabi/crosstool.config8
-rw-r--r--samples/arm-unknown-elf/crosstool.config8
-rw-r--r--samples/arm-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/arm-unknown-linux-gnueabi/crosstool.config8
-rw-r--r--samples/arm-unknown-linux-uclibc/crosstool.config8
-rw-r--r--samples/arm-unknown-linux-uclibcgnueabi/crosstool.config8
-rw-r--r--samples/armeb-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/armeb-unknown-linux-gnueabi/crosstool.config8
-rw-r--r--samples/armeb-unknown-linux-uclibc/crosstool.config8
-rw-r--r--samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config8
-rw-r--r--samples/i586-geode-linux-uclibc/crosstool.config8
-rw-r--r--samples/i686-nptl-linux-gnu/crosstool.config8
-rw-r--r--samples/ia64-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/mips-unknown-linux-uclibc/crosstool.config8
-rw-r--r--samples/mipsel-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/powerpc-405-linux-gnu/crosstool.config8
-rw-r--r--samples/powerpc-860-linux-gnu/crosstool.config8
-rw-r--r--samples/powerpc-e500v2-linux-gnuspe/crosstool.config8
-rw-r--r--samples/powerpc-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/powerpc-unknown-linux-uclibc/crosstool.config8
-rw-r--r--samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config8
-rw-r--r--samples/sh4-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/x86_64-unknown-linux-gnu/crosstool.config8
-rw-r--r--samples/x86_64-unknown-linux-uclibc/crosstool.config8
-rw-r--r--scripts/functions45
27 files changed, 218 insertions, 73 deletions
diff --git a/config/global/download.in b/config/global/download.in
index 2450cba..910cb21 100644
--- a/config/global/download.in
+++ b/config/global/download.in
@@ -156,7 +156,7 @@ config PROXY_TYPE
default "socks4" if PROXY_TYPE_SOCKS_4
default "socks5" if PROXY_TYPE_SOCKS_5
-menuconfig USE_LAN_MIRROR
+menuconfig USE_MIRROR
bool
prompt "Use LAN mirror"
default n
@@ -171,46 +171,54 @@ menuconfig USE_LAN_MIRROR
Obviously, nothing prevents you from using a mirror that is in fact
*not* on your LAN, for example on another subnet of your company's
network, or a mirror on the Internet.
-
-if USE_LAN_MIRROR
-
-config LAN_MIRROR_USE_PROXY
+
+ I (Yann E. MORIN) have set up such a mirror to host snapshots of
+ some components, when those snapshots are volatile on the upstream
+ servers. The mirror is *slow*, because it is hosted behind an ADSL
+ line. For the time being, I haven't set up bandwidth limitations,
+ but should the mirror be abused, I will. Please avoid using my
+ machine when you can...
+ The mirror is available as (fill in those values in the fields
+ below):
+ host name: ymorin.is-a-geek.org
+ base dir : /mirrors
+
+if USE_MIRROR
+
+config PREFER_MIRROR
bool
- prompt "Use the proxy"
+ prompt "Prefer the LAN mirror"
default n
- depends on USE_PROXY
help
- Say 'Y' here if you need to use the proxy to connect to the LAN mirror.
-
- You'll need to say 'Y' if the LAN mirror is not really on your LAN.
+ Say 'Y' here if you prefer the LAN miror over the upstream sources.
choice
bool
prompt "Server type:"
-config LAN_MIRROR_HTTP
+config MIRROR_HTTP
bool
prompt "http"
-config LAN_MIRROR_FTP
+config MIRROR_FTP
bool
prompt "ftp"
endchoice # Server type
-config LAN_MIRROR_SCHEME
+config MIRROR_SCHEME
string
- default "http" if LAN_MIRROR_HTTP
- default "ftp" if LAN_MIRROR_FTP
+ default "http" if MIRROR_HTTP
+ default "ftp" if MIRROR_FTP
-config LAN_MIRROR_HOSTNAME
+config MIRROR_HOSTNAME
string
prompt "hostname"
default ""
help
Enter here the hostname on your LAN mirror.
-config LAN_MIRROR_BASE
+config MIRROR_BASE
string
prompt "Base directory"
default ""
@@ -223,7 +231,7 @@ config LAN_MIRROR_BASE
where <name> is replaced with the actual package name.
-config LAN_MIRROR_LS_R
+config MIRROR_LS_R
bool
# prompt "Use ls-lR et al."
depends on EXPERIMENTAL
@@ -238,7 +246,7 @@ config LAN_MIRROR_LS_R
find.txt (ditto)
ls-lR
-endif # USE_LAN_MIRROR
+endif # USE_MIRROR
config CONNECT_TIMEOUT
int
diff --git a/samples/alphaev56-unknown-linux-gnu/crosstool.config b/samples/alphaev56-unknown-linux-gnu/crosstool.config
index e023ed5..4e4ca2b 100644
--- a/samples/alphaev56-unknown-linux-gnu/crosstool.config
+++ b/samples/alphaev56-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-eabi/crosstool.config b/samples/arm-unknown-eabi/crosstool.config
index f28c51f..a4d62d8 100644
--- a/samples/arm-unknown-eabi/crosstool.config
+++ b/samples/arm-unknown-eabi/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-elf/crosstool.config b/samples/arm-unknown-elf/crosstool.config
index 34e56ff..a485e26 100644
--- a/samples/arm-unknown-elf/crosstool.config
+++ b/samples/arm-unknown-elf/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-linux-gnu/crosstool.config b/samples/arm-unknown-linux-gnu/crosstool.config
index 51e95ff..fa9a8a1 100644
--- a/samples/arm-unknown-linux-gnu/crosstool.config
+++ b/samples/arm-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR="${CT_PREFIX_DIR}"
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-linux-gnueabi/crosstool.config b/samples/arm-unknown-linux-gnueabi/crosstool.config
index f2c5713..ea83a18 100644
--- a/samples/arm-unknown-linux-gnueabi/crosstool.config
+++ b/samples/arm-unknown-linux-gnueabi/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-linux-uclibc/crosstool.config b/samples/arm-unknown-linux-uclibc/crosstool.config
index a9777fc..4c1e7f5 100644
--- a/samples/arm-unknown-linux-uclibc/crosstool.config
+++ b/samples/arm-unknown-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
index c42a299..54d8f12 100644
--- a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
+++ b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/armeb-unknown-linux-gnu/crosstool.config b/samples/armeb-unknown-linux-gnu/crosstool.config
index b953922..a73792b 100644
--- a/samples/armeb-unknown-linux-gnu/crosstool.config
+++ b/samples/armeb-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/armeb-unknown-linux-gnueabi/crosstool.config b/samples/armeb-unknown-linux-gnueabi/crosstool.config
index 40ce7e8..5af129e 100644
--- a/samples/armeb-unknown-linux-gnueabi/crosstool.config
+++ b/samples/armeb-unknown-linux-gnueabi/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/armeb-unknown-linux-uclibc/crosstool.config b/samples/armeb-unknown-linux-uclibc/crosstool.config
index a333966..7d0482f 100644
--- a/samples/armeb-unknown-linux-uclibc/crosstool.config
+++ b/samples/armeb-unknown-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
index d5f5986..9cbdd59 100644
--- a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
+++ b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config
index e5ed636..d62c662 100644
--- a/samples/i586-geode-linux-uclibc/crosstool.config
+++ b/samples/i586-geode-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config
index 0100fe5..0306c5b 100644
--- a/samples/i686-nptl-linux-gnu/crosstool.config
+++ b/samples/i686-nptl-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/ia64-unknown-linux-gnu/crosstool.config b/samples/ia64-unknown-linux-gnu/crosstool.config
index f8e5542..f96ec38 100644
--- a/samples/ia64-unknown-linux-gnu/crosstool.config
+++ b/samples/ia64-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/mips-unknown-linux-uclibc/crosstool.config b/samples/mips-unknown-linux-uclibc/crosstool.config
index 0c16992..03f79ac 100644
--- a/samples/mips-unknown-linux-uclibc/crosstool.config
+++ b/samples/mips-unknown-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/mipsel-unknown-linux-gnu/crosstool.config b/samples/mipsel-unknown-linux-gnu/crosstool.config
index af436e6..670f232 100644
--- a/samples/mipsel-unknown-linux-gnu/crosstool.config
+++ b/samples/mipsel-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-405-linux-gnu/crosstool.config b/samples/powerpc-405-linux-gnu/crosstool.config
index cf74cc5..b994bc1 100644
--- a/samples/powerpc-405-linux-gnu/crosstool.config
+++ b/samples/powerpc-405-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config
index 2d47008..aaecaba 100644
--- a/samples/powerpc-860-linux-gnu/crosstool.config
+++ b/samples/powerpc-860-linux-gnu/crosstool.config
@@ -36,7 +36,13 @@ CT_REMOVE_DOCS=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
index 981f241..86a893c 100644
--- a/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
+++ b/samples/powerpc-e500v2-linux-gnuspe/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-unknown-linux-gnu/crosstool.config b/samples/powerpc-unknown-linux-gnu/crosstool.config
index 9c849c2..831921e 100644
--- a/samples/powerpc-unknown-linux-gnu/crosstool.config
+++ b/samples/powerpc-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-unknown-linux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc/crosstool.config
index c753f96..7d2ec42 100644
--- a/samples/powerpc-unknown-linux-uclibc/crosstool.config
+++ b/samples/powerpc-unknown-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
index ba79755..87b9603 100644
--- a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
+++ b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/sh4-unknown-linux-gnu/crosstool.config b/samples/sh4-unknown-linux-gnu/crosstool.config
index 5a6e12c..b52a9d4 100644
--- a/samples/sh4-unknown-linux-gnu/crosstool.config
+++ b/samples/sh4-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config
index 94b3560..98d3a4d 100644
--- a/samples/x86_64-unknown-linux-gnu/crosstool.config
+++ b/samples/x86_64-unknown-linux-gnu/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config
index 237b9b2..52171f6 100644
--- a/samples/x86_64-unknown-linux-uclibc/crosstool.config
+++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config
@@ -33,7 +33,13 @@ CT_INSTALL_DIR_RO=y
# CT_FORCE_DOWNLOAD is not set
# CT_USE_PROXY is not set
CT_PROXY_TYPE="none"
-# CT_USE_LAN_MIRROR is not set
+CT_USE_MIRROR=y
+# CT_PREFER_MIRROR is not set
+CT_MIRROR_HTTP=y
+# CT_MIRROR_FTP is not set
+CT_MIRROR_SCHEME="http"
+CT_MIRROR_HOSTNAME="ymorin.is-a-geek.org"
+CT_MIRROR_BASE="/mirrors"
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
diff --git a/scripts/functions b/scripts/functions
index b1db160..75b2eaf 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -474,40 +474,27 @@ CT_GetFile() {
# Not found locally, try from the network
- # Start with LAN mirror
- if [ "${CT_USE_LAN_MIRROR}" = "y" ]; then
- CT_DoSetProxy ${CT_LAN_MIRROR_USE_PROXY:+${CT_PROXY_TYPE}}
- CT_DoLog DEBUG "Trying to retrieve a copy of '${file}' from LAN mirror '${CT_LAN_MIRROR_HOSTNAME}'"
- CT_TestOrAbort "Please set the LAN mirror hostname" -n "${CT_LAN_MIRROR_HOSTNAME}"
- CT_TestOrAbort "Please tell me where to find tarballs on the LAN mirror '${CT_LAN_MIRROR_HOSTNAME}'" -n "${CT_LAN_MIRROR_BASE}"
- for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
- # Please note: we just have the file's basename in a single piece.
- # So we have to just try and split it back into name and version... :-(
- for url in "${CT_LAN_MIRROR_SCHEME}://${CT_LAN_MIRROR_HOSTNAME}/${CT_LAN_MIRROR_BASE}/${file%-*}" \
- "${CT_LAN_MIRROR_SCHEME}://${CT_LAN_MIRROR_HOSTNAME}/${CT_LAN_MIRROR_BASE}"; \
- do
- CT_DoLog DEBUG "Trying '${url}/${file}${ext}'"
- CT_DoGetFile "${url}/${file}${ext}"
- if [ -f "${file}${ext}" ]; then
- CT_DoLog DEBUG "Got '${file}' from the LAN mirror"
- if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
- # The file may already exist if downloads are forced: remove it first
- CT_DoLog EXTRA "Saving '${file}' to local storage"
- CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
- CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
- CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
- fi
- return 0
- fi
- done
- done
+ # Add URLs on the LAN mirror
+ LAN_URLS=
+ if [ "${CT_USE_MIRROR}" = "y" ]; then
+ CT_DoLog DEBUG "Trying to retrieve a copy of '${file}' from LAN mirror '${CT_MIRROR_HOSTNAME}'"
+ CT_TestOrAbort "Please set the LAN mirror hostname" -n "${CT_MIRROR_HOSTNAME}"
+ CT_TestOrAbort "Please tell me where to find tarballs on the LAN mirror '${CT_MIRROR_HOSTNAME}'" -n "${CT_MIRROR_BASE}"
+ LAN_URLS="${LAN_URLS} ${CT_MIRROR_SCHEME}://${CT_MIRROR_HOSTNAME}/${CT_MIRROR_BASE}/${file%-*}"
+ LAN_URLS="${LAN_URLS} ${CT_MIRROR_SCHEME}://${CT_MIRROR_HOSTNAME}/${CT_MIRROR_BASE}"
+ fi
+
+ if [ "${CT_PREFER_MIRROR}" = "y" ]; then
+ URLS="${LAN_URLS} ${@}"
+ else
+ URLS="${@} ${LAN_URLS}"
fi
- # OK, available neither localy, nor from the LAN mirror (if any).
+ # Scan all URLs in turn, and try to grab a tarball from there
CT_DoSetProxy ${CT_PROXY_TYPE}
for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
# Try all urls in turn
- for url in "$@"; do
+ for url in ${URLS}; do
CT_DoLog DEBUG "Trying '${url}/${file}${ext}'"
CT_DoGetFile "${url}/${file}${ext}"
if [ -f "${file}${ext}" ]; then