eclipse-equinox / p2

Eclipse Public License 2.0
14 stars 41 forks source link

NPE at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.buildPGPTrustore #34

Closed Phillipus closed 2 years ago

Phillipus commented 2 years ago

Our RCP application is built using the following pom:

https://github.com/archimatetool/archi/blob/master/pom.xml

I have substituted the p2 URL with the url for ECLipse 4.24 M1:

https://download.eclipse.org/eclipse/updates/4.24-I-builds/I20220414-1800/

Now, when I build using mvn clean package -P product the product build fails with:

!SESSION 2022-04-15 10:48:15.185 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.13
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -eclipse.keyring C:\Users\PHILLI~1\AppData\Local\Temp\tycho9463308444736115507secure_storage
Command-line arguments:  -eclipse.keyring C:\Users\PHILLI~1\AppData\Local\Temp\tycho9463308444736115507secure_storage

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.185
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.modelimporter.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.203
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.modelimporter,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.204
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.reports.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.227
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.templates,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.240
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.opengroup.archimate.xmlexchange.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.311
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.316
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.hammer,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.317
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.reports,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.327
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.canvas,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.336
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.gef.feature,1.0.0.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.399
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.eclipse.feature,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.484
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.model,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.517
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.csv,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.541
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.browser,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.555
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jasperreports,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.575
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.gef,3.11.100.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.613
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.zest,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.619
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.draw2d,3.10.200.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.622
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jasperreports.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.672
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.zest.layouts,1.1.400.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.684
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.export.svg,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.741
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.help,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.760
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.zest.core,1.5.400.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.764
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.opengroup.archimate.xmlexchange,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.123
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.widgets,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.250
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.csv.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.326
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.editor.feature,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.368
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.launch.win32,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.548
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.themes,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.561
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.572
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.win32.win32.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.708
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jdom,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.809
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.gtk.linux.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.904
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.cocoa.macosx.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:17.013
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.cocoa.macosx.aarch64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.director 0 0 2022-04-15 10:48:19.935
!MESSAGE Overall install request is satisfiable
!SUBENTRY 1 org.eclipse.equinox.p2.director 0 0 2022-04-15 10:48:19.935
!MESSAGE Add request for Archi 4.9.3.202204150947 (com.archimatetool.editor.product 4.9.3.202204150947) is satisfiable

!ENTRY org.eclipse.equinox.p2.engine 4 4 2022-04-15 10:48:21.393
!MESSAGE An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-04-15 10:48:21.393
!MESSAGE session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-04-15 10:48:21.393
!MESSAGE NullPointerException
!STACK 0
java.lang.NullPointerException
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.buildPGPTrustore(CertificateChecker.java:292)
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(CertificateChecker.java:117)
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.start(CertificateChecker.java:73)
    at org.eclipse.equinox.internal.p2.engine.phases.CheckTrust.completePhase(CheckTrust.java:63)
    at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:254)
    at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:105)
    at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
    at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
    at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
    at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:46)
    at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:27)
    at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:772)
    at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:762)
    at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:743)
    at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1066)
    at org.eclipse.tycho.p2.tools.director.DirectorApplicationWrapper$DirectorApplicationWrapperCommand.execute(DirectorApplicationWrapper.java:47)
    at org.eclipse.tycho.plugins.p2.director.DirectorMojo.execute(DirectorMojo.java:153)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
merks commented 2 years ago

This NPE is fixed in Eclipse 4.23 but you need to use a Tycho version that uses 4.23. As such, you will need to use Tycho 2.7.1 or 3.0.0-SNAPSHOT. See the following changes in EPP's build to make this all work properly:

https://git.eclipse.org/c/epp/org.eclipse.epp.packages.git/commit/?id=67a031d913dcb0ae56534cf09549159eedd0c266

Please read the comment of the commit. When you've built your product, check in the about dialog that the jetty plugins indicate they are PGP signed, rather than appearing unsigned...

Phillipus commented 2 years ago

