scripts/build/debug/strace.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Apr 26 21:31:05 2008 +0000 (2008-04-26)
changeset 454 372b2f397baa
parent 239 988e9b7f70eb
permissions -rw-r--r--
Configure tsocks with a simple heuristic.

Consider the proxy has to be in a 'local' network. It means it is directly
reachable by the local machine, even if the local machine has to hop through
one or more gates to reach the proxy (often the case in enterprise networks
where class A 10.0.0.0/8 is in fact sub-divided into smaller networks, each
one of them in a different location, eg. 10.1.0.0/16 in a place, while
10.2.0.0/16 would be on the other side of the world). Not being in the same
subnet does not mean the proxy is not available.

So we will build a mask with at most high bits set, which defines a network
that has both the local machine and the proxy. Because a machine may have
more than one interface, build a mask for each of them, removing 127.0.0.1
which is added automagically by tsocks, and removing duplicate masks.

If all of this does not work, then it means the local machine can NOT in fact
reach the proxy, which in turn means the user mis-configured something (most
probably a typo...).

/trunk/scripts/crosstool.sh | 61 52 9 0 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 9 deletions(-)
yann@239
     1
# Build script for strace
yann@239
     2
yann@239
     3
is_enabled="${CT_STRACE}"
yann@239
     4
yann@239
     5
do_print_filename() {
yann@239
     6
    [ "${CT_STRACE}" = "y" ] || return 0
yann@239
     7
    echo "strace-${CT_STRACE_VERSION}"
yann@239
     8
}
yann@239
     9
yann@239
    10
do_debug_strace_get() {
yann@239
    11
    CT_GetFile "strace-${CT_STRACE_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/strace/
yann@239
    12
}
yann@239
    13
yann@239
    14
do_debug_strace_extract() {
yann@239
    15
    CT_ExtractAndPatch "strace-${CT_STRACE_VERSION}"
yann@239
    16
}
yann@239
    17
yann@239
    18
do_debug_strace_build() {
yann@239
    19
    CT_DoStep INFO "Installing strace"
yann@239
    20
    mkdir -p "${CT_BUILD_DIR}/build-strace"
yann@239
    21
    CT_Pushd "${CT_BUILD_DIR}/build-strace"
yann@239
    22
yann@239
    23
    CT_DoLog EXTRA "Configuring strace"
yann@239
    24
    "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure"   \
yann@239
    25
        --build=${CT_BUILD}                                 \
yann@239
    26
        --host=${CT_TARGET}                                 \
yann@255
    27
        --prefix=/usr                                       2>&1 |CT_DoLog ALL
yann@239
    28
yann@239
    29
    CT_DoLog EXTRA "Building strace"
yann@255
    30
    make    2>&1 |CT_DoLog ALL
yann@239
    31
yann@239
    32
    CT_DoLog EXTRA "Installing strace"
yann@255
    33
    make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install  2>&1 |CT_DoLog ALL
yann@239
    34
yann@239
    35
    CT_Popd
yann@239
    36
    CT_EndStep
yann@239
    37
}
yann@239
    38