| Summary: | Building EPP packages with Tycho | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] EPP | Reporter: | Cedric Brun <cedric.brun> | ||||||||
| Component: | Packager | Assignee: | Project Inbox <epp.packager-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | david_williams, gamma32, gunnar, Lars.Vogel, mike.milinkovich, mknauer, steffen.pingel, thanh.ha | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 1.4.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 405828 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Cedric Brun
Created attachment 208269 [details]
EPP modeling based on Tycho v0.1
Here is a first draft of how it can be made.
It's building the Indigo EPP modeling package using Tycho (launch mvn clean package in org.eclipse.epp.package.modeling.build)
Known issues so far :
No welcome page
I did not filled the about dialog correctly
I get an NPE from tycho when trying to build the linux 64 bit package. It need further investigation ...
For references, Igor pushed the experiment here: https://github.com/ifedorenko/org.eclipse.epp Welcome page and about : I was not including the modeling package feature, now fixed. NPE : not reproduced with Tycho 0.14 but building the MacOS package Product you can't update : to avoid this I had to remove all the feature I want from the product file and add them as advices in the p2.inf file. As usual, It makes sense once you figured it out. I ends up with a working build for Indigo. The modeling package looks good. Unfortunately moving it to Juno I ends up with : [ERROR] Cannot resolve project dependencies: [ERROR] Software being installed: org.eclipse.epp.package.modeling.product 4.2.0.qualifier [ERROR] Missing requirement: org.eclipse.epp.package.modeling.product 4.2.0.qualifier requires 'org.eclipse.equinox.executable.feature.group 0.0.0' but it could not be found [ERROR] (In reply to comment #3) > > Product you can't update : to avoid this I had to remove all the feature I want > from the product file and add them as advices in the p2.inf file. As usual, It > makes sense once you figured it out. > This could be done with current system, right? (Not specific to Tycho builds?) I think the general idea intersects with bug 345503 ... that is, there is certain amount of "policy" related to what can be updated and what can not. My guess is that most package maintainers would want the ability to "update sub features" ... but, would just encourage the broader discussion (if I'm reading this right). Thanks! Created attachment 232542 [details] tycho.patch Attached patch builds all of the EPP packages using Tycho minus the parallel package which I had problems finding a dependency for which I'll explain below. It is based off of Igor's initial work from comment 2. For the parallel package it couldn't find the dependency org.eclipse.linuxtools.changelog.c_0.0.0 and threw this error: [ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.18.0:package-feature (default-package-feature) on project org.eclipse.epp.package.parallel.feature: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:0.18.0:package-feature failed: Could not resolve feature org.eclipse.linuxtools.changelog.c_0.0.0; Path to dependency: -> [Help 1] I'm not sure where this comes from but in this patch I used the repo at http://download.eclipse.org/releases/kepler to resolve dependencies which I'm not sure if it's correct or not but it contained all the dependencies for the other bundles. I'm also not sure if the product files are correct for the various packages since I reused Igor's initial work for the Java package. I'd like to provide patches for signing via bug 405828 but before that can happen we need EPP producing CBI builds. Would it be possible to have these Tycho patches looked at so we can fix any outstanding issues and have it merged into EPP? The main problem that I'm seeing right now is that we are basically duplicating the .product files because Tycho expects them to be in their own directory, whereas Buckminster uses a different structure. If we find a way to satisfy both, Tycho and Buckminster, without duplicating the .product files, I'd be happy to apply this patch. (Personally, I'm not against changing the underlying build system, but this needs to be discussed, decided, and done first.) (In reply to comment #7) > The main problem that I'm seeing right now is that we are basically > duplicating the .product files because Tycho expects them to be in their own > directory, whereas Buckminster uses a different structure. If we find a way > to satisfy both, Tycho and Buckminster, without duplicating the .product > files, I'd be happy to apply this patch. > > (Personally, I'm not against changing the underlying build system, but this > needs to be discussed, decided, and done first.) Fair enough. I have an idea on how to get around the duplicate product file issue but it does have some issues. Use symlinks to point to the product files located in the feature. I tested a quick test build of the java product and it appears to work just fine. I will do a larger test and submit another patch if it works out. Unfortunately the side effect of this is that on Windows systems that don't support symlinks these links of course will fail. I'm not sure how big an issue this would be, do people build EPP on Windows with Maven/Tycho? Considering there is no Maven/Tycho build today for EPP maybe this isn't "major" and can be documented, and this wouldn't affect the existing build (as far as I know). (In reply to comment #8) > Unfortunately the side effect of this is that on Windows systems that don't > support symlinks these links of course will fail. I'm not sure how big an > issue this would be, do people build EPP on Windows with Maven/Tycho? > > Considering there is no Maven/Tycho build today for EPP maybe this isn't > "major" and can be documented, and this wouldn't affect the existing build > (as far as I know). In case anyone's interested here's an interesting stackoverflow I found on the topic of symlinks on Windows: http://stackoverflow.com/questions/5917249/git-symlinks-in-windows (In reply to comment #8) > Use symlinks to point to the product files located in the feature. I tested > a quick test build of the java product and it appears to work just fine. I > will do a larger test and submit another patch if it works out. Yeah, I thought about that, too, but I've no experience with symlinks and Git. Maybe it works just fine... then it would be a perfect solution for this (intermediate) issue. > Unfortunately the side effect of this is that on Windows systems that don't > support symlinks these links of course will fail. I'm not sure how big an > issue this would be, do people build EPP on Windows with Maven/Tycho? > > Considering there is no Maven/Tycho build today for EPP maybe this isn't > "major" and can be documented, and this wouldn't affect the existing build > (as far as I know). I'm not aware of anyone using Windows to run the EPP build. At eclipse.org and on my own machine they are running on Linux anyway. And in the long run, I'd like to switch to Tycho, which means we do not have to support two systems in parallel forever. Created attachment 234031 [details]
epp-tycho.patch
Updated patch to use symlinks instead of duplicating the products.
(In reply to comment #11) > Created attachment 234031 [details] > epp-tycho.patch I pushed this patch to master now (and updated version numbers here and there, added .project files, etc.) But I have to say that Eclipse and/or EGit isn't designed for symlinks... the idea is great and it's Eclipse that should improve here because it just doesn't work and causes trouble and problems. :( Anyway, I'd like to move forward, and this means to accept these problems for a transition period. (In reply to comment #12) > (In reply to comment #11) > > Created attachment 234031 [details] > > epp-tycho.patch > > I pushed this patch to master now (and updated version numbers here and > there, added .project files, etc.) > > But I have to say that Eclipse and/or EGit isn't designed for symlinks... > the idea is great and it's Eclipse that should improve here because it just > doesn't work and causes trouble and problems. :( > > Anyway, I'd like to move forward, and this means to accept these problems > for a transition period. Thanks Markus, I am able to build EPP with the merged patch. Of course with the exception of the parallel package issue I mentioned in comment 5. I was able to run a maven build with small changes, but I'm not sure if the results are comparable to the standart builds. Changes I made: 1. I removed the parallel package from the build 2. I'm on Maven 3.1.1, I changed the version to Tycho 0.19.0, because Tycho 0.18.0 does not work with Maven 3.1.1 3. I added the code recommenders repository, which is part of the Java Package I did not test every package, but the Java Package seems to work like expected. The CPP Package seems a little bit strange, for example it is not possible to create a new project. So, how far is the EPP Packaging with Tycho? (In reply to Hendrik Still from comment #14) > 1. I removed the parallel package from the build The Parallel package defines some optional dependencies to artifacts that are not in the repositories; Tycho has it's own way of interpreting 'optional', but even if this behaviour is changed the feature doesn't resolve properly. With my changes over the last few days the packages can be built, and a test-run of a temporary Hudson job is successful (with the exception of the Parallel package), including signed bundles and signed binaries, but there's a difference between 'build finishes successful' and the results. Still lot of work to do. [1] https://hudson.eclipse.org/hudson/user/mknauer/my-views/view/EPP/job/luna.epp-tycho-build/ The new packages for Luna M4 will be built using Tycho. The Hudson job is running on the EPP HIPP instance [1]. Documentation, Wiki, etc. still need to be updated, but with the main topic of the bug being addressed, I'm going to close this bug as fixed. [1] https://hudson.eclipse.org/packaging/job/luna.epp-tycho-build/ Thanks for the update. Do the EPP packages support root level features, to allow independent updates of single features? Because there is currently a open tycho bug(bug 361772) for this problem. > Because there is currently a open tycho bug(bug 361772) for this problem. Sorry this was the wrong bug. I meant bug 361722 No, we are currently using Tycho 0.19. |