[SCM] eclipse - Powerful IDE written in java - Debian package. branch, ubuntu, updated. 50b57d32067311d70ea9d6bff04dad9d1a2c069a

Benjamin Drung bdrung-guest at alioth.debian.org
Fri Jan 29 23:51:35 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, ubuntu has been updated
       via  50b57d32067311d70ea9d6bff04dad9d1a2c069a (commit)
       via  82e62c9d1b5ff59598120c8cb0a98fee41f594d1 (commit)
       via  81d2b57ba5cc5c4d0965c02223776275df315271 (commit)
       via  c9da06bc734f9a38b750a98768e4fe50af91ec45 (commit)
       via  636de0e60bb551788b49c5c2d6085439e4a6874c (commit)
       via  66db32b029c7de06b768b28bfc141f1f46f26e66 (commit)
       via  ab9e62000472a31936147fd856ed7d2d50de0b04 (commit)
       via  9203efb7d6590accc6435d2c7fc43bb5771d1116 (commit)
       via  054270ca0b9359b7f6e07764f789614d60554f79 (commit)
       via  09ef820da646eb611ae3d5bf33c14ef41c4b0552 (commit)
       via  36bcd68d79fbf4484128e027fb16727f6dfd9be7 (commit)
       via  ce3cb834aac1369e251dba156939def48a406a6b (commit)
       via  4aad529e96627c189d407d3f2730e2cc14b63724 (commit)
       via  356c95855b17d6c325a3ee94ed365656502f1f74 (commit)
       via  cef6642a55cbf45a2d4e1174f6bcd6cef297f615 (commit)
       via  51495a58035a596e9fca9137ae1c30b0affa7f5e (commit)
       via  2d945a1f726f0e06a403d6c9a166795c445e80ea (commit)
       via  bf5b8daf9b193cb00ba6582e5e6952f03acbaede (commit)
       via  ac1c6a0274176ca84356758691c770ad7c19329f (commit)
       via  801427258c6f4a7a7204599a1116bb2f7cc9bfe6 (commit)
       via  2757e2911b81af99cc40566130a9d6f9facd0e05 (commit)
       via  0f15371e18e32c0a496eb0e4c7ec53a580727318 (commit)
      from  96d0bb47128fdaeda702f5ded2777d1289cb0c3b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 50b57d32067311d70ea9d6bff04dad9d1a2c069a
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jan 30 00:50:51 2010 +0100

    Fix system-jars.csv

commit 82e62c9d1b5ff59598120c8cb0a98fee41f594d1
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jan 30 00:32:14 2010 +0100

    Re-add versioned dependency on libcommons-el-java, libjetty-java, libservlet2.4-java; the packages are now available in Ubuntu.

commit 81d2b57ba5cc5c4d0965c02223776275df315271
Merge: c9da06bc734f9a38b750a98768e4fe50af91ec45 636de0e60bb551788b49c5c2d6085439e4a6874c
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jan 30 00:09:00 2010 +0100

    Merge branch 'master' into ubuntu

commit c9da06bc734f9a38b750a98768e4fe50af91ec45
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jan 30 00:01:28 2010 +0100

    Revert last commit (I applied it to the wrong branch).

-----------------------------------------------------------------------

Summary of changes:
 build.xml                                          |   12 +
 debian/changelog                                   |   16 ++
 debian/control                                     |   33 ++-
 debian/eclipse-platform.install                    |    2 -
 debian/eclipse-rcp.install                         |    2 +
 debian/extra/eclipse                               |   34 +++-
 debian/extra/eclipse.1                             |    4 +-
 debian/libswt-eclipse-java.install                 |    2 +
 debian/libswt-gtk-3.5-java.install                 |    1 -
 debian/patches/codec.patch                         |   18 ++
 debian/patches/install-icu4j-bundles.patch         |   18 ++
 debian/patches/lucene.patch                        |   16 ++
 debian/patches/series                              |    5 +
 debian/patches/source-jars.patch                   |  224 ++++++++++++++++++++
 debian/patches/swtbug291128.patch                  |   50 +++++
 debian/patches/system-jars.patch                   |   23 ++-
 debian/rules                                       |   44 +++--
 .../org.eclipse.equinox.p2.user.ui/feature.xml     |    2 +-
 .../org.eclipse.help.base/META-INF/MANIFEST.MF     |    4 +-
 patches/swtbug291128.patch                         |   32 +++
 replacements                                       |   17 ++
 system-jars.csv                                    |   21 ++-
 unjar-jar                                          |  179 ++++++++++++++++
 23 files changed, 705 insertions(+), 54 deletions(-)

diff --git a/build.xml b/build.xml
index 8245874..19ba175 100644
--- a/build.xml
+++ b/build.xml
@@ -249,6 +249,7 @@
 		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
 		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
+		<patch patchfile="${basedir}/patches/swtbug291128.patch" dir="${buildDirectory}/plugins/org.eclipse.swt/Eclipse SWT Accessibility" strip="1" />
 		<patch patchfile="${basedir}/patches/gnomeproxy-makefile.patch" dir="${buildDirectory}" strip="1" />
 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
@@ -280,6 +281,11 @@
 			<arg line="-c" />
 			<arg line="${buildDirectory}" />
 		</exec>
+		<chmod perm="+x" file="unjar-jar" />
+		<exec executable="./unjar-jar" failonerror="true">
+			<arg line="-c" />
+			<arg line="${buildDirectory}/plugins" />
+		</exec>
 		<echo file="symlink-stamp" />
 	</target>
 
@@ -591,6 +597,12 @@
 				<filename name="org.eclipse.*.jar" />
 			</fileset>
 		</copy>
+		<copy todir="${buildDirectory}/installation/plugins">
+		        <!-- Apparently something forgets these. -->
+		        <fileset dir="${buildDirectory}/plugins/">
+		                <include name="com.ibm.icu.base*.jar" />
+			</fileset>
+		</copy>
 		<exec executable="./symlink-system-jars" failonerror="true">
 			<arg line="-c" />
 			<arg line="${buildDirectory}/installation" />
