Skip to content

Commit 706cc82

Browse files
committed
Migrated to temurin
1 parent f33358b commit 706cc82

File tree

4 files changed

+66
-27
lines changed

4 files changed

+66
-27
lines changed

tools/openjdk-jre/Dockerfile.template

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
#syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
22

3-
FROM ghcr.io/uniget-org/tools/openjdk:latest AS openjdk
4-
53
FROM ghcr.io/uniget-org/images/ubuntu:24.04 AS prepare
64
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
75
/etc/profile.d/ \
86
/etc/profile.d/
97
SHELL [ "bash", "-clo", "errexit" ]
10-
COPY --from=openjdk / /usr/local/
118
ARG name
129
ARG version
1310
RUN <<EOF
14-
jlink --strip-debug --no-man-pages --no-header-files --compress=2 --output "${prefix}/opt/openjdk-jre" --add-modules \
15-
java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.incubator.vector,jdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,jdk.jdwp.agent,jdk.jfr,jdk.jsobject,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.xml.dom,jdk.zipfs
11+
echo "### Setting architecture string for ${TARGETPLATFORM}"
12+
case "${arch}" in
13+
x86_64)
14+
export arch_suffix="x64"
15+
;;
16+
aarch64)
17+
export arch_suffix="${arch}"
18+
;;
19+
*)
20+
echo "ERROR: Unsupported architecture ${arch}."
21+
exit 1
22+
;;
23+
esac
24+
echo " Using ${arch_suffix}"
25+
26+
MAJOR_VERSION="$(echo "${version}" | cut -d. -f1)"
27+
version_url_encoded="$(echo "${version}" | sed 's/+/%2B/g')"
28+
version_filename="$(echo "${version}" | sed 's/+/_/g')"
29+
30+
check-github-release-asset "adoptium/temurin${MAJOR_VERSION}-binaries" "jdk-${version}" "OpenJDK${MAJOR_VERSION}U-jre_x64_alpine-linux_hotspot_${version_filename}.tar.gz"
31+
mkdir -p "${prefix}/opt/openjdk-jre"
32+
curl --silent --show-error --location --fail "https://github.com/adoptium/temurin${MAJOR_VERSION}-binaries/releases/download/jdk-${version_url_encoded}/OpenJDK${MAJOR_VERSION}U-jre_x64_alpine-linux_hotspot_${version_filename}.tar.gz" \
33+
| tar --extract --gzip --directory="${prefix}/opt/openjdk-jre" --strip-components=1 --no-same-owner
34+
1635
cd "${prefix}/opt/openjdk-jre/bin"
1736
find . -type f -executable \
1837
| while read -r BINARY; do

tools/openjdk-jre/manifest.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
22
name: openjdk-jre
3-
version: "22"
3+
license:
4+
name: GPLv2
5+
link: https://github.com/openjdk/jdk/blob/master/LICENSE
6+
version: "22.0.2+9"
47
binary: java
58
check: ${binary} -version 2>&1 | grep ^openjdk | cut -d' ' -f3 | tr -d '"'
69
build_dependencies:
@@ -9,15 +12,12 @@ tags:
912
- type/cli
1013
- category/development
1114
- lang/java
12-
homepage: https://github.com/openjdk
13-
repository: https://github.com/openjdk
15+
homepage: https://adoptium.net/de/temurin/
16+
repository: https://github.com/adoptium
1417
description: OpenJDK
1518
renovate:
16-
datasource: github-tags
17-
package: openjdk/jdk
18-
extractVersion: ^jdk-(?<version>.+)-ga$
19+
datasource: github-releases
20+
package: uniget-org/renovate-custom
21+
extractVersion: ^openjdk/(?<version>.+)$
1922
versioning: loose
2023
priority: low
21-
license:
22-
name: GPLv2
23-
link: https://github.com/openjdk/jdk/blob/master/LICENSE

tools/openjdk/Dockerfile.template

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
#syntax=docker/dockerfile:1.10.0@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5
22

3-
FROM ghcr.io/uniget-org/tools/jabba:latest AS jabba
4-
53
FROM ghcr.io/uniget-org/images/ubuntu:24.04 AS prepare
64
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
75
/etc/profile.d/ \
86
/etc/profile.d/
97
SHELL [ "bash", "-clo", "errexit" ]
10-
COPY --from=jabba / /usr/local/
118
ARG name
129
ARG version
1310
RUN <<EOF
14-
jabba install --output "${prefix}/opt/openjdk/" openjdk@1.${version}
11+
echo "### Setting architecture string for ${TARGETPLATFORM}"
12+
case "${arch}" in
13+
x86_64)
14+
export arch_suffix="x64"
15+
;;
16+
aarch64)
17+
export arch_suffix="${arch}"
18+
;;
19+
*)
20+
echo "ERROR: Unsupported architecture ${arch}."
21+
exit 1
22+
;;
23+
esac
24+
echo " Using ${arch_suffix}"
25+
26+
MAJOR_VERSION="$(echo "${version}" | cut -d. -f1)"
27+
version_url_encoded="$(echo "${version}" | sed 's/+/%2B/g')"
28+
version_filename="$(echo "${version}" | sed 's/+/_/g')"
29+
30+
check-github-release-asset "adoptium/temurin${MAJOR_VERSION}-binaries" "jdk-${version}" "OpenJDK${MAJOR_VERSION}U-jdk_x64_alpine-linux_hotspot_${version_filename}.tar.gz"
31+
mkdir -p "${prefix}/opt/openjdk"
32+
curl --silent --show-error --location --fail "https://github.com/adoptium/temurin${MAJOR_VERSION}-binaries/releases/download/jdk-${version_url_encoded}/OpenJDK${MAJOR_VERSION}U-jdk_x64_alpine-linux_hotspot_${version_filename}.tar.gz" \
33+
| tar --extract --gzip --directory="${prefix}/opt/openjdk" --strip-components=1 --no-same-owner
34+
1535
cd "${prefix}/opt/openjdk/bin"
1636
find . -type f -executable \
1737
| while read -r BINARY; do

tools/openjdk/manifest.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
22
name: openjdk
3-
version: "22"
3+
license:
4+
name: GPLv2
5+
link: https://github.com/openjdk/jdk/blob/master/LICENSE
6+
version: "22.0.2+9"
47
binary: javac
58
check: ${binary} -version | cut -d' ' -f2
69
build_dependencies:
@@ -9,15 +12,12 @@ tags:
912
- type/cli
1013
- category/development
1114
- lang/java
12-
homepage: https://github.com/openjdk
13-
repository: https://github.com/openjdk
15+
homepage: https://adoptium.net/de/temurin/
16+
repository: https://github.com/adoptium
1417
description: OpenJDK
1518
renovate:
16-
datasource: github-tags
17-
package: openjdk/jdk
18-
extractVersion: ^jdk-(?<version>.+)-ga$
19+
datasource: github-releases
20+
package: uniget-org/renovate-custom
21+
extractVersion: ^openjdk/(?<version>.+)$
1922
versioning: loose
2023
priority: low
21-
license:
22-
name: GPLv2
23-
link: https://github.com/openjdk/jdk/blob/master/LICENSE

0 commit comments

Comments
 (0)