Bug 789272

Summary: Tycho bundles parts of eclipse
Product: [Fedora] Fedora Reporter: Alexander Kurtakov <akurtako>
Component: tychoAssignee: Roland Grunberg <rgrunber>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mizdebsk, rgrunber, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tycho-0.21.0-8.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-10 15:33:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1098424    

Description Alexander Kurtakov 2012-02-10 08:53:12 UTC
Tycho ships /usr/share/java/tycho/tycho-p2-runtime.zip . This zip contains equinox, sat4j, ecf and other parts of regular eclipse . Ideally it shouldn't be needed but if this is too hard to achieve the zip should be replaced by regular directory with symlinks in it or even zip with symlinks or tar.gz if zip doesn't support symlinks.

Comment 1 Fedora Admin XMLRPC Client 2012-02-22 16:24:12 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Roland Grunberg 2012-10-10 20:39:06 UTC
Just as an update, dependency issues are preventing further work on this for the time being. Currently Eclipse depends on Tycho (f18,rawhide) to perform the CBI build. Tycho also depends on having some Eclipse bundles so we need to have these bundled in the zips so as to avoid the cycle.

Comment 3 Fedora End Of Life 2013-04-03 17:19:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Mikolaj Izdebski 2014-01-22 11:37:09 UTC
Still not fixed. Moving to rawhide to prevent auto-closing it too soon.

Comment 5 Roland Grunberg 2014-08-22 16:50:56 UTC
After looking at the possibility of extending Tycho's OSGi runtime locator to find the the bundles at runtime using fedoraproject-p2, I realized that I'd need an OSGi runtime, but this is exactly what Tycho is doing within that class, so it seems like we might as well just replace the jars with symlinks at build time in the %install section.

The problem I'm currently running into is that plexus-archiver's zip unarchiver (What Tycho uses for extraction) doesn't seem to support extracting zips containing symlinks (https://jira.codehaus.org/browse/PLXCOMP-113).

Comment 6 Roland Grunberg 2014-09-04 20:52:51 UTC
With http://pkgs.fedoraproject.org/cgit/plexus-archiver.git/commit/?id=06ee4bbd462351b8e728e81c6a36bad8d4ac8893 , I've been able to build Tycho with symlinks in place of the bundled libraries for zip files. I'll be testing this out and committing the changes in the near future.

Comment 7 Roland Grunberg 2014-09-05 19:11:40 UTC
http://pkgs.fedoraproject.org/cgit/tycho.git/commit/?id=793ac795c5202b40886f158ad18272f50590d355 (tycho-0.21.0-7) will resolve this issue.

We could also backport this to f21 but it would require plexus-archiver-2.4.4-4. In addition, this makes Tycho's runtime much more susceptible to changes in Eclipse. One way around this would be to discover the necessary bundles at runtime as well, but we wouldn't be able to use p2 API from within an OSGi runtime.

Comment 8 Roland Grunberg 2014-09-08 16:42:54 UTC
There are some issues with this change so I've temporarily untagged tycho-0.21.0-7.

Comment 9 Mikolaj Izdebski 2014-09-09 07:56:36 UTC
I saw two problems:

1. To extract ZIP files XMvn uses OpenJDK, which doesn't support symlinks. This is fixed in https://github.com/rgrunber/fedoraproject-p2/commit/51d2ab4

2. Symlinks inside ZIPs were poining to some eclipse JARs which can be either under /usr/lib or /usr/lib64. This means that tycho wouldn't work on 32-bit machine if it was built on 64-bit one (and vice versa). Possible solutions are: A) make tycho arch-specific, or B) expose eclipse JARs under constant path (for example via symlink in javadir). I definitely prefer the second solution.

Comment 10 Roland Grunberg 2014-09-09 14:03:59 UTC
> 2. Symlinks inside ZIPs were poining to some eclipse JARs which can be either
> under /usr/lib or /usr/lib64. This means that tycho wouldn't work on 32-bit
> machine if it was built on 64-bit one (and vice versa). Possible solutions are:
> A) make tycho arch-specific, or B) expose eclipse JARs under constant path (for
> example via symlink in javadir). I definitely prefer the second solution.

As discussed with Alex, (A) would be a pain for secondary archs as they wouldn't be able to import by default. (B) is exactly what we hope to do. Mat has committed http://pkgs.fedoraproject.org/cgit/eclipse.git/commit/?id=6a3b1d5b09d6dc6fd5f03f942040befe10cfe068 which will provide all the required core/equinox jars in javadir without the version_qualifier so there's less chance for breakage.

From here Tycho can simply symlink from those locations (which it checks first by default). There is one additional patch I see needs to be made in Tycho's Equinox runtime to permit jars that aren't of the form "name_version", but I think once this is done debundling should work.

Comment 11 Roland Grunberg 2014-09-09 17:19:15 UTC
http://pkgs.fedoraproject.org/cgit/tycho.git/commit/?id=7448eae657bf8f0470ac8bf650935afec92678a3 (tycho-0.21.0-8) should resolve the remaining issues. This should be built once http://koji.fedoraproject.org/koji/buildinfo?buildID=576267 (eclipse-4.4.0-18.fc22) is in the buildroot and not before.

Comment 12 Roland Grunberg 2014-09-10 15:33:05 UTC
I'm marking this bug as CLOSED (RAWHIDE). Thanks to everyone who helped to finally resolve this.