Skip to content

Support plugin_customization.ini for p2 trust preferences#1075

Merged
vogella merged 2 commits into
eclipse-equinox:masterfrom
vogella:fix-p2-trust-prefs-defaultscope
May 30, 2026
Merged

Support plugin_customization.ini for p2 trust preferences#1075
vogella merged 2 commits into
eclipse-equinox:masterfrom
vogella:fix-p2-trust-prefs-defaultscope

Conversation

@vogella

@vogella vogella commented May 21, 2026

Copy link
Copy Markdown
Contributor

p2's "trust always" preferences (trustAlways for artifacts, trustAllAuthorities for authorities) were read with IEclipsePreferences.getBoolean() on a single ProfileScope node, which by contract never falls through to other scopes. Values seeded into DefaultScope via a product's plugin_customization.ini were therefore unreachable, even though docs/Trust_Settings.md documents that as the configuration path.

Both isTrustAlways() methods now read through IPreferencesService with { ProfileScope, DefaultScope.INSTANCE }, so user-set profile values still win and plugin_customization.ini defaults are honored as a fallback. Writes still go to ProfileScope and are unchanged.

Mirrors the fix in eclipse-platform/eclipse.platform.ui#1795 for the e4 workbench renderer preferences.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

Test Results

   18 files  ±0     18 suites  ±0   28m 19s ⏱️ - 1m 26s
2 169 tests ±0  2 166 ✅ ±0  3 💤 ±0  0 ❌ ±0 
5 161 runs  ±0  5 152 ✅ ±0  9 💤 ±0  0 ❌ ±0 

Results for commit bbf91d1. ± Comparison against base commit 5f7adc7.

♻️ This comment has been updated with latest results.

The "trust always" preferences (trustAlways for artifacts and
trustAllAuthorities for authorities) were read only from the
ProfileScope node via IEclipsePreferences.getBoolean(), which by
contract only consults that single node. Values seeded into the
Eclipse DefaultScope via a product's plugin_customization.ini were
therefore unreachable, even though docs/Trust_Settings.md documents
them as the way to configure defaults.

Route both reads through IPreferencesService so the lookup chains
through ProfileScope first (user-set values still win) and falls
through to DefaultScope (where plugin_customization.ini lands).
Writes still go to ProfileScope and are unchanged.

This mirrors the fix in eclipse-platform/eclipse.platform.ui#1795
for the e4 workbench renderer preferences.
@vogella vogella force-pushed the fix-p2-trust-prefs-defaultscope branch from 6eccb37 to 739d6ff Compare May 30, 2026 08:22
@vogella

vogella commented May 30, 2026

Copy link
Copy Markdown
Contributor Author

@merks AFAIK you implement this, have a look if you have the time.

@eclipse-equinox-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
features/org.eclipse.equinox.p2.core.feature/feature.xml
features/org.eclipse.equinox.p2.extras.feature/feature.xml
features/org.eclipse.equinox.p2.rcp.feature/feature.xml
features/org.eclipse.equinox.p2.sdk/feature.xml
features/org.eclipse.equinox.p2.user.ui/feature.xml
features/org.eclipse.equinox.server.p2/feature.xml

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 684d96c4e7323468ad6bdbfda39a96f49272b9df Mon Sep 17 00:00:00 2001
From: Eclipse Equinox Bot <equinox-bot@eclipse.org>
Date: Sat, 30 May 2026 08:26:12 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
index b56d0d431..b6a19576b 100644
--- a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.p2.engine;singleton:=true
-Bundle-Version: 2.11.100.qualifier
+Bundle-Version: 2.11.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.engine.EngineActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/features/org.eclipse.equinox.p2.core.feature/feature.xml b/features/org.eclipse.equinox.p2.core.feature/feature.xml
index 1b8ea3aae..adc9ef1a4 100644
--- a/features/org.eclipse.equinox.p2.core.feature/feature.xml
+++ b/features/org.eclipse.equinox.p2.core.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.core.feature"
       label="%featureName"
-      version="1.7.1100.qualifier"
+      version="1.7.1200.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.extras.feature/feature.xml b/features/org.eclipse.equinox.p2.extras.feature/feature.xml
index ef0bc0e4e..79bf64f05 100644
--- a/features/org.eclipse.equinox.p2.extras.feature/feature.xml
+++ b/features/org.eclipse.equinox.p2.extras.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.extras.feature"
       label="%featureName"
-      version="1.4.3200.qualifier"
+      version="1.4.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.rcp.feature/feature.xml b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
index eaba47d6d..074dab22b 100644
--- a/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
+++ b/features/org.eclipse.equinox.p2.rcp.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.rcp.feature"
       label="%featureName"
-      version="1.4.3200.qualifier"
+      version="1.4.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.sdk/feature.xml b/features/org.eclipse.equinox.p2.sdk/feature.xml
index 7784e65dd..c92a18762 100644
--- a/features/org.eclipse.equinox.p2.sdk/feature.xml
+++ b/features/org.eclipse.equinox.p2.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.sdk"
       label="%featureName"
-      version="3.11.3200.qualifier"
+      version="3.11.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.p2.user.ui/feature.xml b/features/org.eclipse.equinox.p2.user.ui/feature.xml
index db829b849..b1b9ae3f6 100644
--- a/features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ b/features/org.eclipse.equinox.p2.user.ui/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.user.ui"
       label="%featureName"
-      version="2.4.3200.qualifier"
+      version="2.4.3300.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
diff --git a/features/org.eclipse.equinox.server.p2/feature.xml b/features/org.eclipse.equinox.server.p2/feature.xml
index d8bec5c89..f1dc11ce8 100644
--- a/features/org.eclipse.equinox.server.p2/feature.xml
+++ b/features/org.eclipse.equinox.server.p2/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.server.p2"
       label="%featureName"
-      version="1.12.2100.qualifier"
+      version="1.12.2200.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@merks

merks commented May 30, 2026

Copy link
Copy Markdown
Contributor

This seems reasonable.

Note that -Dp2.trustedAuthorities can also be used by product to customize the list.

@vogella

vogella commented May 30, 2026

Copy link
Copy Markdown
Contributor Author

This seems reasonable.

Note that -Dp2.trustedAuthorities can also be used by product to customize the list.

Thanks, AFAICS that's already wired up via p2.trustedAuthorities in AuthorityChecker and noted in Trust_Settings.md.

@vogella vogella merged commit e4acb1d into eclipse-equinox:master May 30, 2026
12 checks passed
@vogella vogella deleted the fix-p2-trust-prefs-defaultscope branch May 30, 2026 09:10
@iloveeclipse

Copy link
Copy Markdown
Member

This PR caused regression, see #1098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants