Skip to content

fix(packaging): accept Java 21 or newer in the .rpm and .deb dependencies - #4237

Merged
bpamiri merged 1 commit into
developfrom
peter/linux-pkg-java21-plus
Oct 4, 2026
Merged

bpamiri merged 1 commit into
developfrom
peter/linux-pkg-java21-plus

Conversation

@bpamiri

@bpamiri bpamiri commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

wheels / wheels-be can't be installed on current Fedora: the rpm requires java-21-openjdk-headless, and Fedora 44 ships only java-25-openjdk-headless / java-latest-openjdk-headless:

nothing provides java-21-openjdk-headless needed by wheels-be-4.2.0~snapshot.2870-1.noarch from wheels-be

Changes (tools/distribution-drafts/linux-packages/, used live by release.yml):

  • rpm (both nfpm configs): Requires: (java-21-headless or java-headless >= 1:21). No single name covers both families: Rocky/RHEL's java-21 provides java-21-headless but not the generic java-headless, and Fedora's java-25/latest provides java-headless = 1:25…. A rich dependency needs rpm >= 4.13 (EL8+, Fedora). Java 21 stays first.
  • deb (both nfpm configs): openjdk-21-jre-headless | openjdk-21-jre | openjdk-25-jre-headless | openjdk-25-jre. 21 stays first, so it's what apt picks when nothing is installed. Today's Ubuntu/Debian all still package 21; 25 is already the default JRE on newer releases.
  • Launcher: _wheels_java_ok already accepts any Java >= 21 (no upper bound), and an only-Java-25 system resolves through the /usr/bin/java alternatives fallback. Only the wording changes: the final error now says "cannot find a Java 21 or newer runtime … any Java 21+ works", and the probe comment matches. tools/test-linux-launcher-java.sh is updated for the new message text.

Does Wheels run on Java 25? Yes: Fedora 44 + java-25-openjdk-headless 25.0.4.1, wheels new + wheels start, GET / 200, Lucee 7.0.0.395.

Verification: packages built locally with this branch through the release script (build-linux-packages.sh, nfpm 2.40.0, snapshot 2870 inputs, CHANNEL=bleeding-edge). The rich dependency survives nfpm and rpm-rewrap.sh (its dependency-equality check passes; rpm2cpio OK on Rocky 9 and 10). Then installed from the local files:

System Install Java pulled wheels --version
Rocky Linux 9.3 (dnf 4) dnf install ./wheels-be-…noarch.rpm java-21-openjdk-headless 21.0.11 wheels 4.2.0-snapshot.2870 (bleeding-edge)
Fedora 44 (dnf5) dnf install ./wheels-be-…noarch.rpm java-25-openjdk-headless 25.0.4.1 wheels 4.2.0-snapshot.2870 (bleeding-edge)
Ubuntu 24.04 apt-get install ./wheels-be_…_all.deb openjdk-21-jre-headless 21.0.12.1 wheels 4.2.0-snapshot.2870 (bleeding-edge)
Ubuntu 26.04 LTS apt-get install ./wheels-be_…_all.deb openjdk-21-jre-headless 21.0.12.1 wheels 4.2.0-snapshot.2870 (bleeding-edge)
Ubuntu 26.04 LTS, openjdk-25 preinstalled apt-get install ./wheels-be_…_all.deb none (keeps 25) wheels 4.2.0-snapshot.2870 (bleeding-edge)
  • tools/test-linux-launcher-java.sh passes 19/19 on Linux (ubuntu:24.04). On macOS one case fails on the /var -> /private/var symlink, unrelated and pre-existing.

Once this ships in a release, a Fedora/dnf5 leg can be added to distribution-install-smoke.yml (deferred until now, see #4235).

🤖 Generated with Claude Code

…cies

The rpm required java-21-openjdk-headless, which current Fedora (44) no longer
ships, so wheels/wheels-be couldn't be installed there. It now requires
'(java-21-headless or java-headless >= 1:21)'. The .deb also accepts OpenJDK 25.
The launcher already accepted any Java 21+; its error hint now says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bpamiri

bpamiri commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

rev1-r1 review: head d115294a8: APPROVE (LOWs optional)

  • rpm: (java-21-headless or java-headless >= 1:21) is a rich dependency (rpm ≥ 4.13, so every EL8+/Fedora target).
    • dnf prefers the first alternative, so Rocky/RHEL stays on 21.
    • On Fedora 44, which has no java-21, the java-headless provider (25) satisfies it.
    • java-17-openjdk-headless provides java-headless = 1:17, so it correctly does not satisfy the dependency.
  • deb: 21 | 21-jre | 25-headless | 25-jre keeps 21 as the default pick and accepts 25. That matches your matrix, including 26.04 keeping a preinstalled 25.
  • Launcher: it already gates on major ≥ 21. Only the hint text changed, and its test was updated with it.

LOW (optional):

  1. A Java 25 install isn't probed by name. The named candidates and the last-resort glob are 21-only (java-21-*, *jre-21*, *-21-*), so a 25-only install is found only via default-java or the /usr/bin/java alternative. If the alternative points at an older JDK while 25 is also installed, the launcher says "cannot find a Java 21 or newer runtime" even though 25 is present. For example: a Fedora box with java-17 selected, plus the java-25 this package now pulls in. Since _wheels_java_ok already version-checks, the last-resort loop could glob /usr/lib/jvm/* (newest first) instead of only *-21-*.
  2. The hint names java-21-openjdk-headless for yum/dnf, which doesn't exist on Fedora 44. Suggest adding "(Fedora: java-latest-openjdk-headless)".
  3. Optional for deb: OpenJDK packages also provide the virtual java21-runtime-headless (each openjdk-N provides javaK-runtime-headless for K ≤ N, as far as I know). Appending | java21-runtime-headless would accept 26+ and vendor JREs without another edit. Please verify on 26.04 before relying on it.

OK TO MERGE.

@bpamiri
bpamiri merged commit 94dbd1f into develop Oct 4, 2026
16 checks passed
@bpamiri
bpamiri deleted the peter/linux-pkg-java21-plus branch October 4, 2026 15:01
bpamiri added a commit that referenced this pull request Oct 11, 2026
…4.2.0 changelog

#4237 and #4243 changed released Linux package behaviour without a fragment.
The framework-suite datasource line (added by #4295 for #4254) gains its
issue reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
bpamiri added a commit that referenced this pull request Oct 11, 2026
* chore(release): promote changelog fragments into 4.2.0

Runs tools/changelog-promote.sh 4.2.0 2026-10-11: assembles the 272
changelog.d fragments into a new 4.2.0 section and empties changelog.d.
The date is the prep date and moves to the tag date at the cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>

* chore(release): add the Java 21+ package line and a reference to the 4.2.0 changelog

#4237 and #4243 changed released Linux package behaviour without a fragment.
The framework-suite datasource line (added by #4295 for #4254) gains its
issue reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>

* chore(release): describe job heartbeats as they ship in 4.2

Folds the heartbeat Added entry (#4477) and the grace Fixed entry (#4502)
into one Added entry. The Fixed entry described a 'before' that never
shipped, and the Added entry's 'heartbeats more often than its timeout'
contradicted the grace rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Peter Amiri <peter@alurium.com>

---------

Signed-off-by: Peter Amiri <peter@alurium.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant