summaryrefslogtreecommitdiff
path: root/config/global/download.in
blob: 910cb21f67dace13b9408a147268f9301589d05c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# Options specific to downloading packages

comment "Downloading"

config FORCE_DOWNLOAD
    bool
    prompt "Force downloads"
    default n
    help
      Force downloading tarballs, even if one already exists.
      
      Usefull if you suspect a tarball to be damaged.

menuconfig USE_PROXY
    bool
    prompt "Use a proxy"
    default n
    help
      Say 'Y' here if you need to use a proxy to connect to the internet.
      
      You can then choose between an HTTP or a SOCKS 4/5 proxy.
      
      **** NOTE ****
      The settings below may not cover all possible proxy configurations!
      You'd be better off setting proxy in the environment!

if USE_PROXY

choice
    bool
    prompt "Proxy type"

config PROXY_TYPE_HTTP
    bool
    prompt "HTTP proxy"
    help
      Use an HTTP proxy to connect to to the internet.
      Only the http and ftp protocols will be tunneled through this
      proxy.
      
      Alternatively to setting this option, you can set and export the
      following variables in your environment:
        ftp_proxy=http://user:passwd@proxy.server:port/
        http_proxy=http://user:passwd@proxy.server:port/
        https_proxy=http://user:passwd@proxy.server:port/

# Haha! Here is an interesting feature/bug of mconf!
# The following config entries will be shown out-side the
# choice menu!
# To add a third entry in the choice menu, add it after the
# if...endif conditional below, and so on for a fourth entry...
if PROXY_TYPE_HTTP

config PROXY_HOST
    string
    prompt "hostname/IP"

config PROXY_PORT
    int
    prompt "port"
    default 8080
    
config PROXY_USER
    string
    prompt "user name"

config PROXY_PASS
    string
    prompt "password"

endif # USE_HTTP_PROXY

config PROXY_TYPE_SOCKS
    bool
    prompt "SOCKS 4/5 proxy"
    help
      Use a Socks 4/5 proxy to connect to the internet.
      All protocols can get tunneled through this kind of proxy (your
      proxy configuration may not allow all protocols, but chances are
      that protocols needed by crosstool-NG are allowed).
      
      Alternatively to setting this option, you can configure tsocks
      system-wide, and set and export the following variable in your
      environment:
        LD_PRELOAD=/path/to/your/tsocks-library.so
      
      This option makes use of the tsocks library. You will have to have tsocks
      installed on your system, of course.
      
      If you think you do not know what tsocks is, or how to configure it,
      chances are that you do not need to set this option.

if PROXY_TYPE_SOCKS

choice
    bool
    prompt "type"
    default PROXY_TYPE_SOCKS_SYS

config PROXY_TYPE_SOCKS_SYS
    bool
    prompt "Use system settings"
    help
      Use that if tsocks is already configured on your system.

config PROXY_TYPE_SOCKS_AUTO
    bool
    prompt "Auto"
    help
      crosstool-NG will attempt to guess what type of SOCKS version
      the proxy speaks.

config PROXY_TYPE_SOCKS_4
    bool
    prompt "SOCKS 4"

config PROXY_TYPE_SOCKS_5
    bool
    prompt "SOCKS 5"

endchoice

if ! PROXY_TYPE_SOCKS_SYS

config PROXY_HOST
    string
    prompt "hostname/IP"

config PROXY_PORT
    int
    prompt "port"
    default 1080

config PROXY_USER
    string
    prompt "user name"

config PROXY_PASS
    string
    prompt "password"

endif # ! PROXY_TYPE_SOCKS_SYS

endif # USE_SOCKS_PROXY

endchoice

endif # USE_PROXY

config PROXY_TYPE
    string
    default "none"      if ! USE_PROXY
    default "http"      if PROXY_TYPE_HTTP
    default "sockssys"  if PROXY_TYPE_SOCKS_SYS
    default "socksauto" if PROXY_TYPE_SOCKS_AUTO
    default "socks4"    if PROXY_TYPE_SOCKS_4
    default "socks5"    if PROXY_TYPE_SOCKS_5

menuconfig USE_MIRROR
    bool
    prompt "Use LAN mirror"
    default n
    help
      If you have a machine on your LAN that mirrors some of the needed
      tarballs, you can say 'Y' here, and configure adequate values in
      the following options.
      
      Tarballs will be be preferably fetched from the LAN mirror, and if
      not found there, standard places will be searched for.
      
      Obviously, nothing prevents you from using a mirror that is in fact
      *not* on your LAN, for example on another subnet of your company's
      network, or a mirror on the Internet.
      
      I (Yann E. MORIN) have set up such a mirror to host snapshots of
      some components, when those snapshots are volatile on the upstream
      servers. The mirror is *slow*, because it is hosted behind an ADSL
      line. For the time being, I haven't set up bandwidth limitations,
      but should the mirror be abused, I will. Please avoid using my
      machine when you can...
      The mirror is available as (fill in those values in the fields
      below):
        host name: ymorin.is-a-geek.org
        base dir : /mirrors

if USE_MIRROR

config PREFER_MIRROR
    bool
    prompt "Prefer the LAN mirror"
    default n
    help
      Say 'Y' here if you prefer the LAN miror over the upstream sources.

choice
    bool
    prompt "Server type:"

config MIRROR_HTTP
    bool
    prompt "http"

config MIRROR_FTP
    bool
    prompt "ftp"

endchoice # Server type

config MIRROR_SCHEME
    string
    default "http"  if MIRROR_HTTP
    default "ftp"   if MIRROR_FTP

config MIRROR_HOSTNAME
    string
    prompt "hostname"
    default ""
    help
      Enter here the hostname on your LAN mirror.

config MIRROR_BASE
    string
    prompt "Base directory"
    default ""
    help
      This is the base directory searched for for tarballs. If you enter
      /mirror, then the search is performed in the following directories
      on the server:
        /mirror/<name>/
        /mirror/
      
      where <name> is replaced with the actual package name.

config MIRROR_LS_R
    bool
#    prompt "Use ls-lR et al."
    depends on EXPERIMENTAL
    default n
    help
      If the tarball was not found at the above location, see if the server
      has a ls-lr.gz (or similar) file, and use that file to see if the
      tarball is listed somewhere in that file.
      
      Common file names looked for are:
        ls-lrRt.txt     (used at ftp.gnu.org)
        find.txt        (ditto)
        ls-lR

endif # USE_MIRROR

config CONNECT_TIMEOUT
    int
    prompt "connection timeout"
    default 10
    help
      From the curl manual:
        Maximum time in seconds that you allow the connection to the server to take.
      
      The scenario is as follows;
        - some enterprise networks have firewalls that prohibit FTP traffic, while
          still allowing HTTP
        - most download sites have http:// equivalent for the ftp:// URL
        - after this number of seconds, it is considered that the connection could
          not be established, and the next URL in the list is tried, until we reach
          an URL that will go through the firewall, most probably an http:// URL.
      
      If you have a slow network, you'd better set this value higher than the default
      10s. If you know a firewall is blocking connections, but your network is globally
      fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
      
      Note that this value applies equally to wget if you have that installed.
      
      Of course, you'd be better off to use a proxy, as offered by the previous
      option.

config ONLY_DOWNLOAD
    bool
    prompt "Stop after downloading tarballs"
    default n
    help
      Only download the tarballs. Exit once it done.
      
      Usefull to pre-retrieve the tarballs before going off-line.