config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Dec 30 15:36:22 2009 +0100 (2009-12-30)
changeset 1669 61edd9d19e3c
parent 1295 38cf339a6ad0
child 1776 6144097af955
permissions -rw-r--r--
scripts/functions: add aria2, a powerfull downloader

aria2 is a powerfull downloader that is capable of chunking and
parallel retrieval.

Due to li;itations in crosstool-NG retrieval facilities, it's not possible
to take fully advantage of aria2. It might happen that, in the future,
those limitations get lifted away, so we can take use features such as
parallel downloading from more than one server at the same time. For now,
it should still speed up downloads thanks to parallel downloading of chunks.
yann@693
     1
# Options specific to downloading packages
yann@693
     2
yann@693
     3
comment "Downloading"
yann@693
     4
yann@1131
     5
config FORBID_DOWNLOAD
yann@1131
     6
    bool
yann@1131
     7
    prompt "Forbid downloads"
yann@1131
     8
    default n
yann@1131
     9
    help
yann@1131
    10
      Normally, crosstool-NG will try to download missing tarballs (or
yann@1131
    11
      checkout from CVS/SVN...).
yann@1131
    12
      If you do not have network connectivity when you run crosstool-NG,
yann@1131
    13
      and some files are missing, it can be a long time before crosstool-NG
yann@1131
    14
      fails.
yann@1131
    15
      
yann@1131
    16
      Saying 'y' here will prevent crosstool-NG from downloading missing
yann@1131
    17
      files, thus failing early so that you don't get stuck.
yann@1131
    18
yann@1131
    19
if ! FORBID_DOWNLOAD
yann@1131
    20
yann@693
    21
config FORCE_DOWNLOAD
yann@693
    22
    bool
yann@693
    23
    prompt "Force downloads"
yann@693
    24
    default n
yann@693
    25
    help
yann@693
    26
      Force downloading tarballs, even if one already exists.
yann@693
    27
      
yann@693
    28
      Usefull if you suspect a tarball to be damaged.
yann@693
    29
yann@1022
    30
menuconfig USE_MIRROR
yann@754
    31
    bool
yann@754
    32
    prompt "Use LAN mirror"
yann@754
    33
    default n
yann@754
    34
    help
yann@754
    35
      If you have a machine on your LAN that mirrors some of the needed
yann@754
    36
      tarballs, you can say 'Y' here, and configure adequate values in
yann@754
    37
      the following options.
yann@754
    38
      
yann@754
    39
      Tarballs will be be preferably fetched from the LAN mirror, and if
yann@754
    40
      not found there, standard places will be searched for.
yann@754
    41
      
yann@754
    42
      Obviously, nothing prevents you from using a mirror that is in fact
yann@754
    43
      *not* on your LAN, for example on another subnet of your company's
yann@754
    44
      network, or a mirror on the Internet.
yann@1294
    45
yann@1294
    46
if USE_MIRROR
yann@1294
    47
yann@1294
    48
config PREFER_MIRROR
yann@1294
    49
    bool
yann@1294
    50
    prompt "Prefer the mirror"
yann@1294
    51
    default n
yann@1294
    52
    help
yann@1294
    53
      Say 'Y' here if you prefer the LAN miror over the upstream sources.
yann@1294
    54
yann@1294
    55
config MIRROR_BASE_URL
yann@1294
    56
    string
yann@1294
    57
    prompt "Base URL"
yann@1295
    58
    default "http://ymorin.is-a-geek.org/mirrors/"
yann@1294
    59
    help
yann@1294
    60
      This is the base URL searched in for tarballs.
yann@1022
    61
      
yann@1022
    62
      I (Yann E. MORIN) have set up such a mirror to host snapshots of
yann@1022
    63
      some components, when those snapshots are volatile on the upstream
yann@1022
    64
      servers. The mirror is *slow*, because it is hosted behind an ADSL
yann@1022
    65
      line. For the time being, I haven't set up bandwidth limitations,
yann@1022
    66
      but should the mirror be abused, I will. Please avoid using my
yann@1294
    67
      machine when you can... Also, no guarantee is made as to its
yann@1294
    68
      availability. Use at your own risks.
yann@754
    69
      
yann@1294
    70
      The mirror is available at:
yann@1294
    71
        http://ymorin.is-a-geek.org/mirrors/
yann@754
    72
yann@1022
    73
config MIRROR_LS_R
yann@754
    74
    bool
yann@754
    75
#    prompt "Use ls-lR et al."
yann@754
    76
    depends on EXPERIMENTAL
yann@754
    77
    default n
yann@754
    78
    help
yann@754
    79
      If the tarball was not found at the above location, see if the server
yann@754
    80
      has a ls-lr.gz (or similar) file, and use that file to see if the
yann@754
    81
      tarball is listed somewhere in that file.
yann@754
    82
      
yann@754
    83
      Common file names looked for are:
yann@754
    84
        ls-lrRt.txt     (used at ftp.gnu.org)
yann@754
    85
        find.txt        (ditto)
yann@754
    86
        ls-lR
yann@754
    87
yann@1022
    88
endif # USE_MIRROR
yann@754
    89
yann@695
    90
config CONNECT_TIMEOUT
yann@695
    91
    int
yann@1669
    92
    prompt "Connection timeout"
yann@695
    93
    default 10
yann@695
    94
    help
yann@695
    95
      From the curl manual:
yann@695
    96
        Maximum time in seconds that you allow the connection to the server to take.
yann@754
    97
      
yann@695
    98
      The scenario is as follows;
yann@695
    99
        - some enterprise networks have firewalls that prohibit FTP traffic, while
yann@695
   100
          still allowing HTTP
yann@695
   101
        - most download sites have http:// equivalent for the ftp:// URL
yann@695
   102
        - after this number of seconds, it is considered that the connection could
yann@695
   103
          not be established, and the next URL in the list is tried, until we reach
yann@695
   104
          an URL that will go through the firewall, most probably an http:// URL.
yann@754
   105
      
yann@695
   106
      If you have a slow network, you'd better set this value higher than the default
yann@695
   107
      10s. If you know a firewall is blocking connections, but your network is globally
yann@695
   108
      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
yann@754
   109
      
yann@695
   110
      Note that this value applies equally to wget if you have that installed.
yann@695
   111
yann@1669
   112
config DOWNLOAD_MAX_CHUNKS
yann@1669
   113
    int
yann@1669
   114
    prompt "Maximum number of // chunks"
yann@1669
   115
    default 5
yann@1669
   116
    range 1 10
yann@1669
   117
    help
yann@1669
   118
      If you have aria2 installed, then it will be used to download files.
yann@1669
   119
      Aria2 can split the download in chunks, and download those chunks in //
yann@1669
   120
      which can be interesting to speed up the download.
yann@1669
   121
      
yann@1669
   122
      On the other hand, using many chunks, or even chunking in general, may
yann@1669
   123
      be seen by some site admins as being kind of unfair, or even as a DoS.
yann@1669
   124
      That's why the range of acceptable values is [1..10], and the default
yann@1669
   125
      is 5 (aria2's default).
yann@1669
   126
yann@695
   127
config ONLY_DOWNLOAD
yann@695
   128
    bool
yann@695
   129
    prompt "Stop after downloading tarballs"
yann@695
   130
    default n
yann@695
   131
    help
yann@695
   132
      Only download the tarballs. Exit once it done.
yann@695
   133
      
yann@695
   134
      Usefull to pre-retrieve the tarballs before going off-line.
yann@1131
   135
yann@1131
   136
endif # ! FORBID_DOWNLOAD