Signing jars with Buckminster [message #385136] |
Thu, 07 May 2009 21:31  |
Eclipse User |
|
|
|
One more thing remains on the odyssey - getting the jars on the p2
site signed, in this case by the Eclipse jarsigner.
I use an ant task, setting the signer name and password
on the command line (btw be careful here - the password
you supply appears in the logs). Signing-related settings
are highlighted with ****.
<target name="signed.site" depends="buckminster.setup.preferences">
<echo message=".... building ${project.name} p2 repository"/>
<buckminster command="org.eclipse.buckminster.core.import">
<args>
<arg value="${project.cquery.file}"/>
</args>
</buckminster>
<buckminster command="org.eclipse.buckminster.core.perform">
<args>
<arg
value=" -Dbuckminster.output.root=${base.directory}/${project.name}. site "/>
<arg value="-Dsite.pack200=true"/>
<arg value="-Dcbi.include.source=false"/>
**** <arg value="-Dsite.signing=true"/>
**** <arg value="-Dsigning.type=eclipse.remote"/>
**** <arg value="-Declipse.committer.name=${signer}"/>
**** <arg value="-Declipse.committer.password=${pwd}"/>
<arg value="${project.toplevel.feature}#site.p2.zip"/>
</args>
</buckminster>
<echo>
${project.name} p2 repository is available in
${base.directory}/${project.name}.site
</echo>
</target>
When I run this target on the build.eclipse.org infrastructure, there's
some kind of connectivity issue that generates an exception during
the repack command:
[start
org.eclipse.stp.toplevel.feature:eclipse.feature$2.0.0.20090 5070221#OSGi#site.repacked]
.
.
[java] org.eclipse.core.runtime.CoreException:
/shared/stp/builds/05may09/3.5M7/stp/b5/stp.site/org.eclipse .stp.toplevel.feature_2.0.0-eclipse.feature/site/features/or g.eclipse.stp.sca.feature.tuscany_2.0.0.200905072127.jar
[java] at
org.eclipse.buckminster.runtime.BuckminsterException.fromMes sage(BuckminsterException.java:64)
[java] at
org.eclipse.buckminster.jarprocessor.ProducerThread.drain(Pr oducerThread.java:73)
[java] at
org.eclipse.buckminster.jarprocessor.RecursiveConditioner.ne stedConditioning(RecursiveConditioner.java:147)
[java] at
org.eclipse.buckminster.jarprocessor.RecursiveConditioner.co ndition(RecursiveConditioner.java:58)
[java] at
org.eclipse.buckminster.jarprocessor.JarProcessorActor.repac kJars(JarProcessorActor.java:141)
[java] at
org.eclipse.buckminster.jarprocessor.JarProcessorActor.repac kJars(JarProcessorActor.java:134)
[java] at
org.eclipse.buckminster.jarprocessor.JarProcessorActor.inter nalPerform(JarProcessorActor.java:84)
[stack elided here]
This exception is caused by an IOException thrown by a PipedInputStream:
[java] Caused by: java.io.IOException: Read end dead
[java] at
java.io.PipedInputStream.checkStateForReceive(PipedInputStre am.java:214)
[java] at java.io.PipedInputStream.receive(PipedInputStream.java:155)
[java] at java.io.PipedOutputStream.write(PipedOutputStream.java:120)
[java] at
java.util.zip.ZipOutputStream.writeInt(ZipOutputStream.java: 455)
[java] at
java.util.zip.ZipOutputStream.writeCEN(ZipOutputStream.java: 390)
[java] at
java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:32 2)
I'm wondering if I am taking the right approach to signing here - perhaps
there's
an issue there which is resulting in this exception? Maybe I should be
doing a
local sign when building on b.e.o?
cheers
--oh
|
|
|
|
|
Re: Signing jars with Buckminster [SOLUTION] [message #385139 is a reply to message #385138] |
Fri, 08 May 2009 09:51  |
Eclipse User |
|
|
|
I've picked up r10281 and yes, indeed this issue is fixed - thanks!
Here's the final ant command that I used to get this to work. Note
the -Dstaging.area=/home/data/httpd/download-staging.priv.stp
definition - this will default to the buckminster signing directory,
which of course I don't have privs to use.
<target name="signed.site"
depends="buckminster.setup.preferences">
<echo message=".... building ${project.name} p2 repository"/>
<buckminster command="org.eclipse.buckminster.core.import">
<args>
<arg value="${project.cquery.file}"/>
</args>
</buckminster>
<buckminster command="org.eclipse.buckminster.core.perform">
<args>
<arg
value=" -Dbuckminster.output.root=${base.directory}/${project.name}. site "/>
<arg value="-Dsite.pack200=true"/>
<arg value="-Dcbi.include.source=false"/>
<arg value="-Dsite.signing=true"/>
**** <arg
value="-Dstaging.area=/home/data/httpd/download-staging.priv/stp "/>
<arg value="-Dsigning.type=eclipse.remote"/>
<arg value="-Declipse.committer.name=${signer}"/>
<arg value="-Declipse.committer.password=${pwd}"/>
<arg value="${project.toplevel.feature}#site.p2.zip"/>
</args>
</buckminster>
<echo>
${project.name} p2 repository is available in
${base.directory}/${project.name}.site
</echo>
</target>
The STP build, pack, sign, p2ize process is now just a matter
of issuing a command
ant -Dbase.directory=... -Dsigner=... -Dpwd=... signed.site
and that's it :) Now I just have to get the categories right!
Thanks for all the help, Thomas.
cheers
--oh
|
|
|
Powered by
FUDForum. Page generated in 0.05290 seconds