mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-26 14:19:19 +00:00
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(-)
This commit is contained in:
parent
ef2e479e1d
commit
6bfe4b1550
@ -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
|
||||
bool
|
||||
prompt "Use the proxy"
|
||||
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.
|
||||
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 "Prefer the LAN mirror"
|
||||
default n
|
||||
help
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
# OK, available neither localy, nor from the LAN mirror (if any).
|
||||
if [ "${CT_PREFER_MIRROR}" = "y" ]; then
|
||||
URLS="${LAN_URLS} ${@}"
|
||||
else
|
||||
URLS="${@} ${LAN_URLS}"
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user