you will need to use Tycho 2.7.1

That did the trick!

check in the about dialog that the jetty plugins indicate they are PGP signed, rather than appearing unsigned...

The "Eclipse Jetty Project" plug-ins all say "unsigned" - is that a problem?

Ed, thanks ever so much for responding so quickly. :-)

Phil

Phillipus commented 2 years ago

I'm not sure if I understand this correctly.

In order for the Jetty plug-ins to be PGP signed I need to add the following to the configuration of tycho-p2-repository-plugin:

<includeAllDependencies>true</includeAllDependencies>

And the following to the configuration of tycho-p2-director-plugin:

<source>repository</source>

I've done that but they still show as Unsigned.

merks commented 2 years ago

The <source>repository</source> for the tycho-p2-director-plugin also important:

https://git.eclipse.org/c/epp/org.eclipse.epp.packages.git/tree/releng/org.eclipse.epp.config/parent/pom.xml?id=67a031d913dcb0ae56534cf09549159eedd0c266#n334

https://www.eclipse.org/tycho/sitedocs/tycho-p2/tycho-p2-director-plugin/materialize-products-mojo.html#source

That's because the target platform's artifact metadata doesn't contain the pgp keys but the repository does.

Phillipus commented 2 years ago

The <source>repository</source> for the tycho-p2-director-plugin also important:

I've added that and still no dice.

merks commented 2 years ago

There are many ways to do it wrong and get no complaints from Maven/Tycho. Using -X helps to see if it's configured properly. Is there somewhere I can have a look at what you've tried? Did you add it here:

https://github.com/archimatetool/archi/blob/f51cebe063d628d6f83154e9522be6c1c370eb9b/com.archimatetool.editor.product/pom.xml#L41

Phillipus commented 2 years ago

Is there somewhere I can have a look at what you've tried?

Thanks for your help.

I created a new branch: https://github.com/archimatetool/archi/tree/pom-test

Parent pom: https://github.com/archimatetool/archi/blob/pom-test/pom.xml Product pom: https://github.com/archimatetool/archi/blob/pom-test/com.archimatetool.editor.product/pom.xml

I can see that when this is run a com.archimatetool.editor.product/target/repository is created and inspecting the artifacts.xml file inside of artifacts.xml file the PGP sigs are there for Jetty. But the final products in com.archimatetool.editor.product/target/products/com.archimatetool.editor.product show as unsigned when run and the plug-in information is shown.

Phillipus commented 2 years ago

I don't think there's a problem with the pom.xml with the new additions.

The product generation generates an artifacts.xml file alongside the Archi.exe and Archi.ini files. And I can see the PGP sigs for Jetty inside of that. However, for some reason this information is not being picked up in the installation details list of plug-ins:

info

merks commented 2 years ago

The pom looks okay. The important property that's missing, apparently, is the pgp.publicKeys property. It should be present in the repository's artifacts.xml and in the final artifacts.xml of the product.

Tycho added a test for this:

https://github.com/eclipse/tycho/pull/826

Did you try running with -X to check that the configuration is properly interpreted (though, as I said, it looks okay).

I'm running short on time today, but I assume I could reproduce your problem locally if I cloned and checked out that branch?

merks commented 2 years ago

Oops, I didn't mean to close!

Phillipus commented 2 years ago

The pom looks okay. The important property that's missing, apparently, is the pgp.publicKeys property. It should be present in the repository's artifacts.xml and in the final artifacts.xml of the product.

Yes, those properties are there.

Did you try running with -X

Yes. I couldn't see anything unusual.

I'm running short on time today, but I assume I could reproduce your problem locally if I cloned and checked out that branch?

Yes, thanks for helping. You'll need to build with this:

mvn clean package -P product

And the products should appear in:

com.archimatetool.editor.product\target\products\com.archimatetool.editor.product

On Windows you can run the Archi.exe file and then go to Help -> About Archi -> Installation Details to see the Plug-in details as in the screenshot above.

