Skip to content

Commit 5a5d6b8

Browse files
Netbinox: Enable loading of bundles importing java.* packages
Newer bouncy castle JARs declare an import of the java.io package. This is rejected by the manifest verification in the equinox version NetBeans uses wrapped into Netbinox. This change deactivates the check in equinox that rejects that entry. Closes: #8894
1 parent 26cc860 commit 5a5d6b8

6 files changed

Lines changed: 24 additions & 10 deletions

File tree

platform/netbinox/external/M20140115-0800.patch

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717
diff --git a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
18-
index 617db7f..1851f4a 100644
18+
index 617db7f49..1851f4ade 100644
1919
--- a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
2020
+++ b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
2121
@@ -563,11 +563,19 @@ public class Framework implements EventPublisher, Runnable {
@@ -42,3 +42,16 @@ index 617db7f..1851f4a 100644
4242
return result;
4343
}
4444

45+
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
46+
index b6964980a..d9d2f996d 100644
47+
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
48+
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
49+
@@ -819,7 +819,7 @@ public class StateBuilder {
50+
throw new BundleException(message + " : " + NLS.bind(StateMsg.HEADER_PACKAGE_DUPLICATES, packageNames[j]), BundleException.MANIFEST_ERROR); //$NON-NLS-1$
51+
}
52+
// check for java.*
53+
- if (!jreBundle && packageNames[j].startsWith("java.")) { //$NON-NLS-1$
54+
+ if (false && !jreBundle && packageNames[j].startsWith("java.")) { //$NON-NLS-1$
55+
String message = NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, headerKey, elements[i].toString());
56+
throw new BundleException(message + " : " + NLS.bind(StateMsg.HEADER_PACKAGE_JAVA, packageNames[j]), BundleException.MANIFEST_ERROR); //$NON-NLS-1$
57+
}

platform/netbinox/external/binaries-list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
CB97D80CEDF7963313E1B1EADC0F1E49F62570DD org.eclipse.osgi_3.9.1.nb9.jar
17+
FAE5455278493B0125564195DB3F3B92F4169A6E https://doppel-helix.eu/org.eclipse.osgi_3.9.1.nb10.jar org.eclipse.osgi_3.9.1.nb10.jar

platform/netbinox/external/org.eclipse.osgi_3.9.1.v20140110-1610-license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: Equinox
22
Version: 3.9.1
33
Description: Eclipse OSGi container
44
License: OSGi
5-
Files: org.eclipse.osgi_3.9.1.nb9.jar
5+
Files: org.eclipse.osgi_3.9.1.nb10.jar
66
Origin: Eclipse
77
URL: http://www.eclipse.org/equinox/
88

platform/netbinox/external/rebuild-equinox.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@ BASE=`dirname $0`
2020
cd $BASE
2121
BASE=`pwd`
2222

23-
git clone https://git.eclipse.org/r/equinox/rt.equinox.framework
24-
cd rt.equinox.framework
23+
git clone https://github.com/eclipse-equinox/equinox.framework
24+
cd equinox.framework
2525
git checkout M20140115-0800
2626
git show M20140115-0800:bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java >Framework.java
27+
git show M20140115-0800:bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java >StateBuilder.java
2728
patch <../M20140115-0800.patch
2829
if ! [ -e org.eclipse.osgi-3.9.1.v20140110-1610.jar ]; then
2930
wget https://repo.eclipse.org/content/repositories/releases/org/eclipse/core/org.eclipse.osgi/3.9.1.v20140110-1610/org.eclipse.osgi-3.9.1.v20140110-1610.jar
3031
fi
3132
mkdir -p out
32-
javac -cp org.eclipse.osgi-3.9.1.v20140110-1610.jar Framework.java -d out || exit 1
33+
javac --release 17 -cp org.eclipse.osgi-3.9.1.v20140110-1610.jar Framework.java StateBuilder.java -d out || exit 1
3334
cd out
3435
zip -d ../org.eclipse.osgi-3.9.1.v20140110-1610.jar META-INF/ECLIPSE_.SF META-INF/ECLIPSE_.RSA
3536
zip -r ../org.eclipse.osgi-3.9.1.v20140110-1610.jar .
3637

3738
cd "$BASE"
38-
mv rt.equinox.framework/org.eclipse.osgi-3.9.1.v20140110-1610.jar org.eclipse.osgi_3.9.1.nb9.jar
39+
mv equinox.framework/org.eclipse.osgi-3.9.1.v20140110-1610.jar org.eclipse.osgi_3.9.1.nb10.jar

platform/netbinox/nbproject/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
is.autoload=true
19-
release.external/org.eclipse.osgi_3.9.1.nb9.jar=modules/ext/org.eclipse.osgi_3.9.1.nb9.jar
19+
release.external/org.eclipse.osgi_3.9.1.nb10.jar=modules/ext/org.eclipse.osgi_3.9.1.nb10.jar
2020
javac.release=17
2121

2222
javac.compilerargs=-Xlint -Xlint:-serial

platform/netbinox/nbproject/project.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
<package>org.eclipse.osgi.util</package>
128128
</public-packages>
129129
<class-path-extension>
130-
<runtime-relative-path>ext/org.eclipse.osgi_3.9.1.nb9.jar</runtime-relative-path>
131-
<binary-origin>external/org.eclipse.osgi_3.9.1.nb9.jar</binary-origin>
130+
<runtime-relative-path>ext/org.eclipse.osgi_3.9.1.nb10.jar</runtime-relative-path>
131+
<binary-origin>external/org.eclipse.osgi_3.9.1.nb10.jar</binary-origin>
132132
</class-path-extension>
133133
</data>
134134
</configuration>

0 commit comments

Comments
 (0)