config/global/download_extract.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Apr 18 22:16:28 2008 +0000 (2008-04-18)
changeset 451 8a72f9bcf675
parent 450 4765aa0bd896
child 452 15fdb2eb2db3
permissions -rw-r--r--
Using SOCKS 4/5 proxy is no easy task:
- a machine may well be able to reach the proxy, even if it is not on the same sub-net(s) as the machine itself (absolutely legitimate)
- tsocks.conf needs a list of so-called 'local' networks that can be reached without the need for a SOCKS connection
- SOCKS proxies are expected to be in 'local' networks
- there is absolutely NO way to tell what networks are local, besides the sub-net(s) the machine is in

Therefore, appropriate configuration of SOCKS 4/5 configuration is really complex, and attempts to correctly overcome this issue are doomed.

/trunk/scripts/crosstool.sh | 52 46 6 0 ++++++++++++++++++++++++++++++++++----
/trunk/config/global/download_extract.in | 39 31 8 0 +++++++++++++++++++++++------
2 files changed, 77 insertions(+), 14 deletions(-)
yann@445
     1
# Options specific to downloading and extracting packages
yann@174
     2
yann@63
     3
comment "Downloading"
yann@1
     4
yann@63
     5
config FORCE_DOWNLOAD
yann@1
     6
    bool
yann@63
     7
    prompt "Force downloads"
yann@1
     8
    default n
yann@1
     9
    help
yann@63
    10
      Force downloading tarballs, even if one already exists.
yann@63
    11
      
yann@63
    12
      Usefull if you suspect a tarball to be damaged.
yann@1
    13
yann@1
    14
config ONLY_DOWNLOAD
yann@1
    15
    bool
yann@63
    16
    prompt "Stop after downloading tarballs"
yann@1
    17
    default n
yann@1
    18
    help
yann@1
    19
      Only download the tarballs. Exit once it done.
yann@1
    20
      
yann@1
    21
      Usefull to pre-retrieve the tarballs before going off-line.
yann@1
    22
yann@441
    23
choice
yann@441
    24
    bool
yann@441
    25
    prompt "Proxy type"
yann@441
    26
    default USE_NO_PROXY
yann@441
    27
yann@442
    28
config PROXY_TYPE_NONE
yann@441
    29
    bool
yann@441
    30
    prompt "No proxy"
yann@441
    31
    help
yann@441
    32
      Select this option if you have a direct connection to the internet,
yann@441
    33
      or if you already set the environment adequately.
yann@441
    34
yann@442
    35
config PROXY_TYPE_HTTP
yann@441
    36
    bool
yann@441
    37
    prompt "HTTP proxy"
yann@441
    38
    help
yann@441
    39
      Use an HTTP proxy to connect to to the internet.
yann@442
    40
      Only the http and ftp protocols will be tunneled through this
yann@441
    41
      proxy.
yann@441
    42
yann@442
    43
      Alternatively to setting this option, you can set and export the
yann@442
    44
      following variables in your environment:
yann@441
    45
        ftp_proxy=http://user:passwd@proxy.server:port/
yann@441
    46
        http_proxy=http://user:passwd@proxy.server:port/
yann@441
    47
        https_proxy=http://user:passwd@proxy.server:port/
yann@441
    48
yann@441
    49
# Haha! Here is an interesting feature/bug of mconf!
yann@441
    50
# The following config entries will be shown out-side the
yann@441
    51
# choice menu!
yann@441
    52
# To add a third entry in the choice menu, add it after the
yann@441
    53
# if...endif conditional below, and so on for a fourth entry...
yann@442
    54
if PROXY_TYPE_HTTP
yann@441
    55
yann@442
    56
config PROXY_HOST
yann@441
    57
    string
yann@442
    58
    prompt "hostname/IP"
yann@441
    59
yann@442
    60
config PROXY_PORT
yann@441
    61
    int
yann@442
    62
    prompt "port"
yann@442
    63
    default 0
yann@441
    64
    
yann@442
    65
config PROXY_USER
yann@441
    66
    string
yann@442
    67
    prompt "user name"
yann@441
    68
yann@442
    69
config PROXY_PASS
yann@441
    70
    string
yann@442
    71
    prompt "password"
yann@441
    72
yann@441
    73
endif # USE_HTTP_PROXY
yann@441
    74
yann@442
    75
config PROXY_TYPE_SOCKS
yann@442
    76
    bool
yann@451
    77
    prompt "SOCKS 4/5 proxy (EXPERIMENTAL)"
yann@451
    78
    depends on EXPERIMENTAL
yann@442
    79
    help
yann@442
    80
      Use a Socks 4/5 proxy to connect to the internet.
yann@442
    81
      All protocols can get tunneled through this kind of proxy (depending
yann@442
    82
      on your proxy configuration, so;e do not allow all protocols, but
yann@442
    83
      chances are that protocols needed by crosstool-NG are allowed).
yann@442
    84
