workaround(java-25): add java-25-openjdk and java-25-openjdk-portable compon…#16070
workaround(java-25): add java-25-openjdk and java-25-openjdk-portable compon…#16070reubeno merged 4 commits intotomls/base/mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds dedicated component definitions for Java 25 OpenJDK packages to pin Fedora snapshots and apply overlays needed to unblock the portable build/bootstrap process.
Changes:
- Introduce dedicated
*.comp.tomlfiles forjava-25-openjdkandjava-25-openjdk-portable. - Pin Fedora 43 snapshots for both components to align with the desired upstream state.
- Add overlays for the portable build to self-bootstrap (buildjdkver + explicit BuildRequires) and bypass the ccache symlink wrapper issue.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| base/comps/java-25-openjdk/java-25-openjdk.comp.toml | New dedicated component definition with an upstream Fedora snapshot pin. |
| base/comps/java-25-openjdk-portable/java-25-openjdk-portable.comp.toml | New dedicated component definition with snapshot pin + overlays for bootstrap/compiler environment. |
| base/comps/components-full.toml | Removes inline component entries now that dedicated files exist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description = "Override buildjdkver to use Java 21 instead of 24 for bootstrap" | ||
| type = "spec-search-replace" | ||
| regex = '^%global buildjdkver 24$' | ||
| replacement = '%global buildjdkver 25' | ||
|
|
||
| [[components.java-25-openjdk-portable.overlays]] | ||
| description = "We need JDK 25 to build sicne that is our bootstrap version" |
There was a problem hiding this comment.
This overlay description says it switches the bootstrap JDK to Java 21, but the replacement actually changes buildjdkver from 24 to 25. Please correct the description to reflect what the overlay does so future readers don’t misinterpret the bootstrap strategy.
| description = "Override buildjdkver to use Java 21 instead of 24 for bootstrap" | |
| type = "spec-search-replace" | |
| regex = '^%global buildjdkver 24$' | |
| replacement = '%global buildjdkver 25' | |
| [[components.java-25-openjdk-portable.overlays]] | |
| description = "We need JDK 25 to build sicne that is our bootstrap version" | |
| description = "Override buildjdkver to use Java 25 instead of 24 for bootstrap" | |
| type = "spec-search-replace" | |
| regex = '^%global buildjdkver 24$' | |
| replacement = '%global buildjdkver 25' | |
| [[components.java-25-openjdk-portable.overlays]] | |
| description = "We need JDK 25 to build since that is our bootstrap version" |
| replacement = '%global buildjdkver 25' | ||
|
|
||
| [[components.java-25-openjdk-portable.overlays]] | ||
| description = "We need JDK 25 to build sicne that is our bootstrap version" |
There was a problem hiding this comment.
Typo in overlay description: “sicne” → “since”.
| description = "We need JDK 25 to build sicne that is our bootstrap version" | |
| description = "We need JDK 25 to build since that is our bootstrap version" |
| description = "Set GCC and CC environment variables to /usr/bin/gcc to avoid ccache symlink that OpenJDK configure rejects" | ||
| type = "spec-prepend-lines" | ||
| section = "%build" | ||
| lines = ["export GCC=/usr/bin/gcc", "export CC=/usr/bin/gcc", "export CXX=/usr/bin/g++"] |
There was a problem hiding this comment.
For readability/maintainability, please format the lines list as a multi-line TOML array when it contains multiple entries (consistent with other overlays in this repo). This makes diffs and future edits less error-prone.
| lines = ["export GCC=/usr/bin/gcc", "export CC=/usr/bin/gcc", "export CXX=/usr/bin/g++"] | |
| lines = [ | |
| "export GCC=/usr/bin/gcc", | |
| "export CC=/usr/bin/gcc", | |
| "export CXX=/usr/bin/g++", | |
| ] |
ddstreetmicrosoft
left a comment
There was a problem hiding this comment.
I'm not marking this review as 'request changes' because i don't want to block getting everything building, but I added some comments to explain why I would normally block this PR.
| @@ -0,0 +1,20 @@ | |||
| [components.java-25-openjdk-portable] | |||
| spec = { type = "upstream", upstream-distro = { name = "fedora", version = "43", snapshot = "2025-07-22T00:00:00-08:00" } } | |||
There was a problem hiding this comment.
This package builds fine for me in a local build, once I disable mock ccache. What's the reason we need to use the older version?
There was a problem hiding this comment.
correction - it builds fine, but %check fails, if that's the reason for using the older version, shouldn't we just disable %check for now instead?
There was a problem hiding this comment.
This package will not build in stage2 because we do not build jdk24 in stage1. I am also not sure how it built for you without attempting to pull in jdk24! Can you please check what version of jdk it used to bootstrap or did you disable bootstrap build?
There was a problem hiding this comment.
this package doesn't require 24:
https://src.fedoraproject.org/rpms/java-25-openjdk-portable/blob/f43/f/java-25-openjdk-portable.spec#_414
base/comps/java-25-openjdk-portable/java-25-openjdk-portable.comp.toml
Outdated
Show resolved
Hide resolved
|
I built
The |
|
We had some discussion and the issue here is a stage1/stage2 problem: For stage1, the java-25-openjdk-portable package will build fine (with changes noted), but the java-25-openjdk will not build because the version of the java-25-openjdk-portable pacakge it needs has not been published in f43. So an older version of the java-25-opendjk package must be built in stage1, using the older java-25-openjdk-portable published in f43. Then in stage2, which uses only packages built in stage1 and does not use the f43 repo packages, the java-25-openjdk-portable package can still build (with noted changes), but the java-25-openjdk package will not build, because the older java-25-openjdk-portable package is not available. This is the easiest way to get both packages building in both stages, i.e. set both to the older version. After our bootstrap phase we can iterate up to the latest version. One change I would prefer is to not add the workaround for ccache; if we can merge #16081 first, then this PR can remove the ccache workaround. |
❌ Spec Review Failed
🛠️ Debug locally: .github/workflows/scripts/README.md
|
|
i think your rebase might have got messed up, there's a lot of wrong-hash commits in your pr for recent changes to the tomls/base/main branch |
|
Whoops, let me take a look. |
a7deadd to
85bc115
Compare
…ents
java25 needs sources supplied by java-portable-sources which is version 25.0.20.0.10
in fed43 repo. Fedora build pulls in this version from fed42 repo. Downgrading java25
to version 25.0.0.0.32 via an older snapshot date takes care of this.
For java25 portable build, there is a bootstrap stage which needs N-1 jdk version, 24
in our case. This is not available in fed43 or fed42 and fedora build pulls this from
fed41. We have to fix this to get stage2 build going. Downgrade will not work. Instead
we override the bootstrap java version to 25 - self bootstrap, which will be built by
stage1.
Below is copilot's explanation of the mechanics of the change.
Add dedicated component definitions for java-25-openjdk-portable and
java-25-openjdk, migrating them from inline definitions in
components-full.toml to dedicated comp.toml files with overlays to fix
two build failures:
1. Missing bootstrap JDK: The upstream Fedora spec uses conditional
BuildRequires that resolve to java-latest-openjdk-devel, which does
not pull in a specific JDK version. Added an explicit BuildRequires
for java-25-openjdk-devel and set buildjdkver to 25.
2. ccache symlink rejection: OpenJDK's autoconf configure script
detects /usr/lib64/ccache/gcc as a ccache wrapper symlink and
refuses to proceed:
configure: error: /usr/lib64/ccache/gcc is a symbolic link to
ccache. This is not supported.
Added exports for CC=/usr/bin/gcc, CXX=/usr/bin/g++, and
GCC=/usr/bin/gcc in the %build section to bypass the ccache
wrappers in PATH.
Overlays applied to java-25-openjdk-portable:
- spec-search-replace: buildjdkver 24 -> 25
- spec-add-tag: BuildRequires java-25-openjdk-devel
- spec-prepend-lines: export CC/CXX/GCC to real compiler paths
java-25-openjdk uses a separate Fedora 43 snapshot (2025-07-30) to
match the portable sources version produced by java-25-openjdk-portable.
Tested: Built java-25-openjdk-portable-25.0.0.0.32-0.1.ea.azl4
successfully, producing 13 RPMs (runtime, devel, docs, sources,
static-libs, and debug variants).
… no need to workaround that
85bc115 to
4543b74
Compare
java25 needs sources supplied by java-portable-sources which is version 25.0.20.0.10 in fed43 repo. Fedora build pulls in this version from fed42 repo. Downgrading java25 to version 25.0.0.0.32 via an older snapshot date takes care of this.
For java25 portable build, there is a bootstrap stage which needs N-1 jdk version, 24 in our case. This is not available in fed43 or fed42 and fedora build pulls this from fed41. We have to fix this to get stage2 build going. Downgrade will not work. Instead we override the bootstrap java version to 25 - self bootstrap, which will be built by stage1.
Below is copilot's explanation of the mechanics of the change.
Add dedicated component definitions for java-25-openjdk-portable and java-25-openjdk, migrating them from inline definitions in components-full.toml to dedicated comp.toml files with overlays to fix two build failures:
Missing bootstrap JDK: The upstream Fedora spec uses conditional BuildRequires that resolve to java-latest-openjdk-devel, which does not pull in a specific JDK version. Added an explicit BuildRequires for java-25-openjdk-devel and set buildjdkver to 25.
ccache symlink rejection: OpenJDK's autoconf configure script detects /usr/lib64/ccache/gcc as a ccache wrapper symlink and refuses to proceed:
configure: error: /usr/lib64/ccache/gcc is a symbolic link to
ccache. This is not supported.
Added exports for CC=/usr/bin/gcc, CXX=/usr/bin/g++, and GCC=/usr/bin/gcc in the %build section to bypass the ccache wrappers in PATH.
Overlays applied to java-25-openjdk-portable:
java-25-openjdk uses a separate Fedora 43 snapshot (2025-07-30) to match the portable sources version produced by java-25-openjdk-portable.
Tested: Built java-25-openjdk-portable-25.0.0.0.32-0.1.ea.azl4 successfully, producing 13 RPMs (runtime, devel, docs, sources, static-libs, and debug variants).
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology