rhill 14/03/09 07:38:47
Added: vuze-5.3.0.0-cache-size.patch
vuze-5.3.0.0-disable-shared-plugins.patch
vuze-5.3.0.0-disable-updaters.patch
vuze-5.3.0.0-remove-classpath.patch
vuze-5.3.0.0-unbundle-json.patch
vuze-5.3.0.0-java5.patch
vuze-5.3.0.0-use-jdk-cipher-only.patch
vuze-5.3.0.0-unbundle-commons.patch
vuze-5.3.0.0-invalid-characters.patch
vuze-5.3.0.0-disable-osx.patch
Log:
Version bump (bug #481582). Unbundle commons-lang. Disable installation of
shared plugins and plugin updates due to write permissions. Use most of
Fedora's patchset. Temporarily use bundled bcprov as the required version is
not in the tree and would require a downgrade. Other misc fixes. Remove old.
Signed-off-by: Ryan Hill <[email protected]>
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key
957A8463)
Revision Changes Path
1.1 net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-cache-size.patch
===================================================================
--- a/org/gudy/azureus2/core3/config/COConfigurationManager.java
+++ b/org/gudy/azureus2/core3/config/COConfigurationManager.java
@@ -52,7 +52,7 @@ COConfigurationManager
public static final int CONFIG_CACHE_SIZE_MAX_MB;
static{
- long max_mem_bytes = Runtime.getRuntime().maxMemory();
+ long max_mem_bytes = Math.min
(Runtime.getRuntime().maxMemory(), 64*1024*1024);
long mb_1 = 1*1024*1024;
long mb_32 = 32*mb_1;
int size = (int)(( max_mem_bytes - mb_32 )/mb_1);
1.1
net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-disable-shared-plugins.patch
===================================================================
Disallow users to install into the shared plugin directory,
which they won't have write access to. This doesn't disable
shared plugins, just removes the installation UI.
--- a/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java
+++ b/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java
@@ -234,13 +234,13 @@ public class IPWListPanel extends
AbstractWizardPanel<InstallPluginWizard> {
}
public boolean
- isNextEnabled()
+ isFinishEnabled()
{
return(((InstallPluginWizard)wizard).getPluginList().size() > 0
);
}
- public IWizardPanel<InstallPluginWizard> getNextPanel() {
- return new IPWInstallModePanel(wizard,this);
+ public IWizardPanel<InstallPluginWizard> getFinishPanel() {
+ return new IPWFinishPanel(wizard,this);
}
public void updateList() {
@@ -252,7 +252,7 @@ public class IPWListPanel extends
AbstractWizardPanel<InstallPluginWizard> {
}
}
wizard.setPluginList( list );
- wizard.setNextEnabled( isNextEnabled() );
+ wizard.setFinishEnabled( isFinishEnabled() );
}
}
1.1 net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-disable-updaters.patch
===================================================================
--- a/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java
+++ b/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java
@@ -130,18 +130,6 @@ PluginInitializer
"Magnet URI Handler",
"true",
"false"},
- { PluginManagerDefaults.PID_CORE_UPDATE_CHECKER,
-
"org.gudy.azureus2.update.CoreUpdateChecker",
- "azbpcoreupdater",
- "CoreUpdater",
- "true",
- "true"},
- { PluginManagerDefaults.PID_CORE_PATCH_CHECKER,
-
"org.gudy.azureus2.update.CorePatchChecker",
- "azbpcorepatcher",
- "CorePatcher",
- "true",
- "true"},
{ PluginManagerDefaults.PID_PLATFORM_CHECKER,
"org.gudy.azureus2.platform.PlatformManagerPluginDelegate",
"azplatform2",
--- a/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
+++ b/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
@@ -562,6 +562,10 @@ PluginUpdatePlugin
}
}
+ if ( pi.getPluginState().isShared()) {
+ continue;
+ }
+
String mand =
pi.getPluginProperties().getProperty( "plugin.mandatory");
boolean pi_mandatory = mand != null &&
mand.trim().toLowerCase().equals("true");
--- a/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java
+++ b/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java
@@ -64,7 +64,7 @@ public class SWTUpdateChecker implements UpdatableComponent
public static void
initialize()
{
-
PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new
SWTUpdateChecker(),true);
+//
PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new
SWTUpdateChecker(),true);
}
public SWTUpdateChecker() {
1.1 net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-remove-classpath.patch
===================================================================
--- a/build.xml
+++ b/build.xml
@@ -46,7 +46,6 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop
in order to compil
<jar destfile="${root.dir}/${dist.dir}/Azureus2.jar"
basedir="${root.dir}" excludes="${dist.jar.excludes}" >
<manifest>
<attribute name="Main-Class"
value="org.gudy.azureus2.ui.common.Main" />
- <attribute name="Class-Path" value="Azureus2.jar
apple-extensions.jar commons-cli.jar log4j.jar swt.jar swt-win32.jar
swt-osx.jar" />
</manifest>
</jar>
1.1 net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-unbundle-json.patch
===================================================================
--- a/com/aelitis/azureus/util/ImportExportUtils.java
+++ b/com/aelitis/azureus/util/ImportExportUtils.java
@@ -360,7 +360,7 @@ public final class ImportExportUtils {
throws IOException
{
- List l = new JSONArray(data.length);
+ List l = new JSONArray();
map.put( key, l );
--- a/com/aelitis/azureus/util/JSONUtils.java
+++ b/com/aelitis/azureus/util/JSONUtils.java
@@ -74,7 +74,7 @@ public class JSONUtils
* @since 3.0.1.5
*/
public static JSONObject encodeToJSONObject(Map map) {
- JSONObject newMap = new JSONObject((int)(map.size()*1.5));
+ JSONObject newMap = new JSONObject();
for (Map.Entry<String, Object> entry:
((Map<String,Object>)map).entrySet()){
String key = entry.getKey();
@@ -105,9 +105,7 @@ public class JSONUtils
*/
public static String encodeToJSON(Map map) {
JSONObject jobj = encodeToJSONObject(map);
- StringBuilder sb = new StringBuilder(8192);
- jobj.toString( sb );
- return( sb.toString());
+ return( jobj.toString());
}
public static String encodeToJSON(Collection list) {
@@ -138,7 +136,7 @@ public class JSONUtils
* @since 3.0.1.5
*/
private static JSONArray encodeToJSONArray(Collection list) {
- JSONArray newList = new JSONArray(list.size());
+ JSONArray newList = new JSONArray();
for ( Object value: list ){
1.1 net-p2p/vuze/files/vuze-5.3.0.0-java5.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-java5.patch
===================================================================
--- a/build.xml
+++ b/build.xml
@@ -36,7 +36,7 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop
in order to compil
<fileset dir="${root.dir}/${libs.dir}" includes="**/*.jar" />
</path>
- <javac srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes"
source="1.4" target="1.4" includeAntRuntime="no" debug="true"
debuglevel="lines,vars,source" >
+ <javac encoding="8859_1" srcdir="${root.dir}" destdir="${root.dir}"
nowarn="yes" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source"
>
<classpath refid="libs.classpath" />
</javac>
</target>
1.1 net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-use-jdk-cipher-only.patch
===================================================================
---
a/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
+++
b/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
@@ -36,7 +36,6 @@ import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.encodings.PKCS1Encoding;
import org.bouncycastle.crypto.engines.RSAEngine;
import org.bouncycastle.crypto.params.ParametersWithRandom;
-import org.bouncycastle.jce.provider.RSAUtil;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.core3.util.RandomUtils;
import org.gudy.azureus2.plugins.utils.StaticUtilities;
@@ -83,30 +82,12 @@ SecureMessageServiceClientHelper
byte[] secret_bytes = session_key.getEncoded();
- try{
Cipher rsa_cipher = Cipher.getInstance( "RSA"
);
rsa_cipher.init( Cipher.ENCRYPT_MODE,
public_key );
encryped_session_key = rsa_cipher.doFinal(
secret_bytes );
- }catch( Throwable e ){
-
- // fallback to the BC implementation
for jdk1.4.2 as JCE RSA not available
-
- RSAEngine eng = new RSAEngine();
-
- PKCS1Encoding padded_eng = new PKCS1Encoding(
eng );
-
- CipherParameters param =
RSAUtil.generatePublicKeyParameter(public_key);
-
- param = new ParametersWithRandom(param,
RandomUtils.SECURE_RANDOM);
-
- padded_eng.init( true, param );
-
- encryped_session_key =
padded_eng.processBlock(secret_bytes, 0, secret_bytes.length);
- }
-
}catch( Throwable e ){
e.printStackTrace();
1.1 net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-unbundle-commons.patch
===================================================================
--- a/com/aelitis/azureus/core/metasearch/Result.java
+++ b/com/aelitis/azureus/core/metasearch/Result.java
@@ -27,7 +27,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Random;
-import org.apache.commons.lang.Entities;
+import org.apache.commons.lang.StringEscapeUtils;
import org.gudy.azureus2.core3.util.DisplayFormatters;
import org.json.simple.JSONObject;
@@ -372,6 +372,6 @@ public abstract class Result {
if ( input == null ){
return( null );
}
- return( Entities.HTML40.unescape( input ));
+ return( StringEscapeUtils.unescapeHtml( input ));
}
}
--- a/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
+++ b/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
@@ -88,14 +88,14 @@ public class WebResult extends Result {
public void setNameFromHTML(String name) {
if(name != null) {
name = removeHTMLTags(name);
- this.name = Entities.HTML40.unescape(name);
+ this.name = StringEscapeUtils.unescapeHtml(name);
}
}
public void setCommentsFromHTML(String comments) {
if(comments != null) {
comments = removeHTMLTags(comments);
- comments = Entities.HTML40.unescape(comments);
+ comments = StringEscapeUtils.unescapeHtml(comments);
comments = comments.replaceAll(",", "");
comments = comments.replaceAll(" ", "");
try{
@@ -108,7 +108,7 @@ public class WebResult extends Result {
public void setCategoryFromHTML(String category) {
if(category != null) {
category = removeHTMLTags(category);
- this.category =
Entities.HTML40.unescape(category).trim();
+ this.category =
StringEscapeUtils.unescapeHtml(category).trim();
/*int separator = this.category.indexOf(">");
if(separator != -1) {
@@ -133,7 +133,7 @@ public class WebResult extends Result {
public void setNbPeersFromHTML(String nbPeers) {
if(nbPeers != null) {
nbPeers = removeHTMLTags(nbPeers);
- String nbPeersS = Entities.HTML40.unescape(nbPeers);
+ String nbPeersS =
StringEscapeUtils.unescapeHtml(nbPeers);
nbPeersS = nbPeersS.replaceAll(",", "");
nbPeersS = nbPeersS.replaceAll(" ", "");
try {
@@ -148,7 +148,7 @@ public class WebResult extends Result {
public void setNbSeedsFromHTML(String nbSeeds) {
if(nbSeeds != null) {
nbSeeds = removeHTMLTags(nbSeeds);
- String nbSeedsS = Entities.HTML40.unescape(nbSeeds);
+ String nbSeedsS =
StringEscapeUtils.unescapeHtml(nbSeeds);
nbSeedsS = nbSeedsS.replaceAll(",", "");
nbSeedsS = nbSeedsS.replaceAll(" ", "");
try {
@@ -163,7 +163,7 @@ public class WebResult extends Result {
public void setNbSuperSeedsFromHTML(String nbSuperSeeds) {
if(nbSuperSeeds != null) {
nbSuperSeeds = removeHTMLTags(nbSuperSeeds);
- String nbSuperSeedsS =
Entities.HTML40.unescape(nbSuperSeeds);
+ String nbSuperSeedsS =
StringEscapeUtils.unescapeHtml(nbSuperSeeds);
nbSuperSeedsS = nbSuperSeedsS.replaceAll(",", "");
nbSuperSeedsS = nbSuperSeedsS.replaceAll(" ", "");
try {
@@ -230,7 +230,7 @@ public class WebResult extends Result {
public void setPublishedDateFromHTML(String publishedDate) {
if(publishedDate != null) {
publishedDate = removeHTMLTags(publishedDate);
- String publishedDateS =
Entities.HTML40.unescape(publishedDate).replace((char)160,(char)32);
+ String publishedDateS =
StringEscapeUtils.unescapeHtml(publishedDate).replace((char)160,(char)32);
this.publishedDate =
dateParser.parseDate(publishedDateS);
}
}
@@ -239,7 +239,7 @@ public class WebResult extends Result {
public void setSizeFromHTML(String size) {
if(size != null) {
size = removeHTMLTags(size);
- String sizeS =
Entities.HTML40.unescape(size).replace((char)160,(char)32);
+ String sizeS =
StringEscapeUtils.unescapeHtml(size).replace((char)160,(char)32);
sizeS = sizeS.replaceAll("<[^>]+>", " ");
//Add a space between the digits and unit if there is
none
sizeS = sizeS.replaceFirst("(\\d)([a-zA-Z])", "$1 $2");
@@ -285,7 +285,7 @@ public class WebResult extends Result {
public void setVotesFromHTML(String votes_str) {
if(votes_str != null) {
votes_str = removeHTMLTags(votes_str);
- votes_str = Entities.HTML40.unescape(votes_str);
+ votes_str = StringEscapeUtils.unescapeHtml(votes_str);
votes_str = votes_str.replaceAll(",", "");
votes_str = votes_str.replaceAll(" ", "");
try {
@@ -299,7 +299,7 @@ public class WebResult extends Result {
public void setVotesDownFromHTML(String votes_str) {
if(votes_str != null) {
votes_str = removeHTMLTags(votes_str);
- votes_str = Entities.HTML40.unescape(votes_str);
+ votes_str = StringEscapeUtils.unescapeHtml(votes_str);
votes_str = votes_str.replaceAll(",", "");
votes_str = votes_str.replaceAll(" ", "");
try {
1.1 net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-invalid-characters.patch
===================================================================
--- a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
+++ b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
@@ -50,17 +50,17 @@ public class DateParserRegex extends DateParser {
private static final String[] MONTHS_LIST = new String[] {
" january janvier enero januar",
- " february fevrier f�vrier febrero februar",
- " march mars marzo marz marz m�rz" ,
+ " february fevrier febrero februar",
+ " march mars marzo marz marz" ,
" april avril abril april ",
" may mai mayo mai",
" june juin junio juni",
" july juillet julio juli",
- " august aout ao�t agosto august",
+ " august aout agosto august",
" september septembre septiembre september",
" october octobre octubre oktober",
" november novembre noviembre november",
- " december decembre d�cembre diciembre dezember"};
+ " december decembre diciembre dezember"};
public DateParserRegex() {
this("GMT-7",true,null);
1.1 net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch?rev=1.1&content-type=text/plain
Index: vuze-5.3.0.0-disable-osx.patch
===================================================================
--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
+++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
@@ -229,57 +229,6 @@ public class SWTThread {
}
});
- if (Constants.isOSX) {
-
- // On Cocoa, we get a Close trigger on display. Need
to check if all
- // platforms send this.
- display.addListener(SWT.Close, new Listener() {
- public void handleEvent(Event event) {
- event.doit =
UIFunctionsManager.getUIFunctions().dispose(false, false);
- }
- });
-
- String platform = SWT.getPlatform();
- // use reflection here so we decouple generic SWT from
OSX specific stuff to an extent
-
- if (platform.equals("carbon")) {
- try {
-
- Class<?> ehancerClass =
Class.forName("org.gudy.azureus2.ui.swt.osx.CarbonUIEnhancer");
-
- Constructor<?> constructor =
ehancerClass.getConstructor(new Class[] {});
-
- constructor.newInstance(new Object[]
{});
-
- } catch (Throwable e) {
-
- Debug.printStackTrace(e);
- }
- } else if (platform.equals("cocoa")) {
- try {
-
- Class<?> ehancerClass =
Class.forName("org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer");
-
- Method mGetInstance =
ehancerClass.getMethod("getInstance", new Class[0]);
- Object claObj =
mGetInstance.invoke(null, new Object[0] );
-
- Method mHookAppMenu =
claObj.getClass().getMethod("hookApplicationMenu", new Class[] {});
- if (mHookAppMenu != null) {
- mHookAppMenu.invoke(claObj, new
Object[0]);
- }
-
- Method mHookDocOpen =
claObj.getClass().getMethod("hookDocumentOpen", new Class[] {});
- if (mHookDocOpen != null) {
- mHookDocOpen.invoke(claObj, new
Object[0]);
- }
-
- } catch (Throwable e) {
-
- Debug.printStackTrace(e);
- }
- }
- }
-
if (app != null) {
app.runInSWTThread();
runner = new Thread(new AERunnable() {