Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332364 - Plugin signatures lost upon site.p2
Summary: Plugin signatures lost upon site.p2
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-11 12:13 EST by Thorsten Meinl CLA
Modified: 2019-02-25 14:39 EST (History)
1 user (show)

See Also:


Attachments
feature for building a p2 repository (573 bytes, text/xml)
2010-12-11 12:14 EST, Thorsten Meinl CLA
no flags Details
Patch for org.eclipse.buckminster.pde (8.09 KB, patch)
2010-12-15 16:36 EST, Thorsten Meinl CLA
no flags Details | Diff
Patch for org.eclipse.buckminster.pde (4.57 KB, patch)
2011-01-27 10:32 EST, Thorsten Meinl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Meinl CLA 2010-12-11 12:13:08 EST
Build Identifier: 3.6.1.M20100909-0800

If plugins from the target platform are included in an update site built via site.p2 sometimes the signing information is lost. This only affects plugins that reside in folder and not jarred plugins, e.g. org.apache.ant.

The problem lies in the "recreate.jar" task in org/eclipse/buckminster/pde/antscripts/build.xml that is used to re-jar plugins for the update site: the signature files are deliberately excluded.

Reproducible: Always

Steps to Reproduce:
1. Get the attached feature.xml
2. Invoke site.p2 on the feature to create a p2 repository
3. the org.apache.ant-plugin will be included in the repository by the signature files ECLIPSE.SF and ECLIPSE.RSA are missing although they exist in the plugin in the installation directory.
Comment 1 Thorsten Meinl CLA 2010-12-11 12:14:03 EST
Created attachment 185025 [details]
feature for building a p2 repository
Comment 2 Thorsten Meinl CLA 2010-12-11 12:14:55 EST
Sorry, forgot the Buckminster version again: org.eclipse.buckminster.pde_1.2.1.r11582
Comment 3 Thorsten Meinl CLA 2010-12-15 16:36:14 EST
Created attachment 185270 [details]
Patch for org.eclipse.buckminster.pde

I'm not sure if this patch is the most elegant way of solving the problem, but it works for me.
The patch adds an additional check for unpacked bundles: if they are part of the target platform they are recreated by a new ant tasks that includes all files in the corresponding directory and does *not* exclude the signature files. If the plugin is not part of the TP it is recreated by the "old" ant tasks that leaves out the signature files.
The check if a bundle is part of the TP may not be the most efficient way, but I didn't find another one.
Comment 4 Thomas Hallgren CLA 2011-01-24 05:39:08 EST
This patch seems to move a couple of methods which makes it hard to see what the actual difference is. It would be great if you could provide a patch where nothing is moved. I'd prefer if it was applicable to the helios-maintance branch.
Comment 5 Thorsten Meinl CLA 2011-01-27 10:32:52 EST
Created attachment 187736 [details]
Patch for org.eclipse.buckminster.pde

Sorry, the save action on the project has moved the method. Here is a patch with only the relevant lines.
Comment 6 Thorsten Meinl CLA 2011-01-27 10:35:15 EST
BTW, I discovered that the described problem not only affects plugin but merely *all* features from the target platform. They are all present as folders and upon packaging them for an update site, all signature files are deliberately removed. Unfortunately, looking the the corresponding code I could not find an as easy way as for the plugins to fix this problem. But maybe someone with a better understanding of the code and the internals can.
Comment 7 Thomas Hallgren CLA 2011-01-27 10:37:48 EST
(In reply to comment #5)
> Sorry, the save action on the project has moved the method.

This is due to a limitation in Eclipse. The Buckminster code assumes that you have a global workspace setting for member sort order. The expected order is public, protected, default, private. For some reason this setting cannot be applied per project. It's been reported but to my knowledge it hasn't been fixed yet.

> Here is a patch with only the relevant lines.

Thanks. I 'll have a look.