Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Need help with pack200


Hi Andrew,

Thank you for your reply.  Your suggestion of unzipping the files and only condition the jar files in the zip file really worked.   I have successfully created a conditioned (repacked) zip files with proper file permissions. The idea is not to let the pack200 program touch files other than jar files or class files.  However, if I pack the feature and plugin jar files when I prepare the update site, and users download the plugins through the updater, which unpacks the jar files, the execute permissions of files in the plugins will still be lost.  The change of file permissions seems to be a limitation of pack200.

As for the error returned when repacking the org.eclipse.tptp.platform.examples.isv plugin, I couldn't get more detailed error messages.  I am now excluding that plugin from the repack process.  


You can see our build scripts at dev.eclipse.org:/home/tptp, under module platform/org.eclipse.hyades.releng.builder.  
Files related to pack200 include /org.eclipse.hyades.releng.builder/master/runtime/customTargets.xml and /org.eclipse.hyades.releng.builder/master/bash/pack200.sh


Thanks again for your helpful input!
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382



Andrew Niefer/Ottawa/IBM@IBMCA
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx

06/12/2006 03:12 PM

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
cc
Subject
Re: [cross-project-issues-dev] Need help with pack200






Hubert,

If you are talking about the permissions on files in the zip (as opposed to permissions on files inside jars), then one workaround would be to extract the zip to a temporary directory and run the jarprocessor on the directory instead of on the zip, then rezip the directory.  I don't see how there should be any difference between postAssemble and postPackage as far as permissions go so this is a bit of a mystery.


The return code of 1 is what was returned from pack200.exe, I have not been able to find any documention on it either.  I would suggest manually running the command that failed and see if pack200 wrote any error message to the screen that may be helpful.  Although it might be hard to stop the processor before it deletes that temporary file.  You could also run the command manually on org.eclipse.tptp.platform.examples.isv.  I wouldn't think that any nested examples plugins should make a difference.


Are your releng scripts in CVS that I can get them to try and debug this a bit?


-Andrew


Hubert H Leung/Toronto/IBM@IBMCA
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx

06/11/2006 05:54 PM

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
cc
Subject
[cross-project-issues-dev] Need help with pack200








I face two problems with pack200 when trying to compress the packages for TPTP.  If someone has a similar experience but has a solution, please help me out.  Please also let me know if you think I'm doing something wrong.


The first problem is about file permissions.  From the documentation of pack200, you can find this quote: "By default, the packer does not change the order of JAR elements. Also, the modification time and deflation hint of each JAR element is passed unchanged. (Any other ZIP-archive information, such as extra attributes giving Unix file permissions, are lost.)"


I learned about this limitation the hard way.  I condition the jar files (at least for TPTP) in the postAssemble step of the PDE build, after PDE creates all the feature zip files, but before we slice and dice the features into zipfiles for download.  Since the same feature can end up in more than one package (such as runtime, sdk, etc.), doing the conditioning before the packaging step can avoid conditioning the same jar file several times.  However, if I do this, the file mode of all files and directories in the final zip files become 000.  That is, all read, write and execute permissions are gone.  I noticed WTP does the conditioning in the postPackage step, which is equivalent to doing the conditioning on the final zip files.  I tried that too, and the result was that the read and write permissions flags are set, but all execute flags are lost.  There are some operating system specific files which I took special care to make sure the execute permission is set, but that's gone after pack200.  



The second problem I found was an error returned when repacking (or packing) some of our jar files.  For example:

   [exec] Extracting eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar

   [exec] Running Repack on /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar

   [exec]
Error: 1 was returned from command: /opt/ibm/jdk1.5.0_06/jre/bin/pack200 -r /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp_org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp.org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar
   [exec] Adding eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar to /public/TPTP/4.2.0/TPTP-4.2.0-200606110100/tptp.platform.sdk-TPTP-4.2.0-200606110100.zip.temp


I could not find any documentation on this error code.  A possible reason of the error is that this plugin contains some examples plugins, which contain a MANIFEST.MF file for each example, and the packer is somehow confused.  



_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev

_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev


Back to the top