Bug 12579 - Use CROPS container command launcher for Yocto C/C++ projects
Summary: Use CROPS container command launcher for Yocto C/C++ projects
Status: CLOSED OBSOLETE
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 4.99
Assignee: Chin Huat Ang
QA Contact: Toaster default assignee
URL:
Whiteboard:
Depends on:
Blocks: 12681
  Show dependency tree
 
Reported: 2018-03-02 08:33 UTC by Chin Huat Ang
Modified: 2019-08-29 15:17 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chin Huat Ang 2018-03-02 08:33:20 UTC
CROPS containers such as crops/poky use poky-entry.py as the entry point which expects specific arguments such as --cmd or --workdir, as such we need the ability to register a CROPS command launcher in CDT which would add the CROPS specifics arguments.

CROPS command launcher also needs to be registered with higher priority so that it overrides the default org.eclipse.cdt.docker.launcher.ContainerCommandLauncher (priority=0).
Comment 1 Chin Huat Ang 2018-03-08 00:28:14 UTC
New plugin org.yocto.crops.docker.launcher is being developed here:

http://git.yoctoproject.org/cgit/cgit.cgi/eclipse-yocto-contrib/log/?h=cha/containerBuild

Initial implementation is completed, however additional refactoring to use proper API (with patches submitted to upstream) is preferred rather than extending the following non-API Java classes to include CROPS-specific customization:

YoctoCropsContainerCommandLauncher extends o.e.cdt.docker.launcher.ContainerCommandLauncher
YoctoCropsContainerCommandLauncherFactory extends o.e.cdt.docker.launcher.ContainerCommandLauncherFactory
YoctoCropsContainerLauncher extends o.e.linuxtools.docker.ui.launch.ContainerLauncher
Comment 2 Chin Huat Ang 2018-03-08 03:11:58 UTC
There are several upstream implementation issues such as unnecessarily set UID for containers, unnecessary use of "sh -c" for executing autotools scripts, and over/under-quoting of arguments for docker entrypoint. 

We may want to fix these in upstream CDT instead of workaround them in eclipse-yocto.
Comment 3 Scott Lewis 2018-03-08 09:01:37 UTC
(In reply to comment #2)
> There are several upstream implementation issues such as unnecessarily set
> UID for containers, unnecessary use of "sh -c" for executing autotools
> scripts, and over/under-quoting of arguments for docker entrypoint. 
> 
> We may want to fix these in upstream CDT instead of workaround them in
> eclipse-yocto.


This will have to happen very fast to make Photon.  Most projects in the SR put on an API freeze before ~M7 which is May 18:

https://wiki.eclipse.org/Photon/Simultaneous_Release_Plan

I'm assuming that the changes would slightly change (enhance?) the CDT and linuxtools APIs but not break any existing API.   If breaking it will likely be impossible.  If no API change it should be relatively easy.

You will likely have to separate the CDT changes (autotools) from the linuxtools (container stuff).

1) open cdt and linuxtools bugs for the needed changes right away if bugs don't already exist.  Attempt to get some agreement from Doug and Jeff that they will be able/willing to apply the changes for Photon.  
2) implementing the needed changes as 1 or more gerrit submissions to the associated upstream classes (which when submitted to gerrit will be attached to appropriate bug)
3) Submit the gerrit changes asap

I also suggest being very targeted...i.e. only submit to upstream the things most needed...things that can't be easily overridden.
Comment 4 Armin Kuster 2019-08-29 15:15:59 UTC
Eclipse got dropped from project support.
Comment 5 Armin Kuster 2019-08-29 15:17:23 UTC
closing