config/global/download.in
changeset 695 320862b2d6f1
parent 693 458facedc485
child 696 d8cb632212ee
     1.1 --- a/config/global/download.in	Sat Jul 19 21:22:58 2008 +0000
     1.2 +++ b/config/global/download.in	Sat Jul 19 22:45:17 2008 +0000
     1.3 @@ -11,51 +11,99 @@
     1.4        
     1.5        Usefull if you suspect a tarball to be damaged.
     1.6  
     1.7 -config ONLY_DOWNLOAD
     1.8 +menuconfig USE_LAN_MIRROR
     1.9      bool
    1.10 -    prompt "Stop after downloading tarballs"
    1.11 +    prompt "Use LAN mirror"
    1.12      default n
    1.13      help
    1.14 -      Only download the tarballs. Exit once it done.
    1.15 +      If you have a machine on your LAN that mirrors some of the needed
    1.16 +      tarballs, you can say 'Y' here, and configure adequate values in
    1.17 +      the following options.
    1.18        
    1.19 -      Usefull to pre-retrieve the tarballs before going off-line.
    1.20 +      Tarballs will be be preferably fetched from the LAN mirror, and if
    1.21 +      not found there, standard places will be searched for.
    1.22  
    1.23 -config CONNECT_TIMEOUT
    1.24 -    int
    1.25 -    prompt "connection timeout"
    1.26 -    default 10
    1.27 +if USE_LAN_MIRROR
    1.28 +
    1.29 +choice
    1.30 +    bool
    1.31 +    prompt "Server type:"
    1.32 +
    1.33 +config LAN_MIRROR_HTTP
    1.34 +    bool
    1.35 +    prompt "http"
    1.36 +
    1.37 +config LAN_MIRROR_FTP
    1.38 +    bool
    1.39 +    prompt "ftp"
    1.40 +
    1.41 +endchoice # Server type
    1.42 +
    1.43 +config LAN_MIRROR_SCHEME
    1.44 +    string
    1.45 +    default "http"  if LAN_MIRROR_HTTP
    1.46 +    default "ftp"   if LAN_MIRROR_FTP
    1.47 +
    1.48 +config LAN_MIRROR_HOSTNAME
    1.49 +    string
    1.50 +    prompt "hostname"
    1.51 +    depends on EXPERIMENTAL
    1.52 +    default  "localhost"
    1.53      help
    1.54 -      From the curl manual:
    1.55 -        Maximum time in seconds that you allow the connection to the server to take.
    1.56 +      Enter here the hostname on your LAN mirror.
    1.57  
    1.58 -      The scenario is as follows;
    1.59 -        - some enterprise networks have firewalls that prohibit FTP traffic, while
    1.60 -          still allowing HTTP
    1.61 -        - most download sites have http:// equivalent for the ftp:// URL
    1.62 -        - after this number of seconds, it is considered that the connection could
    1.63 -          not be established, and the next URL in the list is tried, until we reach
    1.64 -          an URL that will go through the firewall, most probably an http:// URL.
    1.65 +config LAN_MIRROR_PATTERNS
    1.66 +    string
    1.67 +    prompt "locations patterns (READ HELP!)"
    1.68 +    default "/downloads /downloads/%pkg /downloads/%pkg/%ver /downloads/%pkg-%ver"
    1.69 +    help
    1.70 +      A space-separated list of patterns to find the tarballs on the
    1.71 +      LAN mirror.
    1.72  
    1.73 -      If you have a slow network, you'd better set this value higher than the default
    1.74 -      10s. If you know a firewall is blocking connections, but your network is globally
    1.75 -      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
    1.76 +      You can use the following 'variables', and they'll get replaced by
    1.77 +      adequate values:
    1.78 +        %pkg : name of the package
    1.79 +        %ver : version of the package
    1.80  
    1.81 -      Note that this value applies equally to wget if you have that installed.
    1.82 +      Thus for gcc-4.2.4, %pkg will be replaced with 'gcc', and %ver with
    1.83 +      '4.2.4' (both without quotes). Thus if you entered the default
    1.84 +      pattern: "/downloads/%pkg/ /downloads/%pkg/%ver /downloads/%pkg-%ver"
    1.85 +      the tarball for gcc-4.2.4 would be searched for in:
    1.86 +        /downloads/gcc/
    1.87 +        /downloads/gcc/4.2.4/
    1.88 +        /downloads/gcc-4.2.4/
    1.89  
    1.90 -      Of course, you'd be better off to use a proxy, as offered by the following
    1.91 -      choice of options.
    1.92 +      Of course, if the files on the LAN mirror are really arranged in weird
    1.93 +      ways, entering a list of patterns will be tedious... But see below.
    1.94 +
    1.95 +config LAN_MIRROR_LS_R
    1.96 +    bool
    1.97 +    prompt "Use ls-lr.gz et al."
    1.98 +    default n
    1.99 +    help
   1.100 +      If the tarball was not found at any of the above locations, see if the
   1.101 +      server has a ls-lr.gz (or similar) file, and use that file to see if
   1.102 +      the tarball is listed somewhere in that file.
   1.103 +
   1.104 +      Common file names looked for are:
   1.105 +        ls-lrRt.txt     (used at ftp.gnu.org)
   1.106 +        find.txt        (ditto)
   1.107 +        ls-lR
   1.108 +
   1.109 +endif # USE_LAN_MIRROR
   1.110 +
   1.111 +menuconfig USE_PROXY
   1.112 +    bool
   1.113 +    prompt "Proxy settings"
   1.114 +    default n
   1.115 +    help
   1.116 +      Say 'Y' here if you need to use a proxy to connect to the internet.
   1.117 +
   1.118 +if USE_PROXY
   1.119  
   1.120  choice
   1.121      bool
   1.122      prompt "Proxy type"
   1.123 -    default PROXY_TYPE_NONE
   1.124 -
   1.125 -config PROXY_TYPE_NONE
   1.126 -    bool
   1.127 -    prompt "No proxy"
   1.128 -    help
   1.129 -      Select this option if you have a direct connection to the internet,
   1.130 -      or if you already set the environment adequately.
   1.131  
   1.132  config PROXY_TYPE_HTTP
   1.133      bool
   1.134 @@ -173,11 +221,47 @@
   1.135  
   1.136  endchoice
   1.137  
   1.138 +endif # Proxy settings
   1.139 +
   1.140  config PROXY_TYPE
   1.141      string
   1.142 -    default "none"      if PROXY_TYPE_NONE
   1.143 +    default "none"      if ! USE_PROXY
   1.144      default "http"      if PROXY_TYPE_HTTP
   1.145      default "sockssys"  if PROXY_TYPE_SOCKS_SYS
   1.146      default "socksauto" if PROXY_TYPE_SOCKS_AUTO
   1.147      default "socks4"    if PROXY_TYPE_SOCKS_4
   1.148      default "socks5"    if PROXY_TYPE_SOCKS_5
   1.149 +
   1.150 +config CONNECT_TIMEOUT
   1.151 +    int
   1.152 +    prompt "connection timeout"
   1.153 +    default 10
   1.154 +    help
   1.155 +      From the curl manual:
   1.156 +        Maximum time in seconds that you allow the connection to the server to take.
   1.157 +
   1.158 +      The scenario is as follows;
   1.159 +        - some enterprise networks have firewalls that prohibit FTP traffic, while
   1.160 +          still allowing HTTP
   1.161 +        - most download sites have http:// equivalent for the ftp:// URL
   1.162 +        - after this number of seconds, it is considered that the connection could
   1.163 +          not be established, and the next URL in the list is tried, until we reach
   1.164 +          an URL that will go through the firewall, most probably an http:// URL.
   1.165 +
   1.166 +      If you have a slow network, you'd better set this value higher than the default
   1.167 +      10s. If you know a firewall is blocking connections, but your network is globally
   1.168 +      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
   1.169 +
   1.170 +      Note that this value applies equally to wget if you have that installed.
   1.171 +
   1.172 +      Of course, you'd be better off to use a proxy, as offered by the previous
   1.173 +      option.
   1.174 +
   1.175 +config ONLY_DOWNLOAD
   1.176 +    bool
   1.177 +    prompt "Stop after downloading tarballs"
   1.178 +    default n
   1.179 +    help
   1.180 +      Only download the tarballs. Exit once it done.
   1.181 +      
   1.182 +      Usefull to pre-retrieve the tarballs before going off-line.