yann@442
    85
      Alternatively to setting this option, you can set and export the
yann@442
    86
      following variable in your environment:
yann@442
    87
        LD_PRELOAD=/path/to/your/tsocks-library.so
yann@442
    88
yann@442
    89
      In any case, wether you set this option or you export the aforementionned
yann@442
    90
      variable, you will _have_ to  configure the /etc/tsocks.conf file
yann@442
    91
      accordingly to your network setup.
yann@442
    92
yann@442
    93
      This option makes use of the tsocks library. You will have to have tsocks
yann@442
    94
      installed on your system, of course.
yann@442
    95
yann@442
    96
      If you think you do not know what tsocks is, or how to configure it,
yann@442
    97
      chances are that you do not need to set this option.
yann@442
    98
yann@442
    99
if PROXY_TYPE_SOCKS
yann@442
   100
yann@442
   101
choice
yann@442
   102
    bool
yann@442
   103
    prompt "type"
yann@451
   104
    default PROXY_TYPE_SOCKS_SYS
yann@451
   105
yann@451
   106
config PROXY_TYPE_SOCKS_SYS
yann@451
   107
    bool
yann@451
   108
    prompt "Use system settings"
yann@451
   109
    help
yann@451
   110
      Use that if your system is already configured to
yann@451
   111
      connect to SOCKS 4/5 proxies.
yann@451
   112
yann@451
   113
config PROXY_TYPE_SOCKS_AUTO
yann@451
   114
    bool
yann@451
   115
    prompt "Auto"
yann@451
   116
    help
yann@451
   117
      crosstool-NG will attempt to guess what type of
yann@451
   118
      SOCKS version the proxy speaks.
yann@451
   119
yann@451
   120
config PROXY_TYPE_SOCKS_4
yann@451
   121
    bool
yann@451
   122
    prompt "SOCKS 4"
yann@442
   123
yann@442
   124
config PROXY_TYPE_SOCKS_5
yann@442
   125
    bool
yann@442
   126
    prompt "SOCKS 5"
yann@442
   127
yann@451
   128
endchoice
yann@442
   129
yann@451
   130
if ! PROXY_TYPE_SOCKS_SYS
yann@451
   131
yann@451
   132
comment "THIS IS HIGHLY EXPERIMENTAL!!!"
yann@441
   133
yann@442
   134
config PROXY_HOST
yann@442
   135
    string
yann@442
   136
    prompt "hostname/IP"
yann@442
   137
yann@442
   138
config PROXY_PORT
yann@442
   139
    int
yann@442
   140
    prompt "port"
yann@442
   141
    default 0
yann@442
   142
yann@442
   143
config PROXY_USER
yann@442
   144
    string
yann@442
   145
    prompt "user name"
yann@442
   146
yann@442
   147
config PROXY_PASS
yann@442
   148
    string
yann@442
   149
    prompt "password"
yann@442
   150
yann@451
   151
endif # ! PROXY_TYPE_SOCKS_SYS
yann@451
   152
yann@442
   153
endif # USE_SOCKS_PROXY
yann@442
   154
yann@442
   155
endchoice
yann@442
   156
yann@442
   157
config PROXY_TYPE
yann@442
   158
    string
yann@451
   159
    default "none"      if PROXY_TYPE_NONE
yann@451
   160
    default "http"      if PROXY_TYPE_HTTP
yann@451
   161
    default "sockssys"  if PROXY_TYPE_SOCKS_SYS
yann@451
   162
    default "socksauto" if PROXY_TYPE_SOCKS_AUTO
yann@451
   163
    default "socks4"    if PROXY_TYPE_SOCKS_4
yann@451
   164
    default "socks5"    if PROXY_TYPE_SOCKS_5
yann@442
   165
yann@441
   166
# Force restore indentation
yann@445
   167
config BREAK_INDENT
yann@445
   168
    bool
yann@445
   169
    default n
yann@121
   170
yann@244
   171
if ! ONLY_DOWNLOAD
yann@244
   172
yann@63
   173
comment "Extracting"
yann@1
   174
yann@1
   175
config FORCE_EXTRACT
yann@1
   176
    bool
yann@1
   177
    prompt "Force extractions"
yann@1
   178
    default n
yann@1
   179
    help
yann@1
   180
      Force extraction of already exctracted tarballs.
yann@1
   181
      
yann@1
   182
      Usefull if you suspect a previous extract did not complete (eg. broken
yann@1
   183
      tarball), or you added a new set of patches for this component.
yann@1
   184
yann@63
   185
config ONLY_EXTRACT
yann@63
   186
    bool
yann@63
   187
    prompt "Stop after extracting tarballs"
yann@63
   188
    default n
yann@63
   189
    help
yann@63
   190
      Exit after unpacking and patching tarballs.
yann@63
   191
      
yann@63
   192
      Usefull to look at the code before doing the build itself.
yann@63
   193
yann@244
   194
endif # ! ONLY_DOWNLOAD