[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] generator and download.md5 for packed files

"download.md5" does capture the md5 of the bytes being downloaded.


Inactive hide details for Henrich Kraemer ---04/06/2009 06:29:29 PM---Yes, I would think the download.md5 should capture the mdHenrich Kraemer ---04/06/2009 06:29:29 PM---Yes, I would think the download.md5 should capture the md5 of the bytes as downloaded (before any pr


From:

Henrich Kraemer <henrich.kraemer@xxxxxxxxxx>

To:

P2 developer discussions <p2-dev@xxxxxxxxxxx>

Date:

04/06/2009 06:29 PM

Subject:

Re: [p2-dev] generator and download.md5 for packed files




Yes, I would think the download.md5 should capture the md5 of the bytes as downloaded (before any processing steps are applied).

- Henrich

Inactive hide details for Andrew Niefer <aniefer@xxxxxxxxxx>Andrew Niefer <aniefer@xxxxxxxxxx>

                  Andrew Niefer <aniefer@xxxxxxxxxx>
                  Sent by: p2-dev-bounces@xxxxxxxxxxx

                  04/06/2009 03:19 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>
To

P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc
Subject

Re: [p2-dev] generator and download.md5 for packed files


I don't know if there is any particular reason for not setting an MD5, it could just be an oversite. None of the places (publisher, repo tools) that do pack.gz set MD5 properties for them.

The only question would be the use of the MD5 at runtime. Is it checked against the raw artifact before processing steps are applied?



Note there is a new ant task in M6:

<p2.process.artifacts repositoryPath="file:/build/repo" />


It will update the artifact repository with new MD5s for the jars and add pack.gz descriptors (but doesn't add MD5s for the pack.gz files).

It also takes an optional pack="true" attribute that will call the jarprocessor to pack the jars first, and it takes a nested <sign> element to sign the jars as well. PDE/Build uses this if you are building using the publisher.


-Andrew


Henrich Kraemer <henrich.kraemer@xxxxxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

04/06/2009 05:41 PM


Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>
To
p2-dev@xxxxxxxxxxx
cc
Subject
[p2-dev] generator and download.md5 for packed files




>From a directory containing features and plugins, I am using Jar Processor to pack the plugins.

Then I would like to make a P2 repository out of this. I only need an artifact repository here. My code invokes org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication with the following arguments:
-publishArtifactRepository
-compress
-inplace
-reusePack200Files
-artifactRepository
file:/C:/p2test/input_artifacts/
-metadataRepository
file:/C:/p2test/input_artifacts/
-source
C:\p2test\input_artifacts

The output of artifacts.jar (see excerpt below) looks good except that I am surprised that the packed files do not have a download.md5 property. I would really want to have this property to enable integrity check the associated downloads. Should this be considered a bug? Is there a work-around?

Another aspect - probably benign - but surprising to me was that I had to specify a -metadataRepository argument for the task to generate <artifact elements> inside artifacts.jar. Is this expected?

Thanks,

Henrich

<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<repository name='file:/C:/p2test/ - artifacts' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
<properties size='3'>
<property name='p2.compressed' value='true'/>
<property name='publishPackFilesAsSiblings' value='true'/>
<property name='p2.timestamp' value='1239051805364'/>
</properties>
<mappings size='4'>
<rule filter='(&amp; (classifier=osgi.bundle) (format=packed))' output='${repoUrl}/plugins/${id}_${version}.jar.pack.gz'/>
<rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
<rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
<rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
</mappings>
<artifacts size='5'>
...
<artifact classifier='osgi.bundle' id='com.ibm.cic.common.core.p2.tests.util.P2RepoCreateHelper.exploded' version='1.0.0'>
<properties size='4'>
<property name='artifact.size' value='5558'/>
<property name='download.size' value='5558'/>
<property name='download.md5' value='703aff78437858a8990bf0284a7b3051'/>
<property name='download.contentType' value='application/zip'/>
</properties>
</artifact>
...
<artifact classifier='osgi.bundle' id='com.ibm.cic.common.core.p2.tests.util.P2RepoCreateHelper.exploded' version='1.0.0'>
<processing size='1'>
<step id='org.eclipse.equinox.p2.processing.Pack200Unpacker' required='true'/>
</processing>
<properties size='3'>
<property name='artifact.size' value='5558'/>
<property name='download.size' value='3242'/>
<property name='format' value='packed'/>
</properties>
</artifact>
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/p2-dev
[attachment "pic00603.gif" deleted by Pascal Rapicault/Ottawa/IBM]
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


GIF image

GIF image

GIF image

GIF image