| Summary: | Target installer reports MD5 mismatch | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ralf Sternberg <rsternberg> |
| Component: | Releng | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | beyhan.veliev |
| Version: | 1.4 | ||
| Target Milestone: | 1.5 M2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 330297 | ||
| Bug Blocks: | |||
|
Description
Ralf Sternberg
It seems that the bundle "org.eclipse.equinox.http.registry" is corrupted in our target repository. Did we changed something in this bundle? I checked the repository and found that the md5 hash of the bundle is in fact 19...f8. The artifacts.jar also contains this hash. This means that the repository is not broken, but p2 expects a different hash.
rsternber@dev2:~/download/1.4/runtime/RC2/plugins> md5sum org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
19ecfce1cac5eea477d404688083fef8 org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
rsternber@dev2:~/download/1.4/runtime/RC2> zless artifacts.jar
...
<artifact classifier='osgi.bundle' id='org.eclipse.equinox.http.registry' version='1.1.100.v20110502'>
<properties size='3'>
<property name='artifact.size' value='43998'/>
<property name='download.size' value='43998'/>
<property name='download.md5' value='19ecfce1cac5eea477d404688083fef8'/>
</properties>
</artifact>
...
I found the expected checksum in the artifacts.jar of the RC1 runtime.
...
<artifact classifier='osgi.bundle' id='org.eclipse.equinox.http.registry' version='1.1.100.v20110502'>
<properties size='3'>
<property name='artifact.size' value='43998'/>
<property name='download.size' value='43998'/>
<property name='download.md5' value='03d541989acab427b324990d9d551e67'/>
</properties>
</artifact>
...
So the problem seems to be related to the fact that we re-sign bundles that have not changed. Signing always leads to a new checksum. The bundles from the base platform have yet another checksum, but it does not change:
rsternber@build:/shared/rt/rap/base-platforms/eclipse-3.7RC1/plugins> md5sum org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
d46acfe18868e4928e0c09a2c2f4eedc org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
rsternber@build:/shared/rt/rap/base-platforms/eclipse-3.7RC2/plugins> md5sum org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
d46acfe18868e4928e0c09a2c2f4eedc org.eclipse.equinox.http.registry_1.1.100.v20110502.jar
(In reply to comment #3) I analyzed the p2 logic to check the MD5 checksum of a bundle in 3.6 SR2 and 3.7 RC2. The problem described in this bug can happen when the artifact (org.eclipse.equinox.http.registry) has been downloaded from http://download.eclipse.org/rt/rap/1.4/runtime/RC2 and the metadata of repository http://download.eclipse.org/rt/rap/1.4/runtime/RC1 has been used to verify the md5 checksum. This problem can't happen in 3.6 SR2 and 3.7 RC2 because the metadata of the repository from where the bundle has been downloaded is used to verify the MD5 checksum. I also couldn't success to reproduce it with tests and didn't find any p2 bugs for this. In RAP 1.4, our build re-compiled bundles from the platform in the pack200 stage. This could lead to different artifacts with same id and version. These duplicates must have provoked this checksum error. This cannot happen with RAP 1.5 anymore, since the new runtime build now only compiles bundles produced by RAP. Platform bundles for the target requirements feature are only copied from the platform repository. |