Introduce using a LAN mirror for retrieving tarballs.
/trunk/scripts/functions | 40 36 4 0 ++++++++++++-
/trunk/config/global/download.in | 146 115 31 0 ++++++++++++++++++++++++++++++++++++----------
2 files changed, 151 insertions(+), 35 deletions(-)
1 # Options specific to downloading packages
7 prompt "Force downloads"
10 Force downloading tarballs, even if one already exists.
12 Usefull if you suspect a tarball to be damaged.
14 menuconfig USE_LAN_MIRROR
16 prompt "Use LAN mirror"
19 If you have a machine on your LAN that mirrors some of the needed
20 tarballs, you can say 'Y' here, and configure adequate values in
21 the following options.
23 Tarballs will be be preferably fetched from the LAN mirror, and if
24 not found there, standard places will be searched for.
32 config LAN_MIRROR_HTTP
40 endchoice # Server type
42 config LAN_MIRROR_SCHEME
44 default "http" if LAN_MIRROR_HTTP
45 default "ftp" if LAN_MIRROR_FTP
47 config LAN_MIRROR_HOSTNAME
50 depends on EXPERIMENTAL
53 Enter here the hostname on your LAN mirror.
55 config LAN_MIRROR_PATTERNS
57 prompt "locations patterns (READ HELP!)"
58 default "/downloads /downloads/%pkg /downloads/%pkg/%ver /downloads/%pkg-%ver"
60 A space-separated list of patterns to find the tarballs on the
63 You can use the following 'variables', and they'll get replaced by
65 %pkg : name of the package
66 %ver : version of the package
68 Thus for gcc-4.2.4, %pkg will be replaced with 'gcc', and %ver with
69 '4.2.4' (both without quotes). Thus if you entered the default
70 pattern: "/downloads/%pkg/ /downloads/%pkg/%ver /downloads/%pkg-%ver"
71 the tarball for gcc-4.2.4 would be searched for in:
76 Of course, if the files on the LAN mirror are really arranged in weird
77 ways, entering a list of patterns will be tedious... But see below.
79 config LAN_MIRROR_LS_R
81 prompt "Use ls-lr.gz et al."
84 If the tarball was not found at any of the above locations, see if the
85 server has a ls-lr.gz (or similar) file, and use that file to see if
86 the tarball is listed somewhere in that file.
88 Common file names looked for are:
89 ls-lrRt.txt (used at ftp.gnu.org)
93 endif # USE_LAN_MIRROR
97 prompt "Proxy settings"
100 Say 'Y' here if you need to use a proxy to connect to the internet.
108 config PROXY_TYPE_HTTP
112 Use an HTTP proxy to connect to to the internet.
113 Only the http and ftp protocols will be tunneled through this
116 Alternatively to setting this option, you can set and export the
117 following variables in your environment:
118 ftp_proxy=http://user:passwd@proxy.server:port/
119 http_proxy=http://user:passwd@proxy.server:port/
120 https_proxy=http://user:passwd@proxy.server:port/
122 # Haha! Here is an interesting feature/bug of mconf!
123 # The following config entries will be shown out-side the
125 # To add a third entry in the choice menu, add it after the
126 # if...endif conditional below, and so on for a fourth entry...
146 endif # USE_HTTP_PROXY
148 config PROXY_TYPE_SOCKS
150 prompt "SOCKS 4/5 proxy (EXPERIMENTAL)"
151 depends on EXPERIMENTAL
153 Use a Socks 4/5 proxy to connect to the internet.
154 All protocols can get tunneled through this kind of proxy (depending
155 on your proxy configuration, some do not allow all protocols, but
156 chances are that protocols needed by crosstool-NG are allowed).
158 Alternatively to setting this option, you can configure tsocks
159 system-wide, and set and export the following variable in your
161 LD_PRELOAD=/path/to/your/tsocks-library.so
163 This option makes use of the tsocks library. You will have to have tsocks
164 installed on your system, of course.
166 If you think you do not know what tsocks is, or how to configure it,
167 chances are that you do not need to set this option.
174 default PROXY_TYPE_SOCKS_SYS
176 config PROXY_TYPE_SOCKS_SYS
178 prompt "Use system settings"
180 Use that if tsocks is already configured on your system.
182 config PROXY_TYPE_SOCKS_AUTO
186 crosstool-NG will attempt to guess what type of SOCKS version
189 config PROXY_TYPE_SOCKS_4
193 config PROXY_TYPE_SOCKS_5
199 if ! PROXY_TYPE_SOCKS_SYS
218 endif # ! PROXY_TYPE_SOCKS_SYS
220 endif # USE_SOCKS_PROXY
224 endif # Proxy settings
228 default "none" if ! USE_PROXY
229 default "http" if PROXY_TYPE_HTTP
230 default "sockssys" if PROXY_TYPE_SOCKS_SYS
231 default "socksauto" if PROXY_TYPE_SOCKS_AUTO
232 default "socks4" if PROXY_TYPE_SOCKS_4
233 default "socks5" if PROXY_TYPE_SOCKS_5
235 config CONNECT_TIMEOUT
237 prompt "connection timeout"
240 From the curl manual:
241 Maximum time in seconds that you allow the connection to the server to take.
243 The scenario is as follows;
244 - some enterprise networks have firewalls that prohibit FTP traffic, while
246 - most download sites have http:// equivalent for the ftp:// URL
247 - after this number of seconds, it is considered that the connection could
248 not be established, and the next URL in the list is tried, until we reach
249 an URL that will go through the firewall, most probably an http:// URL.
251 If you have a slow network, you'd better set this value higher than the default
252 10s. If you know a firewall is blocking connections, but your network is globally
253 fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
255 Note that this value applies equally to wget if you have that installed.
257 Of course, you'd be better off to use a proxy, as offered by the previous
262 prompt "Stop after downloading tarballs"
265 Only download the tarballs. Exit once it done.
267 Usefull to pre-retrieve the tarballs before going off-line.