| Summary: | Executable bit is not set on exported launcher executable. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Andrei Neshcheret <a.nesheret> | ||||
| Component: | Build | Assignee: | pde-build-inbox <pde-build-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aniefer, bhunt, boehme, ChristianOrtolf, eric.jain, hniederhausen, irbull, kasemirk, lmarchal, pascal, sources, Tod_Creasey, torkildr, zstorok | ||||
| Version: | 3.5 | Flags: | dj.houghton:
review+
|
||||
| Target Milestone: | 3.6 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows Vista | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 532463 | ||||||
| Attachments: |
|
||||||
|
Description
Andrei Neshcheret
Is there any simple workaround? Workaround would be export to folder and manually zip up the results using the native "zip" command. *** Bug 273757 has been marked as a duplicate of this bug. *** Problem for me with zipping by hand is that MacOSX seems then not to recognize the .icns file for the executable if I do export without zipping. (In reply to comment #2) > Workaround would be export to folder and manually zip up the results using the > native "zip" command. > How is that possible with headless building? I can't find a flag for exporting to folder in the propertioes files. (In reply to comment #5) > (In reply to comment #2) > > Workaround would be export to folder and manually zip up the results using the > > native "zip" command. > > > > How is that possible with headless building? I can't find a flag for exporting > to folder in the propertioes files. > If you are building headless, you can specify that the native "zip" be used directly using the archiveFormat property. eg: archivesFormat=macosx,cocoa,x86-zip "folder" will also work here, though there may be problems if you are building more than one platform archivesFormat=macosx,cocoa,x86-folder I did just realize that this doesn't really help when building on windows, but it would be fine when building from mac or linux. (In reply to comment #5) > (In reply to comment #2) > > Workaround would be export to folder and manually zip up the results using the > > native "zip" command. > > > > How is that possible with headless building? I can't find a flag for exporting > to folder in the propertioes files. > It doesn't need headless building. This bug appears also when exporting through eclipse directly. I've run into the same problem and tried the suggested work-around. Building on Linux I use "p2.gathering=true" and "archivesFormat=linux,gtk,x86-zip & win32,win32,x86-zip & macosx,carbon,x86-zip & linux,gtk,x86_64-zip" Which produces nothing! When leaving "archivesFormat" to the default value I get the zip's but with the unset executable bit. "archivesFormat = linux, gtk, x86 - zip" produces a zip file with the correct permissions when I do a headless build on Linux (Eclipse 20090619-0625). There's another issue though with using "tar" (see bug 287127)... Can anyone of the PDE people give a hint where to look to fix this bug? (In reply to comment #10) > Can anyone of the PDE people give a hint where to look to fix this bug? See comment #6, you need to use the native "zip" archive format instead of the default "antZip". Or build to a folder and zip it yourself. Does someone else have the same problem with exporting to folder and then zipping: .icns file for Mac launcher not being accepted? Comment #6 is a workaround for the headless build, but there is still no solution when exporting from eclipse with the export wizard. The binary in the zip file on linux and Mac OSX is not executable. Lots of users should have this problem it's quite critical, is there a fix worked on for this bug ? (In reply to comment #8), I see the same under OS X: Default settings generate a ZIP without executable bit. archivesFormat=macosx,carbon,x86-zip results in no ZIP at all archivesFormat=macosx,carbon,x86-tar creates a file ending in 'zip' that seems to be a valid yet empty 'tgz'. Created attachment 168036 [details]
patch
In general, PDE/Build does not know what permissions p2 is going to set on what files. We can only preserve those permissions that we know about. This is the permissions set by the root.permissions properties in feature build.properties files. This does include the launchers that come from the org.eclipse.equinox.executable feature. patch released. The difference between "p2.gathering=true" and not, is that when we aren't doing p2, we know exactly what files are going to end up in the final archive, and which ones are supposed to have special permissions. When creating an archive using antZip (which is the default), we must explicitly list files with special permission because ant can't preserve whatever is on disk (because Java code can't see these permissions). This was fine when not doing p2 since we knew everything. When doing p2, we no longer know exactly what files are involved in the install, so we were just zipping up everything without listing out anything explicitly. This loses the permissions. The fix here is to list out the files that we know about through the normal feature root properties. This does not cover any files inside bundles that may have had permissions set using the p2 chmod action. If you are running on linux or mac, using "zip" or "tar" as the archive format is a workaround because that invokes the native "zip" or "tar" executables. If you are running on windows, there is no workaround because the OS itself does not have permissions so they are lost from the beginning. To get executable bits on windows you need this fix and you need "antZip" as the format. *** Bug 289614 has been marked as a duplicate of this bug. *** In org.eclipse.pde.build_3.6.1.R36x_v20100823.jar this only works for antZip and not for antTar because in the TarFileSet constructor the permission parameter is not passed to the super ZipFileSet.
public TarFileSet(String dir, boolean file, String defaultexcludes, String includes, String includesfile, String excludes, String excludesfile, String prefix, String casesensitive, String permission) {
super(dir, file, defaultexcludes, includes, includesfile, excludes, excludesfile, prefix, casesensitive, null);
}
For me it only works on a windows build machine to create a tar.gz linux build with permissions set if I pass the parameter.
|