config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 31 18:27:27 2008 +0000 (2008-10-31)
changeset 1022 7b3e8b8d392e
parent 1021 fa97295ee307
child 1131 b62d14d45fc4
permissions -rw-r--r--
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(-)
     1 # Options specific to downloading packages
     2 
     3 comment "Downloading"
     4 
     5 config FORCE_DOWNLOAD
     6     bool
     7     prompt "Force downloads"
     8     default n
     9     help
    10       Force downloading tarballs, even if one already exists.
    11       
    12       Usefull if you suspect a tarball to be damaged.
    13 
    14 menuconfig USE_PROXY
    15     bool
    16     prompt "Use a proxy"
    17     default n
    18     help
    19       Say 'Y' here if you need to use a proxy to connect to the internet.
    20       
    21       You can then choose between an HTTP or a SOCKS 4/5 proxy.
    22       
    23       **** NOTE ****
    24       The settings below may not cover all possible proxy configurations!
    25       You'd be better off setting proxy in the environment!
    26 
    27 if USE_PROXY
    28 
    29 choice
    30     bool
    31     prompt "Proxy type"
    32 
    33 config PROXY_TYPE_HTTP
    34     bool
    35     prompt "HTTP proxy"
    36     help
    37       Use an HTTP proxy to connect to to the internet.
    38       Only the http and ftp protocols will be tunneled through this
    39       proxy.
    40       
    41       Alternatively to setting this option, you can set and export the
    42       following variables in your environment:
    43         ftp_proxy=http://user:passwd@proxy.server:port/
    44         http_proxy=http://user:passwd@proxy.server:port/
    45         https_proxy=http://user:passwd@proxy.server:port/
    46 
    47 # Haha! Here is an interesting feature/bug of mconf!
    48 # The following config entries will be shown out-side the
    49 # choice menu!
    50 # To add a third entry in the choice menu, add it after the
    51 # if...endif conditional below, and so on for a fourth entry...
    52 if PROXY_TYPE_HTTP
    53 
    54 config PROXY_HOST
    55     string
    56     prompt "hostname/IP"
    57 
    58 config PROXY_PORT
    59     int
    60     prompt "port"
    61     default 8080
    62     
    63 config PROXY_USER
    64     string
    65     prompt "user name"
    66 
    67 config PROXY_PASS
    68     string
    69     prompt "password"
    70 
    71 endif # USE_HTTP_PROXY
    72 
    73 config PROXY_TYPE_SOCKS
    74     bool
    75     prompt "SOCKS 4/5 proxy"
    76     help
    77       Use a Socks 4/5 proxy to connect to the internet.
    78       All protocols can get tunneled through this kind of proxy (your
    79       proxy configuration may not allow all protocols, but chances are
    80       that protocols needed by crosstool-NG are allowed).
    81       
    82       Alternatively to setting this option, you can configure tsocks
    83       system-wide, and set and export the following variable in your
    84       environment:
    85         LD_PRELOAD=/path/to/your/tsocks-library.so
    86       
    87       This option makes use of the tsocks library. You will have to have tsocks
    88       installed on your system, of course.
    89       
    90       If you think you do not know what tsocks is, or how to configure it,
    91       chances are that you do not need to set this option.
    92 
    93 if PROXY_TYPE_SOCKS
    94 
    95 choice
    96     bool
    97     prompt "type"
    98     default PROXY_TYPE_SOCKS_SYS
    99 
   100 config PROXY_TYPE_SOCKS_SYS
   101     bool
   102     prompt "Use system settings"
   103     help
   104       Use that if tsocks is already configured on your system.
   105 
   106 config PROXY_TYPE_SOCKS_AUTO
   107     bool
   108     prompt "Auto"
   109     help
   110       crosstool-NG will attempt to guess what type of SOCKS version
   111       the proxy speaks.
   112 
   113 config PROXY_TYPE_SOCKS_4
   114     bool
   115     prompt "SOCKS 4"
   116 
   117 config PROXY_TYPE_SOCKS_5
   118     bool
   119     prompt "SOCKS 5"
   120 
   121 endchoice
   122 
   123 if ! PROXY_TYPE_SOCKS_SYS
   124 
   125 config PROXY_HOST
   126     string
   127     prompt "hostname/IP"
   128 
   129 config PROXY_PORT
   130     int
   131     prompt "port"
   132     default 1080
   133 
   134 config PROXY_USER
   135     string
   136     prompt "user name"
   137 
   138 config PROXY_PASS
   139     string
   140     prompt "password"
   141 
   142 endif # ! PROXY_TYPE_SOCKS_SYS
   143 
   144 endif # USE_SOCKS_PROXY
   145 
   146 endchoice
   147 
   148 endif # USE_PROXY
   149 
   150 config PROXY_TYPE
   151     string
   152     default "none"      if ! USE_PROXY
   153     default "http"      if PROXY_TYPE_HTTP
   154     default "sockssys"  if PROXY_TYPE_SOCKS_SYS
   155     default "socksauto" if PROXY_TYPE_SOCKS_AUTO
   156     default "socks4"    if PROXY_TYPE_SOCKS_4
   157     default "socks5"    if PROXY_TYPE_SOCKS_5
   158 
   159 menuconfig USE_MIRROR
   160     bool
   161     prompt "Use LAN mirror"
   162     default n
   163     help
   164       If you have a machine on your LAN that mirrors some of the needed
   165       tarballs, you can say 'Y' here, and configure adequate values in
   166       the following options.
   167       
   168       Tarballs will be be preferably fetched from the LAN mirror, and if
   169       not found there, standard places will be searched for.
   170       
   171       Obviously, nothing prevents you from using a mirror that is in fact
   172       *not* on your LAN, for example on another subnet of your company's
   173       network, or a mirror on the Internet.
   174       
   175       I (Yann E. MORIN) have set up such a mirror to host snapshots of
   176       some components, when those snapshots are volatile on the upstream
   177       servers. The mirror is *slow*, because it is hosted behind an ADSL
   178       line. For the time being, I haven't set up bandwidth limitations,
   179       but should the mirror be abused, I will. Please avoid using my
   180       machine when you can...
   181       The mirror is available as (fill in those values in the fields
   182       below):
   183         host name: ymorin.is-a-geek.org
   184         base dir : /mirrors
   185 
   186 if USE_MIRROR
   187 
   188 config PREFER_MIRROR
   189     bool
   190     prompt "Prefer the LAN mirror"
   191     default n
   192     help
   193       Say 'Y' here if you prefer the LAN miror over the upstream sources.
   194 
   195 choice
   196     bool
   197     prompt "Server type:"
   198 
   199 config MIRROR_HTTP
   200     bool
   201     prompt "http"
   202 
   203 config MIRROR_FTP
   204     bool
   205     prompt "ftp"
   206 
   207 endchoice # Server type
   208 
   209 config MIRROR_SCHEME
   210     string
   211     default "http"  if MIRROR_HTTP
   212     default "ftp"   if MIRROR_FTP
   213 
   214 config MIRROR_HOSTNAME
   215     string
   216     prompt "hostname"
   217     default ""
   218     help
   219       Enter here the hostname on your LAN mirror.
   220 
   221 config MIRROR_BASE
   222     string
   223     prompt "Base directory"
   224     default ""
   225     help
   226       This is the base directory searched for for tarballs. If you enter
   227       /mirror, then the search is performed in the following directories
   228       on the server:
   229         /mirror/<name>/
   230         /mirror/
   231       
   232       where <name> is replaced with the actual package name.
   233 
   234 config MIRROR_LS_R
   235     bool
   236 #    prompt "Use ls-lR et al."
   237     depends on EXPERIMENTAL
   238     default n
   239     help
   240       If the tarball was not found at the above location, see if the server
   241       has a ls-lr.gz (or similar) file, and use that file to see if the
   242       tarball is listed somewhere in that file.
   243       
   244       Common file names looked for are:
   245         ls-lrRt.txt     (used at ftp.gnu.org)
   246         find.txt        (ditto)
   247         ls-lR
   248 
   249 endif # USE_MIRROR
   250 
   251 config CONNECT_TIMEOUT
   252     int
   253     prompt "connection timeout"
   254     default 10
   255     help
   256       From the curl manual:
   257         Maximum time in seconds that you allow the connection to the server to take.
   258       
   259       The scenario is as follows;
   260         - some enterprise networks have firewalls that prohibit FTP traffic, while
   261           still allowing HTTP
   262         - most download sites have http:// equivalent for the ftp:// URL
   263         - after this number of seconds, it is considered that the connection could
   264           not be established, and the next URL in the list is tried, until we reach
   265           an URL that will go through the firewall, most probably an http:// URL.
   266       
   267       If you have a slow network, you'd better set this value higher than the default
   268       10s. If you know a firewall is blocking connections, but your network is globally
   269       fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
   270       
   271       Note that this value applies equally to wget if you have that installed.
   272       
   273       Of course, you'd be better off to use a proxy, as offered by the previous
   274       option.
   275 
   276 config ONLY_DOWNLOAD
   277     bool
   278     prompt "Stop after downloading tarballs"
   279     default n
   280     help
   281       Only download the tarballs. Exit once it done.
   282       
   283       Usefull to pre-retrieve the tarballs before going off-line.