diff --git a/debian/changelog b/debian/changelog
index a6c3ce0..fb54f5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+eclipse (3.5.1+repack~3-0ubuntu2) UNRELEASED; urgency=low
+
+  * Rebase to packaging from pkg-java/eclipse (thanks to Niels Thykier):
+    + Set a sane file limit for osgi-bundles. (Closes: #558693, LP: #293573)
+    + Inject update sites on first run. (LP: #460944)
+    + Prevent conflict with swt-gtk's swt packages.
+      - Rename our swt packages.
+      - Do not install conflicting symlinks/files.
+      (Closes: #541638, LP: #491880)
+    + Imported patch from Fedora that fixes seg. faults in libpango.
+      (LP: #445009)
+  * Re-add versioned dependency on libcommons-el-java, libjetty-java,
+    libservlet2.4-java; the packages are now available in Ubuntu.
+
+ -- Benjamin Drung <bdrung at ubuntu.com>  Sat, 30 Jan 2010 00:04:22 +0100
+
 eclipse (3.5.1+repack~3-0ubuntu1) lucid; urgency=low
 
   * Rebase to packaging from pkg-java/eclipse:
diff --git a/debian/control b/debian/control
index 3159a41..d747932 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Build-Depends: ant (>= 1.7.1),
                libatk1.0-dev,
                libcairo2-dev,
                libcommons-codec-java (>= 1.4-2),
+               libcommons-el-java (>= 1.0-5),
                libcommons-httpclient-java (>= 3.1-9),
                libcommons-logging-java (>= 1.1.1-6),
                libgl1-mesa-dev | libgl-dev,
@@ -24,9 +25,13 @@ Build-Depends: ant (>= 1.7.1),
                libgnomeui-dev,
                libgtk2.0-dev,
                libhamcrest-java (>= 1.1-4),
+               libicu4j-java (>= 4.0.1.1),
+               libjetty-java (>= 6.1.22),
                libjsch-java (>= 0.1.37-3),
-               liblucene2-java,
+               liblucene2-java (>= 2.9.1+ds1-5),
+               libmx4j-java (>= 3.0.2-8),
                libpango1.0-dev,
+               libservlet2.4-java (>= 5.0.30-10),
                libservlet2.5-java (>= 6.0.20-8),
                libxt-dev,
                libxtst-dev,
@@ -105,11 +110,15 @@ Depends: default-jre | java1-runtime | java2-runtime | java5-runtime | java6-run
          eclipse-rcp (= ${binary:Version}),
          java-common (>= 0.23),
          libcommons-codec-java (>= 1.4-2),
+         libcommons-el-java (>= 1.0-5),
          libcommons-httpclient-java (>= 3.1-9),
          libcommons-logging-java (>= 1.1.1-6),
+         libjetty-java (>= 6.1.22),
          libjsch-java (>= 0.1.37-3),
+         liblucene2-java (>= 2.9.1+ds1-5),
+         libservlet2.4-java (>= 5.0.30-10),
          libservlet2.5-java (>= 6.0.20-8),
-         libswt-gtk-3.5-java (= ${binary:Version}),
+         libswt-eclipse-java (= ${binary:Version}),
          sat4j (>= 2.1.0),
          xulrunner-1.9.1,
          ${misc:Depends},
@@ -171,6 +180,7 @@ Depends: cvs (>= 1.12.13-8),
          default-jre | java1-runtime | java2-runtime | java5-runtime | java6-runtime,
          eclipse-platform (= ${binary:Version}),
          ${misc:Depends}
+Replaces: eclipse-cvs
 Description: Eclipse Team Integration (CVS support)
  The Eclipse Platform is an open and extensible platform for anything and yet
  nothing in particular. It provides a foundation for constructing and running
@@ -185,7 +195,8 @@ Package: eclipse-rcp
 Architecture: any
 Depends: default-jre | java1-runtime | java2-runtime | java5-runtime | java6-runtime,
          libequinox-osgi-java (= ${source:Version}),
-         libswt-gtk-3.5-java (= ${binary:Version}),
+         libicu4j-java (>= 4.0.1.1),
+         libswt-eclipse-java (= ${binary:Version}),
          ${shlibs:Depends},
          ${misc:Depends}
 Suggests: eclipse
@@ -224,15 +235,17 @@ Description: Equinox OSGi framework
  This package includes only the Eclipse Equinox OSGi framework, which can
  be used outside Eclipse.
 
-Package: libswt-gtk-3.5-java
+Package: libswt-eclipse-java
 Architecture: any
 Depends: default-jre | java1-runtime | java2-runtime | java5-runtime | java6-runtime,
          java-common (>= 0.23),
-         libswt-gtk-3.5-jni (= ${binary:Version}),
+         libswt-eclipse-jni (= ${binary:Version}),
          ${misc:Depends}
 Conflicts: libswt3.2-java
-Replaces: libswt3.2-java,
-          libswt-gtk-3.4-java-gcj
+Replaces: eclipse-platform (<< 3.5.1+repack),
+          libswt3.2-java,
+          libswt-gtk-3.4-java-gcj,
+          libswt-gtk-3.4-java
 Description: Standard Widget Toolkit for Java, GTK+ version
  The Standard Widget Toolkit (SWT) is a fast and rich GUI toolkit for the Java
  programming language. SWT provides efficient, portable and fast access to
@@ -251,14 +264,16 @@ Description: Standard Widget Toolkit for Java, GTK+ version
  .
  This package provides the packaged SWT libraries.
 
-Package: libswt-gtk-3.5-jni
+Package: libswt-eclipse-jni
 Architecture: any
 Depends: default-jre | java1-runtime | java2-runtime | java5-runtime | java6-runtime,
          ${shlibs:Depends},
          ${misc:Depends}
 Recommends: ${shlibs:Recommends}
 Conflicts: libswt3.2-jni
-Replaces: libswt3.2-jni
+Replaces: libswt3.2-jni,
+          libswt-gtk-3.4-jni,
+          libswt-gtk-3.5-jni (<< 3.5.1+repack)
 Description: Standard Widget Toolkit for Java, GTK+ version JNI libraries
  The Standard Widget Toolkit (SWT) is a fast and rich GUI toolkit for the Java
  programming language. SWT provides efficient, portable and fast access to
diff --git a/debian/eclipse-platform.install b/debian/eclipse-platform.install
index 15c9789..c7d4195 100644
--- a/debian/eclipse-platform.install
+++ b/debian/eclipse-platform.install
@@ -181,8 +181,6 @@ usr/lib/eclipse/plugins/org.eclipse.platform_*
 usr/lib/eclipse/plugins/org.eclipse.sdk_*
 usr/lib/eclipse/plugins/org.eclipse.search.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.search_*.jar
-usr/lib/eclipse/plugins/org.eclipse.swt.gtk.linux.*.jar
-usr/lib/eclipse/plugins/org.eclipse.swt_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.core.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.core_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.ui.source_*.jar
diff --git a/debian/eclipse-rcp.install b/debian/eclipse-rcp.install
index b7cab42..9b8a709 100644
--- a/debian/eclipse-rcp.install
+++ b/debian/eclipse-rcp.install
@@ -1,6 +1,8 @@
 usr/*/eclipse/features/org.eclipse.rcp.source_*
 usr/*/eclipse/features/org.eclipse.rcp_*
 usr/lib/eclipse/configuration/org.eclipse.osgi/
+usr/lib/eclipse/plugins/com.ibm.icu.base.source_*.jar
+usr/lib/eclipse/plugins/com.ibm.icu.base_*.jar
 usr/lib/eclipse/plugins/com.ibm.icu.source_*.jar
 usr/lib/eclipse/plugins/com.ibm.icu_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.commands.source_*.jar
diff --git a/debian/extra/eclipse b/debian/extra/eclipse
index 47dd446..c155216 100644
--- a/debian/extra/eclipse
+++ b/debian/extra/eclipse
@@ -6,4 +6,36 @@
 export GDK_NATIVE_WINDOWS=true
 
 xuldir=/usr/lib/xulrunner-$(/usr/bin/xulrunner-1.9.1 --gre-version)
-LD_LIBRARY_PATH=$xuldir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} /usr/lib/eclipse/eclipse "$@" &
+
+export LD_LIBRARY_PATH="$xuldir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+
+ECLIPSE=/usr/lib/eclipse/eclipse
+
+inject_update_site(){
+    if [ ! -e "$1" ] ; then
+	echo "W: Cannot find $1" 2>&1
+	return 1
+    fi
+    cat - >>"$1" <<EOF
+repositories/http\:__download.eclipse.org_releases_galileo/enabled=true
+repositories/http\:__download.eclipse.org_releases_galileo/isSystem=false
+repositories/http\:__download.eclipse.org_releases_galileo/nickname=Galileo Update Site
+repositories/http\:__download.eclipse.org_releases_galileo/uri=http\://download.eclipse.org/releases/galileo/
+EOF
+
+}
+
+
+if [ ! -d ~/.eclipse/ ] ; then
+    $ECLIPSE -clean -initialize || exit $?
+    settings=`echo ~/.eclipse/org.eclipse.platform_*/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/.data/.settings/`
+    if [ ! -d "$settings" ] ; then
+	echo "W: Cannot inject update-sites, cannot find the correct config." 2>&1
+    else
+	( inject_update_site "$settings/org.eclipse.equinox.p2.metadata.repository.prefs" && \
+	  inject_update_site "$settings/org.eclipse.equinox.p2.artifact.repository.prefs" && \
+	  echo "I: Injected update sites" ) || echo "W: Could not inject update sites." 2>&1
+    fi
+fi
+
+exec $ECLIPSE "$@"
diff --git a/debian/extra/eclipse.1 b/debian/extra/eclipse.1
index e2f666d..99da649 100644
--- a/debian/extra/eclipse.1
+++ b/debian/extra/eclipse.1
@@ -18,7 +18,7 @@ just cut and paste from Eclipse's document.
 .SH PLATFORM OPTIONS
 A summary of platform options are included below. Some of this options can 
 be set by editing ~/.eclipse/eclipserc (but options given on the commandline
-will overwrite them). This is usefull, when you start eclipse via menu entry.
+will overwrite them). This is useful, when you start eclipse via menu entry.
 .TP
 .B \-arch <architecture>
 Defines the processor architecture on which the Eclipse platform is running. 
@@ -203,7 +203,7 @@ started from.
 .B \-vmargs <args>
 When passed to the Eclipse, this option is used to customize the operation of 
 the Java VM used to run Eclipse. If specified, this option must come at the 
-end of the command line. The given arguments are dependant on VM that is 
+end of the command line. The given arguments are dependent on VM that is 
 being run.
 .TP
 .B \-ws <window system>
diff --git a/debian/libswt-eclipse-java.install b/debian/libswt-eclipse-java.install
new file mode 100644
index 0000000..a529778
--- /dev/null
+++ b/debian/libswt-eclipse-java.install
@@ -0,0 +1,2 @@
+usr/lib/eclipse/plugins/org.eclipse.swt.gtk.linux.*.jar
+usr/lib/eclipse/plugins/org.eclipse.swt_*.jar
diff --git a/debian/libswt-gtk-3.5-java.install b/debian/libswt-gtk-3.5-java.install
deleted file mode 100644
index 635c6a0..0000000
--- a/debian/libswt-gtk-3.5-java.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/java/swt-gtk-3.5.1.jar
diff --git a/debian/patches/codec.patch b/debian/patches/codec.patch
new file mode 100644
index 0000000..5a0ead6
--- /dev/null
+++ b/debian/patches/codec.patch
@@ -0,0 +1,18 @@
+Description: Tell eclipse that any version of commons-codec can be used.
+Author: Niels Thykier <niels at thykier.net>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=294748
+Applied-Upstream: no
+
+diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
+index 8a34d35..6bac392 100644
+--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
++++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
+@@ -305,7 +305,7 @@
+          id="org.apache.commons.codec"
+          download-size="0"
+          install-size="0"
+-         version="1.3.0.qualifier"
++         version="0.0.0"
+          unpack="false"/>
+ 
+    <plugin
diff --git a/debian/patches/install-icu4j-bundles.patch b/debian/patches/install-icu4j-bundles.patch
new file mode 100644
index 0000000..554acd6
--- /dev/null
+++ b/debian/patches/install-icu4j-bundles.patch
@@ -0,0 +1,18 @@
+Description: Installs com.ibm.icu.base, which would otherwise be left behind.
+Forwarded: no
+
+--- eclipse-3.5.1+repack.orig/build.xml
++++ eclipse-3.5.1+repack/build.xml
+@@ -597,6 +597,12 @@
+ 				<filename name="org.eclipse.*.jar" />
+ 			</fileset>
+ 		</copy>
++		<copy todir="${buildDirectory}/installation/plugins">
++		        <!-- Apparently something forgets these. -->
++		        <fileset dir="${buildDirectory}/plugins/">
++		                <include name="com.ibm.icu.base*.jar" />
++			</fileset>
++		</copy>
+ 		<exec executable="./symlink-system-jars" failonerror="true">
+ 			<arg line="-c" />
+ 			<arg line="${buildDirectory}/installation" />
diff --git a/debian/patches/lucene.patch b/debian/patches/lucene.patch
new file mode 100644
index 0000000..ea66358
--- /dev/null
+++ b/debian/patches/lucene.patch
@@ -0,0 +1,16 @@
+Description: Removed expected version for lucene2, since our version is "too new".
+Author: Niels Thykier <niels at thykier.net>
+
+--- a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
++++ b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
+@@ -36,8 +36,8 @@ Export-Package: org.apache.lucene.demo.h
+  org.eclipse.help.search,
+  org.eclipse.help.server,
+  org.eclipse.help.standalone
+-Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
+- org.apache.lucene.analysis;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
++Require-Bundle: org.apache.lucene;visibility:=reexport,
++ org.apache.lucene.analysis;visibility:=reexport,
+  org.eclipse.ant.core;bundle-version="3.2.100";resolution:=optional,
+  org.eclipse.core.runtime;bundle-version="3.3.0",
+  org.eclipse.help;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
diff --git a/debian/patches/series b/debian/patches/series
index 26a38b5..cab9909 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,8 @@ remove-eclipse-version.patch
 move-config-file-to-etc.patch
 fix-directory-in-eclipse-ini.patch
 system-jars.patch
+codec.patch
+lucene.patch
+swtbug291128.patch
+source-jars.patch
+install-icu4j-bundles.patch
diff --git a/debian/patches/source-jars.patch b/debian/patches/source-jars.patch
new file mode 100644
index 0000000..de96970
--- /dev/null
+++ b/debian/patches/source-jars.patch
@@ -0,0 +1,224 @@
+diff --git a/build.xml b/build.xml
+index a537cb3..a470ea4 100644
+--- a/build.xml
++++ b/build.xml
+@@ -281,6 +281,11 @@
+ 			<arg line="-c" />
+ 			<arg line="${buildDirectory}" />
+ 		</exec>
++		<chmod perm="+x" file="unjar-jar" />
++		<exec executable="./unjar-jar" failonerror="true">
++			<arg line="-c" />
++			<arg line="${buildDirectory}/plugins" />
++		</exec>
+ 		<echo file="symlink-stamp" />
+ 	</target>
+ 
+diff --git a/replacements b/replacements
+index e69de29..41be130 100644
+--- a/replacements
++++ b/replacements
+@@ -0,0 +1,17 @@
++com.ibm.icu.base.source_*.jar
++com.ibm.icu.source_*.jar
++com.jcraft.jsch.source_*.jar
++javax.servlet.jsp.source_*.jar
++javax.servlet.source_*.jar
++org.apache.ant.source_*.jar
++org.apache.commons.codec.source_*.jar
++org.apache.commons.el.source_*.jar
++org.apache.commons.httpclient.source_*.jar
++org.apache.commons.logging.source_*.jar
++org.apache.jasper.source_*.jar
++org.apache.lucene.analysis.source_*.jar
++org.hamcrest.core.source_*.jar
++org.junit.source_*.jar
++org.mortbay.jetty.server.source_*.jar
++org.mortbay.jetty.util.source_*.jar
++org.objectweb.asm.source_*.jar
+diff --git a/unjar-jar b/unjar-jar
+old mode 100644
+new mode 100755
+index e69de29..876789f
+--- a/unjar-jar
++++ b/unjar-jar
+@@ -0,0 +1,179 @@
++#!/usr/bin/perl
++
++use strict;
++use warnings;
++
++my $tmp = undef;
++my $linkdir = ".";
++my $prefix = "link-";
++my @jarpath = (".", "/usr/share/java");
++my $wdir;
++my $rfile = `pwd`;
++my $linkonly = 0;
++my $embed = 0;
++my $ignore = 0;
++chomp($rfile);
++$rfile.="/replacements";
++
++while(defined(my $arg = shift(@ARGV))){
++    my $param;
++    if($arg eq '-c'){
++	$param = shift(@ARGV);
++	choke("Missing argument for $arg") if(!defined($param));
++	chdir($param) or choke("E: Could not cd to $param: $!");
++    } elsif($arg eq '-d'){
++	$linkdir = shift(@ARGV);
++	choke("Missing argument for $arg") if(!defined($linkdir));
++    } elsif($arg eq "-p"){
++	$prefix = shift(@ARGV);
++    } elsif($arg eq "-I"){
++	$param = shift(@ARGV);
++	push(@jarpath, $param);
++    } elsif($arg eq '-l'){
++	$linkonly = 1;
++	$embed = 0;
++    } elsif($arg eq '-e'){
++	$embed = 1;
++	$linkonly = 0;
++    } elsif($arg eq '-i'){
++	$ignore = 1;
++    } else {
++	choke("Unknown argument $arg");
++    }
++}
++
++-d $linkdir or system("mkdir -p \"$linkdir\"") == 0 or choke("Could not create $linkdir");
++
++$SIG{'INT'} = \&cleanup;
++$SIG{'TERM'} = \&cleanup;
++$tmp = `mktemp -d`;
++$wdir = `pwd`;
++chomp($wdir);
++chomp($tmp);
++
++replace($rfile);
++cleanup();
++exit 0;
++
++sub base{
++    my $name = shift;
++    $name =~ s@[^/]*+/@@go;
++    return $name;
++}
++
++sub dolink {
++    my @jars = @_;
++    foreach my $jar (@jars){
++	my $base = base($jar);
++	info("Linking $jar -> $linkdir/$prefix$base");
++	system("ln -sf \"$jar\" \"$linkdir/$prefix$base\"") == 0 or choke("Could not create link $jar -> $linkdir/$prefix$base");
++    }
++}
++
++sub embed {
++    my $file = shift;
++    my @cp = @_;
++    choke("$file does not exist") if( ! -e $file);
++    choke("$file has no classpath") if(scalar(@cp) < 1);
++
++    system("mkdir -p \"$tmp/old\" \"$tmp/new\" && cd \"$tmp/old\" && jar xf \"$wdir/$file\"" . 
++	   " && mv -f \"$tmp/old/META-INF/MANIFEST.MF\" \"$tmp/manifest\"") == 0 or choke("Could not unjar $file");
++    unlink($file) or choke("Unlinking $file: $!");
++    foreach my $jar (@cp){
++	system("unzip \"$jar\" -d  \"$tmp/new\" && rm -fr \"$tmp/new/META-INF/\"") == 0 or choke("Could not unzip $jar");
++    }
++    system("rm -fr \"$tmp/new/META-INF\" && cd \"$tmp/new\" && zip -r \"$wdir/$file\" *");
++    system("jar umf \"$tmp/manifest\" $wdir/$file && rm -fr \"$tmp/\"*") == 0 or choke("Could not create replacement jar.");
++    info("Embedded $file");
++    return 1;
++}
++
++sub repack {
++    my $file = shift;
++    my @cp = map { $_ = "$linkdir/$prefix" . base($_); } @_;
++    choke("$file does not exist") if( ! -e $file);
++
++    system("cd \"$tmp\" && jar xf \"$wdir/$file\"") == 0 or choke("Could not unjar $file");
++
++    unlink($file) or choke("Unlinking $file: $!");
++
++    open(MANIFEST_ORIG, "<", "$tmp/META-INF/MANIFEST.MF") or choke("Opening $tmp/META-INF/MANIFEST.MF");
++    open(MANIFEST, ">", "$tmp/manifest") or choke("Opening $tmp/manifest: $!");
++    while( my $line = <MANIFEST_ORIG> ) {
++	chomp($line);
++	last if($line =~ m/^\s*$/o);
++	print MANIFEST "$line\n";
++    }
++    close(MANIFEST) or choke("Writing $tmp/manifest: $!");
++    close(MANIFEST_ORIG);
++    system("rm -fr \"$tmp/META-INF/\" && find \"$tmp\" -name '*.class' -o -name '*.java' -delete") == 0 or choke("Could not clean $file");
++    system("cd \"$tmp\" && zip -r \"$wdir/$file\" * && jar umf \"$tmp/manifest\" \"$wdir/$file\" && rm -fr \"$tmp/\"*") == 0 or choke("Could not create replacement jar.");
++    info("Replaced $file");
++    return 1;
++}
++
++sub findJars{
++    my @result = ();
++    foreach my $jar (@_) {
++	my $jarfname = undef;
++	next if($jar eq "");
++	foreach my $path (@jarpath) {
++	    if( -e "$path/$jar" ) {
++		$jarfname = "$path/$jar";
++		last;
++	    }
++	}
++	choke("Cannot find $jar in " . join(" ", @jarpath)) unless(defined($jarfname));
++	push(@result, $jarfname),
++    }
++    return @result;
++}
++
++sub replace {
++    my $fname = shift;
++    open(REPLACEMENTS, "<", $fname) or choke("$fname: $!");
++    while( my $line = <REPLACEMENTS> ){
++	my $toReplace;
++	my $rest;
++	my @jars;
++	chomp($line);
++	next if($line =~ m/^#/o);
++	($toReplace, $rest) = split(/\s*;\s*/o, $line);
++	@jars = findJars(split(/\s*,\s*/o, $rest//''));
++	# Make the shell expand wildcards
++	$toReplace = `echo $toReplace`;
++	chomp($toReplace);
++	next if( ! -e $toReplace && $ignore);
++	if($embed) {
++	    embed($toReplace, @jars);
++	    next;
++	}
++	if( -e $toReplace) {
++	    dolink(@jars);
++	    repack($toReplace, @jars) unless($linkonly);
++	} elsif(!$linkonly){
++	    choke("Cannot find $toReplace");
++	}
++    }
++    close(REPLACEMENTS);
++}
++
++sub choke{
++    my $msg = shift;
++    print STDERR "E: $msg\n";
++    cleanup();
++    exit 1;
++}
++
++sub info{
++    my $msg = shift;
++    print "I: $msg\n";
++}
++
++sub cleanup{
++    if(defined($tmp) && -d $tmp){
++	info("Removing $tmp");
++	system("rm -fr \"$tmp\"");
++    }
++}
++
diff --git a/debian/patches/swtbug291128.patch b/debian/patches/swtbug291128.patch
new file mode 100644
index 0000000..cdd5bed
--- /dev/null
+++ b/debian/patches/swtbug291128.patch
@@ -0,0 +1,50 @@
+Description: Fixes upstream #291128
+Origin: Fedora, http://cvs.fedoraproject.org/viewvc/rpms/eclipse/devel/eclipse-swtbug291128.patch?revision=1.2&content-type=text%2Fplain&view=co
+
+--- a/patches/swtbug291128.patch	1969-12-31 19:00:00.000000000 -0500
++++ b/patches/swtbug291128.patch	2009-12-22 16:46:54.000000000 -0500
+@@ -0,0 +1,32 @@
++### Eclipse Workspace Patch 1.0
++#P org.eclipse.swt
++Index: Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
++===================================================================
++RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java,v
++retrieving revision 1.46
++diff -u -r1.46 AccessibleObject.java
++--- Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	29 May 2009 21:30:30 -0000	1.46
+++++ Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	22 Dec 2009 17:05:15 -0000
++@@ -1176,7 +1176,12 @@
++ 	}
++ 
++ 	static AccessibleObject getAccessibleObject (int /*long*/ atkObject) {
++-		return (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
+++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
+++		if (object == null) return null;
+++		if (object.accessible == null) return null;
+++		Control control = object.accessible.control;
+++		if (control == null || control.isDisposed()) return null;
+++		return object;
++ 	}
++ 	
++ 	AccessibleObject getChildByHandle (int /*long*/ handle) {
++@@ -1252,7 +1257,7 @@
++ 		GObjectClass objectClassStruct = new GObjectClass ();
++ 		ATK.memmove (objectClassStruct, gObjectClass);
++ 		ATK.call (objectClassStruct.finalize, atkObject);
++-		AccessibleObject object = getAccessibleObject (atkObject);
+++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
++ 		if (object != null) {
++ 			AccessibleObjects.remove (new LONG (atkObject));
++ 			object.release ();
+diff --git a/build.xml b/build.xml
+index 8245874..a537cb3 100644
+--- a/build.xml
++++ b/build.xml
+@@ -249,6 +249,7 @@
+ 		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
+ 		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
+ 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
++		<patch patchfile="${basedir}/patches/swtbug291128.patch" dir="${buildDirectory}/plugins/org.eclipse.swt/Eclipse SWT Accessibility" strip="1" />
+ 		<patch patchfile="${basedir}/patches/gnomeproxy-makefile.patch" dir="${buildDirectory}" strip="1" />
+ 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
+ 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
diff --git a/debian/patches/system-jars.patch b/debian/patches/system-jars.patch
index ca2c82a..35d0a62 100644
--- a/debian/patches/system-jars.patch
+++ b/debian/patches/system-jars.patch
@@ -154,7 +154,7 @@ Applied-Upstream: no
 +fi
 --- /dev/null
 +++ eclipse-3.5.1+repack/system-jars.csv
-@@ -0,0 +1,46 @@
+@@ -0,0 +1,51 @@
 +plugins/org.apache.ant_*/bin/ant;/usr/share/ant/bin/ant
 +plugins/org.apache.ant_*/bin/antRun;/usr/share/ant/bin/antRun
 +plugins/org.apache.ant_*/bin/antRun.pl;/usr/share/ant/bin/antRun.pl
@@ -186,18 +186,23 @@ Applied-Upstream: no
 +plugins/org.apache.ant_*/lib/ant.jar;/usr/share/java/ant.jar
 +plugins/org.junit_3.*/junit.jar;/usr/share/java/junit.jar
 +plugins/com.jcraft.jsch_*.jar;/usr/share/java/jsch.jar
-+#plugins/javax.servlet.jsp_*.jar;/usr/share/java/jsp-api-2.0.jar
-+#plugins/javax.servlet_2.4*.jar;/usr/share/java/servlet-api-2.4.jar
++plugins/javax.servlet.jsp_*.jar;/usr/share/java/jsp-api-2.0.jar
++plugins/javax.servlet_2.4*.jar;/usr/share/java/servlet-api-2.4.jar
 +plugins/javax.servlet_2.5*.jar;/usr/share/java/servlet-api-2.5.jar
-+#plugins/org.apache.commons.codec_*.jar;/usr/share/java/commons-codec.jar
-+#plugins/org.apache.commons.el_*.jar;/usr/share/java/commons-el.jar
++plugins/org.apache.commons.codec_*.jar;/usr/share/java/commons-codec.jar
++plugins/org.apache.commons.el_*.jar;/usr/share/java/commons-el.jar
 +plugins/org.apache.commons.httpclient_*.jar;/usr/share/java/commons-httpclient.jar
 +plugins/org.apache.commons.logging_*.jar;/usr/share/java/commons-logging.jar
-+#plugins/org.apache.lucene.analysis_*.jar;/usr/share/java/lucene-analyzers.jar
-+#plugins/org.apache.lucene_*.jar;/usr/share/java/lucene-core.jar
++plugins/org.apache.lucene.analysis_*.jar;/usr/share/java/lucene-analyzers.jar
++plugins/org.apache.lucene_*.jar;/usr/share/java/lucene-core.jar
 +plugins/org.hamcrest.core_*.jar;/usr/share/java/hamcrest-core.jar
 +plugins/org.junit4/junit.jar;/usr/share/java/junit4.jar
-+#plugins/org.mortbay.jetty.server_*.jar;/usr/share/java/jetty.jar
-+#plugins/org.mortbay.jetty.util_*.jar;/usr/share/java/jetty-util.jar
++plugins/org.mortbay.jetty.server_*.jar;/usr/share/java/jetty.jar
++plugins/org.mortbay.jetty.util_*.jar;/usr/share/java/jetty-util.jar
 +plugins/org.sat4j.core_*.jar;/usr/share/sat4j/org.sat4j.core.jar
 +plugins/org.sat4j.pb_*.jar;/usr/share/sat4j/org.sat4j.pb.jar
++plugins/com.ibm.icu_*.jar;/usr/share/java/com.ibm.icu.jar
++plugins/com.ibm.icu.base_*.jar;/usr/share/java/com.ibm.icu.base.jar
++plugins/javax.management_*.jar;/usr/share/java/mx4j.jar
++plugins/javax.management.remote_*.jar;/usr/share/java/mx4j-remote.jar
++#plugins/org.apache.ws.commons.util_*.jar;/usr/share/java/ws-commons-util.jar
diff --git a/debian/rules b/debian/rules
index cf3eb70..063ed3e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -38,20 +38,22 @@ DEB_JARS := $(ANT_HOME)/lib/ant-nodeps.jar
 export JAVA_HOME=/usr/lib/jvm/default-java
 export PATH:=$(CURDIR)/debian/extra/bin:$(PATH)
 
-DEB_DH_SHLIBDEPS_ARGS_libswt-gtk-3.5-jni := \
-	$(strip $(shell pkg-config --libs-only-L libxul | sed "s/-L/-l/g")):/usr/lib/jvm/default-java/jre/lib/$(DEB_HOST_ARCH_CPU) \
+JNI_SO_PATH:=debian/libswt-eclipse-jni/usr/lib/eclipse/configuration/org.eclipse.osgi/bundles/*/1/.cp
+
+DEB_DH_SHLIBDEPS_ARGS_libswt-eclipse-jni := \
+	$(strip $(shell pkg-config --libs-only-L libxul | sed "s/-L/-l/g")):$(JAVA_HOME)/jre/lib/$(DEB_HOST_ARCH_CPU) \
 	-- -dDepends \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-atk-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-awt-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-cairo-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-pi-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-xpcominit-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-xulrunner-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-atk-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-awt-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-cairo-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-pi-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-xpcominit-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-xulrunner-gtk-*.so \
 	-dRecommends \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-gnome-gtk-*.so \
-		debian/libswt-gtk-3.5-jni/usr/lib/jni/libswt-glx-gtk-*.so \
-	-Tdebian/libswt-gtk-3.5-jni.substvars
+		$(JNI_SO_PATH)/libswt-gnome-gtk-*.so \
+		$(JNI_SO_PATH)/libswt-glx-gtk-*.so \
+	-Tdebian/libswt-eclipse-jni.substvars
 
 clean::
 	rm -f *.cdbs-config_list
@@ -79,11 +81,11 @@ binary-post-install/eclipse-rcp::
 	test -x swt_bundle.sh || chmod a+x swt_bundle.sh
 	# Extract swt's bundle from eclipse-rcp where all the other bundles are installed.
 	$(DEB_ANT_INVOKE) -Dprefix=/usr -Dlibdir=/lib -Declipse.rcp.package.root=debian/eclipse-rcp/ \
-	    -Declipse.swt.package.root=debian/libswt-gtk-3.5-jni package.extract.swt
+	    -Declipse.swt.package.root=debian/libswt-eclipse-jni package.extract.swt
 	# Remove outdated libraries or else shlibdeps will fail later.
-	rm -f debian/libswt-gtk-3.5-jni/usr/lib/eclipse/configuration/org.eclipse.osgi/bundles/*/1/.cp/libswt-mozilla-gcc*
-	mkdir -p debian/libswt-gtk-3.5-jni/usr/lib/jni
-	cd debian/libswt-gtk-3.5-jni/usr/lib/jni && find ../eclipse/configuration/ -name '*.so' -exec ln -s {} . \;
+	rm -f debian/libswt-eclipse-jni/usr/lib/eclipse/configuration/org.eclipse.osgi/bundles/*/1/.cp/libswt-mozilla-gcc*
+	# mkdir -p debian/libswt-eclipse-jni/usr/lib/jni
+	# cd debian/libswt-eclipse-jni/usr/lib/jni && find ../eclipse/configuration/ -name '*.so' -exec ln -s {} . \;
 
 # TODO: Turn all commands below this comment into patches and send them to eclipse-build.
 
@@ -153,9 +155,9 @@ debian-install-stamp:
 			-application org.eclipse.equinox.initializer.configInitializer \
 			-fileInitializer $(CURDIR)/debian/extract_patterns.txt
 	# Copy SWT jar file
-	mkdir -p $(DEB_DESTDIR)usr/lib/java
-	cp $(SOURCE_DIR)/plugins/org.eclipse.swt.gtk.linux.$(ECLIPSE_BUILD_ARCH)/swt.jar \
-		$(DEB_DESTDIR)usr/lib/java/swt-gtk-3.5.1.jar
+	#mkdir -p $(DEB_DESTDIR)usr/lib/java
+	#cp $(SOURCE_DIR)/plugins/org.eclipse.swt.gtk.linux.$(ECLIPSE_BUILD_ARCH)/swt.jar \
+	#	$(DEB_DESTDIR)usr/lib/java/swt-gtk-3.5.1.jar
 	# Normalize the paths.
 	grep --exclude-from=debian/exclude_patterns.txt -l -I -r debian/tmp debian/tmp/ | xargs sed -i s@$(CURDIR)/debian/tmp@@g
 	TO_CORRECT=`echo $(CURDIR)/debian/tmp | sed s@/@_ at g` ; grep --exclude-from=debian/exclude_patterns.txt \
@@ -166,6 +168,8 @@ debian-install-stamp:
 	install -m 755 debian/extra/eclipse $(DEB_DESTDIR)usr/bin/eclipse
 	# Correct the profile in config.ini - else eclipse will refuse to open the update/install menus.
 	sed -i 's/SDKProfile/PlatformProfile/' "$(DEB_DESTDIR)usr/lib/eclipse/configuration/config.ini"
+	# Set a saner default file limit than "unlimited".
+	echo 'osgi.bundlefile.limit=100' >> "$(DEB_DESTDIR)usr/lib/eclipse/configuration/config.ini"
 	# Remove the unnecessary configuration data (taken from Fedora spec)
 	rm -r $(DEBIAN_PACK_LIBDIR)/configuration/org.eclipse.core.runtime
 	rm -r $(DEBIAN_PACK_LIBDIR)/configuration/org.eclipse.equinox.app
@@ -174,3 +178,5 @@ debian-install-stamp:
 	find $(DEBIAN_PACK_LIBDIR) -depth -type d -empty -delete
 	# fix permissions of scripts
 	chmod +x $(DEB_DESTDIR)usr/lib/eclipse/plugins/org.eclipse.pde.build_*/templates/package-build/*.sh
+	# Regenerate the eclipse.ini symlink - one of the eclipse runs above trashes it.
+	ln -sf /etc/eclipse.ini $(DEB_DESTDIR)usr/lib/eclipse/eclipse.ini
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
index 8a34d35..6bac392 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
@@ -305,7 +305,7 @@
          id="org.apache.commons.codec"
          download-size="0"
          install-size="0"
-         version="1.3.0.qualifier"
+         version="0.0.0"
          unpack="false"/>
 
    <plugin
diff --git a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
index 5cc8999..2cfc24e 100644
--- a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
@@ -36,8 +36,8 @@ Export-Package: org.apache.lucene.demo.html;x-internal:=true,
  org.eclipse.help.search,
  org.eclipse.help.server,
  org.eclipse.help.standalone
-Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
- org.apache.lucene.analysis;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
+Require-Bundle: org.apache.lucene;visibility:=reexport,
+ org.apache.lucene.analysis;visibility:=reexport,
  org.eclipse.ant.core;bundle-version="3.2.100";resolution:=optional,
  org.eclipse.core.runtime;bundle-version="3.3.0",
  org.eclipse.help;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
diff --git a/patches/swtbug291128.patch b/patches/swtbug291128.patch
new file mode 100644
index 0000000..9d43ee4
--- /dev/null
+++ b/patches/swtbug291128.patch
@@ -0,0 +1,32 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.swt
+Index: Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java,v
+retrieving revision 1.46
+diff -u -r1.46 AccessibleObject.java
+--- Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	29 May 2009 21:30:30 -0000	1.46
++++ Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	22 Dec 2009 17:05:15 -0000
+@@ -1176,7 +1176,12 @@
+ 	}
+ 
+ 	static AccessibleObject getAccessibleObject (int /*long*/ atkObject) {
+-		return (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
++		if (object == null) return null;
++		if (object.accessible == null) return null;
++		Control control = object.accessible.control;
++		if (control == null || control.isDisposed()) return null;
++		return object;
+ 	}
+ 	
+ 	AccessibleObject getChildByHandle (int /*long*/ handle) {
+@@ -1252,7 +1257,7 @@
+ 		GObjectClass objectClassStruct = new GObjectClass ();
+ 		ATK.memmove (objectClassStruct, gObjectClass);
+ 		ATK.call (objectClassStruct.finalize, atkObject);
+-		AccessibleObject object = getAccessibleObject (atkObject);
++		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
+ 		if (object != null) {
+ 			AccessibleObjects.remove (new LONG (atkObject));
+ 			object.release ();
diff --git a/replacements b/replacements
new file mode 100644
index 0000000..41be130
--- /dev/null
+++ b/replacements
@@ -0,0 +1,17 @@
+com.ibm.icu.base.source_*.jar
+com.ibm.icu.source_*.jar
+com.jcraft.jsch.source_*.jar
+javax.servlet.jsp.source_*.jar
+javax.servlet.source_*.jar
+org.apache.ant.source_*.jar
+org.apache.commons.codec.source_*.jar
+org.apache.commons.el.source_*.jar
+org.apache.commons.httpclient.source_*.jar
+org.apache.commons.logging.source_*.jar
+org.apache.jasper.source_*.jar
+org.apache.lucene.analysis.source_*.jar
+org.hamcrest.core.source_*.jar
+org.junit.source_*.jar
+org.mortbay.jetty.server.source_*.jar
+org.mortbay.jetty.util.source_*.jar
+org.objectweb.asm.source_*.jar
diff --git a/system-jars.csv b/system-jars.csv
index 6224ad9..6d2f975 100644
--- a/system-jars.csv
+++ b/system-jars.csv
@@ -29,18 +29,23 @@ plugins/org.apache.ant_*/lib/ant-weblogic.jar;/usr/share/java/ant-weblogic.jar
 plugins/org.apache.ant_*/lib/ant.jar;/usr/share/java/ant.jar
 plugins/org.junit_3.*/junit.jar;/usr/share/java/junit.jar
 plugins/com.jcraft.jsch_*.jar;/usr/share/java/jsch.jar
-#plugins/javax.servlet.jsp_*.jar;/usr/share/java/jsp-api-2.0.jar
-#plugins/javax.servlet_2.4*.jar;/usr/share/java/servlet-api-2.4.jar
+plugins/javax.servlet.jsp_*.jar;/usr/share/java/jsp-api-2.0.jar
+plugins/javax.servlet_2.4*.jar;/usr/share/java/servlet-api-2.4.jar
 plugins/javax.servlet_2.5*.jar;/usr/share/java/servlet-api-2.5.jar
-#plugins/org.apache.commons.codec_*.jar;/usr/share/java/commons-codec.jar
-#plugins/org.apache.commons.el_*.jar;/usr/share/java/commons-el.jar
+plugins/org.apache.commons.codec_*.jar;/usr/share/java/commons-codec.jar
+plugins/org.apache.commons.el_*.jar;/usr/share/java/commons-el.jar
 plugins/org.apache.commons.httpclient_*.jar;/usr/share/java/commons-httpclient.jar
 plugins/org.apache.commons.logging_*.jar;/usr/share/java/commons-logging.jar
-#plugins/org.apache.lucene.analysis_*.jar;/usr/share/java/lucene-analyzers.jar
-#plugins/org.apache.lucene_*.jar;/usr/share/java/lucene-core.jar
+plugins/org.apache.lucene.analysis_*.jar;/usr/share/java/lucene-analyzers.jar
+plugins/org.apache.lucene_*.jar;/usr/share/java/lucene-core.jar
 plugins/org.hamcrest.core_*.jar;/usr/share/java/hamcrest-core.jar
 plugins/org.junit4/junit.jar;/usr/share/java/junit4.jar
-#plugins/org.mortbay.jetty.server_*.jar;/usr/share/java/jetty.jar
-#plugins/org.mortbay.jetty.util_*.jar;/usr/share/java/jetty-util.jar
+plugins/org.mortbay.jetty.server_*.jar;/usr/share/java/jetty.jar
+plugins/org.mortbay.jetty.util_*.jar;/usr/share/java/jetty-util.jar
 plugins/org.sat4j.core_*.jar;/usr/share/sat4j/org.sat4j.core.jar
 plugins/org.sat4j.pb_*.jar;/usr/share/sat4j/org.sat4j.pb.jar
+plugins/com.ibm.icu_*.jar;/usr/share/java/com.ibm.icu.jar
+plugins/com.ibm.icu.base_*.jar;/usr/share/java/com.ibm.icu.base.jar
+plugins/javax.management_*.jar;/usr/share/java/mx4j.jar
+plugins/javax.management.remote_*.jar;/usr/share/java/mx4j-remote.jar
+#plugins/org.apache.ws.commons.util_*.jar;/usr/share/java/ws-commons-util.jar
diff --git a/unjar-jar b/unjar-jar
new file mode 100755
index 0000000..876789f
--- /dev/null
+++ b/unjar-jar
@@ -0,0 +1,179 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my $tmp = undef;
+my $linkdir = ".";
+my $prefix = "link-";
+my @jarpath = (".", "/usr/share/java");
+my $wdir;
+my $rfile = `pwd`;
+my $linkonly = 0;
+my $embed = 0;
+my $ignore = 0;
+chomp($rfile);
+$rfile.="/replacements";
+
+while(defined(my $arg = shift(@ARGV))){
+    my $param;
+    if($arg eq '-c'){
+	$param = shift(@ARGV);
+	choke("Missing argument for $arg") if(!defined($param));
+	chdir($param) or choke("E: Could not cd to $param: $!");
+    } elsif($arg eq '-d'){
+	$linkdir = shift(@ARGV);
+	choke("Missing argument for $arg") if(!defined($linkdir));
+    } elsif($arg eq "-p"){
+	$prefix = shift(@ARGV);
+    } elsif($arg eq "-I"){
+	$param = shift(@ARGV);
+	push(@jarpath, $param);
+    } elsif($arg eq '-l'){
+	$linkonly = 1;
+	$embed = 0;
+    } elsif($arg eq '-e'){
+	$embed = 1;
+	$linkonly = 0;
+    } elsif($arg eq '-i'){
+	$ignore = 1;
+    } else {
+	choke("Unknown argument $arg");
+    }
+}
+
+-d $linkdir or system("mkdir -p \"$linkdir\"") == 0 or choke("Could not create $linkdir");
+
+$SIG{'INT'} = \&cleanup;
+$SIG{'TERM'} = \&cleanup;
+$tmp = `mktemp -d`;
+$wdir = `pwd`;
+chomp($wdir);
+chomp($tmp);
+
+replace($rfile);
+cleanup();
+exit 0;
+
+sub base{
+    my $name = shift;
+    $name =~ s@[^/]*+/@@go;
+    return $name;
+}
+
+sub dolink {
+    my @jars = @_;
+    foreach my $jar (@jars){
+	my $base = base($jar);
+	info("Linking $jar -> $linkdir/$prefix$base");
+	system("ln -sf \"$jar\" \"$linkdir/$prefix$base\"") == 0 or choke("Could not create link $jar -> $linkdir/$prefix$base");
+    }
+}
+
+sub embed {
+    my $file = shift;
+    my @cp = @_;
+    choke("$file does not exist") if( ! -e $file);
+    choke("$file has no classpath") if(scalar(@cp) < 1);
+
+    system("mkdir -p \"$tmp/old\" \"$tmp/new\" && cd \"$tmp/old\" && jar xf \"$wdir/$file\"" . 
+	   " && mv -f \"$tmp/old/META-INF/MANIFEST.MF\" \"$tmp/manifest\"") == 0 or choke("Could not unjar $file");
+    unlink($file) or choke("Unlinking $file: $!");
+    foreach my $jar (@cp){
+	system("unzip \"$jar\" -d  \"$tmp/new\" && rm -fr \"$tmp/new/META-INF/\"") == 0 or choke("Could not unzip $jar");
+    }
+    system("rm -fr \"$tmp/new/META-INF\" && cd \"$tmp/new\" && zip -r \"$wdir/$file\" *");
+    system("jar umf \"$tmp/manifest\" $wdir/$file && rm -fr \"$tmp/\"*") == 0 or choke("Could not create replacement jar.");
+    info("Embedded $file");
+    return 1;
+}
+
+sub repack {
+    my $file = shift;
+    my @cp = map { $_ = "$linkdir/$prefix" . base($_); } @_;
+    choke("$file does not exist") if( ! -e $file);
+
+    system("cd \"$tmp\" && jar xf \"$wdir/$file\"") == 0 or choke("Could not unjar $file");
+
+    unlink($file) or choke("Unlinking $file: $!");
+
+    open(MANIFEST_ORIG, "<", "$tmp/META-INF/MANIFEST.MF") or choke("Opening $tmp/META-INF/MANIFEST.MF");
+    open(MANIFEST, ">", "$tmp/manifest") or choke("Opening $tmp/manifest: $!");
+    while( my $line = <MANIFEST_ORIG> ) {
+	chomp($line);
+	last if($line =~ m/^\s*$/o);
+	print MANIFEST "$line\n";
+    }
+    close(MANIFEST) or choke("Writing $tmp/manifest: $!");
+    close(MANIFEST_ORIG);
+    system("rm -fr \"$tmp/META-INF/\" && find \"$tmp\" -name '*.class' -o -name '*.java' -delete") == 0 or choke("Could not clean $file");
+    system("cd \"$tmp\" && zip -r \"$wdir/$file\" * && jar umf \"$tmp/manifest\" \"$wdir/$file\" && rm -fr \"$tmp/\"*") == 0 or choke("Could not create replacement jar.");
+    info("Replaced $file");
+    return 1;
+}
+
+sub findJars{
+    my @result = ();
+    foreach my $jar (@_) {
+	my $jarfname = undef;
+	next if($jar eq "");
+	foreach my $path (@jarpath) {
+	    if( -e "$path/$jar" ) {
+		$jarfname = "$path/$jar";
+		last;
+	    }
+	}
+	choke("Cannot find $jar in " . join(" ", @jarpath)) unless(defined($jarfname));
+	push(@result, $jarfname),
+    }
+    return @result;
+}
+
+sub replace {
+    my $fname = shift;
+    open(REPLACEMENTS, "<", $fname) or choke("$fname: $!");
+    while( my $line = <REPLACEMENTS> ){
+	my $toReplace;
+	my $rest;
+	my @jars;
+	chomp($line);
+	next if($line =~ m/^#/o);
+	($toReplace, $rest) = split(/\s*;\s*/o, $line);
+	@jars = findJars(split(/\s*,\s*/o, $rest//''));
+	# Make the shell expand wildcards
+	$toReplace = `echo $toReplace`;
+	chomp($toReplace);
+	next if( ! -e $toReplace && $ignore);
+	if($embed) {
+	    embed($toReplace, @jars);
+	    next;
+	}
+	if( -e $toReplace) {
+	    dolink(@jars);
+	    repack($toReplace, @jars) unless($linkonly);
+	} elsif(!$linkonly){
+	    choke("Cannot find $toReplace");
+	}
+    }
+    close(REPLACEMENTS);
+}
+
+sub choke{
+    my $msg = shift;
+    print STDERR "E: $msg\n";
+    cleanup();
+    exit 1;
+}
+
+sub info{
+    my $msg = shift;
+    print "I: $msg\n";
+}
+
+sub cleanup{
+    if(defined($tmp) && -d $tmp){
+	info("Removing $tmp");
+	system("rm -fr \"$tmp\"");
+    }
+}
+


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list