Community
Participate
Working Groups
product tar.gz archives are currently created using plexus archiver. it has no support for symlinks, see bug 402052 and http://jira.codehaus.org/browse/PLXCOMP-117 it looks like commons compress supports symlinks in tar archives http://commons.apache.org/proper/commons-compress/javadocs/api-1.7/org/apache/commons/compress/archivers/tar/TarArchiveEntry.html investigate if we can use commons compress to create the tar archives. make sure we dont lose support for preserving executable bits.
Created attachment 240647 [details] PoC proof of concept using apache commons compress preserves executable permission bits and symlinks inside the tar archive However this requires java.nio features introduced with Java 7 only.
Created attachment 240652 [details] PoC project
(In reply to Jan Sievers from comment #1) > Created attachment 240647 [details] > PoC > > proof of concept using apache commons compress > preserves executable permission bits and symlinks inside the tar archive > > However this requires java.nio features introduced with Java 7 only. Well, if it helps ... we'd not mind using Java 7 to do builds ... and, seems there should be a way that "use common compress if on Java 7" but "fall back to previous method if not". So no one would be worse off.
A solution would be highly appreciated and I don't mind using Java 7 in our EPP build if that helps solving the problem. We've been hit by this problem in EPP, too (of course...) and solved it with a workaround described in bug 424769 where we call a Bash script from Maven.
(In reply to David Williams from comment #3) > (In reply to Jan Sievers from comment #1) > > Created attachment 240647 [details] > > PoC > > > > proof of concept using apache commons compress > > preserves executable permission bits and symlinks inside the tar archive > > > > However this requires java.nio features introduced with Java 7 only. > > Well, if it helps ... we'd not mind using Java 7 to do builds ... and, seems > there should be a way that "use common compress if on Java 7" but "fall back > to previous method if not". So no one would be worse off. I was thinking along these lines too. we need to find a solution how to build the module in Tycho (which is currently Java 6 based) without pulling all the rest of Tycho up to min requirement Java 7
I am in favour of moving entire Tycho java 7. I'd rather not complicate things with java 6 compatibility. Anyone who needs to stay on java 6 for whatever odd reason will have to stick with tycho 0.20.
created CQ 8090 for commons-compress 1.7
(In reply to comment #6) > I am in favour of moving entire Tycho java 7. I'd rather not complicate things > with java 6 compatibility. Anyone who needs to stay on java 6 for whatever odd > reason will have to stick with tycho 0.20. Before taking this decision, I'd like to discuss this what this would mean for the users at SAP. AFAIK, we still widely use Java 6 internally. Also, the workaround of using Toolchains for building for an older JRE is not supported on our internal release servers. So this move may be a problem for us...
https://git.eclipse.org/r/#/c/25416/
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=a56679010bce06433459724df659df9610be5e86
Unfortunately the fix for this bug has a bug itself (see attached test case and patch for the implementation). Symlinks that are relative to the tar's own contents have their preceeding '../' stripped of which leads to unresolveable symlinks. The patch passes all test cases and has an additional regression test case for the bug.
Created attachment 242816 [details] Fix for symlinks that are relative to the .tar's content - Regression test - Fix for regression
Tobias, thanks for reporting and providing a patch including testcase! To accept your patch (I will push it to gerrit), we need a signed CLA in place for the author email adress of a proposed git patch including Signed-off-by: footer. See [1] for details. Could you 1. Sign the CLA https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#Eclipse_Foundation_Contributor_License_Agreement 2. Provide a git commit with author and Signed-off-By: footer with the same email adress 3. push the commit to gerrit yourself [2] or attach it here (using git format-patch HEAD~) so I can push it to gerrit [1] https://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions [2] https://wiki.eclipse.org/Tycho/Contributor_Guide#Using_Gerrit
https://git.eclipse.org/r/#/c/26243/
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=f4a314ad89bdeb0de7a55304c1dec52dec8ff52b
Dear Jan, should this patch already be in the SNAPSHOT-build of tycho-0.21.0? If it was at the moment when I wrote this comment, the changed patch doesn't resolve the problem I fixed with my patch (maybe my test was wrong). The problem I'm trying to solve is to ship a JRE with my product, and Mac is very picky about a special symlink in that JRE. Could you give me a feedback so that I can decide whether I have to dig the problem down or whether I just have to wait until it is in a SNAPSHOT-build? Tobias
(In reply to Tobias Heide from comment #16) > Dear Jan, > should this patch already be in the SNAPSHOT-build of tycho-0.21.0? If it > was at the moment when I wrote this comment, the changed patch doesn't > resolve the problem I fixed with my patch (maybe my test was wrong) we have a problem with the CI build server at the moment which is why the fix may not visible on https://oss.sonatype.org/content/groups/public/ yet. you can build tycho yourself from the master branch to verify the fix in the meantime.
(In reply to Jan Sievers from comment #17) > we have a problem with the CI build server at the moment which is why the > fix may not visible on https://oss.sonatype.org/content/groups/public/ yet. CI job deployment has been fixed. I slightly simplified the fix but kept your unit test and it succeeds. please verify the fix and put this bug as into state VERIFIED or REOPENED if the fix did not cover your issue.
I pulled your fixes on the master branch and built them locally. The modified patch works as expected, thank you! The deployed SNAPSHOT does not yet have the changes, and my regression still exists there. Maybe the CI build has not yet run. I cannot change the bug status, but from my point of view it is verified.
FYI: I've updated the Developer's guide [1] to include instructions how to fix the Eclipse project configuration of tycho-p2-director-plugin in case it has compile errors after importing the project. This happens if you have a Java 6 JDK registered in you workspace. [1] http://wiki.eclipse.org/Developing_Tycho
*** Bug 442893 has been marked as a duplicate of this bug. ***