Skip to content

Commit

Permalink
Drop jshell as the CMD for openjdk-devel on SP5+
Browse files Browse the repository at this point in the history
jshell is broken on ppc64le for mysterious reasons and it's not really a useful
CMD anyway, so let's just stop using it by default until someone complains
  • Loading branch information
dcermak committed Dec 3, 2024
1 parent 7749907 commit 71002aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bci_build/package/openjdk-devel/README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The OpenJDK development image is intended to be used as a build environment. For

## Usage

The default command for the image is the Java Shell tool (JShell).
{% if image.os_version | string == "5" %}The default command for the image is the Java Shell tool (JShell).

```ShellSession
$ podman run -it --rm {{ image.pretty_reference }}
jshell> /help
```

To compile and deploy an application, copy the sources and build the binary:
{% endif %}To compile and deploy an application, copy the sources and build the binary:

```Dockerfile
# Build the application using the OpenJDK development image
Expand Down
10 changes: 8 additions & 2 deletions src/bci_build/package/openjdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@


def _get_openjdk_kwargs(
os_version: OsVersion,
os_version: Literal[
OsVersion.TUMBLEWEED, OsVersion.SP7, OsVersion.SP6, OsVersion.SP5
],
devel: bool,
java_version: Literal[11, 13, 15, 17, 20, 21, 23],
):
Expand Down Expand Up @@ -61,12 +63,16 @@ def _get_openjdk_kwargs(
}

if devel:
# don't set CMD in SP6 onward as jshell is broken and the CMD is
# arguably not too useful anyway
if os_version == OsVersion.SP5:
common |= {"cmd": ["/usr/bin/jshell"]}

return common | {
"name": "openjdk-devel",
"custom_labelprefix_end": "openjdk.devel",
"pretty_name": f"OpenJDK {java_version} development",
"package_list": [f"java-{java_version}-openjdk-devel", "maven"],
"cmd": ["/usr/bin/jshell"],
"from_image": f"{_build_tag_prefix(os_version)}/openjdk:{java_version}",
}
return common | {
Expand Down

0 comments on commit 71002aa

Please sign in to comment.