Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368089

Summary: Product tar.gz file has wrong filesystem permissions bits on MacOSX
Product: z_Archived Reporter: Igor Fedorenko <igor>
Component: TychoAssignee: Jan Sievers <jan.sievers>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jan.sievers, laurent.redor, pierre-charles.david, sbouchet, tanis, thanh.ha, tonny.madsen
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Igor Fedorenko CLA 2012-01-07 14:48:55 EST
This is a follow-up for bug 368079. Product tar.gz files built on Max OSX do not have expected executable bits set for native launchers. The same build executed under Linux produces tar.gz file with expected permissions. Most likely a bug in plexus-io, but I did not have time/desire to investigate this.
Comment 1 Jan Sievers CLA 2012-06-01 09:00:38 EDT
I debugged the problem and opened plexus-io bug

http://jira.codehaus.org/browse/PLXCOMP-207

It seems the problem only happens with non-english locales (env variable $LANG).
Date format parsing of 'ls' output can fail for these locales and as a follow-up file permissions are lost too.

Possible workarounds:

1. use Java 7 (plexus-io will use java 7 file attribute API instead of parsing 'ls' output); not verified
2. Change the locale to english before starting the build:
export LANG=en_US.UTF-8 ; verified
Comment 2 Jan Sievers CLA 2012-06-01 11:15:17 EDT
@Igor I would be interested what is the ls format/locale on your mac for which you originally reported this bug.
We saw the same problem but in our case it was caused by a german locale/date format.

Can you do a

ls -1lna

on any directory of your choice on this machine and post the output here?
Comment 3 Igor Fedorenko CLA 2012-06-01 11:25:36 EDT
Igor-Fedorenkos-MacBook-Pro:org.eclipse.tycho.extras igor$ ls -1lna
total 32
drwxr-xr-x  15 501  80   510  1 Jun 10:57 .
drwxr-xr-x  35 501  80  1190 27 May 19:03 ..
drwxr-xr-x  17 501  80   578  1 Jun 11:18 .git
-rw-r--r--   1 501  80    39  8 Dec 22:57 .gitignore
-rw-r--r--   1 501  80   387  8 Dec 23:10 .project
drwxr-xr-x   4 501  80   136  8 Dec 23:10 .settings
drwxr-xr-x   9 501  80   306  1 Jun 11:06 pack200
-rw-r--r--   1 501  80  7683 31 May 10:06 pom.xml
drwxr-xr-x   3 501  80   102 31 May 07:10 target-platform-validation-plugin
drwxr-xr-x   8 501  80   272  1 Jun 11:10 tycho-buildtimestamp-jgit
drwxr-xr-x   9 501  80   306  1 Jun 10:58 tycho-custom-bundle-plugin
drwxr-xr-x   9 501  80   306  1 Jun 11:00 tycho-eclipserun-plugin
drwxr-xr-x  10 501  80   340  1 Jun 10:58 tycho-p2-extras-plugin
drwxr-xr-x   9 501  80   306  1 Jun 11:00 tycho-source-feature-plugin
drwxr-xr-x   9 501  80   306  1 Jun 10:58 tycho-version-bump-plugin
Comment 4 Tonny Madsen CLA 2012-06-01 14:23:59 EDT
I have the same problem :-)

tonny-madsen:~ tonny$ cd /tmp
tonny-madsen:tmp tonny$ ls -1lna
total 32
drwxrwxrwt  19 0    0    646 Jun  1 07:51 .
drwxr-xr-x@  6 0    0    204 Jul 20  2011 ..
drwxrwxrwt   2 0    0     68 May 30 13:38 .ICE-unix
drwxrwxrwt   2 0    0     68 May 31 08:46 .X11-unix
drwxrwxrwt   2 0    0     68 May 30 13:38 .font-unix
-rw-r-----   1 0    26  1193 May 30 17:46 01a4e4fc93eb3
srwxrwxrwx   1 501  0      0 May 30 16:33 dbus-VXXABNi6CS
srwxrwxrwx   1 501  0      0 May 30 13:38 dbus-bs6vFn9Mpz
srwxrwxrwx   1 501  0      0 May 31 08:45 dbus-vOn2ffgGfe
drwx------   3 501  0    102 May 29 20:15 launch-MFrw7j
drwx------   3 501  0    102 May 29 20:15 launch-UzprDP
drwx------   3 501  0    102 May 29 20:15 launch-h4f9BW
drwx------   3 501  0    102 May 29 20:15 launch-o8gVpd
drwx------   3 501  0    102 May 29 20:15 launchd-195.8E4gUy
drwx------   3 89   0    102 May 29 20:16 launchd-344.vVOidU
drwxrwxrwx   4 501  0    136 May 31 08:46 skl
-rw-r--r--   1 0    0      6 May 29 20:15 trendmsgtmp0
-rw-r--r--   1 0    0      6 May 29 20:15 trendmsgtmp1
-rw-r--r--   1 0    0      6 May 29 20:15 trendmsgtmp2
Comment 5 Jan Sievers CLA 2012-06-03 04:42:59 EDT
(In reply to comment #1)
> Possible workarounds:
> 
> 1. use Java 7 (plexus-io will use java 7 file attribute API instead of parsing
> 'ls' output); not verified

would require plexus-io >= 2.0 which is not what we have right now (1.0.1) so this is not an option for a workaround
Comment 6 Jan Sievers CLA 2012-10-01 04:13:12 EDT
*** Bug 389829 has been marked as a duplicate of this bug. ***
Comment 7 Jan Sievers CLA 2012-10-01 04:15:59 EDT
plexus-io 2.0.5 was released.

It contains my fix for http://jira.codehaus.org/browse/PLXCOMP-207 so we should consider consuming it.
Comment 8 Jan Sievers CLA 2012-10-05 07:48:05 EDT
https://git.eclipse.org/r/#/c/8058/