Oops, I didn't mean to close!

I do that all the time. The "Close with comment" button is too big. :-)

Phillipus commented 2 years ago

I do that all the time. The "Close with comment" button is too big. :-)

And guess what? I just did exactly that. D'oh!

merks commented 2 years ago

I must run now, but when I check out and switch to your branch, it doesn't have the changes to use 2.7.1 and the 4.24 repository:

merks@CORE MINGW64 ~/archi/archi
$git status
On branch pom-test

Perhaps you missed a step?

I'll be back tomorrow.

Phillipus commented 2 years ago

I see them here: https://github.com/archimatetool/archi/tree/pom-test

Parent pom: https://github.com/archimatetool/archi/blob/pom-test/pom.xml Product pom: https://github.com/archimatetool/archi/blob/pom-test/com.archimatetool.editor.product/pom.xml

merks commented 2 years ago

Turns out I have 15 more minutes. I was using the command line so I'm a bit clueless. Switching to use EGit has helped. Building again...

Phillipus commented 2 years ago

You might want to edit Archi.ini if you don't want it to write stuff to your home folder. And maybe remove the -cleanConfig line to make it behave like a standard Eclipse app.

merks commented 2 years ago

I see the right things in the product's artifacts.xml:

    <artifact classifier='osgi.bundle' id='org.eclipse.jetty.security' version='10.0.9'>
      <properties size='3'>
        <property name='pgp.signatures' value='-----BEGIN PGP SIGNATURE-----&#xA;Version: GnuPG v2.0.22 (GNU/Linux)&#xA;&#xA;iQIcBAABAgAGBQJiWKryAAoJEHAOTzm8BTZLXt8P/iyw9A272QMmi71I+DjmFPqe&#xA;+6TtHRVQYmDBDZtmyAyFweO6qx6+MjlR4hzSydaRWVPvmSsmKfNWGB5iJN5AAF5Q&#xA;6sfsRomWT64+3h7qfQrnJj0kqDvTkhhIP3u/A2qYeDZ/FhfSYbcNGRQuUVI1r68F&#xA;rw6IhIbTceB8DYWTTxbTLjyJkKNS45ssPWg7MazBxoR1rdd+AmSHw/4EE7zuGLYl&#xA;OY+UtJlKNO6GYxcaYC29v7uZIjn0WztKhqEDtxCzUsLnD22jdmcb3PkLbwz2wj8q&#xA;DX9OUsD2UpA4H2BPiOoCnsYYBv3WWkbM4911jx0Wi8Bkvn+B3KuIEJQTabFeZH/y&#xA;HZEdxrxFucAxT/cnI5jqDrcFovWes24EOIv8ksN1K/ldUy+5PI+0ab+nhsJ2BBUs&#xA;EQ6Jl7wTQwX7FSokuibReo7Uc2PNzYcGte2X2JBUZQRhXveRvQ981IuTgX5im2jS&#xA;BSKVv8lsgEOfpkCyy/MyJaTfFovrkVz9q7xq2qHuF9NcTnZbzXAOu0bQXCy13SlF&#xA;EawRUAGzdMH18vIO4txFwPppyBADIlr3AbTVXAOHkI4VG6ZJA4rtjWBCid3Qu8BL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ja+wM/7w3JC1aIwMYJn1yF2ykUYS+BoTCU7TA8r43pHg4I4Fz+Y2P5RLk+RJ&#xD;&#xA;I4kJezDNiJOpIcr/nKTPxMGUzMtWlGyAJ7LkyOZCtQXhtXwaT8grjtHzlwlGrpgD&#xD;&#xA;Rtf7wWjzEWeaQSegTFM9Mid+09kCp0PkJvveg8wJCuoVboNOto0O5rQsUczjXxiW&#xD;&#xA;kXYlHGeQL4rWc1zP7F1n4DEwDbVZC7jOn/80l3x4LcKuhc86gP4L5HKbdjn5GcQ0&#xD;&#xA;3RVLl1WVTQCdpr0+am28hl9XpyHdlWwSEmqqoUnjGv5B8RClocBRS4ECPPZCVSBl&#xD;&#xA;yK8eDgRww9Fu1EFq4xkq5fGj4YUOAIm756iW41NQ3VnPYbom/J27iFFN8+h92CSb&#xD;&#xA;KAqhmRwQh+GGo0eGCXmPHyQ/KCHTvnTZCFBUvabm3rVNFaDO+RvmwPwNCRz0DYzG&#xD;&#xA;paeMOGo4nMMGbzdhgfJ/X5Ed1/Mqz8egHhGIO94ebKEN5ZtJjAOK&#xD;&#xA;=xtSl&#xD;&#xA;-----END PGP MESSAGE-----&#xD;&#xA;'/>
        <property name='download.size' value='121474'/>
      </properties>
    </artifact>

