config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 19 21:22:58 2008 +0000 (2008-07-19)
changeset 693 458facedc485
child 695 320862b2d6f1
permissions -rw-r--r--
Split-up download and extract options into two separate files, because download options are begining to be numerous.

/trunk/config/global/extract.in | 193 1 192 0 ----------------------------------------------
/trunk/config/global/download.in | 52 1 51 0 ------------
/trunk/config/global.in | 3 2 1 0 +
3 files changed, 4 insertions(+), 244 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@693
    14
config ONLY_DOWNLOAD
yann@693
    15
    bool
yann@693
    16
    prompt "Stop after downloading tarballs"
yann@693
    17
    default n
yann@693
    18
    help
yann@693
    19
      Only download the tarballs. Exit once it done.
yann@693
    20
      
yann@693
    21
      Usefull to pre-retrieve the tarballs before going off-line.
yann@693
    22
yann@693
    23
config CONNECT_TIMEOUT
yann@693
    24
    int
yann@693
    25
    prompt "connection timeout"
yann@693
    26
    default 10
yann@693
    27
    help
yann@693
    28
      From the curl manual:
yann@693
    29
        Maximum time in seconds that you allow the connection to the server to take.
yann@693
    30
yann@693
    31
      The scenario is as follows;
yann@693
    32
        - some enterprise networks have firewalls that prohibit FTP traffic, while
yann@693
    33
          still allowing HTTP
yann@693
    34
        - most download sites have http:// equivalent for the ftp:// URL
yann@693
    35
        - after this number of seconds, it is considered that the connection could
yann@693
    36
          not be established, and the next URL in the list is tried, until we reach
yann@693
    37
          an URL that will go through the firewall, most probably an http:// URL.
yann@693
    38
yann@693
    39
      If you have a slow network, you'd better set this value higher than the default
yann@693
    40
      10s. If you know a firewall is blocking connections, but your network is globally
yann@693
    41
      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
yann@693
    42
yann@693
    43
      Note that this value applies equally to wget if you have that installed.
yann@693
    44
yann@693
    45
      Of course, you'd be better off to use a proxy, as offered by the following
yann@693
    46
      choice of options.
yann@693
    47
yann@693
    48
choice
yann@693
    49
    bool
yann@693
    50
    prompt "Proxy type"
yann@693
    51
    default PROXY_TYPE_NONE
yann@693
    52
yann@693
    53
config PROXY_TYPE_NONE
yann@693
    54
    bool
yann@693
    55
    prompt "No proxy"
yann@693
    56
    help
yann@693
    57
      Select this option if you have a direct connection to the internet,
yann@693
    58
      or if you already set the environment adequately.
yann@693
    59
yann@693
    60
config PROXY_TYPE_HTTP
yann@693
    61
    bool
yann@693
    62
    prompt "HTTP proxy"
yann@693
    63
    help
yann@693
    64
      Use an HTTP proxy to connect to to the internet.
yann@693
    65
      Only the http and ftp protocols will be tunneled through this
yann@693
    66
      proxy.
yann@693
    67
yann@693
    68
      Alternatively to setting this option, you can set and export the
yann@693
    69
      following variables in your environment:
yann@693
    70
        ftp_proxy=http://user:passwd@proxy.server:port/
yann@693
    71
        http_proxy=http://user:passwd@proxy.server:port/
yann@693
    72
        https_proxy=http://user:passwd@proxy.server:port/
yann@693
    73
yann@693
    74
# Haha! Here is an interesting feature/bug of mconf!
yann@693
    75
# The following config entries will be shown out-side the
yann@693
    76
# choice menu!
yann@693
    77
# To add a third entry in the choice menu, add it after the
yann@693
    78
# if...endif conditional below, and so on for a fourth entry...
yann@693
    79
if PROXY_TYPE_HTTP
yann@693
    80
yann@693
    81
config PROXY_HOST
yann@693
    82
    string
yann@693
    83
    prompt "hostname/IP"
yann@693
    84
yann@693
    85
config PROXY_PORT
yann@693
    86
    int
yann@693
    87
    prompt "port"
yann@693
    88
    default 8080
yann@693
    89
    
yann@693
    90
config PROXY_USER
yann@693
    91
    string
