Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 566638

Summary: Make linux proxy support work for all archs
Product: [Eclipse Project] Platform Reporter: Liviu Ionescu <ilg>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, jjohnstn, jonah, stephan.herrmann
Version: 4.17   
Target Milestone: 4.21 M2   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/175195
https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=42fcea372ad237bc43e78496c1cd38343dfad785
https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/179782
https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/179783
https://git.eclipse.org/c/platform/eclipse.platform.releng.git/commit/?id=87a25cc861e9bf102457409f32afd16722fc2bb1
https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/179784
https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=45855a865e7777c7797ef73367f903ab04a51494
https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=53f4a42a546347d629c0dac69166acd766e5e8d1
https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/180368
https://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=f97e0374e552bf072482a60d176dc230071a1006
Whiteboard:
Bug Depends on:    
Bug Blocks: 565419    

Description Liviu Ionescu CLA 2020-09-03 06:40:09 EDT
To finalise support for aarch64 and close 565419.
Comment 1 Alexander Kurtakov CLA 2020-09-03 07:29:37 EDT
The fix here should be to create single o.e.core.net.linux that uses JNA to both simplify releng and feature work.
Comment 2 Liviu Ionescu CLA 2020-10-26 06:40:38 EDT
Any progress on this?
Comment 3 Alexander Kurtakov CLA 2020-10-26 06:44:48 EDT
Sorry, I haven't found time for this. I would appreciate any help.
Comment 4 Liviu Ionescu CLA 2020-10-26 06:49:32 EDT
I can provide some help, but I'm afraid my knowledge on the subject is so poor that you would need more time to explain me what to do than to do it yourself :-(

I don't even know how important this is, but since in 2020-12 all Eclipses will include archives for Aarch64, I thought it would be useful to have them more or less complete.
Comment 5 Alexander Kurtakov CLA 2021-01-18 11:44:23 EST
Code lives in https://git.eclipse.org/c/platform/eclipse.platform.team.git/tree/bundles/org.eclipse.core.net.linux.x86_64 . Having one JNA based fragment for all archs would be perfect
Comment 6 Eclipse Genie CLA 2021-01-21 21:43:32 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/175195
Comment 8 Jeff Johnston CLA 2021-04-23 20:12:32 EDT
Released for 4.20 M2
Comment 9 Eclipse Genie CLA 2021-04-24 03:02:47 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/179782
Comment 10 Eclipse Genie CLA 2021-04-24 03:08:01 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/179783
Comment 12 Eclipse Genie CLA 2021-04-24 03:11:28 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/179784
Comment 15 Stephan Herrmann CLA 2021-05-06 15:37:26 EDT
(In reply to Eclipse Genie from comment #7)
> Gerrit change
> https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/175195 was
> merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/
> ?id=42fcea372ad237bc43e78496c1cd38343dfad785

I have a build that tries to use the director to install additional IUs on top of a recent Eclipse SDK. It started to fail like this:

     [java] !ENTRY org.eclipse.equinox.p2.publisher 4 0 2021-05-06 19:10:27.552
     [java] !MESSAGE An error occured while parsing advice file: basePath=/home/jenkins/agent/workspace/buildAndTest/testrun/build-root/eclipse/plugins/org.eclipse.core.net.linux.x86_64_1.2.500.v20210423-1606.jar, adviceFilePath=META-INF/p2.inf.
     [java] !STACK 0
     [java] org.eclipse.core.runtime.AssertionFailedException: null argument:
     [java] 	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
     [java] 	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
     [java] 	at org.eclipse.equinox.internal.p2.metadata.RequiredCapability.createMatchExpressionFromRange(RequiredCapability.java:141)
     [java] 	at org.eclipse.equinox.internal.p2.metadata.RequiredCapability.<init>(RequiredCapability.java:108)
     [java] 	at org.eclipse.equinox.p2.metadata.MetadataFactory.createRequirement(MetadataFactory.java:523)
     [java] 	at org.eclipse.equinox.p2.publisher.AdviceFileParser.createRequirement(AdviceFileParser.java:361)
     [java] 	at org.eclipse.equinox.p2.publisher.AdviceFileParser.parseRequired(AdviceFileParser.java:329)
     [java] 	at org.eclipse.equinox.p2.publisher.AdviceFileParser.parseRequires(AdviceFileParser.java:267)
     [java] 	at org.eclipse.equinox.p2.publisher.AdviceFileParser.parse(AdviceFileParser.java:116)
     [java] 	at org.eclipse.equinox.p2.publisher.AdviceFileAdvice.<init>(AdviceFileAdvice.java:81)
     [java] 	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createAdviceFileAdvice(BundlesAction.java:1068)
     [java] 	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.generateBundleIUs(BundlesAction.java:1015)
     [java] 	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform(BundlesAction.java:894)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.publish(RepositoryListener.java:167)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.processBundle(RepositoryListener.java:153)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.process(RepositoryListener.java:143)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener.added(RepositoryListener.java:122)
     [java] 	at org.eclipse.equinox.internal.p2.extensionlocation.BundlePoolFilteredListener.added(BundlePoolFilteredListener.java:42)
     [java] 	at org.eclipse.equinox.internal.p2.extensionlocation.SiteListener.added(SiteListener.java:326)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.processFile(DirectoryWatcher.java:199)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.scanDirectories(DirectoryWatcher.java:162)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.poll(DirectoryWatcher.java:112)
     [java] 	at org.eclipse.equinox.internal.p2.extensionlocation.SiteListener.synchronizeRepositories(SiteListener.java:116)
     [java] 	at org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository.ensureInitialized(ExtensionLocationArtifactRepository.java:69)
     [java] 	at org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository.getProperties(ExtensionLocationArtifactRepository.java:283)
     [java] 	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.addRepository(AbstractRepositoryManager.java:133)
     [java] 	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:683)
     [java] 	at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:131)
     [java] 	at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:125)
     [java] 	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util.getAggregatedBundleRepository(Util.java:153)
     [java] 	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util.getAggregatedBundleRepository(Util.java:110)
     [java] 	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CollectAction.collect(CollectAction.java:83)
     [java] 	at org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CollectAction.execute(CollectAction.java:39)
     [java] 	at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:186)
     [java] 	at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:99)
     [java] 	at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
     [java] 	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
     [java] 	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:46)
     [java] 	at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:27)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:772)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:762)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:743)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1066)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1204)


