eclipse-tycho / tycho

Tycho project repository (tycho)
https://tycho.eclipseprojects.io
Eclipse Public License 2.0
170 stars 189 forks source link

Filename issues with product tar.gz archives using Tycho 2.5.0 and 2.6.0 #629

Closed drsgoodall closed 2 years ago

drsgoodall commented 2 years ago

I've been trying to upgrade from Tycho 2.4.0 to 2.5.0 or 2.6.0. However these have a problem archiving a linux tar.gz product.

It appears the long path for the linux eclipse launcher META-INF files get truncated. For example on the filesystem there should be MANIFEST.MF, but the tar.gz will have MANI. E.g. AppAppApp\plugins\org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.400.v20211117-0650\META-INF\MANI

This appears to depending on the relative path length as changing the rootFolder attribute for the tycho-p2-director-plugin configuration.

This path looks to be 100 characters which I noticed a comment about in https://github.com/eclipse/tycho/blob/master/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java

I've created an example project here; https://github.com/drsgoodall/tycho-path-truncation-issue

laeubi commented 2 years ago

It seems thsi is an issue with your extraction tool, I can't reproduce this on a debian linux.

drsgoodall commented 2 years ago

Hmm, interesting. I came across this issue using the RCPTT 2.5.1 maven plugin which downloads the tar.gz and unpacks it. This is the most recent version I believe. I have been testing against my example app using an old version of winzip.

I've tracked the cause down to the fix in https://github.com/eclipse/tycho/issues/292 switching LONGFILE mode from GNU mode to POSIX mode in the tar archiver.

laeubi commented 2 years ago

You should use 7zip or a native linux to test this. It might be that RCPTT either do not suppor this or you are hitting a file-system limit as well.

drsgoodall commented 2 years ago

Just confirmed a recent tar can unpack my build correctly wheres my old winzip cannot.