config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 04 00:04:23 2011 +0200 (2011-05-04)
changeset 2608 aa09a36c3d36
parent 2593 2472b2f24e3a
child 2725 32aa23619dfd
permissions -rw-r--r--
scripts/functions: test for decompressors before use

./configure does check for the presence of gz and bzip2, so we can
safely use them in the build scripts.

On the other hand, more recent formats (eg. XZ) are not yet widely
available, and we do not want, and can't, force the user to install
them as a pre-requisite.

So, build up a list of allowed tarball formats based on the available
decompressors. For no, this is a static list, but the upcoming XZ
support will conditionnaly add to this list.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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
    help
yann@1131
     9
      Normally, crosstool-NG will try to download missing tarballs (or
yann@1131
    10
      checkout from CVS/SVN...).
yann@1131
    11
      If you do not have network connectivity when you run crosstool-NG,
yann@1131
    12
      and some files are missing, it can be a long time before crosstool-NG
yann@1131
    13
      fails.
yann@1131
    14
      
yann@1131
    15
      Saying 'y' here will prevent crosstool-NG from downloading missing
yann@1131
    16
      files, thus failing early so that you don't get stuck.
yann@1131
    17
yann@1131
    18
if ! FORBID_DOWNLOAD
yann@1131
    19
yann@693
    20
config FORCE_DOWNLOAD
yann@693
    21
    bool
yann@693
    22
    prompt "Force downloads"
yann@693
    23
    help
yann@693
    24
      Force downloading tarballs, even if one already exists.
yann@693
    25
      
antony@2564
    26
      Useful if you suspect a tarball to be damaged.
yann@693
    27
yann@695
    28
config CONNECT_TIMEOUT
yann@695
    29
    int
yann@1669
    30
    prompt "Connection timeout"
yann@695
    31
    default 10
yann@695
    32
    help
yann@695
    33
      From the curl manual:
yann@695
    34
        Maximum time in seconds that you allow the connection to the server to take.
yann@754
    35
      
yann@695
    36
      The scenario is as follows;
yann@695
    37
        - some enterprise networks have firewalls that prohibit FTP traffic, while
yann@695
    38
          still allowing HTTP
yann@695
    39
        - most download sites have http:// equivalent for the ftp:// URL
yann@695
    40
        - after this number of seconds, it is considered that the connection could
yann@695
    41
          not be established, and the next URL in the list is tried, until we reach
yann@695
    42
          an URL that will go through the firewall, most probably an http:// URL.
yann@754
    43
      
yann@695
    44
      If you have a slow network, you'd better set this value higher than the default
yann@695
    45
      10s. If you know a firewall is blocking connections, but your network is globally
yann@695
    46
      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
yann@754
    47
      
yann@695
    48
      Note that this value applies equally to wget if you have that installed.
yann@695
    49
yann@695
    50
config ONLY_DOWNLOAD
yann@695
    51
    bool
yann@695
    52
    prompt "Stop after downloading tarballs"
yann@695
    53
    help
yann@695
    54
      Only download the tarballs. Exit once it done.
yann@695
    55
      
antony@2564
    56
      Useful to pre-retrieve the tarballs before going off-line.
yann@1131
    57
yann@1131
    58
endif # ! FORBID_DOWNLOAD
yann@2595
    59
yann@2595
    60
config USE_MIRROR
yann@2595
    61
    bool
yann@2595
    62
    prompt "Use a mirror"
yann@2595
    63
    help
yann@2595
    64
      If you have a machine on your LAN that mirrors some of the needed
yann@2595
    65
      tarballs, you can say 'Y' here, and configure adequate values in
yann@2595
    66
      the following options.
yann@2595
    67
      
yann@2595
    68
      Obviously, nothing prevents you from using a mirror that is in fact
yann@2595
    69
      *not* on your LAN, for example on another subnet of your company's
yann@2595
    70
      network, or a mirror on the Internet.
yann@2595
    71
yann@2595
    72
config MIRROR_BASE_URL
yann@2595
    73
    string
yann@2595
    74
    prompt "Base URL"
yann@2595
    75
    depends on USE_MIRROR
yann@2595
    76
    default "http://ymorin.is-a-geek.org/mirrors/"
yann@2595
    77
    help
yann@2595
    78
      This is the base URL searched in for tarballs.
yann@2595
    79
      
yann@2595
    80
      I (Yann E. MORIN) have set up such a mirror to host snapshots of
yann@2595
    81
      some components, when those snapshots are volatile on the upstream
yann@2595
    82
      servers. The mirror is *slow*, because it is hosted behind an ADSL
yann@2595
    83
      line. For the time being, I haven't set up bandwidth limitations,
yann@2595
    84
      but should the mirror be abused, I will. Please avoid using my
yann@2595
    85
      machine when you can... Also, no guarantee is made as to its
yann@2595
    86
      availability. Use at your own risks.
yann@2595
    87
      
yann@2595
    88
      The mirror is available at:
yann@2595
    89
        http://ymorin.is-a-geek.org/mirrors/