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