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