Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Questions on p2.director
Questions on p2.director [message #120760] Thu, 06 November 2008 10:33 Go to next message
No real name is currently offline No real name
Messages: 10
Registered: July 2009
Junior Member
Hi,

I have a couple questions on p2.director. I'm doing headless build on
linux. When I run p2.director as the last step to make a p2-enabled
archive, it tries to access eclipse.org. Since I just built my sources, I
just want it to retrieve what was built from another directory. How do I
make it to only look in a certain directory locally for what it needs?

Also, I'm getting some errors unzipping jar files due to invalid zip file
format during the run. Here is a sample snippet.

!MESSAGE Error closing the output stream for org.junit4/osgi.bundle/4.3.1
on repository
file:/home/ctbuilds/Eclipse_Builds_new/eclipse_build/fsl.ecl ipse/eclipse_p2/.
!STACK 0
java.io.IOException: Error unzipping /tmp/org.junit4_4.3.130706.jar:
Invalid zip file format
at
org.eclipse.equinox.internal.p2.core.helpers.FileUtils.unzip File(FileUtils.java:31)
at
org.eclipse.equinox.internal.p2.artifact.repository.simple.S impleArtifactRepository$ZippedFolderOutputStream.close(Simpl eArtifactRepository.java:146)
at java.io.FilterOutputStream.close(FilterOutputStream.java:143 )


Here is what I did to build:
1. I added the following into buildConfigs/sdk/build.properties

product=${buildDirectory}/sdk.product
generate.p2.metadata=true
p2.metadata.repo = file:${buildDirectory}/repo
p2.artifact.repo = file:${buildDirectory}/repo
p2.flavor = tooling
p2.publish.artifacts=true
generateVersionsList=true

2. copied buildConfigs/sdk/packager/sdk.product into buildDirectory and
modified @qualifier@ to "Test_Build". I also modified the postFetch step
in sdk's customTarger.xml so it doesn't use timestamp as qualifier for sdk
and platform archives. I'm not sure why it was set that way to begin with.

3. build. I use build.xml in eclipsebuilder. This generated the repo/*.xml
files and the simpleconfigurator directory under eclipse/configuration.

4. unzip the built archive to use as builder. run p2.director as follows.
eclipse_p2 is the new directory for the result.

../../../sun_java/j2sdk1.4.2_14/jre/bin/java
-Declipse.p2.data.area=./eclipse_p2/p2 -jar
/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.Test_B uild.jar
-data workspace -application
org.eclipse.equinox.p2.director.app.application -flavor tooling
-metadataRepository file:../repo -artifactRepository file:../repo
-installIU org.eclipse.sdk.ide -p2.os linux -p2.ws gtk -p2.arch x86
-profile SDKProfile -profileProperties
org.eclipse.update.install.features=true -destination ./eclipse_p2
-bundlepool ./eclipse_p2 -consoleLog -roaming

Is there something wrong with this process that caused p2.director to fail?

Thanks for any pointers.

Have a great day,
Eirene
Re: Questions on p2.director [message #120859 is a reply to message #120760] Thu, 06 November 2008 23:07 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 10
Registered: July 2009
Junior Member
Hi,

I managed to get past the first part of my problems about trying to access
eclipse.org. Then I realized that most of the unzip failures were caused
by trying to unzip a folder. The artifacts.xml file somehow specified
those as application/zip while they're actually folders in my layout. Can
someone tell me where the info is generated from and what I could do to
correct it one way or another?

thanks,
Eirene
Re: Questions on p2.director [message #120879 is a reply to message #120859] Fri, 07 November 2008 11:39 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew Niefer
Messages: 990
Registered: July 2009
Senior Member
I don't think that the artifact repository supports folder shaped
artifacts. Everything in the artifact repo should be a jar. It will be
automatically unzipped into folder shape as appropriate at install time
according to the metadata. (via a zipped instruction on the IU).

-Andrew

Eirene wrote:
>
> Hi,
>
> I managed to get past the first part of my problems about trying to
> access eclipse.org. Then I realized that most of the unzip failures were
> caused by trying to unzip a folder. The artifacts.xml file somehow
> specified those as application/zip while they're actually folders in my
> layout. Can someone tell me where the info is generated from and what I
> could do to correct it one way or another?
>
> thanks,
> Eirene
>
Re: Questions on p2.director [message #120897 is a reply to message #120879] Fri, 07 November 2008 17:40 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 10
Registered: July 2009
Junior Member
As it turned out, the cause of the last problem was that I had an extra
space at the end of the line of p2.publish.artifacts=true so it wasn't set
up right to begin with.

After rebuilding it, I manually removed the references to
download.eclipse.org from content.xml. it still tried to access it though.
How do I prevent the references from even been generated?

I also got these errors that are similar. I searched the error message on
google and didn't turn up much.

!ENTRY org.eclipse.equinox.p2.engine 4 4 2008-11-07 16:16:22.327
!MESSAGE An error occurred while collecting items to be installed
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2008-11-07
16:16:22.327
!MESSAGE Problems downloading artifact:
osgi.bundle,org.apache.ant,1.7.0.v200803061910.
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 0 0 2008-11-07
16:16:22.328
!MESSAGE OK
!SUBENTRY 2 org.eclipse.core.runtime 0 0 2008-11-07 16:16:22.328
!MESSAGE OK
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2008-11-07
16:16:22.329
!MESSAGE Error reading signed content: /tmp/signatureFile44350.jar
!STACK 0
java.security.SignatureException: The signature cannot be verified for the
signer "META-INF/ECLIPSE.RSA" in this jar: /tmp/signatureFile44350.jar
at
org.eclipse.osgi.internal.signedcontent.PKCS7Processor.verif ySFSignature(PKCS7Processor.java:399)
..
..
..
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2008-11-07
16:16:22.332
!MESSAGE Problems downloading artifact:
osgi.bundle,org.junit,3.8.2.v20080602-1318.
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 0 0 2008-11-07
16:16:22.332
!MESSAGE OK
!SUBENTRY 2 org.eclipse.core.runtime 0 0 2008-11-07 16:16:22.333
!MESSAGE OK
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2008-11-07
16:16:22.333
!MESSAGE Error reading signed content: /tmp/signatureFile44695.jar
!STACK 0
java.security.SignatureException: The signature cannot be verified for the
signer "META-INF/ECLIPSE.RSA" in this jar: /tmp/signatureFile44695.jar


Any pointer is appreciated!

Thanks,
Eirene
Re: Questions on p2.director [message #120986 is a reply to message #120897] Mon, 10 November 2008 13:55 Go to previous message
No real name is currently offline No real name
Messages: 10
Registered: July 2009
Junior Member
Hi,

I'm really bummed about p2-izing a build. It can't be this difficult! I'm
only trying to build the 3.4.1 sources!

I started my build from scratch to get a clean start. The sources were
checked out of eclipse cvs (R3_4_1 tag) and put into our repository to be
checked out from there during my build. I updated maps files for the new
location.

I built the sdk component with build.xml in eclipsebuilder. No
modifications to build.properties or anything.

After it's done I untar the archive and ran the following command line to
generate p2 metadata

../../../sun_java/j2sdk1.4.2_14/jre/bin/java -jar
/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.Test_B uild.jar
-data workspace -application
org.eclipse.equinox.p2.metadata.generator.EclipseGenerator -flavor tooling
-metadataRepository "file:../repo" -artifactRepository "file:../repo"
-root "Eclipse SDK" -rootVersion 3.4.1 -source ./eclipse -append
-publishArtifacts -publishArtifactRepository

Then ran the following for p2 director

../../../sun_java/j2sdk1.4.2_14/jre/bin/java
-Declipse.p2.data.area=./eclipse_p2/p2 -jar
/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.Test_B uild.jar
-data workspace -application
org.eclipse.equinox.p2.director.app.application -flavor tooling
-metadataRepository file:../repo -artifactRepository file:../repo
-installIU "Eclipse SDK" -version 3.4.1 -p2.os linux -p2.ws gtk -p2.arch
x86 -profile SDKProfile -profileProperties
org.eclipse.update.install.features=true -destination ./eclipse_p2
-bundlepool ./eclipse_p2 -consoleLog -roaming

In the eclipse_p2 folder, I got features, p2, and plugins folders but no
eclipse.exe or any other files that should be at that level. Also got the
verifying signature error I mentioned in the previous post.

Can someone tell me what's missing in my steps? Am I supposed to modify
something in the eclipse sources to have more info generated? I assumed
the sources were already set up properly to have everything needed for the
metadata generator and p2 director.

thanks,
Eirene
Previous Topic:accessing to EJB3-beans on JBoss
Next Topic:p2 (provisional) API questions
Goto Forum:
  


Current Time: Thu Jul 31 22:00:57 EDT 2014

Powered by FUDForum. Page generated in 0.02575 seconds