Ticket #2317: i2p-0.9.37-no-classpath.patch

File i2p-0.9.37-no-classpath.patch, 14.2 KB (added by villain, 4 months ago)
  • apps/i2psnark/java/build.xml

    diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml
    index cecf0b1d3..5b80da5ba 100644
    a b  
    2525        </depend>
    2626    </target>
    2727
     28    <!-- only used if not set by a higher build.xml -->
    2829    <property name="javac.compilerargs" value="" />
    2930    <property name="javac.version" value="1.7" />
    3031    <property name="require.gettext" value="true" />
     32    <property name="manifest.classpath.name" value="Class-Path" />
    3133
    3234    <condition property="no.bundle">
    3335        <isfalse value="${require.gettext}" />
     
    7981        <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class, **/standalone/*">
    8082            <manifest>
    8183                <attribute name="Main-Class" value="org.klomp.snark.CommandLine" />
    82                 <attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
     84                <attribute name="${manifest.classpath.name}" value="i2p.jar mstreaming.jar streaming.jar" />
    8385                <attribute name="Implementation-Version" value="${full.version}" />
    8486                <attribute name="Built-By" value="${build.built-by}" />
    8587                <attribute name="Build-Date" value="${build.timestamp}" />
  • apps/i2ptunnel/java/build.xml

    diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml
    index 6c8dee9cd..a2e8fb403 100644
    a b  
    3030    <property name="javac.compilerargs" value="" />
    3131    <property name="javac.version" value="1.7" />
    3232    <property name="require.gettext" value="true" />
     33    <property name="manifest.classpath.name" value="Class-Path" />
    3334
    3435    <!-- Compile includes ui/ classes but not web/ classes here -->
    3536    <target name="compile" depends="depend">
     
    8384        <jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class" excludes="**/ui/*.class **/web/*.class" >
    8485            <manifest>
    8586                <attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" />
    86                 <attribute name="Class-Path" value="i2p.jar mstreaming.jar" />
     87                <attribute name="${manifest.classpath.name}" value="i2p.jar mstreaming.jar" />
    8788                <attribute name="Implementation-Version" value="${full.version}" />
    8889                <attribute name="Built-By" value="${build.built-by}" />
    8990                <attribute name="Build-Date" value="${build.timestamp}" />
     
    324325
    325326                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
    326327                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     328                <pathelement location="../../jetty/jettylib/jetty-xml.jar" />
    327329                <pathelement location="../../jetty/jettylib/jetty-util.jar" />
    328330                <pathelement location="${ant.home}/lib/ant.jar" />
    329331                <pathelement location="build/i2ptunnel.jar" />
     
    358360                <pathelement location="../../jetty/jettylib/tomcat-util-scan.jar" />
    359361
    360362                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     363                <pathelement location="../../jetty/jettylib/jetty-xml.jar" />
    361364                <pathelement location="../../jetty/jettylib/jetty-util.jar" />
    362365                <pathelement location="build/i2ptunnel.jar" />
    363366                <pathelement location="build/temp-beans.jar" />
  • apps/jetty/build.xml

    diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml
    index 24a3f5970..e50f3f86c 100644
    a b  
    2525    <property name="verified.filename" value="verified.txt" />
    2626    <property name="javac.compilerargs" value="" />
    2727    <property name="javac.version" value="1.7" />
     28    <property name="manifest.classpath.name" value="Class-Path" />
    2829
    2930    <!-- everything we need is in the deployer package, except for tomcat-api.jar in the full package,
    3031         so we just use the full package instead.
     
    410411                <attribute name="Build-Date" value="${build.timestamp}" />
    411412                <attribute name="Base-Revision" value="${workspace.version}" />
    412413                <!-- needed by JettyStart for pre-0.7.5 wrapper.config -->
    413                 <attribute name="Class-Path" value="jetty-deploy.jar jetty-xml.jar" />
     414                <attribute name="${manifest.classpath.name}" value="jetty-deploy.jar jetty-xml.jar" />
    414415                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
    415416                <attribute name="X-Compile-Source-JDK" value="${javac.version}" />
    416417                <attribute name="X-Compile-Target-JDK" value="${javac.version}" />
  • apps/jrobin/java/build.xml

    diff --git a/apps/jrobin/java/build.xml b/apps/jrobin/java/build.xml
    index 2cf49899e..71400da64 100644
    a b  
    1919        </depend>
    2020    </target>
    2121
     22    <!-- only used if not set by a higher build.xml -->
    2223    <property name="javac.compilerargs" value="" />
    2324    <property name="javac.version" value="1.7" />
     25    <property name="manifest.classpath.name" value="Class-Path" />
    2426
    2527    <target name="compile" depends="depend">
    2628        <mkdir dir="./build" />
     
    6062        <property name="workspace.changes.tr" value="" />
    6163        <jar destfile="./build/jrobin.jar" basedir="./build/obj" includes="**/*.class">
    6264            <manifest>
    63                 <attribute name="Class-Path" value="i2p.jar" />
     65                <attribute name="${manifest.classpath.name}" value="i2p.jar" />
    6466                <attribute name="Implementation-Version" value="1.6.0-1" />
    6567                <attribute name="Built-By" value="${build.built-by}" />
    6668                <attribute name="Build-Date" value="${build.timestamp}" />
  • apps/ministreaming/java/build.xml

    diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml
    index b5cbcab13..cbef236f9 100644
    a b  
    2424    <property name="javac.compilerargs" value="" />
    2525    <property name="javac.version" value="1.7" />
    2626    <property name="require.gettext" value="true" />
     27    <property name="manifest.classpath.name" value="Class-Path" />
    2728
    2829    <condition property="no.bundle">
    2930        <isfalse value="${require.gettext}" />
     
    7677        <property name="workspace.changes.tr" value="" />
    7778        <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" >
    7879            <manifest>
    79                 <attribute name="Class-Path" value="i2p.jar streaming.jar" />
     80                <attribute name="${manifest.classpath.name}" value="i2p.jar streaming.jar" />
    8081                <attribute name="Specification-Title" value="I2P Streaming API" />
    8182                <attribute name="Specification-Version" value="${release.number}" />
    8283                <attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
  • apps/routerconsole/java/build.xml

    diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
    index 974b948dd..317f1a6f8 100644
    a b  
    4646        </dependset>
    4747    </target>
    4848
     49    <!-- only used if not set by a higher build.xml -->
    4950    <property name="javac.compilerargs" value="" />
    5051    <property name="javac.version" value="1.7" />
     52    <property name="manifest.classpath.name" value="Class-Path" />
    5153
    5254    <target name="compile" depends="prepare, depend, dependVersion">
    5355        <mkdir dir="./build" />
     
    128130                <!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
    129131                <!-- very old installs don't have i2psnark,jstl,standard in the classpath... not added in WebAppConfiguration any more -->
    130132                <!-- All new jetty 7 jars should have been in 0.9.6, added in 0.9.7 -->
    131                 <attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jstlel.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar" />
     133                <attribute name="${manifest.classpath.name}" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jstlel.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar" />
    132134                <attribute name="Implementation-Version" value="${full.version}" />
    133135                <attribute name="Built-By" value="${build.built-by}" />
    134136                <attribute name="Build-Date" value="${build.timestamp}" />
  • apps/sam/java/build.xml

    diff --git a/apps/sam/java/build.xml b/apps/sam/java/build.xml
    index 5891bd1a8..6382cb3fd 100644
    a b  
    2222        </depend>
    2323    </target>
    2424
     25    <!-- only used if not set by a higher build.xml -->
    2526    <property name="javac.compilerargs7" value="" />
    2627    <property name="javac.version" value="1.7" />
     28    <property name="manifest.classpath.name" value="Class-Path" />
    2729
    2830    <!-- compile everything including client classes -->
    2931    <target name="compile" depends="depend">
     
    7173        <jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class" excludes="net/i2p/sam/client/*">
    7274            <manifest>
    7375                <attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
    74                 <attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
     76                <attribute name="${manifest.classpath.name}" value="i2p.jar mstreaming.jar streaming.jar" />
    7577                <attribute name="Implementation-Version" value="${full.version}" />
    7678                <attribute name="Built-By" value="${build.built-by}" />
    7779                <attribute name="Build-Date" value="${build.timestamp}" />
  • build.properties

    diff --git a/build.properties b/build.properties
    index b1326e5f7..90888bb2a 100644
    a b javac.version=1.7 
    170170# Debian: Not in wheezy/jessie
    171171# Ubuntu: Only in wily and later
    172172#with-libhttpclient-java=true
     173
     174### Redhat packages ###
     175# uncomment to prevent classpaths in jar manifests
     176# https://fedoraproject.org/wiki/Packaging:Java
     177# without-manifest-classpath=true
  • build.xml

    diff --git a/build.xml b/build.xml
    index a35d5e02e..78d3fee6e 100644
    a b  
    443443        <copy file="apps/jrobin/java/build/jrobin.jar" todir="build/" />
    444444    </target>
    445445
    446     <target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber, setBuildTimestamp" >
     446    <target name="buildProperties" depends="getMtnRev, getReleaseNumber, getBuildNumber, setBuildTimestamp, disableManifestClasspath" >
    447447        <!-- default if not set above -->
    448448        <property name="workspace.version" value="unknown" />
    449449        <!-- default if not set by setBuildTimestamp -->
    450450        <property name="build.timestamp" value="reproducible" />
     451        <!-- default if not set by disableManifestClasspath -->
     452        <property name="manifest.classpath.name" value="Class-Path" />
    451453        <property name="full.version" value="${release.number}-${i2p.build.number}${build.extra}" />
    452454        <echo message="Building version ${full.version} (mtn rev ${workspace.version})" />
    453455    </target>
     
    458460        </tstamp>
    459461    </target>
    460462
     463    <!-- Disable Class-Path in jar manifests by renaming it (Fedora) -->
     464    <target name="disableManifestClasspath" if="${without-manifest-classpath}" >
     465        <property name="manifest.classpath.name" value="Disabled-Class-Path" />
     466    </target>
     467
    461468    <target name="buildWEB" depends="buildRouterConsole" >
    462469        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
    463470        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
  • core/java/build.xml

    diff --git a/core/java/build.xml b/core/java/build.xml
    index 0646807f1..2cae75bd8 100644
    a b  
    2020    <property name="javac.compilerargs" value="" />
    2121    <property name="javac.classpath" value="" />
    2222    <property name="javac.version" value="1.7" />
     23    <property name="manifest.classpath.name" value="Class-Path" />
    2324
    2425    <!-- fixups if we're using libintl.jar for GettextResource.java -->
    2526    <condition property="source.exclude1" value="gnu/gettext/GettextResource.java" else="NOTHING" >
     
    9697            <!-- the getopt translation files -->
    9798            <fileset dir="src" includes="${translation.includes}" />
    9899            <manifest>
    99                 <attribute name="Class-Path" value="${gettext.jar} ${getopt.jar} ${httpclient.jar}" />
     100                <attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar} ${httpclient.jar}" />
    100101                <attribute name="Specification-Title" value="I2P Core API" />
    101102                <attribute name="Specification-Version" value="${release.number}" />
    102103                <attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
  • router/java/build.xml

    diff --git a/router/java/build.xml b/router/java/build.xml
    index 188dfef91..c023526ba 100644
    a b  
    3434    <!-- only used if not set by a higher build.xml -->
    3535    <property name="javac.compilerargs" value="" />
    3636    <property name="javac.version" value="1.7" />
     37    <property name="manifest.classpath.name" value="Class-Path" />
    3738
    3839    <target name="compile" depends="depend, dependVersion">
    3940        <mkdir dir="./build" />
     
    6667        <jar destfile="./build/router.jar" basedir="./build/obj" includes="**/*.class" >
    6768            <manifest>
    6869                <!-- so people with very old wrapper.config files will still work with Jetty 6 -->
    69                 <attribute name="Class-Path" value="i2p.jar addressbook.jar jetty-i2p.jar jetty-rewrite-handler.jar jetty-start.jar jetty-util.jar" />
     70                <attribute name="${manifest.classpath.name}" value="i2p.jar addressbook.jar jetty-i2p.jar jetty-rewrite-handler.jar jetty-start.jar jetty-util.jar" />
    7071                <attribute name="Specification-Title" value="I2P Router" />
    7172                <attribute name="Specification-Version" value="${release.number}" />
    7273                <attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />