Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Signing jars with Buckminster
Signing jars with Buckminster [message #385136] Fri, 08 May 2009 01:31 Go to next message
Oisin Hurley is currently offline Oisin HurleyFriend
Messages: 204
Registered: July 2009
Senior Member
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 [message #385137 is a reply to message #385136] Fri, 08 May 2009 05:56 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Oisin,
There's nothing wrong with your approach. This must be timing related and happen on specific files only (I build and
sign all of Buckminster without problems) Can you please give me the steps to run your build locally?

Thanks,
Thomas Hallgren


Oisin Hurley wrote:
> 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 [message #385138 is a reply to message #385137] Fri, 08 May 2009 07:14 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Problem solved!
It was a mistake regarding reader thread that only revealed itself when using a smaller buffer and that's exactly what
happened when I went from the Java 6 specific PipeInputStream(int) constructor to the Java 5 default constructor.

New upload is in progress.

- thomas


Thomas Hallgren wrote:
> Hi Oisin,
> There's nothing wrong with your approach. This must be timing related
> and happen on specific files only (I build and sign all of Buckminster
> without problems) Can you please give me the steps to run your build
> locally?
>
> Thanks,
> Thomas Hallgren
>
>
> Oisin Hurley wrote:
>> 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 13:51 Go to previous message
Oisin Hurley is currently offline Oisin HurleyFriend
Messages: 204
Registered: July 2009
Senior Member
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
Previous Topic:Plug-in org.eclipse.buckminster.jarprocessor was unable to load class org.eclips
Next Topic:Unable to materialize query with last buckminster headless version
Goto Forum:
  


Current Time: Thu Sep 26 10:42:41 GMT 2024

Powered by FUDForum. Page generated in 0.04343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top