Get rid of the proxy settings, once and for all.
They have nothing to do in here, just let the user
configure his/her system appropriately.
-------- diffstat follows --------
/trunk/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/trunk/scripts/functions | 100 0 100 0 -----------------------------
/trunk/config/global/download.in | 148 0 148 0 -------------------------------------------
3 files changed, 249 deletions(-)
1.1 --- a/config/global/download.in Fri Apr 17 20:45:47 2009 +0000
1.2 +++ b/config/global/download.in Sun Apr 19 16:34:59 2009 +0000
1.3 @@ -27,151 +27,6 @@
1.4
1.5 Usefull if you suspect a tarball to be damaged.
1.6
1.7 -menuconfig USE_PROXY
1.8 - bool
1.9 - prompt "Use a proxy"
1.10 - default n
1.11 - help
1.12 - Say 'Y' here if you need to use a proxy to connect to the internet.
1.13 -
1.14 - You can then choose between an HTTP or a SOCKS 4/5 proxy.
1.15 -
1.16 - **** NOTE ****
1.17 - The settings below may not cover all possible proxy configurations!
1.18 - You'd be better off setting proxy in the environment!
1.19 -
1.20 -if USE_PROXY
1.21 -
1.22 -choice
1.23 - bool
1.24 - prompt "Proxy type"
1.25 -
1.26 -config PROXY_TYPE_HTTP
1.27 - bool
1.28 - prompt "HTTP proxy"
1.29 - help
1.30 - Use an HTTP proxy to connect to to the internet.
1.31 - Only the http and ftp protocols will be tunneled through this
1.32 - proxy.
1.33 -
1.34 - Alternatively to setting this option, you can set and export the
1.35 - following variables in your environment:
1.36 - ftp_proxy=http://user:passwd@proxy.server:port/
1.37 - http_proxy=http://user:passwd@proxy.server:port/
1.38 - https_proxy=http://user:passwd@proxy.server:port/
1.39 -
1.40 -# Haha! Here is an interesting feature/bug of mconf!
1.41 -# The following config entries will be shown out-side the
1.42 -# choice menu!
1.43 -# To add a third entry in the choice menu, add it after the
1.44 -# if...endif conditional below, and so on for a fourth entry...
1.45 -if PROXY_TYPE_HTTP
1.46 -
1.47 -config PROXY_HOST
1.48 - string
1.49 - prompt "hostname/IP"
1.50 -
1.51 -config PROXY_PORT
1.52 - int
1.53 - prompt "port"
1.54 - default 8080
1.55 -
1.56 -config PROXY_USER
1.57 - string
1.58 - prompt "user name"
1.59 -
1.60 -config PROXY_PASS
1.61 - string
1.62 - prompt "password"
1.63 -
1.64 -endif # USE_HTTP_PROXY
1.65 -
1.66 -config PROXY_TYPE_SOCKS
1.67 - bool
1.68 - prompt "SOCKS 4/5 proxy"
1.69 - help
1.70 - Use a Socks 4/5 proxy to connect to the internet.
1.71 - All protocols can get tunneled through this kind of proxy (your
1.72 - proxy configuration may not allow all protocols, but chances are
1.73 - that protocols needed by crosstool-NG are allowed).
1.74 -
1.75 - Alternatively to setting this option, you can configure tsocks
1.76 - system-wide, and set and export the following variable in your
1.77 - environment:
1.78 - LD_PRELOAD=/path/to/your/tsocks-library.so
1.79 -
1.80 - This option makes use of the tsocks library. You will have to have tsocks
1.81 - installed on your system, of course.
1.82 -
1.83 - If you think you do not know what tsocks is, or how to configure it,
1.84 - chances are that you do not need to set this option.
1.85 -
1.86 -if PROXY_TYPE_SOCKS
1.87 -
1.88 -choice
1.89 - bool
1.90 - prompt "type"
1.91 - default PROXY_TYPE_SOCKS_SYS
1.92 -
1.93 -config PROXY_TYPE_SOCKS_SYS
1.94 - bool
1.95 - prompt "Use system settings"
1.96 - help
1.97 - Use that if tsocks is already configured on your system.
1.98 -
1.99 -config PROXY_TYPE_SOCKS_AUTO
1.100 - bool
1.101 - prompt "Auto"
1.102 - help
1.103 - crosstool-NG will attempt to guess what type of SOCKS version
1.104 - the proxy speaks.
1.105 -
1.106 -config PROXY_TYPE_SOCKS_4
1.107 - bool
1.108 - prompt "SOCKS 4"
1.109 -
1.110 -config PROXY_TYPE_SOCKS_5
1.111 - bool
1.112 - prompt "SOCKS 5"
1.113 -
1.114 -endchoice
1.115 -
1.116 -if ! PROXY_TYPE_SOCKS_SYS
1.117 -
1.118 -config PROXY_HOST
1.119 - string
1.120 - prompt "hostname/IP"
1.121 -
1.122 -config PROXY_PORT
1.123 - int
1.124 - prompt "port"
1.125 - default 1080
1.126 -
1.127 -config PROXY_USER
1.128 - string
1.129 - prompt "user name"
1.130 -
1.131 -config PROXY_PASS
1.132 - string
1.133 - prompt "password"
1.134 -
1.135 -endif # ! PROXY_TYPE_SOCKS_SYS
1.136 -
1.137 -endif # USE_SOCKS_PROXY
1.138 -
1.139 -endchoice
1.140 -
1.141 -endif # USE_PROXY
1.142 -
1.143 -config PROXY_TYPE
1.144 - string
1.145 - default "none" if ! USE_PROXY
1.146 - default "http" if PROXY_TYPE_HTTP
1.147 - default "sockssys" if PROXY_TYPE_SOCKS_SYS
1.148 - default "socksauto" if PROXY_TYPE_SOCKS_AUTO
1.149 - default "socks4" if PROXY_TYPE_SOCKS_4
1.150 - default "socks5" if PROXY_TYPE_SOCKS_5
1.151 -
1.152 menuconfig USE_MIRROR
1.153 bool
1.154 prompt "Use LAN mirror"
1.155 @@ -285,9 +140,6 @@
1.156 fast, you can try to lower this value to jump more quickly to allowed URLs. YMMV.
1.157
1.158 Note that this value applies equally to wget if you have that installed.
1.159 -
1.160 - Of course, you'd be better off to use a proxy, as offered by the previous
1.161 - option.
1.162
1.163 config ONLY_DOWNLOAD
1.164 bool
2.1 --- a/scripts/build/libc/eglibc.sh Fri Apr 17 20:45:47 2009 +0000
2.2 +++ b/scripts/build/libc/eglibc.sh Sun Apr 19 16:34:59 2009 +0000
2.3 @@ -14,7 +14,6 @@
2.4 *) svn_action="export --force";;
2.5 esac
2.6
2.7 - CT_DoSetProxy ${CT_PROXY_TYPE}
2.8 CT_DoExecLog ALL svn ${svn_action} -r "${CT_EGLIBC_REVISION:-HEAD}" "${svn_url}" . 2>&1
2.9
2.10 # Compress eglibc
3.1 --- a/scripts/functions Fri Apr 17 20:45:47 2009 +0000
3.2 +++ b/scripts/functions Sun Apr 19 16:34:59 2009 +0000
3.3 @@ -288,103 +288,6 @@
3.4 return 0
3.5 }
3.6
3.7 -# Set environment for proxy access
3.8 -# Usage: CT_DoSetProxy <proxy_type>
3.9 -# where proxy_type is one of 'http', 'sockssys', 'socks4' or 'socks5',
3.10 -# or empty (to not change proxy settings).
3.11 -CT_DoSetProxy() {
3.12 - case "${1}" in
3.13 - http)
3.14 - http_proxy="http://"
3.15 - case "${CT_PROXY_USER}:${CT_PROXY_PASS}" in
3.16 - :) ;;
3.17 - :*) http_proxy="${http_proxy}:${CT_PROXY_PASS}@";;
3.18 - *:) http_proxy="${http_proxy}${CT_PROXY_USER}@";;
3.19 - *:*) http_proxy="${http_proxy}${CT_PROXY_USER}:${CT_PROXY_PASS}@";;
3.20 - esac
3.21 - export http_proxy="${http_proxy}${CT_PROXY_HOST}:${CT_PROXY_PORT}/"
3.22 - export https_proxy="${http_proxy}"
3.23 - export ftp_proxy="${http_proxy}"
3.24 - CT_DoLog DEBUG "http_proxy='${http_proxy}'"
3.25 - ;;
3.26 - sockssys)
3.27 - CT_HasOrAbort tsocks
3.28 - . tsocks -on
3.29 - ;;
3.30 - socks*)
3.31 - # Remove any lingering config file from any previous run
3.32 - rm -f "${CT_BUILD_DIR}/tsocks.conf"
3.33 - # Find all interfaces and build locally accessible networks
3.34 - server_ip=$(ping -c 1 -W 2 "${CT_PROXY_HOST}" |head -n 1 |sed -r -e 's/^[^\(]+\(([^\)]+)\).*$/\1/;' || true)
3.35 - CT_TestOrAbort "SOCKS proxy '${CT_PROXY_HOST}' has no IP." -n "${server_ip}"
3.36 - /sbin/ifconfig |"${awk}" -v server_ip="${server_ip}" '
3.37 - BEGIN {
3.38 - split( server_ip, tmp, "\\." );
3.39 - server_ip_num = tmp[1] * 2^24 + tmp[2] * 2^16 + tmp[3] * 2^8 + tmp[4] * 2^0;
3.40 - pairs = 0;
3.41 - }
3.42 -
3.43 - $0 ~ /^[[:space:]]*inet addr:/ {
3.44 - split( $2, tmp, ":|\\." );
3.45 - if( ( tmp[2] == 127 ) && ( tmp[3] == 0 ) && ( tmp[4] == 0 ) && ( tmp[5] == 1 ) ) {
3.46 - /* Skip 127.0.0.1, it'\''s taken care of by tsocks itself */
3.47 - next;
3.48 - }
3.49 - ip_num = tmp[2] * 2^24 + tmp[3] * 2^16 + tmp[4] * 2 ^8 + tmp[5] * 2^0;
3.50 - i = 32;
3.51 - do {
3.52 - i--;
3.53 - mask = 2^32 - 2^i;
3.54 - } while( (i!=0) && ( and( server_ip_num, mask ) == and( ip_num, mask ) ) );
3.55 - mask = and( 0xFFFFFFFF, lshift( mask, 1 ) );
3.56 - if( (i!=0) && (mask!=0) ) {
3.57 - masked_ip = and( ip_num, mask );
3.58 - for( i=0; i<pairs; i++ ) {
3.59 - if( ( masked_ip == ips[i] ) && ( mask == masks[i] ) ) {
3.60 - next;
3.61 - }
3.62 - }
3.63 - ips[pairs] = masked_ip;
3.64 - masks[pairs] = mask;
3.65 - pairs++;
3.66 - printf( "local = %d.%d.%d.%d/%d.%d.%d.%d\n",
3.67 - and( 0xFF, masked_ip / 2^24 ),
3.68 - and( 0xFF, masked_ip / 2^16 ),
3.69 - and( 0xFF, masked_ip / 2^8 ),
3.70 - and( 0xFF, masked_ip / 2^0 ),
3.71 - and( 0xFF, mask / 2^24 ),
3.72 - and( 0xFF, mask / 2^16 ),
3.73 - and( 0xFF, mask / 2^8 ),
3.74 - and( 0xFF, mask / 2^0 ) );
3.75 - }
3.76 - }
3.77 - ' >"${CT_BUILD_DIR}/tsocks.conf"
3.78 - ( echo "server = ${server_ip}";
3.79 - echo "server_port = ${CT_PROXY_PORT}";
3.80 - [ -n "${CT_PROXY_USER}" ] && echo "default_user=${CT_PROXY_USER}";
3.81 - [ -n "${CT_PROXY_PASS}" ] && echo "default_pass=${CT_PROXY_PASS}";
3.82 - ) >>"${CT_BUILD_DIR}/tsocks.conf"
3.83 - case "${CT_PROXY_TYPE/socks}" in
3.84 - 4|5) proxy_type="${CT_PROXY_TYPE/socks}";;
3.85 - auto)
3.86 - reply=$(inspectsocks "${server_ip}" "${CT_PROXY_PORT}" 2>&1 || true)
3.87 - case "${reply}" in
3.88 - *"server is a version 4 socks server") proxy_type=4;;
3.89 - *"server is a version 5 socks server") proxy_type=5;;
3.90 - *) CT_Abort "Unable to determine SOCKS proxy type for '${CT_PROXY_HOST}:${CT_PROXY_PORT}'"
3.91 - esac
3.92 - ;;
3.93 - esac
3.94 - echo "server_type = ${proxy_type}" >> "${CT_BUILD_DIR}/tsocks.conf"
3.95 - CT_HasOrAbort tsocks
3.96 - # If tsocks was found, then validateconf is present (distributed with tsocks).
3.97 - CT_DoExecLog DEBUG validateconf -f "${CT_BUILD_DIR}/tsocks.conf"
3.98 - export TSOCKS_CONF_FILE="${CT_BUILD_DIR}/tsocks.conf"
3.99 - . tsocks -on
3.100 - ;;
3.101 - esac
3.102 -}
3.103 -
3.104 # Download an URL using wget
3.105 # Usage: CT_DoGetFileWget <URL>
3.106 CT_DoGetFileWget() {
3.107 @@ -521,7 +424,6 @@
3.108 fi
3.109
3.110 # Scan all URLs in turn, and try to grab a tarball from there
3.111 - CT_DoSetProxy ${CT_PROXY_TYPE}
3.112 for ext in ${first_ext} .tar.bz2 .tar.gz .tgz .tar ''; do
3.113 # Try all urls in turn
3.114 for url in ${URLS}; do
3.115 @@ -567,7 +469,6 @@
3.116 CT_MktempDir tmp_dir
3.117 CT_Pushd "${tmp_dir}"
3.118
3.119 - CT_DoSetProxy ${CT_PROXY_TYPE}
3.120 CT_DoExecLog ALL cvs -z 9 -d "${uri}" co -P ${tag} "${module}"
3.121 [ -n "${dirname}" ] && CT_DoExecLog ALL mv "${module}" "${dirname}"
3.122 CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${dirname:-${module}}"
3.123 @@ -600,7 +501,6 @@
3.124 CT_MktempDir tmp_dir
3.125 CT_Pushd "${tmp_dir}"
3.126
3.127 - CT_DoSetProxy ${CT_PROXY_TYPE}
3.128 CT_DoExecLog ALL svn export ${rev:+-r ${rev}} "${uri}" "${basename}"
3.129 CT_DoExecLog ALL tar cjf "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${basename}"
3.130 CT_SaveLocal "${CT_TARBALLS_DIR}/${basename}.tar.bz2"