Changeset a9f94315


Ignore:
Timestamp:
Aug 17, 2011 7:34:49 PM (9 years ago)
Author:
hiddenz <hiddenz@…>
Branches:
master
Children:
3f979b1
Parents:
b3cfe653 (diff), 77e1bf6 (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:

merge of 'bfd1fde175d4c3de1a107725991aa1b1d611d298'

and 'eb7a90b602d939a3257fb42ab3d826b54ea4da1b'

Files:
20 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    rb3cfe653 ra9f94315  
    12271227       
    12281228        Set<String> existingNames = listTorrentFiles();
     1229        if (_log.shouldLog(Log.DEBUG))
     1230            _log.debug("DirMon found: " + DataHelper.toString(foundNames) + " existing: " + DataHelper.toString(existingNames));
    12291231        // lets find new ones first...
    12301232        for (int i = 0; i < foundNames.size(); i++) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    rb3cfe653 ra9f94315  
    875875            return "Tunnel must be stopped before modifying destination";
    876876        }
    877         PrivateKeyFile pkf = new PrivateKeyFile(_privKeyFile);
     877
     878        File keyFile = new File(_privKeyFile);
     879        if (!keyFile.isAbsolute())
     880            keyFile = new File(_context.getConfigDir(), _privKeyFile);
     881        PrivateKeyFile pkf = new PrivateKeyFile(keyFile);
    878882        try {
    879883            pkf.createIfAbsent();
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryListener.java

    rb3cfe653 ra9f94315  
    114114        _name = createName(_context, baseName);
    115115        _eventName = createName(_context, baseName + ".events");
     116        File rrdFile = null;
    116117        try {
    117118            RrdBackendFactory factory = RrdBackendFactory.getFactory(getBackendName());
     
    120121                // generate full path for persistent RRD files
    121122                File rrdDir = new SecureFile(_context.getRouterDir(), RRD_DIR);
    122                 File rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
     123                rrdFile = new File(rrdDir, RRD_PREFIX + _name + RRD_SUFFIX);
    123124                rrdDefName = rrdFile.getAbsolutePath();
    124125                if (rrdFile.exists()) {
     
    165166        } catch (RrdException re) {
    166167            _log.error("Error starting RRD for stat " + baseName, re);
     168            // corrupt file?
     169            if (_isPersistent && rrdFile != null)
     170                rrdFile.delete();
    167171        } catch (IOException ioe) {
    168172            _log.error("Error starting RRD for stat " + baseName, ioe);
  • apps/streaming/java/src/net/i2p/client/streaming/MessageHandler.java

    rb3cfe653 ra9f94315  
    1717 */
    1818class MessageHandler implements I2PSessionListener {
    19     private ConnectionManager _manager;
    20     private I2PAppContext _context;
    21     private Log _log;
     19    private final ConnectionManager _manager;
     20    private final I2PAppContext _context;
     21    private final Log _log;
    2222    private final Set<I2PSocketManager.DisconnectListener> _listeners;
    2323   
  • build.xml

    rb3cfe653 ra9f94315  
    2727        <echo message="  dist:      pkg and javadoc" />
    2828        <echo message="  installer: build the GUI installer" />
     29        <echo message="  installer-freebsd: build the GUI installer (FreeBSD only)" />
     30        <echo message="  installer-linux: build the GUI installer (Linux only)" />
     31        <echo message="  installer-osx: build the GUI installer (OSX only)" />
     32        <echo message="  installer-windows: build the GUI installer (Windows only)" />
    2933        <echo message="  tarball:   tar the full install into i2p.tar.bz2 (extracts to build a new clean install)" />
    3034        <echo message="  updater:   Package the built files in i2pupdate.zip (extracts safely over existing installs)" />
     
    286290        </jar>
    287291    </target>
     292   
     293    <!-- Now system-specific jbigis in alphabetical order -->
     294    <target name="jbigi-freebsd-only"  depends="buildProperties, jbigi-list-changes" >
     295        <!-- set if unset -->
     296        <property name="workspace.changes.jbigi.tr" value="" />
     297        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
     298            <fileset dir="installer/lib/jbigi" includes="*freebsd*.so" />
     299            <manifest>
     300                <attribute name="Build-Date" value="${build.timestamp}" />
     301                <attribute name="Base-Revision" value="${workspace.version}" />
     302                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
     303            </manifest>
     304        </jar>
     305    </target>
     306
     307    <target name="jbigi-linux-only"  depends="buildProperties, jbigi-list-changes" >
     308        <!-- set if unset -->
     309        <property name="workspace.changes.jbigi.tr" value="" />
     310        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
     311            <fileset dir="installer/lib/jbigi" includes="*linux*.so" />
     312            <manifest>
     313                <attribute name="Build-Date" value="${build.timestamp}" />
     314                <attribute name="Base-Revision" value="${workspace.version}" />
     315                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
     316            </manifest>
     317        </jar>
     318    </target>
     319
     320    <target name="jbigi-linux-nonx86-only"  depends="buildProperties, jbigi-list-changes" >
     321        <!-- set if unset -->
     322        <property name="workspace.changes.jbigi.tr" value="" />
     323        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
     324            <fileset dir="installer/lib/jbigi" includes="*linux-arm*.so,*linux-ppc*.so" />
     325            <manifest>
     326                <attribute name="Build-Date" value="${build.timestamp}" />
     327                <attribute name="Base-Revision" value="${workspace.version}" />
     328                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
     329            </manifest>
     330        </jar>
     331    </target>
     332
     333    <target name="jbigi-osx-only"  depends="buildProperties, jbigi-list-changes" >
     334        <!-- set if unset -->
     335        <property name="workspace.changes.jbigi.tr" value="" />
     336        <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
     337            <fileset dir="installer/lib/jbigi" includes="*.jnilib" />
     338            <manifest>
     339                <attribute name="Build-Date" value="${build.timestamp}" />
     340                <attribute name="Base-Revision" value="${workspace.version}" />
     341                <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
     342            </manifest>
     343        </jar>
     344    </target>
    288345
    289346    <target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" >
     
    299356        </jar>
    300357    </target>
    301 
    302     <target name="jbigi-linux-only"  depends="buildProperties, jbigi-list-changes" >
    303         <!-- set if unset -->
    304         <property name="workspace.changes.jbigi.tr" value="" />
    305         <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
    306             <fileset dir="installer/lib/jbigi" includes="*linux*.so" />
    307             <manifest>
    308                 <attribute name="Build-Date" value="${build.timestamp}" />
    309                 <attribute name="Base-Revision" value="${workspace.version}" />
    310                 <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
    311             </manifest>
    312         </jar>
    313     </target>
    314 
    315     <target name="jbigi-osx-only"  depends="buildProperties, jbigi-list-changes" >
    316         <!-- set if unset -->
    317         <property name="workspace.changes.jbigi.tr" value="" />
    318         <jar destfile="build/jbigi.jar"  whenmanifestonly="fail" >
    319             <fileset dir="installer/lib/jbigi" includes="*.jnilib" />
    320             <manifest>
    321                 <attribute name="Build-Date" value="${build.timestamp}" />
    322                 <attribute name="Base-Revision" value="${workspace.version}" />
    323                 <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" />
    324             </manifest>
    325         </jar>
    326     </target>
    327 
    328358
    329359    <!-- the apps need to compile the jsps to poupdate -->
     
    390420                <pathelement location="core/lib/junit.jar" />
    391421            </classpath>
     422            <!-- These variables are stored in build.properties.
     423                 End-users can override by creating the file override.properties -->
    392424            <link offline="true" href="${javasedocs.url}" packagelistLoc="installer/resources/package-lists/java/" />
    393425            <link offline="true" href="${jettydocs.url}" packagelistLoc="installer/resources/package-lists/jetty/" />
     
    413445        <exec executable="grep" outputproperty="buildLine" >
    414446            <arg value="public final static long BUILD" />
    415             <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
     447            <arg value="router/java/src/net/i2p/router/RouterVersion.java" />
    416448        </exec>
    417449        <exec executable="cut" inputstring="${buildLine}" outputproperty="build.temp" failonerror="true" >
    418450            <arg value="-f2" />
    419             <arg value="-d=" />
    420         </exec>
    421         <exec executable="cut" inputstring="${build.temp}" outputproperty="build.number" failonerror="true" >
     451            <arg value="-d=" />
     452        </exec>
     453        <exec executable="tr" inputstring="${build.temp}" outputproperty="build.temp.tr" failonerror="true">
     454            <arg value="-d" />
     455            <arg value="[:space:]"/>
     456        </exec>
     457        <exec executable="cut" inputstring="${build.temp.tr}" outputproperty="build.number" failonerror="true" >
    422458            <arg value="-f1" />
    423             <arg value="-d;" />
     459            <arg value="-d;" />
    424460        </exec>
    425461        <echo message="Build number is ${build.number}" />
     
    512548    </target>
    513549
    514     <target name="preppkg" depends="preppkg-linux, preppkg-osx, preppkg-windows, jbigi">
     550    <target name="preppkg" depends="preppkg-linux, preppkg-freebsd, preppkg-osx, preppkg-windows, jbigi">
    515551        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
    516         <copy todir="pkg-temp/lib/wrapper/freebsd/">
    517             <fileset dir="installer/lib/wrapper/freebsd/" />
    518         </copy>
    519         <copy todir="pkg-temp/lib/wrapper/freebsd64/">
    520             <fileset dir="installer/lib/wrapper/freebsd64" />
    521         </copy>
    522         <copy todir="pkg-temp/lib/wrapper/macosx/">
    523             <fileset dir="installer/lib/wrapper/macosx/" />
    524         </copy>
    525552        <copy todir="pkg-temp/lib/wrapper/solaris/">
    526553            <fileset dir="installer/lib/wrapper/solaris/" />
     
    537564    </target>
    538565
     566    <target name="preppkg-freebsd" depends="preppkg-unix">
     567        <copy todir="pkg-temp/lib/wrapper/freebsd/">
     568            <fileset dir="installer/lib/wrapper/freebsd/" />
     569        </copy>
     570        <copy todir="pkg-temp/lib/wrapper/freebsd64/">
     571            <fileset dir="installer/lib/wrapper/freebsd64" />
     572        </copy>
     573    </target>
     574
     575    <target name="preppkg-freebsd-only" depends="preppkg-freebsd, jbigi-freebsd-only" >
     576        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
     577        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
     578    </target>
     579
     580    <!-- only what is needed for debian, etc. -->
     581    <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
     582        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
     583        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
     584    </target>
     585
     586    <target name="preppkg-unix" depends="preppkg-base">
     587        <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
     588        <!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used-->
     589        <copy file="installer/resources/eepget" todir="pkg-temp/" />
     590        <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
     591        <copy file="installer/resources/osid" todir="pkg-temp/" />
     592        <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
     593        <copy todir="pkg-temp/man/">
     594            <fileset dir="installer/resources/man/" />
     595        </copy>
     596    </target>
     597
     598    <!-- x86 linux only -->
     599    <target name="preppkg-linux" depends="preppkg-unix">
     600        <copy todir="pkg-temp/lib/wrapper/linux/">
     601            <fileset dir="installer/lib/wrapper/linux/" />
     602        </copy>
     603        <copy todir="pkg-temp/lib/wrapper/linux64/">
     604            <fileset dir="installer/lib/wrapper/linux64/" />
     605        </copy>
     606    </target>
     607
     608    <target name="preppkg-osx" depends="preppkg-unix">
     609        <!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
     610        <copy todir="pkg-temp/Start I2P Router.app">
     611            <fileset dir="installer/resources/Start I2P Router.app" />
     612        </copy>
     613        <copy todir="pkg-temp/lib/wrapper/macosx/">
     614            <fileset dir="installer/lib/wrapper/macosx/" />
     615        </copy>
     616    </target>
     617
     618    <target name="preppkg-osx-only" depends="preppkg-osx, jbigi-osx-only" >
     619        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
     620        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />     
     621    </target>
     622   
    539623    <target name="preppkg-windows" depends="preppkg-base, buildexe">
    540624        <copy file="i2p.exe" todir="pkg-temp/" failonerror="false" />
     
    545629        <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
    546630        <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" />
    547         <copy file="installer/resources/fix_logfile_path.cmd" todir="pkg-temp/" />
     631        <copy file="installer/resources/fix_logfile_path.cmd" todir="pkg-temp/" />
    548632        <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
    549633        <copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" />
     
    558642    </target>
    559643
    560     <!-- only what is needed for debian, etc. -->
    561     <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
     644    <target name="preppkg-windows-only" depends="preppkg-windows, jbigi-windows-only">
    562645        <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
    563         <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
    564     </target>
    565 
    566     <!-- x86 linux only -->
    567     <target name="preppkg-linux" depends="preppkg-base">
    568         <copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
    569         <!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used-->
    570         <copy file="installer/resources/eepget" todir="pkg-temp/" />
    571         <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
    572         <copy file="installer/resources/osid" todir="pkg-temp/" />
    573         <copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
    574         <copy todir="pkg-temp/man/">
    575             <fileset dir="installer/resources/man/" />
    576         </copy>
    577         <copy todir="pkg-temp/lib/wrapper/linux/">
    578             <fileset dir="installer/lib/wrapper/linux/" />
    579         </copy>
    580         <copy todir="pkg-temp/lib/wrapper/linux64/">
    581             <fileset dir="installer/lib/wrapper/linux64/" />
    582         </copy>
    583     </target>
    584 
    585     <target name="preppkg-osx" depends="preppkg-linux">
    586         <!--<copy file="installer/resources/I2P Router Console.webloc" todir="pkg-temp/" />-->
    587         <copy todir="pkg-temp/Start I2P Router.app">
    588             <fileset dir="installer/resources/Start I2P Router.app" />
    589         </copy>
    590     </target>
    591 
     646        <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
     647    </target>
     648   
    592649    <target name="preppkg-base" depends="build, preplicenses, prepConsoleDocs, prepthemeupdates, prepCertificates">
    593650        <!-- if updater200 was run previously, it left *.pack files in pkg-temp -->
     
    9521009    </target>
    9531010
     1011    <!-- Custom installers -->
     1012
     1013    <target name="installer-freebsd" depends="clean, preppkg-freebsd-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
     1014        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
     1015        <mkdir dir="pkg-temp/installer" />
     1016        <!-- set if unset -->
     1017        <property name="workspace.changes.util.tr" value="" />
     1018        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
     1019            <manifest>
     1020                <attribute name="Main-Class" value="net.i2p.util.Copy" />
     1021                <attribute name="Build-Date" value="${build.timestamp}" />
     1022                <attribute name="Base-Revision" value="${workspace.version}" />
     1023                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1024            </manifest>
     1025        </jar>
     1026        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
     1027            <manifest>
     1028                <attribute name="Main-Class" value="net.i2p.util.Delete" />
     1029                <attribute name="Build-Date" value="${build.timestamp}" />
     1030                <attribute name="Base-Revision" value="${workspace.version}" />
     1031                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1032            </manifest>
     1033        </jar>
     1034        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
     1035            <manifest>
     1036                <attribute name="Main-Class" value="net.i2p.util.Exec" />
     1037                <attribute name="Build-Date" value="${build.timestamp}" />
     1038                <attribute name="Base-Revision" value="${workspace.version}" />
     1039                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1040            </manifest>
     1041        </jar>
     1042        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-freebsd-only.jar" installerType="standard" basedir="${basedir}" />
     1043    </target>
     1044
     1045    <target name="installer-linux" depends="clean, preppkg-linux-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
     1046        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
     1047        <mkdir dir="pkg-temp/installer" />
     1048        <!-- set if unset -->
     1049        <property name="workspace.changes.util.tr" value="" />
     1050        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
     1051            <manifest>
     1052                <attribute name="Main-Class" value="net.i2p.util.Copy" />
     1053                <attribute name="Build-Date" value="${build.timestamp}" />
     1054                <attribute name="Base-Revision" value="${workspace.version}" />
     1055                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1056            </manifest>
     1057        </jar>
     1058        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
     1059            <manifest>
     1060                <attribute name="Main-Class" value="net.i2p.util.Delete" />
     1061                <attribute name="Build-Date" value="${build.timestamp}" />
     1062                <attribute name="Base-Revision" value="${workspace.version}" />
     1063                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1064            </manifest>
     1065        </jar>
     1066        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
     1067            <manifest>
     1068                <attribute name="Main-Class" value="net.i2p.util.Exec" />
     1069                <attribute name="Build-Date" value="${build.timestamp}" />
     1070                <attribute name="Base-Revision" value="${workspace.version}" />
     1071                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1072            </manifest>
     1073        </jar>
     1074        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-linux-only.jar" installerType="standard" basedir="${basedir}" />
     1075    </target>
     1076
     1077
     1078    <target name="installer-osx" depends="clean, checkForIzpack2App, preppkg-osx-only, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes">
     1079        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
     1080        <mkdir dir="pkg-temp/installer" />
     1081        <mkdir dir="pkg-temp/osx" />
     1082        <!-- set if unset -->
     1083        <property name="workspace.changes.util.tr" value="" />
     1084        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
     1085            <manifest>
     1086                <attribute name="Main-Class" value="net.i2p.util.Copy" />
     1087                <attribute name="Build-Date" value="${build.timestamp}" />
     1088                <attribute name="Base-Revision" value="${workspace.version}" />
     1089                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1090            </manifest>
     1091        </jar>
     1092        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
     1093            <manifest>
     1094                <attribute name="Main-Class" value="net.i2p.util.Delete" />
     1095                <attribute name="Build-Date" value="${build.timestamp}" />
     1096                <attribute name="Base-Revision" value="${workspace.version}" />
     1097                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1098            </manifest>
     1099        </jar>
     1100        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
     1101            <manifest>
     1102                <attribute name="Main-Class" value="net.i2p.util.Exec" />
     1103                <attribute name="Build-Date" value="${build.timestamp}" />
     1104                <attribute name="Base-Revision" value="${workspace.version}" />
     1105                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1106            </manifest>
     1107        </jar>
     1108        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-osx-only.jar" installerType="standard" basedir="${basedir}" />
     1109        <ant target="installer2app" />
     1110        <delete dir="pkg-temp/osx" />
     1111    </target>
     1112
     1113    <target name="checkForIzpack2App">
     1114        <available property="izpack2app.available" file="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
     1115    </target>
     1116
     1117    <target name="installer2app" if="izpack2app.available">
     1118        <mkdir dir="pkg-temp/osx" />
     1119        <exec executable="python" failonerror="true">
     1120            <arg value="${user.home}/IzPack/utils/wrappers/izpack2app/izpack2app.py" />
     1121            <arg value="${basedir}/i2pinstall_${release.number}-osx-only.jar" />
     1122            <arg value="${basedir}/pkg-temp/osx/i2p-${release.number}-osx-install.app" />
     1123        </exec>
     1124        <zip destfile="${basedir}/i2pinstall_${release.number}-osx.zip" level="9"
     1125            basedir="${basedir}/pkg-temp/osx" whenempty="fail" comment="${release.number}-${build.number}"/>
     1126    </target>
     1127
     1128    <target name="checkForIzpack2Exe">
     1129        <available property="izpack2exe.available" file="${user.home}/IzPack/utils/wrappers/izpack2exe/izpack2exe.py" />
     1130    </target>
     1131
     1132    <!-- Yes, even though this makes an installer for Windows, we still need to depend on preppkg-unix (because the installer attempts to delete these files
     1133     and will fail if they don't exist. Thankfully these files are so very small there's not much harm in including them.
     1134    -->
     1135    <target name="installer-windows" depends="clean, doBuildEXE, checkForIzpack2Exe, preppkg-windows-only, preppkg-unix, getReleaseNumber, getBuildNumber, buildProperties, util-list-changes" >
     1136        <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" />
     1137        <mkdir dir="pkg-temp/installer" />
     1138        <!-- set if unset -->
     1139        <property name="workspace.changes.util.tr" value="" />
     1140        <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
     1141            <manifest>
     1142                <attribute name="Main-Class" value="net.i2p.util.Copy" />
     1143                <attribute name="Build-Date" value="${build.timestamp}" />
     1144                <attribute name="Base-Revision" value="${workspace.version}" />
     1145                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1146            </manifest>
     1147        </jar>
     1148        <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
     1149            <manifest>
     1150                <attribute name="Main-Class" value="net.i2p.util.Delete" />
     1151                <attribute name="Build-Date" value="${build.timestamp}" />
     1152                <attribute name="Base-Revision" value="${workspace.version}" />
     1153                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1154            </manifest>
     1155        </jar>
     1156        <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
     1157            <manifest>
     1158                <attribute name="Main-Class" value="net.i2p.util.Exec" />
     1159                <attribute name="Build-Date" value="${build.timestamp}" />
     1160                <attribute name="Base-Revision" value="${workspace.version}" />
     1161                <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
     1162            </manifest>
     1163        </jar>
     1164        <izpack input="${basedir}/installer/install.xml" output="${basedir}/i2pinstall_${release.number}-windows-only.jar" installerType="standard" basedir="${basedir}" />
     1165        <ant target="installer2exe" />
     1166        <delete dir="pkg-temp/win" />
     1167
     1168    </target>
     1169
     1170    <target name="installer2exe" if="izpack2exe.available"> <!-- different from the launch4j exe creator -->
     1171        <mkdir dir="pkg-temp/win" />
     1172        <exec executable="python" failonerror="true">
     1173            <arg value="${user.home}/IzPack/utils/wrappers/izpack2exe/izpack2exe.py" />
     1174            <arg value="--file=${basedir}/i2pinstall_${release.number}-windows-only.jar" />
     1175            <arg value="--no-upx" />
     1176            <arg value="--name=I2P" />
     1177            <arg value="--output=${basedir}/i2pinstall-${release.number}-windows.exe" />
     1178        </exec>
     1179    </target>
     1180    <target name="installer-all" >
     1181        <ant target="installer-freebsd" />
     1182        <ant target="installer-linux" />
     1183        <ant target="installer-osx" />
     1184        <ant target="installer-windows" />
     1185        <ant target="installer" />
     1186    </target>
     1187    <!-- end custom installers -->
     1188   
    9541189    <target name="test" depends="buildProperties, jbigi" >
    9551190        <mkdir dir="reports/core/junit/" />
  • core/java/src/net/i2p/util/NativeBigInteger.java

    rb3cfe653 ra9f94315  
    696696        // Add libjbigi-xxx-none.so
    697697        // Note that libjbigi-osx-none.jnilib is a 'fat binary' with both PPC and x86-32
    698         if ((!_isArm)  || (!_isPPC && !_isMac))
     698        if (!_isArm && !_isPPC && !_isMac)
    699699            rv.add(getResourceName(false));
    700700        return rv;
  • debian/rules

    rb3cfe653 ra9f94315  
    5151        # The next line is used by KYTV when building from source packages
    5252        #[ -r jetty/jetty-5.1.15.tgz ] && ln -sf $(CURDIR)/jetty/jetty-5.1.15.tgz $(CURDIR)/apps/jetty/jetty-5.1.15.tgz
    53         ant preppkg-linux javadoc
     53        ant preppkg-unix javadoc
    5454        echo router.updateDisabled=true > $(I2P)/router.config
    5555        mv $(I2P)/runplain.sh $(I2P)/i2prouter-nowrapper
  • history.txt

    rb3cfe653 ra9f94315  
     12011-08-16 zzz
     2  * Console: Tweak logs page CSS
     3  * Graphs: Delete corrupt rrd file (ticket #483)
     4  * UPnP: Fix bug causing failure when the PC has multiple interfaces
     5
    162011-08-06 kytv
    27 * Fix #473 (wrapper.logfile set to the wrong path in Windows).
  • installer/resources/hosts.txt

    rb3cfe653 ra9f94315  
    328328outproxyng.h2ik.i2p=1RqMQd58RgA4D~XT34rCjQteJVQwFKQbPK5P03GetL-DyCfKV6Vg61xyxGOZK-K4KTXXf45PG~oDAWIzE7UY5aXN9oAjHXfPrU9hHxv35BaxFqUpsJLgjWu41OwSjl5aN2-freH4gGVSiL62I1y2bcXHc2kVHlbToQOy8bJoS3KSDHEeU0r79f~cY3xf6rBHpHNMJtdYdnWlLq5KFc2cz~8lIut~sSIAwUEfebBkhfl2ctvdEGdSshBWGTxXiahtQX0xraynF-Cex2hxvBAl0g9aoOnrLx~Gses54WPD-m3RArI3fiaxEALRuFa0mfrrEgjOhBtVU8IlTYrTEkR8JSGofsEmuqqM03FIrwOv6lJZi-xemiNUr3OX6VdO4ckIg69BxpCYzP2IxLO5r8lSwyHqGbYPFxBIjbSMsv6tGWWdglV4Y9sQHTarboA-XDih3DzDpomb1~78cSiV3PRidjj4MDggn1abkQbRVd6WLV~eTi54bctS-JwW-I5Xyqq~AAAA
    329329inr.i2p=GGB99wXYBnX-wOxQ~Xrvo7AvngoYgifvZZL54ksZWzclcirG7AysqfkAKyv906PxfM4y2DcN2K9m4-D99yFj-1BdnUuIEqfi2yuaaVoWuOffT3h9ne~kZnq3C-wrmczD70Gxk4shvSVxMdUEFvEip8QY4K0R-FiKBsFAfWGTE3b9d-QCzP0H9VP5V-CaYjYVQuMRgMluk9gnoLRipvV7483f~rmGgYX8xwygEAQ3v9P4hrAlJrP0lWJLI1K6KQucP3THIxZ4A9Xxnl0I7EZAT8bHwzschFrcDPYM~DtQdkJTz2VphocbNLfIExTrFt88-xC69WE-fSbaMf9jucT4f5kdpfpRu0kM~am40etxPs8uXGF-L9IXCjgUkJHrWdPHeGhnx-ye2xvUTLO2jyga8iY89Ee3IpqivVUg-iAQJzX9NXC29sf0YzNj8d8mdWRNuzbLSx9CVJ3l1NPJr4k7hmCqf8lBGXNIFZQL4Wez1PPcM4gw0o73gqIxkxvVzVcpAAAA
     330pastethis.i2p=qg6Y8Dj5LHAP3tOGmJXpmqe2ivpgVcs4UHJ0hv~VRGhNTh7awM3qPIhKNMhrq9G5ZgXWB3QlSmi-m2FQVndTNKegdfbdnFMNLOOwh2pm1akhvEp6MeKhv0KjJFKpNOb2ygHu2MXPXuDuh5odO1LRs3Pxr1PdjM~7L5NxRE-o-EuCKH5H1335BAfvY5k1SIU-t-YaIctMKGH88D9OjPEt7PlqXsdXUQnJFO6B4V3E1BdH33Zc6oVxaSSOLuLaSPjrczC4h79U9gJFmR4isWpHmynucEtJmEbJ4atcUe4~m2uYw8tWGGFoMvz9y3y6kRqb1alPpX9wPZb5OGjTJIQTmSGsag2-CJldnqa3mEDCWQ3gs6FLud-s1z~2J51BnFl~LpPPF6yT8879R5zOGAEwfIp4N8fJTbgPNxz4P4LRQLXHk0t1oYPEpwLneiLH-87zzM3IiTeeb3XCDyc2T7zzLGrktb2i6BlyEBJMXbsN2CiviKOHI7CEp~u8Lsp69FSeAAAA
  • installer/resources/themes/console/classic/console.css

    rb3cfe653 ra9f94315  
    671671div.joblog:li {
    672672     word-wrap: break-word !important;
    673      text-align: justify !important;
    674673     line-height: 80% !important;
    675674}
  • installer/resources/themes/console/dark/console.css

    rb3cfe653 ra9f94315  
    964964div.joblog li {
    965965     word-wrap: break-word !important;
    966      text-align: justify !important;
    967966     line-height: 120% !important;
    968967     margin: 2px 0px 2px 30px;
  • installer/resources/themes/console/light/console.css

    rb3cfe653 ra9f94315  
    10091009 div.joblog li {
    10101010     word-wrap: break-word !important;
    1011      text-align: justify !important;
    10121011     line-height: 115% !important;
    10131012     padding: 0;
  • router/java/src/net/i2p/router/RouterVersion.java

    rb3cfe653 ra9f94315  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 19;
     21    public final static long BUILD = 21;
    2222
    2323    /** for example "-test" */
    24     public final static String EXTRA = "";
     24    public final static String EXTRA = "-rc";
    2525    public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
    2626    public static void main(String args[]) {
  • router/java/src/net/i2p/router/transport/UPnP.java

    rb3cfe653 ra9f94315  
    55
    66import java.net.InetAddress;
     7import java.net.MalformedURLException;
    78import java.net.UnknownHostException;
     9import java.net.URL;
    810import java.util.HashMap;
    911import java.util.HashSet;
     
    1315import net.i2p.I2PAppContext;
    1416import net.i2p.data.DataHelper;
     17import net.i2p.util.Addresses;
    1518import net.i2p.util.Log;
    1619import net.i2p.util.Translate;
     
    528531                // Just in case...
    529532                // this confuses my linksys? - zzz
    530                 removeMapping(protocol, port, fp, true);
     533                //removeMapping(protocol, port, fp, true);
    531534               
    532535                Action add = _service.getAction("AddPortMapping");
     
    539542                add.setArgumentValue("NewRemoteHost", "");
    540543                add.setArgumentValue("NewExternalPort", port);
    541                 add.setArgumentValue("NewInternalClient", _router.getInterfaceAddress());
     544                // bugfix, see below for details
     545                String intf = _router.getInterfaceAddress();
     546                String us = getOurAddress(intf);
     547                if (_log.shouldLog(Log.WARN) && !us.equals(intf))
     548                        _log.warn("Requesting port forward to " + us + ':' + port +
     549                                  " when cybergarage wanted " + intf);
     550                add.setArgumentValue("NewInternalClient", us);
    542551                add.setArgumentValue("NewInternalPort", port);
    543552                add.setArgumentValue("NewProtocol", protocol);
     
    553562                } else return false;
    554563        }
    555        
     564
     565        /**
     566         * Bug fix:
     567         * If the SSDP notify or search response sockets listen on more than one interface,
     568         * cybergarage can get our IP address wrong, and then we send the wrong one
     569         * to the UPnP device, which will reject it if it enforces strict addressing.
     570         *
     571         * For example, if we have interfaces 192.168.1.1 and 192.168.2.1, we could
     572         * get a response from 192.168.1.99 on the 192.168.2.1 interface, but when
     573         * we send something to 192.168.1.99 it will go out the 192.168.1.1 interface
     574         * with a request to forward to 192.168.2.1.
     575         *
     576         * So return the address of ours that is closest to his.
     577         *
     578         * @since 0.8.8
     579         */
     580        private String getOurAddress(String deflt) {
     581                String rv = deflt;
     582                String hisIP = null;
     583                // see ControlRequest.setRequestHost()
     584                String him = _router.getURLBase();
     585                if (him != null && him.length() > 0) {
     586                        try {
     587                                URL url = new URL(him);
     588                                hisIP = url.getHost();
     589                        } catch (MalformedURLException mue) {}
     590                }
     591                if (hisIP == null) {
     592                        him = _router.getLocation();
     593                        if (him != null && him.length() > 0) {
     594                                try {
     595                                        URL url = new URL(him);
     596                                        hisIP = url.getHost();
     597                                } catch (MalformedURLException mue) {}
     598                        }
     599                }
     600                if (hisIP == null)
     601                        return rv;
     602                try {
     603                        byte[] hisBytes = InetAddress.getByName(hisIP).getAddress();
     604                        if (hisBytes.length != 4)
     605                                return deflt;
     606                        long hisLong = DataHelper.fromLong(hisBytes, 0, 4);
     607                        long distance = Long.MAX_VALUE;
     608
     609                        // loop through all our IP addresses, including the default, and
     610                        // return the one closest to the router's IP
     611                        Set<String> myAddresses = Addresses.getAddresses(true, false);  // yes local, no IPv6
     612                        myAddresses.add(deflt);
     613                        for (String me : myAddresses) {
     614                                if (me.startsWith("127.") || me.equals("0.0.0.0"))
     615                                        continue;
     616                                try {
     617                                        byte[] myBytes = InetAddress.getByName(me).getAddress();
     618                                        long myLong = DataHelper.fromLong(myBytes, 0, 4);
     619                                        long newDistance = myLong ^ hisLong;
     620                                        if (newDistance < distance) {
     621                                                rv = me;
     622                                                distance = newDistance;
     623                                        }
     624                                } catch (UnknownHostException uhe) {}
     625                        }
     626                } catch (UnknownHostException uhe) {}
     627                return rv;
     628        }
     629
    556630        /** blocking */
    557631        private boolean removeMapping(String protocol, int port, ForwardPort fp, boolean noLog) {
  • router/java/src/org/cybergarage/upnp/ControlPoint.java

    rb3cfe653 ra9f94315  
    231231                                return;
    232232                        rootDev.setSSDPPacket(ssdpPacket);
     233                        Debug.warning("Add root device", new Exception("received on " + ssdpPacket.getLocalAddress()));
    233234                        addDevice(rootNode);
    234235
  • router/java/src/org/cybergarage/upnp/ssdp/HTTPMUSocket.java

    rb3cfe653 ra9f94315  
    192192                        ssdpMultiSock.receive(recvPacket.getDatagramPacket());
    193193                        recvPacket.setTimeStamp(System.currentTimeMillis());
     194                        Debug.warning("Received SSDP multicast packet on " + getLocalAddress() + " from " + recvPacket.getRemoteAddress());
    194195                }
    195196                catch (Exception e) {
  • router/java/src/org/cybergarage/upnp/ssdp/HTTPUSocket.java

    rb3cfe653 ra9f94315  
    196196                        ssdpUniSock.receive(recvPacket.getDatagramPacket());
    197197                        recvPacket.setTimeStamp(System.currentTimeMillis());
     198                        Debug.warning("Received SSDP unicast packet on " + getLocalAddress() + " from " + recvPacket.getRemoteAddress());
    198199                }
    199200                catch (Exception e) {
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPNotifySocket.java

    rb3cfe653 ra9f94315  
    3030import org.cybergarage.http.*;
    3131import org.cybergarage.upnp.*;
     32import org.cybergarage.util.Debug;
    3233
    3334public class SSDPNotifySocket extends HTTPMUSocket implements Runnable
     
    4849                }
    4950                open(addr, SSDP.PORT, bindAddr);
     51                Debug.warning("Opened SSDP notify socket at " + bindAddr + ':' + SSDP.PORT);
    5052                setControlPoint(null);
    5153        }
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPSearchResponseSocketList.java

    rb3cfe653 ra9f94315  
    2323
    2424import org.cybergarage.upnp.*;
     25import org.cybergarage.util.Debug;
    2526
    2627public class SSDPSearchResponseSocketList extends Vector
     
    6970                                String bindAddr = HostInterface.getHostAddress(n);
    7071                                SSDPSearchResponseSocket socket = new SSDPSearchResponseSocket(bindAddr, port);
     72                                Debug.warning("Opened SSDP search response socket at " + bindAddr + ':' + port);
    7173                                add(socket);
    7274                        }
  • router/java/src/org/cybergarage/upnp/ssdp/SSDPSearchSocket.java

    rb3cfe653 ra9f94315  
    3838        {
    3939                open(bindAddr);
     40                Debug.warning("Opened SSDP search socket at " + bindAddr + ':' + SSDP.PORT);
    4041        }
    4142
Note: See TracChangeset for help on using the changeset viewer.