It seems that p2 doesn't like the p2.inf added via the above commit.

If I look into the sources at https://git.eclipse.org/c/equinox/rt.equinox.p2.git/tree/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java#n141 p2 seems to require a name, where only a namespace is given.
Comment 16 Stephan Herrmann CLA 2021-05-06 16:12:30 EDT
Updates:

The build actually failed for a different reason. Apparently the director succeeded despite the exception.

Trying to reproduce locally with a regular feature did not show the error. At the point of the exception the build was trying to install a patch feature, maybe that contributes to the exception.

Still that p2.inf should probably be fixed.
Comment 17 Stephan Herrmann CLA 2021-05-06 16:33:55 EDT
Looking at similar examples let me hazard a guess that you actually want one of

requires.0.namespace=org.eclipse.equinox.p2.iu
requires.0.name=org.eclipse.core.net.linux

or

requires.0.namespace=osgi.bundle
requires.0.name=org.eclipse.core.net.linux
Comment 18 Stephan Herrmann CLA 2021-05-06 18:53:15 EDT
For me the following steps reliably trigger the exception:

1. Install Eclipse SDK I20210503-1800

2. Launch eclipse once and immediately exit

3. $ cd eclipse

4. Install ANYTHING using the director like this

$ ./eclipse -application org.eclipse.equinox.p2.director -metadataRepository https://download.eclipse.org/egit/updates/ -artifactRepository https://download.eclipse.org/egit/updates/ -installIU org.eclipse.egit.feature.group -destination `pwd` -nosplash  -consoleLog

No patch feature is needed to reproduce.

OTOH, I did not succeed to reproduce by installing features from within the IDE.
Comment 19 Eclipse Genie CLA 2021-05-07 11:22:46 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.team/+/180368
Comment 20 Jeff Johnston CLA 2021-05-07 11:26:18 EDT
(In reply to Stephan Herrmann from comment #17)
> Looking at similar examples let me hazard a guess that you actually want one
> of
> 
> requires.0.namespace=org.eclipse.equinox.p2.iu
> requires.0.name=org.eclipse.core.net.linux
> 
> or
> 
> requires.0.namespace=osgi.bundle
> requires.0.name=org.eclipse.core.net.linux

A similar change was made for org.eclipse.equinox.security which added a JNA linux version and the p2.inf had the format of the first version you suggested above.  I have pushed a patch into gerrit.