So the build is good.

I suspect there is something not installed needed to show the PGP stuff because your about dialog is missing many tabs...

merks commented 2 years ago

The changes to make this work in the about dialog were done in this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=578166

The class org.eclipse.equinox.internal.p2.ui.KeySigningInfoFactory contributes an adapter that is used by the platform to show the PGP signing details. You don't have the org.eclipse.equinox.p2.ui plugin installed so that adapter isn't available.

Phillipus commented 2 years ago

I suspect there is something not installed needed to show the PGP stuff because your about dialog is missing many tabs...

Could be. But maybe this is a peculiarity of RCP apps, as XMind also shows only those two tabs:

xmind

merks commented 2 years ago

Note that the reason this strangeness is that the normal jar signing is implemented by Equinox and these parts of the platform depend on Equinox for that explicitly But the PGP signing support comes from p2 and this part of the platform framework doesn't know about p2; that's why it was done using an adapter...

Phillipus commented 2 years ago

You don't have the org.eclipse.equinox.p2.ui plugin installed so that adapter isn't available.

I added org.eclipse.equinox.p2.ui to my com.archimatetool.eclipse.feature and re-built. but still no signing info. Maybe another plug-in is needed?

merks commented 2 years ago

Add it to the branch and I'll check tomorrow.

Phillipus commented 2 years ago

Found it. It needs the org.eclipse.equinox.p2.ui.sdk plug-in.

With this plug-in added to my com.archimatetool.eclipse.feature the signing info for the Jetty plug-ins is shown. And two other tabs are also shown in the dialog, "Installed Software" and "Installation History":

signed

Unfortunately, there is a side-effect. Because of the dependency on org.eclipse.equinox.security.ui a new preference tab appears in Archi's preferences:

security_prefs

As Archi doesn't use any of the security features provided by this plug-in it doesn't ship it, and if users saw this Preference they might wonder what this is for.

So I think I'll just leave things as they are regarding the display of signing info in the dialog. I will keep the changes to the poms though.

merks commented 2 years ago

Note that that a user doing an update from within password protected proxy would be prompted for a password.

Also note that it's possible to mostly hide the contributions from any plugin:

https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_advext_activities.htm https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_activities.html

Most concerning to me though is that this class is also in org.eclipse.equinox.p2.ui:

org.eclipse.equinox.internal.p2.ui.ValidationDialogServiceUI

Without that the user cannot be prompted to approve trust for certificates or PGP keys, so I'm not sure how updates will generally work without that...

I'll close because the NPE is fixed and everything can be made to work.

Phillipus commented 2 years ago

Ed, thanks a lot for your help on this one. As you say, the NPE is fixed and I now know how to show the signing info if needed by adding the extra plug-in.

Just to say that because Archi is an RCP app with a sub-set of Eclipse features most end users aren't even aware of, or care about, things like equinox, p2, proxies, or even Eclipse or Java for that matter. Archi doesn't expose p2 update sites to end users so no passwords, etc are needed.

I'll take a look at the links to Activities to hide contributions, thanks for that.