Changeset 8e20e7a


Ignore:
Timestamp:
Jan 10, 2012 4:06:23 AM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1b85c22
Parents:
3024b3f (diff), 4ad6d69 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p' (head 96b4e09e85e0947d0b9df188f4861664073f07a6)

to branch 'i2p.i2p.zzz.jetty6' (head 4024ef4f6e6c5e4ca6a7803614dc769ca654ac5f)

Files:
4 added
1 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHandler.java

    r3024b3f r8e20e7a  
    141141        if (!_ratesOnly) {
    142142            // IP Settings
    143             String oldUdp = _context.getProperty(UDPTransport.PROP_SOURCES, UDPTransport.DEFAULT_SOURCES);
     143            String oldUdp = _context.getProperty(UDPTransport.PROP_SOURCES,
     144                                                 _context.router().isHidden() ? "hidden" : UDPTransport.DEFAULT_SOURCES);
    144145            String oldUHost = _context.getProperty(UDPTransport.PROP_EXTERNAL_HOST, "");
    145146            if (_udpAutoIP != null) {
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java

    r3024b3f r8e20e7a  
    99import net.i2p.router.RouterContext;
    1010import net.i2p.router.startup.ClientAppConfig;
    11 import net.i2p.util.Log;
     11import net.i2p.util.VersionComparator;
    1212
    1313import org.tanukisoftware.wrapper.WrapperManager;
    14 import org.tanukisoftware.wrapper.event.WrapperControlEvent;
    15 import org.tanukisoftware.wrapper.event.WrapperEvent;
    16 import org.tanukisoftware.wrapper.event.WrapperEventListener;
    1714
    1815/**
     
    2320public class ConfigServiceHandler extends FormHandler {
    2421   
    25     private static WrapperEventListener _signalHandler;
    26 
    27     private static final String PROP_GRACEFUL_HUP = "router.gracefulHUP";
     22    private static WrapperListener _wrapperListener;
     23
     24    private static final String LISTENER_AVAILABLE = "3.2.0";
    2825
    2926    /**
     
    138135    /**
    139136     *  Register a handler for signals,
    140      *  so we can handle HUP from the wrapper (non-Windows only)
     137     *  so we can handle HUP from the wrapper (non-Windows only, wrapper 3.2.0 or higher)
    141138     *
    142139     *  @since 0.8.13
    143140     */
    144141    synchronized static void registerSignalHandler(RouterContext ctx) {
    145         if (ctx.hasWrapper() && _signalHandler == null &&
     142        if (ctx.hasWrapper() && _wrapperListener == null &&
    146143            !System.getProperty("os.name").startsWith("Win")) {
    147            _signalHandler = new SignalHandler(ctx);
    148            long mask = WrapperEventListener.EVENT_FLAG_CONTROL;
    149            WrapperManager.addWrapperEventListener(_signalHandler, mask);
     144            String wv = System.getProperty("wrapper.version");
     145            if (wv != null && (new VersionComparator()).compare(wv, LISTENER_AVAILABLE) >= 0) {
     146                try {
     147                   _wrapperListener = new WrapperListener(ctx);
     148                } catch (Throwable t) {}
     149            }
    150150        }
    151151    }
     
    157157     */
    158158    public synchronized static void unregisterSignalHandler() {
    159         if (_signalHandler != null) {
    160            WrapperManager.removeWrapperEventListener(_signalHandler);
    161            _signalHandler = null;
    162         }
    163     }
    164 
    165     /**
    166      *  Catch signals.
    167      *  The wrapper will potentially forward HUP, USR1, and USR2.
    168      *  But USR1 and USR2 are used by the JVM GC and cannot be trapped.
    169      *  So we will only get HUP.
    170      *
    171      *  @since 0.8.13
    172      */
    173     private static class SignalHandler implements WrapperEventListener {
    174         private final RouterContext _ctxt;
    175 
    176         public SignalHandler(RouterContext ctx) {
    177             _ctxt = ctx;
    178         }
    179 
    180         public void fired(WrapperEvent event) {
    181             if (!(event instanceof WrapperControlEvent))
    182                 return;
    183             WrapperControlEvent wce = (WrapperControlEvent) event;
    184             Log log = _ctxt.logManager().getLog(ConfigServiceHandler.class);
    185             if (log.shouldLog(Log.WARN))
    186                 log.warn("Got signal: " + wce.getControlEventName());
    187             int sig = wce.getControlEvent();
    188             switch (sig) {
    189               case WrapperManager.WRAPPER_CTRL_HUP_EVENT:
    190                 if (_ctxt.getBooleanProperty(PROP_GRACEFUL_HUP)) {
    191                     wce.consume();
    192                     if (!(_ctxt.router().gracefulShutdownInProgress() ||
    193                           _ctxt.router().isFinalShutdownInProgress())) {
    194                         System.err.println("WARN: Graceful shutdown initiated by SIGHUP");
    195                         log.logAlways(Log.WARN, "Graceful shutdown initiated by SIGHUP");
    196                         registerWrapperNotifier(_ctxt, Router.EXIT_GRACEFUL, false);
    197                         _ctxt.router().shutdownGracefully();
    198                     }
    199                 } else {
    200                     log.log(Log.CRIT, "Hard shutdown initiated by SIGHUP");
    201                     // JVM will call ShutdownHook if we don't do it ourselves
    202                     //wce.consume();
    203                     //registerWrapperNotifier(_ctxt, Router.EXIT_HARD, false);
    204                     //_ctxt.router().shutdown(Router.EXIT_HARD);
    205                 }
    206                 break;
    207             }
     159        if (_wrapperListener != null) {
     160            _wrapperListener.unregister();
     161            _wrapperListener = null;
    208162        }
    209163    }
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java

    r3024b3f r8e20e7a  
    102102
    103103    private String reachability() {
     104        if (_context.commSystem().isDummy())
     105            return "VM Comm System";
    104106        if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) &&
    105107            !_context.clientManager().isAlive())
     
    181183               _context.netDb().isInitialized() &&
    182184               _context.router().getUptime() > 2*60*1000 &&
     185               (!_context.commSystem().isDummy()) &&
    183186               _context.commSystem().countActivePeers() <= 0 &&
    184187               _context.netDb().getKnownRouters() > 5;
  • apps/routerconsole/jsp/confignet.jsp

    r3024b3f r8e20e7a  
    158158<li class="tidylist"><b><%=intl._("Hidden")%></b> -
    159159     <%=intl._("The router is not configured to publish its address, therefore it does not expect incoming connections.")%>
     160     <%=intl._("Hidden mode is automatically enabled for added protection in certain countries.")%>
    160161<li class="tidylist"><b><%=intl._("WARN - Firewalled and Fast")%></b> -
    161162     <%=intl._("You have configured I2P to share more than 128KBps of bandwidth, but you are firewalled.")%>
  • apps/routerconsole/jsp/error500.jsp

    r3024b3f r8e20e7a  
    5656<b>I2P version:</b> <%=net.i2p.router.RouterVersion.FULL_VERSION%><br>
    5757<b>Java version:</b> <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)<br>
     58<b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
     59 <jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
     60 <jsp:setProperty name="logsHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
     61<b>Server version:</b> <jsp:getProperty name="logsHelper" property="jettyVersion" /><br>
    5862<b>Platform:</b> <%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%><br>
    5963<b>Processor:</b> <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)<br>
    6064<b>Jbigi:</b> <%=net.i2p.util.NativeBigInteger.loadStatus()%><br>
    61 <b>Encoding:</b> <%=System.getProperty("file.encoding")%></p>
     65<b>Encoding:</b> <%=System.getProperty("file.encoding")%><br>
     66<b>Charset:</b> <%=java.nio.charset.Charset.defaultCharset().name()%></p>
    6267<p><%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%></p>
    6368</div></body></html>
  • core/c/jbigi/README

    r3024b3f r8e20e7a  
    1111Linux-specific information:
    1212===========================
    13 Some linux distributions comes bundled with GMP.
     13Some linux distributions come bundled with GMP.
    1414Try 'locate lib/libgmp.so' to see.
    15 If so, install the the libgmp3-dev debian package to get the libgmp headers.
     15
     16In Debian/Ubuntu, install the the libgmp3-dev package to get the libgmp headers.
    1617Then export I2P=/path/to/your/i2p/install.
    1718Then do 'build.sh dynamic'. This will do a quick build using your installed libgmp library
  • core/c/jbigi/build.sh

    r3024b3f r8e20e7a  
    1818#
    1919
    20 mkdir -p lib/
    21 mkdir -p bin/local
     20rm -rf bin/local
     21mkdir -p lib bin/local
     22
     23# Use 4.3.2 32bit CPUs.
     24# Use 5.0.2 64bit CPUs.
    2225VER=4.3.2
    2326
     27# If JAVA_HOME isn't set, try to figure it out on our own
     28[ -z $JAVA_HOME ] && . ./find-java-home
     29if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
     30    echo "ERROR: Cannot find jni.h! Looked in \"$JAVA_HOME/include/jni.h\"" >&2
     31    echo "Please set JAVA_HOME to a java home that has the JNI" >&2
     32    exit 1
     33fi
     34
     35# Abort script on uncaught errors
    2436set -e
    2537
    26 if [ "$1" != "dynamic" -a ! -d gmp-$VER ]
    27 then
    28         TAR=gmp-$VER.tar.bz2
    29         if [ ! -f $TAR ]
    30         then
    31             echo "Downloading ftp://ftp.gmplib.org/pub/gmp-${VER}/gmp-${VER}.tar.bz2"
    32             wget ftp://ftp.gmplib.org/pub/gmp-${VER}/gmp-${VER}.tar.bz2
    33         fi
     38download_gmp ()
     39{
     40if [ $(which wget) ]; then
     41    echo "Downloading ftp://ftp.gmplib.org/pub/gmp-${VER}/${TAR}"
     42    wget -N --progress=dot ftp://ftp.gmplib.org/pub/gmp-${VER}/${TAR}
     43else
     44    echo "ERROR: Cannot find wget." >&2
     45    echo >&2
     46    echo "Please download ftp://ftp.gmplib.org/pub/gmp-${VER}/${TAR}" >&2
     47    echo "manually and rerun this script." >&2
     48    exit 1
     49fi
     50}
    3451
    35         echo "Building the jbigi library with GMP Version $VER"
     52extract_gmp ()
     53{
     54tar -xjf ${TAR} > /dev/null 2>&1|| (rm -f ${TAR} && download_gmp && extract_gmp || exit 1)
     55}
    3656
    37         echo "Extracting GMP..."
    38         tar -xjf gmp-$VER.tar.bz2
     57TAR=gmp-${VER}.tar.bz2
     58
     59if [ "$1" != "dynamic" -a ! -d gmp-${VER} ]; then
     60    if [ ! -f $TAR ]; then
     61        download_gmp
     62    fi
     63
     64    echo "Building the jbigi library with GMP Version ${VER}"
     65    echo "Extracting GMP..."
     66    extract_gmp
    3967fi
    4068
     
    4270
    4371echo "Building..."
    44 if [ "$1" != "dynamic" ]
    45 then
    46         case `uname -sr` in
    47                 Darwin*)
    48                         # --with-pic is required for static linking
    49                         ../../gmp-$VER/configure --with-pic;;
    50                 *)
    51                         # and it's required for ASLR
    52                         ../../gmp-$VER/configure --with-pic;;
    53         esac
    54         make
    55         sh ../../build_jbigi.sh static
     72if [ "$1" != "dynamic" ]; then
     73    case `uname -sr` in
     74        Darwin*)
     75            # --with-pic is required for static linking
     76            ../../gmp-${VER}/configure --with-pic;;
     77        *)
     78            # and it's required for ASLR
     79            ../../gmp-${VER}/configure --with-pic;;
     80    esac
     81    make
     82    sh ../../build_jbigi.sh static
    5683else
    57         sh ../../build_jbigi.sh dynamic
     84    shift
     85    sh ../../build_jbigi.sh dynamic
    5886fi
    5987
     
    6290cd ../..
    6391
    64 if [ ! -f $I2P/lib/i2p.jar ]
    65 then
    66         echo "I2P installation not found"
    67     echo "We looked in '$I2P'"
    68     echo "Not running tests against I2P installation without knowing where it is"
    69     echo "Please set the environment variable I2P to the location of your I2P installation (so that \$I2P/lib/i2p.jar works)"
    70     echo "If you do so, this script will run two tests to compare your installed jbigi with the one here you just compiled (to see if there is a marked improvement)"
    71         exit 1
     92if [ "$1" != "notest" ]; then
     93    if [ -z "$I2P" ]; then
     94        if [ -r $HOME/i2p/lib/i2p.jar ]; then
     95            I2P="$HOME/i2p"
     96        elif [ -r /usr/share/i2p/lib/i2p.jar ]; then
     97            I2P="/usr/share/i2p"
     98        else
     99            echo "Please set the environment variable \$I2P to run tests." >&2
     100        fi
     101    fi
     102
     103    if [ ! -f $I2P/lib/i2p.jar ]; then
     104        echo "I2P installation not found" >&2
     105        echo "We looked in $I2P" >&2
     106        echo "Not running tests against I2P installation without knowing where it is." >&2
     107        echo >&2
     108        echo "Please set the environment variable I2P to the location of your"
     109        echo "I2P installation (so that \$I2P/lib/i2p.jar works)." >&2
     110        echo "If you do so, this script will run two tests to compare your" >&2
     111        echo "installed jbigi with the one here you just compiled to see if" >&2
     112        echo "there is a marked improvement." >&2
     113        exit 1
     114    fi
     115    echo 'Running test with standard I2P installation...'
     116    java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
     117    echo
     118    echo 'Running test with new libjbigi...'
     119    java -Djava.library.path=lib/ -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
     120    echo 'If the second run shows better performance, please use the jbigi that you have compiled so that I2P will work better!'
     121    echo "(You can do that just by copying lib/libjbigi.so over the existing libjbigi.so file in \$I2P)"
    72122fi
    73 echo 'Running test with standard I2P installation...'
    74 java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
    75 echo
    76 echo 'Running test with new libjbigi...'
    77 java -Djava.library.path=lib/ -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
    78 echo 'If the second is better performance, please use the jbigi you have compiled i2p will work better!'
    79 echo '(You can do that just by copying lib/libjbigi.so over the existing libjbigi.so file in $I2P)'
  • core/c/jbigi/build_jbigi.sh

    r3024b3f r8e20e7a  
    11#!/bin/sh
    2 # When executed in Mingw: Produces an jbigi.dll
    3 # When executed in Linux/FreeBSD: Produces an libjbigi.so
    4 # Darwin produces libjbigi.jnilib, right?
    5 
     2# When executed in Mingw: Produces a jbigi.dll
     3# When executed in Linux/FreeBSD: Produces a libjbigi.so
     4# When executed in OSX: Produces a libjbigi.jnilib
    65CC="gcc"
    76
    8 case `uname -sr` in
    9 MINGW*)
    10         JAVA_HOME="c:/software/j2sdk1.4.2_05"
    11         COMPILEFLAGS="-Wall"
    12         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
    13         LINKFLAGS="-shared -Wl,--kill-at"
    14         LIBFILE="jbigi.dll";;
    15 CYGWIN*)
    16         JAVA_HOME="c:/software/j2sdk1.4.2_05"
    17         COMPILEFLAGS="-Wall -mno-cygwin"
    18         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
    19         LINKFLAGS="-shared -Wl,--kill-at"
    20         LIBFILE="jbigi.dll";;
    21 Darwin*)
    22         JAVA_HOME="/Library/Java/Home"
    23         COMPILEFLAGS="-Wall"
    24         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include"
    25         LINKFLAGS="-dynamiclib -framework JavaVM"
    26         LIBFILE="libjbigi.jnilib";;
    27 SunOS*)
    28         COMPILEFLAGS="-fPIC -Wall"
    29         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/solaris"
    30         LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
    31         LIBFILE="libjbigi.so";;
    32 *)
    33         COMPILEFLAGS="-fPIC -Wall"
    34         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
    35         LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
    36         LIBFILE="libjbigi.so";;
    37 esac
    38 
     7# If JAVA_HOME isn't set we'll try to figure it out
     8[ -z $JAVA_HOME ] && . ./find-java-home
    399if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
    4010    echo "Cannot find jni.h! Looked in '$JAVA_HOME/include/jni.h'"
     
    4313fi
    4414
    45 #To link dynamically to GMP (use libgmp.so or gmp.lib), uncomment the first line below
    46 #To link statically to GMP, uncomment the second line below
    47 # Bug!!! Quote *BOTH* or neither! --Sponge
    48 if test "$1" = "dynamic"
    49 then
    50         echo "Building jbigi lib that is dynamically linked to GMP"
    51         LIBPATH="-L.libs"
    52         INCLUDELIBS="-lgmp"
     15case `uname -s` in
     16MINGW*)
     17        JAVA_HOME="c:/software/j2sdk1.4.2_05"
     18        COMPILEFLAGS="-Wall"
     19        INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
     20        LINKFLAGS="-shared -Wl,--kill-at"
     21        LIBFILE="jbigi.dll";;
     22CYGWIN*)
     23        JAVA_HOME="c:/software/j2sdk1.4.2_05"
     24        COMPILEFLAGS="-Wall -mno-cygwin"
     25        INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include/win32/ -I$JAVA_HOME/include/"
     26        LINKFLAGS="-shared -Wl,--kill-at"
     27        LIBFILE="jbigi.dll";;
     28Darwin*)
     29        JAVA_HOME=$(/usr/libexec/java_home)
     30        COMPILEFLAGS="-fPIC -Wall"
     31        INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include"
     32        LINKFLAGS="-dynamiclib -framework JavaVM"
     33        LIBFILE="libjbigi.jnilib";;
     34SunOS*|OpenBSD*|NetBSD*|FreeBSD*|Linux*)
     35        UNIXTYPE=$(uname -s | tr "[A-Z]" "[a-z]")
     36        if [ $UNIXTYPE = "sunos" ]; then
     37            UNIXTYPE="solaris"
     38        fi
     39        COMPILEFLAGS="-fPIC -Wall"
     40        INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/${UNIXTYPE}"
     41        LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
     42        LIBFILE="libjbigi.so";;
     43*)
     44        echo "Unsupported system type."
     45        exit 1;;
     46esac
     47
     48if [ "$1" = "dynamic" ] ; then
     49        echo "Building a jbigi lib that is dynamically linked to GMP"
     50        LIBPATH="-L.libs"
     51        INCLUDELIBS="-lgmp"
    5352else
    54         echo "Building jbigi lib that is statically linked to GMP"
    55         STATICLIBS=".libs/libgmp.a"
     53        echo "Building a jbigi lib that is statically linked to GMP"
     54        STATICLIBS=".libs/libgmp.a"
    5655fi
    5756
    5857echo "Compiling C code..."
    5958rm -f jbigi.o $LIBFILE
    60 $CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c
    61 $CC $LINKFLAGS $INCLUDES -o $LIBFILE jbigi.o $INCLUDELIBS $STATICLIBS
     59$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c || exit 1
     60$CC $LINKFLAGS $INCLUDES -o $LIBFILE jbigi.o $INCLUDELIBS $STATICLIBS || exit 1
     61
     62exit 0
  • core/c/jbigi/mbuild-all.sh

    r3024b3f r8e20e7a  
    155155make_static () {
    156156        $ECHO "Attempting .${4} creation for ${3}${5}${2}"
    157         ../../mbuild_jbigi.sh static || return 1
     157        ../../build_jbigi.sh static || return 1
    158158        cp ${3}.${4} ../../lib/net/i2p/util/${3}${5}${2}.${4}
    159159        return 0
  • core/java/src/freenet/support/CPUInformation/AMDCPUInfo.java

    r3024b3f r8e20e7a  
    4444     */
    4545        public boolean IsBobcatCompatible();
     46    /**
     47     * @return true if the CPU present in the machine is at least a 'bulldozer' CPU
     48     */
     49        public boolean IsBulldozerCompatible();
    4650}
  • core/java/src/freenet/support/CPUInformation/AMDInfoImpl.java

    r3024b3f r8e20e7a  
    1414    protected static boolean isAthlon64Compatible = false;
    1515    protected static boolean isBobcatCompatible = false;
     16    protected static boolean isBulldozerCompatible = false;
    1617
    1718    // If modelString != null, the cpu is considered correctly identified.
     
    3132
    3233    public boolean IsBobcatCompatible(){ return isBobcatCompatible; }
     34
     35        public boolean IsBulldozerCompatible(){ return isBulldozerCompatible; }
    3336
    3437        static
     
    350353            }
    351354        }
     355        //Bulldozer
     356        if(CPUID.getCPUFamily() + CPUID.getCPUExtendedFamily() == 21){
     357            isK6Compatible = true;
     358            isK6_2_Compatible = true;
     359            isK6_3_Compatible = true;
     360            isAthlonCompatible = true;
     361            isAthlon64Compatible = true;
     362            isBobcatCompatible = true;
     363                        isBulldozerCompatible = true;
     364            isX64 = true;
     365            switch(CPUID.getCPUModel() + CPUID.getCPUExtendedModel()){
     366                case 1:                   
     367                    modelString = "Bulldozer FX-6***/FX-8***";
     368                    break;
     369            }
     370        }
    352371    }
    353372
  • core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java

    r3024b3f r8e20e7a  
    239239                        modelString = "Core i7/i5 (32nm)";
    240240                        break;
     241                    case 11:
     242                        modelString = "Core i7/i5 (32nm)";
     243                        break;
    241244                    case 12:
    242245                        modelString = "Core i7 (32nm)";
     246                        break;
     247                    case 13:
     248                        modelString = "Core i7 Extreme Edition (32nm)";
    243249                        break;
    244250                    case 14:
  • debian/patches/0001-path-substitution.patch

    r3024b3f r8e20e7a  
    106106 # Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
    107107 wrapper.java.additional.auto_bits=TRUE
    108 @@ -69,7 +61,7 @@
     108@@ -71,7 +63,7 @@
    109109 wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
    110110 wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
     
    115115 
    116116 # On some IPv6 enabled systems, I2P and other network-enabled java applications
    117 @@ -139,11 +131,7 @@
     117@@ -141,11 +133,7 @@
    118118 # tell the router where to find the wrapper log
    119119 # (change X to the next available number)
     
    128128 # Format of output for the log file.
    129129 # The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
    130 @@ -205,10 +193,7 @@
     130@@ -211,10 +199,7 @@
    131131 # you should copy this file, change the location or file name,
    132132 # and edit the i2prouter script to change the WRAPPER_CONF setting
     
    140140 #
    141141 # From i2prouter:
    142 @@ -219,10 +204,7 @@
     142@@ -225,10 +210,7 @@
    143143 #
    144144 # This means i2prouter looks for './i2p.pid'.
     
    152152 #********************************************************************
    153153 # Wrapper General Properties
    154 @@ -239,30 +221,3 @@
     154@@ -245,30 +227,3 @@
    155155 wrapper.umask=0022
    156156 wrapper.java.umask=0022
  • debian/patches/0002-jbigi-soname.patch

    r3024b3f r8e20e7a  
    33Subject: jbigi soname
    44
    5 The purpose of this patch is to change the path that mbuild_jbigi.sh
     5The purpose of this patch is to change the path that build_jbigi.sh
    66expects to find the source files at. At the same time I'm specifying
    77a soname to shut lintian up.
    88
    99---
    10  core/c/jbigi/mbuild_jbigi.sh |    6 +++---
    11  1 files changed, 3 insertions(+), 3 deletions(-)
     10 core/c/jbigi/build_jbigi.sh |    4 +++---
     11 1 files changed, 2 insertions(+), 2 deletions(-)
    1212
    13 --- a/core/c/jbigi/mbuild_jbigi.sh
    14 +++ b/core/c/jbigi/mbuild_jbigi.sh
    15 @@ -47,7 +47,7 @@
    16                  fi
     13--- a/core/c/jbigi/build_jbigi.sh
     14+++ b/core/c/jbigi/build_jbigi.sh
     15@@ -37,7 +37,7 @@
     16             UNIXTYPE="solaris"
    1717         fi
    1818         COMPILEFLAGS="-fPIC -Wall"
     
    2222         LIBFILE="libjbigi.so";;
    2323 *)
    24 @@ -66,7 +66,7 @@
     24@@ -56,7 +56,7 @@
    2525 
    2626 echo "Compiling C code..."
     
    2828-$CC -c $COMPILEFLAGS $INCLUDES ../../jbigi/src/jbigi.c || exit 1
    2929+$CC -c $COMPILEFLAGS $INCLUDES ./jbigi/src/jbigi.c || exit 1
    30  $CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS || exit 1
     30 $CC $LINKFLAGS $INCLUDES -o $LIBFILE jbigi.o $INCLUDELIBS $STATICLIBS || exit 1
    3131 
    3232 exit 0
  • debian/patches/series

    r3024b3f r8e20e7a  
    220002-jbigi-soname.patch
    330003-renaming-jcpuid.patch
     40004-oom-listener.patch
    45#debian-version.patch
    560004-jetty6.patch
  • history.txt

    r3024b3f r8e20e7a  
     12012-01-10 zzz
     2  * Console:
     3    - Add info to error 500 page
     4    - Add indication on summary bar when in VM comm system
     5    - Make graceful the default for HUP (ticket #580)
     6    - Fix class error on wrapper 3.1.1
     7  * i2prouter: Don't attempt to translate strings from script
     8  * Router:
     9    - Auto-hidden mode for bad countries
     10    - Don't put addresses in our RouterInfo when hidden
     11
    1122012-01-08 zzz
    213  * Plugins:
  • installer/resources/i2prouter

    r3024b3f r8e20e7a  
    462462
    463463gettext() {
    464     "$WRAPPER_CMD" --translate "$1" "$WRAPPER_CONF" 2>/dev/null
    465     if [ $? != 0 ] ; then
     464    # TODO provide translations and call external gettext.
     465    # For now, don't attempt to translate via the wrapper,
     466    # it probably isn't supported in the community edition.
     467    #"$WRAPPER_CMD" --translate "$1" "$WRAPPER_CONF" 2>/dev/null
     468    #if [ $? != 0 ] ; then
    466469        echo "$1"
    467     fi
     470    #fi
    468471}
    469472
     
    11001103            # This sends HUP. router.gracefulHUP must be set in router.config,
    11011104            # or else this will do the same as stop.
    1102             kill $pid
     1105            kill -HUP $pid
    11031106            if [ $? -ne 0 ]
    11041107            then
  • router/java/src/net/i2p/router/CommSystemFacade.java

    r3024b3f r8e20e7a  
    6262    public byte[] getIP(Hash dest) { return null; }
    6363    public void queueLookup(byte[] ip) {}
     64
    6465    /** @since 0.8.11 */
    6566    public String getOurCountry() { return null; }
     67
     68    /** @since 0.8.13 */
     69    public boolean isInBadCountry() { return false; }
     70
    6671    public String getCountry(Hash peer) { return null; }
    6772    public String getCountryName(String code) { return code; }
     
    7075    }
    7176   
     77    /** @since 0.8.13 */
     78    public boolean isDummy() { return true; }
     79
    7280    /**
    7381     * Tell other transports our address changed
  • router/java/src/net/i2p/router/Router.java

    r3024b3f r8e20e7a  
    242242            _config.put("router.firstInstalled", now);
    243243            _config.put("router.updateLastInstalled", now);
    244             // only compatible with new i2prouter script
    245             _config.put("router.gracefulHUP", "true");
    246244            saveConfig();
    247245        }
     
    593591        if ( (ri != null) && (ri.isHidden()) )
    594592            return true;
    595         return _context.getBooleanProperty(PROP_HIDDEN_HIDDEN);
    596     }
    597 
    598     /**
     593        String h = _context.getProperty(PROP_HIDDEN_HIDDEN);
     594        if (h != null)
     595            return Boolean.valueOf(h).booleanValue();
     596        return _context.commSystem().isInBadCountry();
     597    }
     598
     599    /**
     600     *  Only called at startup via LoadRouterInfoJob and RebuildRouterInfoJob.
     601     *  Not called by periodic RepublishLocalRouterInfoJob.
     602     *  We don't want to change the cert on the fly as it changes the router hash.
     603     *  RouterInfo.isHidden() checks the capability, but RouterIdentity.isHidden() checks the cert.
     604     *  There's no reason to ever add a hidden cert?
    599605     *  @return the certificate for a new RouterInfo - probably a null cert.
    600606     */
    601607    public Certificate createCertificate() {
    602         if (isHidden())
     608        if (_context.getBooleanProperty(PROP_HIDDEN))
    603609            return new Certificate(Certificate.CERTIFICATE_TYPE_HIDDEN, null);
    604610        return Certificate.NULL_CERT;
  • router/java/src/net/i2p/router/RouterVersion.java

    r3024b3f r8e20e7a  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 1;
     21    public final static long BUILD = 2;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java

    r3024b3f r8e20e7a  
    177177    }
    178178   
     179    /** @return non-null, possibly empty */
    179180    @Override
    180181    public Set<RouterAddress> createAddresses() {
     182        if (_context.router().isHidden())
     183            return Collections.EMPTY_SET;
    181184        Map<String, RouterAddress> addresses = null;
    182185        boolean newCreated = false;
     
    452455
    453456    /**
     457     *  Are we in a bad place
     458     *  @since 0.8.13
     459     */
     460    public boolean isInBadCountry() {
     461        String us = getOurCountry();
     462        return us != null && (BadCountries.contains(us) || _context.getBooleanProperty("router.forceBadCountry"));
     463    }
     464
     465    /**
    454466     *  Uses the transport IP first because that lookup is fast,
    455467     *  then the SSU IP from the netDb.
     
    518530    }
    519531
     532    /** @since 0.8.13 */
     533    @Override
     534    public boolean isDummy() { return false; }
     535
    520536    /**
    521537     *  Translate
  • router/java/src/net/i2p/router/transport/GeoIP.java

    r3024b3f r8e20e7a  
    2222import net.i2p.data.DataHelper;
    2323import net.i2p.data.Hash;
     24import net.i2p.router.Router;
    2425import net.i2p.router.RouterContext;
    2526import net.i2p.util.ConcurrentHashSet;
     
    284285            _context.router().setConfigSetting(PROP_IP_COUNTRY, country);
    285286            _context.router().saveConfig();
     287            if (_context.commSystem().isInBadCountry() && _context.getProperty(Router.PROP_HIDDEN_HIDDEN) == null) {
     288                String name = fullName(country);
     289                if (name == null)
     290                    name = country;
     291                _log.logAlways(Log.WARN, "Setting hidden mode to protect you in " + name +
     292                                         ", you may override on the network configuration page");
     293                _context.router().rebuildRouterInfo();
     294            }
    286295        }
    287296        /****/
Note: See TracChangeset for help on using the changeset viewer.