Skip to content

Enable loading of bundles importing java.-packages and update Bouncy Castle to fix jgit signing#9329

Merged
matthiasblaesing merged 2 commits intoapache:masterfrom
matthiasblaesing:bouncy_castle_update
Apr 12, 2026
Merged

Enable loading of bundles importing java.-packages and update Bouncy Castle to fix jgit signing#9329
matthiasblaesing merged 2 commits intoapache:masterfrom
matthiasblaesing:bouncy_castle_update

Conversation

@matthiasblaesing
Copy link
Copy Markdown
Contributor

@matthiasblaesing matthiasblaesing commented Apr 10, 2026

jgit signing requires bouncy castle libraries with a version higher equal to or higher than 1.79.

Recent versions of bouncy castle declare an import package:

Import-Package: java.io;resolution:=optional,java.lang;resolution:=optional,java.lang.ref;resolution:=optional,java.lang.reflect;resolution:=optional,java.math;resolution:=optional,java.net;resolution:=optional,java.nio;resolution:=optional,java.nio.channels;resolution:=optional,java.nio.charset;resolution:=optional,java.security;resolution:=optional,java.security.cert;resolution:=optional,java.security.interfaces;resolution:=optional,java.security.spec;resolution:=optional,java.sql;resolution:=optional,java.text;resolution:=optional,java.util;resolution:=optional,java.util.concurrent;resolution:=optional,java.util.concurrent.atomic;resolution:=optional,java.util.logging;resolution:=optional,java.util.zip;resolution:=optional,javax.crypto;resolution:=optional,javax.crypto.interfaces;resolution:=optional,javax.crypto.spec;resolution:=optional,javax.naming;resolution:=optional,javax.naming.directory;resolution:=optional,javax.security.auth;resolution:=optional,javax.security.auth.callback;resolution:=optional,javax.security.auth.x500;resolution:=optional

which is rejected by the NetBeans bundled equinox version. The validation provided by this version rejects alls java.* imports. This PR removes that check and updates bouncy castle to 18.3.

Closes: #8894
Closes: #8776

@matthiasblaesing matthiasblaesing added ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Apr 10, 2026
@matthiasblaesing matthiasblaesing marked this pull request as draft April 10, 2026 11:30
@mbien
Copy link
Copy Markdown
Member

mbien commented Apr 11, 2026

refreshed #8892 and temporarily added this PR to it to test everything together with jgit 7.4.

edit: smoke test worked, modules loaded + tested basic git workflow

@matthiasblaesing matthiasblaesing force-pushed the bouncy_castle_update branch 3 times, most recently from a254fe1 to 59c58a0 Compare April 12, 2026 09:33
@matthiasblaesing matthiasblaesing changed the title TEST Update Bouncy Castle + fix jgit signing Enable loading of bundles importing java.-packages and update Bouncy Castle to fix jgit signing Apr 12, 2026
@matthiasblaesing matthiasblaesing marked this pull request as ready for review April 12, 2026 16:53
@matthiasblaesing matthiasblaesing requested a review from mbien April 12, 2026 16:53
@mbien mbien added this to the NB30 milestone Apr 12, 2026
@mbien mbien added Upgrade Library Library (Dependency) Upgrade Platform [ci] enable platform tests (platform/*) labels Apr 12, 2026
Copy link
Copy Markdown
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good. Checked the dependency tree for the new versions and nothing changed there.

osgi.nb10 probably needs its final hosting location still

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.

Additionally the instructions for building the patched equinox version
were updated.

Closes: apache#8894
@matthiasblaesing
Copy link
Copy Markdown
Contributor Author

changes look good. Checked the dependency tree for the new versions and nothing changed there.

osgi.nb10 probably needs its final hosting location still

Valid point - I wanted to wait with moving to final hosting until this got some opinion apart from mine. Uploaded the artifact to osuosl and updated the corresponding commit.

@matthiasblaesing matthiasblaesing merged commit ad4ae12 into apache:master Apr 12, 2026
38 checks passed
@jherkel
Copy link
Copy Markdown
Contributor

jherkel commented Apr 13, 2026

@matthiasblaesing why does netbeans contain two different OSGI providers? From historical point of view I understood but is there any reason to have them both now?

@neilcsmith-net
Copy link
Copy Markdown
Member

Yes, while I have no issue with moving a quick fix for NB30, this got merged quite quickly, and there are two open questions here for me.

Firstly, are we still looking to remove this OSGi provider in the near future, as that was part of the reasoning behind the Mylyn removal?

Secondly, why are we still pushing stuff to OSUOSL when we're trying to move away from using it? Is that the only option here?

@mbien
Copy link
Copy Markdown
Member

mbien commented Apr 13, 2026

#9020 (comment)
was the last time I experimented with starting everything on one provider. If i remember correctly it started noticeably slower, I didn't do any measurements though (or searched for a cause) since that wasn't the goal - and there were other problems, see link.

Firstly, are we still looking to remove this OSGi provider in the near future, as that was part of the reasoning behind the Mylyn removal?

#9020 (comment)

Secondly, why are we still pushing stuff to OSUOSL when we're trying to move away from using it? Is that the only option here?

I think this is the pragmatic option. OSUOSL usage can be still reduced and ultimately removed but this is a slow / parallel process to other maintenance tasks.

@neilcsmith-net
Copy link
Copy Markdown
Member

Sure, pragmatism is fine, just checking short term fixes and long term plans don't conflict.

I also have a slight issue with us using OSUOSL for new patched binaries. This was not what it was intended to be for, which was hosting legacy things. I do understand it might not be feasible to move this elsewhere at this time, or at all? We do need to consider what is still on there that is not easily migrated to somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Platform [ci] enable platform tests (platform/*) Upgrade Library Library (Dependency) Upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module system can't load current bouncycastle release (OSGI) Netbeans cannot find git commit signing component

4 participants