Skip to content

release file contains text that can't be shell-evaluated #10980

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
headius opened this issue Apr 3, 2025 · 3 comments
Open

release file contains text that can't be shell-evaluated #10980

headius opened this issue Apr 3, 2025 · 3 comments
Assignees
Labels

Comments

@headius
Copy link

headius commented Apr 3, 2025

Builds of GraalVM contain, like many JDK builds, a release file with information about the build, Java version etc. The release files for other JDKs, like Zulu or Oracle or Temurin builds of OpenJDK, can be evaluated directly as a set of environment variables, making it easy to load these values into a launcher script. However GraalVM builds include an additional COMMIT_INFO line that is not quoted and cannot be evaluated by a script.

Here's the release file from my recent download:

IMPLEMENTOR="Oracle Corporation"
JAVA_RUNTIME_VERSION="24+36-jvmci-b01"
JAVA_VERSION="24"
JAVA_VERSION_DATE="2025-03-18"
LIBC="default"
MODULES="java.base java.logging java.management jdk.internal.vm.ci org.graalvm.collections org.graalvm.word org.graalvm.nativeimage jdk.management jdk.unsupported org.graalvm.truffle.compiler jdk.graal.compiler com.oracle.graal.graal_enterprise com.oracle.svm.enterprise.truffle java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.internal.opt jdk.zipfs jdk.compiler jdk.crypto.cryptoki jdk.crypto.ec jdk.dynalink jdk.internal.ed jdk.editpad jdk.graal.compiler.management jdk.hotspot.agent jdk.httpserver jdk.incubator.vector jdk.internal.le jdk.internal.md jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom org.graalvm.nativeimage.llvm"
OS_ARCH="aarch64"
OS_NAME="Darwin"
SOURCE=".:git:febf65d41a22 open:git:47fc4b79f32f labsjdk-builder:a2c0cc958a47161f5a6c8439d25776f83a53e14e compiler:7b230f23574c51bae4b1b13802a02095874cf7bc graal-enterprise:b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e regex:7b230f23574c51bae4b1b13802a02095874cf7bc sdk:7b230f23574c51bae4b1b13802a02095874cf7bc substratevm:7b230f23574c51bae4b1b13802a02095874cf7bc substratevm-enterprise:b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e substratevm-enterprise-gcs:2ea883e9faf8bd00da4c0f7592214eee01702479 tools:7b230f23574c51bae4b1b13802a02095874cf7bc truffle:7b230f23574c51bae4b1b13802a02095874cf7bc vm:7b230f23574c51bae4b1b13802a02095874cf7bc vm-enterprise:b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e wasm:7b230f23574c51bae4b1b13802a02095874cf7bc web-image:b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e web-image-enterprise:b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"
GRAALVM_VERSION="24.2.0"
COMMIT_INFO={"compiler": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "graal-enterprise": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"}, "regex": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "sdk": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "substratevm": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "substratevm-enterprise": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"}, "substratevm-enterprise-gcs": {"commit.committer": "Peter Hofer <peter.hofer@oracle.com>", "commit.committer-ts": 1733135770, "commit.rev": "2ea883e9faf8bd00da4c0f7592214eee01702479"}, "tools": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "truffle": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "vm": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "vm-enterprise": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"}, "wasm": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "7b230f23574c51bae4b1b13802a02095874cf7bc"}, "web-image": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"}, "web-image-enterprise": {"commit.committer": "Danilo Ansaloni <danilo.ansaloni@oracle.com>", "commit.committer-ts": 1741116591, "commit.rev": "b3eef60a91008ec918ac9ec36c3d4ec1c0fe1d3e"}}

Other than this COMMIT_INFO line, all elements are named and quoted correctly to act as environment variables. The formatting of COMMIT_INFO (which appears to be json) breaks that usage.

Matching other JDKs and avoiding the inclusion of unquoted, complex structured data would allow GraalVM to work better with consumers of the release file.

See jruby/jruby#8747 for an example of the sort of problem this introduces.

@headius headius added the bug label Apr 3, 2025
@fniephaus
Copy link
Member

Thanks for raising this, @headius. Looks like we should fix GraalVM's release file.

@ansalond could you look into this please?

@ansalond
Copy link
Member

We are looking into removing the COMMIT_INFO field from our release file. There's a couple of internal usages that we need to patch, but this should not be a blocker.

However, AFAIK, we do not explicitly support to "shell-evaluate" or "source" the release file.

@headius would it be ok with you to rename this issue to something limited to the inconsistent quotation of COMMIT_INFO?

@headius
Copy link
Author

headius commented Apr 10, 2025

@ansalond Sure, do what you will with this issue.

I know there's not really any standard around the release file, but this seemed far enough out of the norm to report. We will have to work around it for earlier releases but we appreciate the fix. I think it's a good idea to keep this file simple going forward.

Edit: I accidentally hit submit early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants