Util: Rename modified apache classes (Gitlab ticket #353)

to avoid conflict in applications linking to apache jars
As requested by 'mesh' project
Remove with-libhttpclient-java build option
No known external uses other than obsolete i2pcontrol plugin
This commit is contained in:
zzz
2022-05-11 07:54:56 -04:00
parent bf27bf140d
commit 07dbab9f02
20 changed files with 35 additions and 65 deletions

View File

@ -12,7 +12,7 @@ import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.util.Log;
import org.apache.http.conn.util.InetAddressUtils;
import net.i2p.apache.http.conn.util.InetAddressUtils;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.HandlerWrapper;

View File

@ -169,12 +169,6 @@ require.gettext=true
#with-famfamfam-flag-png=true
# Don't include json-simple library, we will use libjson-simple-java package
#with-libjson-simple-java=true
# Don't compile org.apache.http classes, we will use libhttpclient-java and libhttpcore-java packages
# 2 MB of dependencies vs. 20 KB of copied source
# Requires 4.4 or higher.
# Debian: Not in wheezy/jessie
# Ubuntu: Only in wily and later
#with-libhttpclient-java=true
### Redhat packages ###
# uncomment to prevent classpaths in jar manifests

View File

@ -866,7 +866,7 @@
additionalparam="-notimestamp"
doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra} (API ${api.version})"
windowtitle="I2P Anonymous Network - Java Documentation - API Version ${api.version}">
<group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:org.apache.http.conn.ssl:org.apache.http.conn.util:org.apache.http.util:org.json.simple:com.southernstorm.noise.crypto.x25519:com.southernstorm.noise.crypto.chacha20:org.minidns:org.minidns.*" />
<group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:net.i2p.apache.http.conn.ssl:net.i2p.apache.http.conn.util:net.i2p.apache.http.util:org.json.simple:com.southernstorm.noise.crypto.x25519:com.southernstorm.noise.crypto.chacha20:org.minidns:org.minidns.*" />
<group title="Streaming Library" packages="net.i2p.client.streaming:net.i2p.client.streaming.impl" />
<group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:net.i2p.data.router:org.cybergarage:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters:com.maxmind.*:com.southernstorm.noise.*" />
<group title="Router Console" packages="net.i2p.router.web:net.i2p.router.web.*:net.i2p.router.update:edu.internet2.ndt:net.i2p.router.news:com.vuze.*" />

View File

@ -43,13 +43,6 @@
<condition property="translation.includes" value="NOTHING" else="gnu/getopt/*.properties" >
<istrue value="${with-libgetopt-java}" />
</condition>
<!-- fixups if we're using httpclient.jar and httpcore.jar for org.apache.http classes -->
<condition property="source.exclude3" value="org/apache/http/**" else="NOTHING" >
<istrue value="${with-libhttpclient-java}" />
</condition>
<condition property="javac.classpath.mod3" value="build/httpclient.jar:build/httpcore.jar:" else="" >
<istrue value="${with-libhttpclient-java}" />
</condition>
<!-- fixups if we're using json-simple.jar for org.json.simple classes -->
<condition property="source.exclude4" value="org/json/simple/**" else="NOTHING" >
<istrue value="${with-libjson-simple-java}" />
@ -57,7 +50,7 @@
<condition property="javac.classpath.mod4" value="build/json-simple.jar:" else="" >
<istrue value="${with-libjson-simple-java}" />
</condition>
<property name="javac.classpath.mod" value="${javac.classpath.mod1}${javac.classpath.mod2}${javac.classpath.mod3}${javac.classpath.mod4}${javac.classpath}" />
<property name="javac.classpath.mod" value="${javac.classpath.mod1}${javac.classpath.mod2}${javac.classpath.mod4}${javac.classpath}" />
<!-- jar classpath fixups -->
<condition property="gettext.jar" value="/usr/share/java/libintl.jar" else="" >
@ -66,9 +59,6 @@
<condition property="getopt.jar" value="/usr/share/java/gnu-getopt.jar" else="" >
<istrue value="${with-libgetopt-java}" />
</condition>
<condition property="httpclient.jar" value="/usr/share/java/httpclient.jar /usr/share/java/httpcore.jar" else="" >
<istrue value="${with-libhttpclient-java}" />
</condition>
<condition property="json-simple.jar" value="/usr/share/java/json-simple.jar" else="" >
<istrue value="${with-libjson-simple-java}" />
</condition>
@ -87,7 +77,6 @@
<include name="**/*.java" />
<exclude name="${source.exclude1}" />
<exclude name="${source.exclude2}" />
<exclude name="${source.exclude3}" />
<exclude name="${source.exclude4}" />
</javac>
</target>
@ -118,7 +107,7 @@
<!-- the getopt translation files -->
<fileset dir="src" includes="${translation.includes}" />
<manifest>
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar} ${httpclient.jar}" />
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar}" />
<attribute name="Specification-Title" value="I2P Core API" />
<attribute name="Specification-Version" value="${api.version}" />
<attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
@ -341,7 +330,7 @@
</copy>
<jar destfile="./build/i2pscalatest.jar" basedir="./build/obj_scala_jar" includes="**/*.class">
<manifest>
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar} ${httpclient.jar}" />
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar}" />
<attribute name="Specification-Title" value="I2P Core API" />
<attribute name="Specification-Version" value="${api.version}" />
<attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
@ -371,7 +360,7 @@
<!-- the getopt translation files -->
<fileset dir="src" includes="${translation.includes}" />
<manifest>
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar} ${httpclient.jar}" />
<attribute name="${manifest.classpath.name}" value="${gettext.jar} ${getopt.jar}" />
<attribute name="Specification-Title" value="I2P Core API" />
<attribute name="Specification-Version" value="${api.version}" />
<attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />

View File

@ -25,7 +25,7 @@
*
*/
package org.apache.http.conn.ssl;
package net.i2p.apache.http.conn.ssl;
import java.net.InetAddress;
import java.net.UnknownHostException;
@ -49,8 +49,8 @@ import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import javax.security.auth.x500.X500Principal;
import org.apache.http.conn.util.InetAddressUtils;
import org.apache.http.conn.util.PublicSuffixMatcher;
import net.i2p.apache.http.conn.util.InetAddressUtils;
import net.i2p.apache.http.conn.util.PublicSuffixMatcher;
import net.i2p.I2PAppContext;
import net.i2p.util.Log;

View File

@ -5,4 +5,7 @@ For I2PSSSLSocketFactory.
Small modifications to remove additional Apache dependencies.
Apache 2.0 license.
</p>
<p>
Moved to net.i2p.apache.* packages in release 1.8.0 (API 0.9.54).
</p>
</body></html>

View File

@ -25,7 +25,7 @@
*
*/
package org.apache.http.conn.util;
package net.i2p.apache.http.conn.util;
import java.util.regex.Pattern;

View File

@ -24,12 +24,12 @@
* <http://www.apache.org/>.
*
*/
package org.apache.http.conn.util;
package net.i2p.apache.http.conn.util;
import java.util.Collections;
import java.util.List;
import org.apache.http.util.Args;
import net.i2p.apache.http.util.Args;
/**
* Public suffix is a set of DNS names or wildcards concatenated with dots. It represents

View File

@ -24,7 +24,7 @@
* <http://www.apache.org/>.
*
*/
package org.apache.http.conn.util;
package net.i2p.apache.http.conn.util;
import java.io.BufferedReader;
import java.io.IOException;

View File

@ -24,7 +24,7 @@
* <http://www.apache.org/>.
*
*/
package org.apache.http.conn.util;
package net.i2p.apache.http.conn.util;
import java.net.IDN;
import java.util.Collection;
@ -32,7 +32,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.util.Args;
import net.i2p.apache.http.util.Args;
/**
* Utility class that can test if DNS names match the content of the Public Suffix List.
@ -40,7 +40,7 @@ import org.apache.http.util.Args;
* An up-to-date list of suffixes can be obtained from
* <a href="http://publicsuffix.org/">publicsuffix.org</a>
*
* @see org.apache.http.conn.util.PublicSuffixList
* @see net.i2p.apache.http.conn.util.PublicSuffixList
*
* @since 4.4
*/

View File

@ -5,4 +5,7 @@ For HostnameVerifier.
Small modifications to remove additional Apache dependencies.
Apache 2.0 license.
</p>
<p>
Moved to net.i2p.apache.* packages in release 1.8.0 (API 0.9.54).
</p>
</body></html>

View File

@ -25,7 +25,7 @@
*
*/
package org.apache.http.util;
package net.i2p.apache.http.util;
public class Args {

View File

@ -5,4 +5,7 @@ For HostnameVerifier.
Small modifications to remove additional Apache dependencies.
Apache 2.0 license.
</p>
<p>
Moved to net.i2p.apache.* packages in release 1.8.0 (API 0.9.54).
</p>
</body></html>

View File

@ -28,7 +28,7 @@ import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.http.conn.util.InetAddressUtils;
import net.i2p.apache.http.conn.util.InetAddressUtils;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;

View File

@ -85,10 +85,10 @@ import net.i2p.I2PAppContext;
import net.i2p.crypto.KeyStoreUtil;
import net.i2p.data.DataHelper;
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
import org.apache.http.conn.util.PublicSuffixList;
import org.apache.http.conn.util.PublicSuffixListParser;
import org.apache.http.conn.util.PublicSuffixMatcher;
import net.i2p.apache.http.conn.ssl.DefaultHostnameVerifier;
import net.i2p.apache.http.conn.util.PublicSuffixList;
import net.i2p.apache.http.conn.util.PublicSuffixListParser;
import net.i2p.apache.http.conn.util.PublicSuffixMatcher;
/**
* Loads trusted ASCII certs from ~/.i2p/certificates/ and $I2P/certificates/.

View File

@ -111,12 +111,3 @@ usr/share/flags/countries/16x11/se.png usr/share/i2p/eepsite/docroot/help/lib/se
usr/share/flags/countries/16x11/tr.png usr/share/i2p/eepsite/docroot/help/lib/tr.png
usr/share/flags/countries/16x11/ua.png usr/share/i2p/eepsite/docroot/help/lib/ua.png
usr/share/flags/countries/16x11/us.png usr/share/i2p/eepsite/docroot/help/lib/us.png
# comment out if not building with libhttpclient-java and libhttpcore-java
# 2 MB of dependencies vs. 20 KB of copied source
# Requires 4.4 or higher.
# Debian: Not in wheezy/jessie
# Ubuntu: Only in wily and later
#usr/share/java/httpclient.jar usr/share/i2p/lib/httpclient.jar
#usr/share/java/httpcore.jar usr/share/i2p/lib/httpcore.jar

View File

@ -126,13 +126,6 @@ the binaries or sources.
We bundle most of the source from https://github.com/rrd4j/rrd4j
No package or not widely available.
* libhttpclient-java
We only use a few classes from this large package.
We require 4.4 or higher which is not available in older distributions.
This is 2 MB of dependencies, instead we bundle 20 KB of copied source.
If we do add this dependency, we use only the code in
/usr/share/java/httpclient.jar and /usr/share/java/httpcore.jar.
* UPnP (cybergarage)
Large subsystem, large number of Java source files, modified with several fixes.
From https://github.com/cybergarage/cybergarage-upnp

View File

@ -116,12 +116,3 @@ usr/share/flags/countries/16x11/se.png usr/share/i2p/eepsite/docroot/help/lib/se
usr/share/flags/countries/16x11/tr.png usr/share/i2p/eepsite/docroot/help/lib/tr.png
usr/share/flags/countries/16x11/ua.png usr/share/i2p/eepsite/docroot/help/lib/ua.png
usr/share/flags/countries/16x11/us.png usr/share/i2p/eepsite/docroot/help/lib/us.png
# comment out if not building with libhttpclient-java and libhttpcore-java
# 2 MB of dependencies vs. 20 KB of copied source
# Requires 4.4 or higher.
# Debian: Not in wheezy/jessie
# Ubuntu: Only in wily and later
#usr/share/java/httpclient.jar usr/share/i2p/lib/httpclient.jar
#usr/share/java/httpcore.jar usr/share/i2p/lib/httpcore.jar

View File

@ -1,3 +1,6 @@
2022-05-11 zzz
* Util: Rename modified apache classes (Gitlab ticket #353)
2022-05-02 zzz
* GeoIP 2022-05-01
* Tomcat 9.0.62

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Git";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 16;
public final static long BUILD = 17;
/** for example "-test" */
public final static String EXTRA = "-rc";