yann@693
    92
    prompt "user name"
yann@693
    93
yann@693
    94
config PROXY_PASS
yann@693
    95
    string
yann@693
    96
    prompt "password"
yann@693
    97
yann@693
    98
endif # USE_HTTP_PROXY
yann@693
    99
yann@693
   100
config PROXY_TYPE_SOCKS
yann@693
   101
    bool
yann@693
   102
    prompt "SOCKS 4/5 proxy (EXPERIMENTAL)"
yann@693
   103
    depends on EXPERIMENTAL
yann@693
   104
    help
yann@693
   105
      Use a Socks 4/5 proxy to connect to the internet.
yann@693
   106
      All protocols can get tunneled through this kind of proxy (depending
yann@693
   107
      on your proxy configuration, some do not allow all protocols, but
yann@693
   108
      chances are that protocols needed by crosstool-NG are allowed).
yann@693
   109
yann@693
   110
      Alternatively to setting this option, you can configure tsocks
yann@693
   111
      system-wide, and set and export the following variable in your
yann@693
   112
      environment:
yann@693
   113
        LD_PRELOAD=/path/to/your/tsocks-library.so
yann@693
   114
yann@693
   115
      This option makes use of the tsocks library. You will have to have tsocks
yann@693
   116
      installed on your system, of course.
yann@693
   117
yann@693
   118
      If you think you do not know what tsocks is, or how to configure it,
yann@693
   119
      chances are that you do not need to set this option.
yann@693
   120
yann@693
   121
if PROXY_TYPE_SOCKS
yann@693
   122
yann@693
   123
choice
yann@693
   124
    bool
yann@693
   125
    prompt "type"
yann@693
   126
    default PROXY_TYPE_SOCKS_SYS
yann@693
   127
yann@693
   128
config PROXY_TYPE_SOCKS_SYS
yann@693
   129
    bool
yann@693
   130
    prompt "Use system settings"
yann@693
   131
    help
yann@693
   132
      Use that if tsocks is already configured on your system.
yann@693
   133
yann@693
   134
config PROXY_TYPE_SOCKS_AUTO
yann@693
   135
    bool
yann@693
   136
    prompt "Auto"
yann@693
   137
    help
yann@693
   138
      crosstool-NG will attempt to guess what type of SOCKS version
yann@693
   139
      the proxy speaks.
yann@693
   140
yann@693
   141
config PROXY_TYPE_SOCKS_4
yann@693
   142
    bool
yann@693
   143
    prompt "SOCKS 4"
yann@693
   144
yann@693
   145
config PROXY_TYPE_SOCKS_5
yann@693
   146
    bool
yann@693
   147
    prompt "SOCKS 5"
yann@693
   148
yann@693
   149
endchoice
yann@693
   150
yann@693
   151
if ! PROXY_TYPE_SOCKS_SYS
yann@693
   152
yann@693
   153
config PROXY_HOST
yann@693
   154
    string
yann@693
   155
    prompt "hostname/IP"
yann@693
   156
yann@693
   157
config PROXY_PORT
yann@693
   158
    int
yann@693
   159
    prompt "port"
yann@693
   160
    default 1080
yann@693
   161
yann@693
   162
config PROXY_USER
yann@693
   163
    string
yann@693
   164
    prompt "user name"
yann@693
   165
yann@693
   166
config PROXY_PASS
yann@693
   167
    string
yann@693
   168
    prompt "password"
yann@693
   169
yann@693
   170
endif # ! PROXY_TYPE_SOCKS_SYS
yann@693
   171
yann@693
   172
endif # USE_SOCKS_PROXY
yann@693
   173
yann@693
   174
endchoice
yann@693
   175
yann@693
   176
config PROXY_TYPE
yann@693
   177
    string
yann@693
   178
    default "none"      if PROXY_TYPE_NONE
yann@693
   179
    default "http"      if PROXY_TYPE_HTTP
yann@693
   180
    default "sockssys"  if PROXY_TYPE_SOCKS_SYS
yann@693
   181
    default "socksauto" if PROXY_TYPE_SOCKS_AUTO
yann@693
   182
    default "socks4"    if PROXY_TYPE_SOCKS_4
yann@693
   183
    default "socks5"    if PROXY_TYPE_SOCKS_5