Skip to content

Update JRE dependencies for debian trixie #2342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stbuehler
Copy link

debian trixie comes (currently) with openjdk-21-jre-headless (selected by default-jre-headless) or openjdk-25-jre-headless, but not openjdk-17-jre-headless (nor 11). I'm currently running (a small personal instance) with openjdk-25-jre-headless and it seems fine.

(openjdk-17-jre-headless is still installed but not selected as /usr/bin/java, and apt is unhappy about "locally installed" packages.)

Another options for the dependency list would be default-jre-headless | java-runtime-headless (>= 17). default-jre-headless is a real package that depends on the default JRE of a debian release, and java-runtime-headless is a (versioned) virtual package provided by all openjdk*-jre-headless packages since version 17 - on trixie this should default to 21 but allow 25. openjdk-11-jre-headless should be usable on buster and bullseye via the default-jre-headless in those dists, or you could append | openjdk-11-jre-headless as final alternative (afaik the versioned java-runtime-headless (>= ...) shouldn't accept openjdk-11-jre-headless, because it provides java-runtime-headless only without a version).

I don't think a versioned dependency on default-jre-headless (e.g. like default-jre-headless (>=2:1.11)) would be a proper solution; if you want to make sure a recent enough java is installed (although that doesn't guarantee it is selected for /usr/bin/java) you should stick to java-runtime-headless (>= 17).

Similar names could be used for the build dependencies.

If you tell me what semantics you'd like in the dependencies I can adjust this PR (within the limits of what is reasonably possible with the debian packages).

…prefers the first one)

Not changing build-depends here because I'm not sure if building with
jdk-17 would result in a binary that wants jre-17.
The debian policy [1] still mentions javaNN-runtime-headless, but since
openjdk-17 the debian packages provide a versioned java-runtime-headless
dependency, and in openjdk-25 (and openjdk-24) the javaNN variants were
dropped [2].

Also given the package uses the `update-alternatives`-selected default
java depending on specific jre versions won't help anyway if a sysadmin
installs a different jre additionaly and selects it (and newer versions
will be selected by default anyway).

[1] https://www.debian.org/doc/packaging-manuals/java-policy/ch02.html#policy-programs
[2] https://salsa.debian.org/openjdk-team/openjdk/-/commit/2fa0698ece274ae9e1539b5fa2289a59d332c6b3
@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@stbuehler
Copy link
Author

Hi, thanks for your contribution! If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

As far as those changes are even protected by copyright they are licensed under Apache-2.0. I won't sign anything that requires me to hire a lawyer, because I'm quite sure you won't me pay for that.

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.

2 participants