config/global/download.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 31 12:46:59 2008 +0000 (2008-10-31)
changeset 1021 fa97295ee307
parent 754 b13657cd64b3
child 1022 7b3e8b8d392e
permissions -rw-r--r--
Add a "NOTE" in the proxy settings help, telling it might not cover all possible proxy configurations.

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