├── .gitignore ├── flathub.json ├── README.md ├── extract_cacerts.sh ├── org.freedesktop.Sdk.Extension.openjdk.appdata.xml ├── patches ├── 0001-Allow-ccache-to-be-handled-by-GCC-wrappers.patch └── 0002-Build-failure-with-glibc-2.42-due-to-uabs-name.patch └── org.freedesktop.Sdk.Extension.openjdk.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | .flatpak-builder 2 | repo 3 | builddir 4 | -------------------------------------------------------------------------------- /flathub.json: -------------------------------------------------------------------------------- 1 | { 2 | "skip-icons-check": true 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SDK Extension for OpenJDK 24 2 | 3 | This extension contains the OpenJDK 24 Java Runtime Environment (JRE) and Java Developement Kit (JDK). 4 | 5 | OpenJDK 24 is the current latest version. This is *not* a long-term support (LTS) version and will be periodically updated as new JDKs are released. 6 | 7 | For the current LTS version, see the [OpenJDK 21](https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk21) extension. 8 | 9 | For the previous LTS version, see the [OpenJDK 17](https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk17) extension. 10 | 11 | ## Usage 12 | 13 | You can bundle the JRE with your Flatpak application by adding it to `sdk-extensions` in your Flatpak manifest and executing the `/usr/lib/sdk/openjdk/install.sh` script. 14 | 15 | Simplified example to make the JRE available at runtime: 16 | 17 | ```yaml 18 | id: org.example.MyApp 19 | runtime: org.freedesktop.Platform 20 | runtime-version: '25.08' 21 | sdk: org.freedesktop.Sdk 22 | sdk-extensions: 23 | - org.freedesktop.Sdk.Extension.openjdk 24 | 25 | modules: 26 | - name: openjdk 27 | buildsystem: simple 28 | build-commands: 29 | - /usr/lib/sdk/openjdk/install.sh 30 | - name: myapp 31 | buildsystem: simple 32 | ... 33 | 34 | ... 35 | 36 | finish-args: 37 | - --env=PATH=/app/jre/bin:/app/bin:/usr/bin 38 | ``` 39 | 40 | To additionally make the JRE available at buildtime of module `myapp`, set `build-options.append-path` accordingly: 41 | 42 | ```yaml 43 | ... 44 | 45 | modules: 46 | ... 47 | - name: myapp 48 | buildsystem: simple 49 | build-options: 50 | append-path: /usr/lib/sdk/openjdk/jvm/openjdk-24/bin 51 | ... 52 | ``` 53 | 54 | ## Development 55 | 56 | ### Build and install 57 | 58 | ```bash 59 | flatpak-builder --user --install --force-clean flatpakbuildir org.freedesktop.Sdk.Extension.openjdk.yaml 60 | ``` 61 | ### Uninstall 62 | 63 | ```bash 64 | flatpak uninstall --user org.freedesktop.Sdk.Extension.openjdk 65 | -------------------------------------------------------------------------------- /extract_cacerts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Tool to generate a Java-style "cacerts" keystore from the installed 4 | # system certificates 5 | 6 | set -e 7 | 8 | jdk=${1:-/app/jdk} 9 | 10 | function get_alias() { 11 | local alias="" 12 | local issuer="${1// /}," 13 | # Determine which attribute to use for the alias 14 | if [[ $issuer =~ CN= ]] ; then 15 | # Use the "Common Name" if available 16 | alias=$(echo "$issuer" | sed -e 's/.*CN=\([^,]*\),.*/\1/') 17 | # Unless it's GlobalSign, because of non-uniqueness 18 | if [[ $alias == GlobalSign ]] ; then 19 | # In which case use the "Organisational Unit" instead 20 | alias=$(echo "$issuer" | sed -e 's/.*OU=\([^,]*\),.*/\1/') 21 | fi 22 | elif [[ $issuer =~ OU= ]] ; then 23 | # Use the "Organisational Unit" if CN is unavailable 24 | alias=$(echo "$issuer" | sed -e 's/.*OU=\([^,]*\),.*/\1/') 25 | else 26 | # Use the "Organisation" if CN and OU are unavailable 27 | alias=$(echo "$issuer" | sed -e 's/.*O=\([^,]*\),.*/\1/') 28 | fi 29 | # Return only acsii chars, all lowercase, all one word, just to be consistent with what p11-kit would do 30 | echo "$alias" | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9()._-]//g' 31 | } 32 | 33 | for certificate in $(ls /etc/ssl/certs/*.pem) ; do 34 | cert=$($jdk/bin/keytool -printcert -file $certificate) 35 | issuer=$(echo "$cert" | grep '^Issuer' | cut -d' ' -f1 --complement) 36 | fprint=$(echo "$cert" | grep 'SHA1:' | cut -d' ' -f3) 37 | alias=$(get_alias "$issuer") 38 | echo "Adding $fprint ($alias, $certificate)" 39 | ${jdk}/bin/keytool -importcert -noprompt -alias "${alias}" -storepass changeit -storetype JKS -keystore cacerts -file "${certificate}" || \ 40 | ${jdk}/bin/keytool -importcert -noprompt -alias "${alias}_1" -storepass changeit -storetype JKS -keystore cacerts -file "${certificate}" # Since there was a certificate that ended up getting the same alias (.pem versus _1.pem) 41 | done 42 | 43 | rm $jdk/lib/security/cacerts 44 | mv cacerts $jdk/lib/security/cacerts 45 | 46 | -------------------------------------------------------------------------------- /org.freedesktop.Sdk.Extension.openjdk.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.freedesktop.Sdk.Extension.openjdk 5 | CC0-1.0 6 | 0BSD AND Apache-1.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND FTL AND GPL-2.0 AND GPL-2.0-with-classpath-exception AND IJG AND ISC AND LGPL-2.1-or-later AND MIT AND MPL-2.0 AND RSA-MD AND SAX-PD AND W3C AND Zlib 7 | OpenJDK SDK Extension 8 | The latest version of the OpenJDK JRE and JDK 9 | 10 |

11 | This SDK extension allows the building and running of Java-based applications. 12 |

13 |
14 | https://openjdk.java.net/ 15 | https://bugs.openjdk.java.net/ 16 | Mat Booth 17 | mat.booth@gmail.com 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | https://github.com/openjdk/jdk/releases/tag/jdk-23%2B37 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | -------------------------------------------------------------------------------- /patches/0001-Allow-ccache-to-be-handled-by-GCC-wrappers.patch: -------------------------------------------------------------------------------- 1 | From 896a90d632f0305c8a561664c9348561cef34253 Mon Sep 17 00:00:00 2001 2 | From: guihkx <626206+guihkx@users.noreply.github.com> 3 | Date: Tue, 15 Jul 2025 17:23:58 -0300 4 | Subject: [PATCH] Allow ccache to be handled by GCC wrappers 5 | 6 | This allows flatpak-builder not to fail at the configure step when 7 | invoked with the --ccache option: 8 | 9 | === 10 | $ flatpak run org.flatpak.Builder -v --install-deps-from flathub \ 11 | --arch x86_64 --delete-build-dirs --force-clean --repo repo/ \ 12 | --sandbox --ccache builddir/ org.freedesktop.Sdk.Extension.openjdk.yaml 13 | [...] 14 | checking for gcc... /run/ccache/bin/gcc 15 | checking resolved symbolic links for CC... /usr/bin/ccache 16 | configure: Please use --enable-ccache instead of providing a wrapped compiler. 17 | configure: error: /run/ccache/bin/gcc is a symbolic link to ccache. This is not supported. 18 | configure exiting with result code 1 19 | FB: host_command_exited_cb 8189 256 20 | 21 | Error: module java: Child process exited with code 1 22 | === 23 | 24 | This patch is required because Flathub builders use --ccache now: 25 | 26 | https://github.com/flathub-infra/vorarbeiter/blob/7f2f04a562e73ba4f46044dae7c99f8e9e64a39d/justfile#L181 27 | --- 28 | make/autoconf/toolchain.m4 | 8 -------- 29 | 1 file changed, 8 deletions(-) 30 | 31 | diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 32 | index e0b4152b81c..e3a99a7512b 100644 33 | --- a/make/autoconf/toolchain.m4 34 | +++ b/make/autoconf/toolchain.m4 35 | @@ -478,14 +478,6 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER], 36 | AC_MSG_RESULT([no symlink]) 37 | else 38 | AC_MSG_RESULT([$SYMLINK_ORIGINAL]) 39 | - 40 | - # We can't handle ccache by gcc wrappers, since we need to know if we're 41 | - # using ccache. Instead ccache usage must be controlled by a configure option. 42 | - COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` 43 | - if test "x$COMPILER_BASENAME" = "xccache"; then 44 | - AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.]) 45 | - AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.]) 46 | - fi 47 | fi 48 | 49 | TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) 50 | -- 51 | 2.50.1 52 | 53 | -------------------------------------------------------------------------------- /patches/0002-Build-failure-with-glibc-2.42-due-to-uabs-name.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp 2 | index 76f88764416..2e1deba2281 100644 3 | --- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp 4 | +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp 5 | @@ -457,7 +457,7 @@ void Assembler::bang_stack_with_offset(int offset) { Unimplemented(); } 6 | 7 | bool asm_util::operand_valid_for_immediate_bits(int64_t imm, unsigned nbits) { 8 | guarantee(nbits == 8 || nbits == 12, "invalid nbits value"); 9 | - uint64_t uimm = (uint64_t)uabs((jlong)imm); 10 | + uint64_t uimm = (uint64_t)g_uabs((jlong)imm); 11 | if (uimm < (UCONST64(1) << nbits)) 12 | return true; 13 | if (uimm < (UCONST64(1) << (2 * nbits)) 14 | diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 15 | index a5e0e2665af..1686603b17e 100644 16 | --- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 17 | +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp 18 | @@ -932,7 +932,7 @@ class Assembler : public AbstractAssembler { 19 | static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M); 20 | 21 | static bool reachable_from_branch_at(address branch, address target) { 22 | - return uabs(target - branch) < branch_range; 23 | + return g_uabs(target - branch) < branch_range; 24 | } 25 | 26 | // Unconditional branch (immediate) 27 | diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 28 | index d561fb912a3..c41919c323d 100644 29 | --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 30 | +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 31 | @@ -3271,7 +3271,7 @@ void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, uint64_t im 32 | if (fits) { 33 | (this->*insn1)(Rd, Rn, imm); 34 | } else { 35 | - if (uabs(imm) < (1 << 24)) { 36 | + if (g_uabs(imm) < (1 << 24)) { 37 | (this->*insn1)(Rd, Rn, imm & -(1 << 12)); 38 | (this->*insn1)(Rd, Rd, imm & ((1 << 12)-1)); 39 | } else { 40 | diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 41 | index de5df5c1af1..b521e748bcf 100644 42 | --- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 43 | +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp 44 | @@ -1133,7 +1133,7 @@ class StubGenerator: public StubCodeGenerator { 45 | 46 | void copy_memory_small(DecoratorSet decorators, BasicType type, Register s, Register d, Register count, int step) { 47 | bool is_backwards = step < 0; 48 | - size_t granularity = uabs(step); 49 | + size_t granularity = g_uabs(step); 50 | int direction = is_backwards ? -1 : 1; 51 | 52 | Label Lword, Lint, Lshort, Lbyte; 53 | @@ -1192,7 +1192,7 @@ class StubGenerator: public StubCodeGenerator { 54 | Register s, Register d, Register count, int step) { 55 | copy_direction direction = step < 0 ? copy_backwards : copy_forwards; 56 | bool is_backwards = step < 0; 57 | - unsigned int granularity = uabs(step); 58 | + unsigned int granularity = g_uabs(step); 59 | const Register t0 = r3, t1 = r4; 60 | 61 | // <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always 62 | diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp 63 | index 31713d7362a..0eaa5548779 100644 64 | --- a/src/hotspot/cpu/riscv/assembler_riscv.hpp 65 | +++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp 66 | @@ -3393,7 +3393,7 @@ enum Nf { 67 | static const unsigned long branch_range = 1 * M; 68 | 69 | static bool reachable_from_branch_at(address branch, address target) { 70 | - return uabs(target - branch) < branch_range; 71 | + return g_uabs(target - branch) < branch_range; 72 | } 73 | 74 | // Decode the given instruction, checking if it's a 16-bit compressed 75 | diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp 76 | index 7e6fe50e8f8..54973022c12 100644 77 | --- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp 78 | +++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp 79 | @@ -874,7 +874,7 @@ class StubGenerator: public StubCodeGenerator { 80 | 81 | void copy_memory_v(Register s, Register d, Register count, int step) { 82 | bool is_backward = step < 0; 83 | - int granularity = uabs(step); 84 | + int granularity = g_uabs(step); 85 | 86 | const Register src = x30, dst = x31, vl = x14, cnt = x15, tmp1 = x16, tmp2 = x17; 87 | assert_different_registers(s, d, cnt, vl, tmp1, tmp2); 88 | @@ -936,7 +936,7 @@ class StubGenerator: public StubCodeGenerator { 89 | } 90 | 91 | bool is_backwards = step < 0; 92 | - int granularity = uabs(step); 93 | + int granularity = g_uabs(step); 94 | 95 | const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13; 96 | const Register gct1 = x28, gct2 = x29, gct3 = t2; 97 | diff --git a/src/hotspot/share/opto/mulnode.cpp b/src/hotspot/share/opto/mulnode.cpp 98 | index ad98fda025f..bf7bf0336c4 100644 99 | --- a/src/hotspot/share/opto/mulnode.cpp 100 | +++ b/src/hotspot/share/opto/mulnode.cpp 101 | @@ -245,7 +245,7 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) { 102 | // Check for negative constant; if so negate the final result 103 | bool sign_flip = false; 104 | 105 | - unsigned int abs_con = uabs(con); 106 | + unsigned int abs_con = g_uabs(con); 107 | if (abs_con != (unsigned int)con) { 108 | sign_flip = true; 109 | } 110 | @@ -480,7 +480,7 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) { 111 | 112 | // Check for negative constant; if so negate the final result 113 | bool sign_flip = false; 114 | - julong abs_con = uabs(con); 115 | + julong abs_con = g_uabs(con); 116 | if (abs_con != (julong)con) { 117 | sign_flip = true; 118 | } 119 | diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp 120 | index 1698ca5338b..f50bb8a93e3 100644 121 | --- a/src/hotspot/share/opto/subnode.cpp 122 | +++ b/src/hotspot/share/opto/subnode.cpp 123 | @@ -1927,14 +1927,14 @@ const Type* AbsNode::Value(PhaseGVN* phase) const { 124 | case Type::Int: { 125 | const TypeInt* ti = t1->is_int(); 126 | if (ti->is_con()) { 127 | - return TypeInt::make(uabs(ti->get_con())); 128 | + return TypeInt::make(g_uabs(ti->get_con())); 129 | } 130 | break; 131 | } 132 | case Type::Long: { 133 | const TypeLong* tl = t1->is_long(); 134 | if (tl->is_con()) { 135 | - return TypeLong::make(uabs(tl->get_con())); 136 | + return TypeLong::make(g_uabs(tl->get_con())); 137 | } 138 | break; 139 | } 140 | diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp 141 | index ccd3106b471..c5f40792a9d 100644 142 | --- a/src/hotspot/share/utilities/globalDefinitions.hpp 143 | +++ b/src/hotspot/share/utilities/globalDefinitions.hpp 144 | @@ -1144,7 +1144,7 @@ inline bool is_even(intx x) { return !is_odd(x); } 145 | 146 | // abs methods which cannot overflow and so are well-defined across 147 | // the entire domain of integer types. 148 | -static inline unsigned int uabs(unsigned int n) { 149 | +static inline unsigned int g_uabs(unsigned int n) { 150 | union { 151 | unsigned int result; 152 | int value; 153 | @@ -1153,7 +1153,7 @@ static inline unsigned int uabs(unsigned int n) { 154 | if (value < 0) result = 0-result; 155 | return result; 156 | } 157 | -static inline julong uabs(julong n) { 158 | +static inline julong g_uabs(julong n) { 159 | union { 160 | julong result; 161 | jlong value; 162 | @@ -1162,8 +1162,8 @@ static inline julong uabs(julong n) { 163 | if (value < 0) result = 0-result; 164 | return result; 165 | } 166 | -static inline julong uabs(jlong n) { return uabs((julong)n); } 167 | -static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } 168 | +static inline julong g_uabs(jlong n) { return g_uabs((julong)n); } 169 | +static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); } 170 | 171 | // "to" should be greater than "from." 172 | inline size_t byte_size(void* from, void* to) { 173 | -------------------------------------------------------------------------------- /org.freedesktop.Sdk.Extension.openjdk.yaml: -------------------------------------------------------------------------------- 1 | id: org.freedesktop.Sdk.Extension.openjdk 2 | branch: '25.08' 3 | runtime: org.freedesktop.Sdk 4 | runtime-version: '25.08' 5 | build-extension: true 6 | sdk: org.freedesktop.Sdk 7 | separate-locales: false 8 | cleanup: 9 | - /share/info 10 | - /share/man 11 | build-options: 12 | no-debuginfo: true 13 | strip: true 14 | prefix: /usr/lib/sdk/openjdk 15 | env: 16 | V: '1' 17 | modules: 18 | - name: bootstrap_jdk 19 | buildsystem: simple 20 | cleanup: 21 | - '*' 22 | sources: 23 | - type: file 24 | only-arches: 25 | - x86_64 26 | url: https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24.0.2%2B12/OpenJDK24U-jdk_x64_linux_hotspot_24.0.2_12.tar.gz 27 | dest-filename: java-openjdk.tar.bz2 28 | sha512: 99b8c6f7125e1cb6cd252805f9db7779edf161c4908f7c523d9c6746aa7487f008ce0900bf5244fecfc3a34702201a1b94fd4aaa86cb3958216c4f872d9e824d 29 | x-checker-data: 30 | type: json 31 | url: https://api.adoptium.net/v3/assets/latest/24/hotspot?os=linux&architecture=x64&image_type=jdk 32 | version-query: .[0].version.semver 33 | url-query: .[0].binary.package.link 34 | - type: file 35 | only-arches: 36 | - aarch64 37 | url: https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24.0.2%2B12/OpenJDK24U-jdk_aarch64_linux_hotspot_24.0.2_12.tar.gz 38 | dest-filename: java-openjdk.tar.bz2 39 | sha512: 9de3c9aacccbdfb7b3bb1a400fb2ffc78165291816d8cdea92dad0da6756b38abaf21e09fcdba181a8bd227ee4f87779c22b7e58f8d399f02dc2023a6068cec3 40 | x-checker-data: 41 | type: json 42 | url: https://api.adoptium.net/v3/assets/latest/24/hotspot?os=linux&architecture=aarch64&image_type=jdk 43 | version-query: .[0].version.semver 44 | url-query: .[0].binary.package.link 45 | build-commands: 46 | - mkdir -p $FLATPAK_DEST/bootstrap-java 47 | - tar xf java-openjdk.tar.bz2 --strip-components=1 --directory=$FLATPAK_DEST/bootstrap-java 48 | - name: java 49 | buildsystem: autotools 50 | no-make-install: true 51 | no-parallel-make: true 52 | config-opts: 53 | - --with-boot-jdk=/usr/lib/sdk/openjdk/bootstrap-java 54 | - --with-jvm-variants=server 55 | - --with-version-build=12 56 | - --with-version-pre= 57 | - --with-version-opt= 58 | - --with-vendor-version-string=25.8 59 | - --with-vendor-name=Flathub 60 | - --with-vendor-url=https://flathub.org 61 | - --with-vendor-bug-url=https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk/issues 62 | - --with-debug-level=release 63 | - --with-native-debug-symbols=internal 64 | - --enable-unlimited-crypto 65 | - --with-zlib=system 66 | - --with-libjpeg=system 67 | - --with-giflib=system 68 | - --with-libpng=system 69 | - --with-lcms=system 70 | - --with-harfbuzz=system 71 | - --with-stdc++lib=dynamic 72 | - --with-extra-cxxflags=-grecord-gcc-switches -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 73 | -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection 74 | - --with-extra-cflags=-grecord-gcc-switches -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 75 | -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection 76 | - --with-extra-ldflags=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed 77 | - --disable-javac-server 78 | - --disable-warnings-as-errors 79 | make-args: 80 | - LOG=info 81 | - images 82 | post-install: 83 | - mkdir -p $FLATPAK_DEST/jvm/ $FLATPAK_DEST/bin 84 | - cp -Lr build/linux-*-server-release/images/jdk $FLATPAK_DEST/jvm/openjdk-24 85 | - ln -s $FLATPAK_DEST/jvm/openjdk-24/bin/* $FLATPAK_DEST/bin 86 | sources: 87 | - type: archive 88 | url: https://github.com/openjdk/jdk24u/archive/refs/tags/jdk-24.0.2+12.tar.gz 89 | sha512: fa3457d69279db37204d829b6637aec541dc76f58574c31b6c7da5cb2758f87d759065cf77e97cded964385887ce9ee859fd81b609efcd490319a774821fe79b 90 | x-checker-data: 91 | type: json 92 | url: https://api.adoptium.net/v3/assets/latest/24/hotspot?os=linux&architecture=x64&image_type=jdk 93 | version-query: .[0].release_name 94 | url-query: '"https://github.com/openjdk/jdk24u/archive/refs/tags/" + $version 95 | + ".tar.gz"' 96 | is-main-source: true 97 | - type: shell 98 | commands: 99 | - chmod a+x configure 100 | - sed -i -e "s|@prefix@|$FLATPAK_DEST|" make/autoconf/spec.gmk.template 101 | - type: patch 102 | paths: 103 | - patches/0001-Allow-ccache-to-be-handled-by-GCC-wrappers.patch 104 | - patches/0002-Build-failure-with-glibc-2.42-due-to-uabs-name.patch 105 | - name: cacerts 106 | buildsystem: simple 107 | sources: 108 | - type: file 109 | path: extract_cacerts.sh 110 | build-commands: 111 | - ./extract_cacerts.sh $FLATPAK_DEST/jvm/openjdk-24 112 | - name: ant 113 | buildsystem: simple 114 | cleanup: 115 | - '*.bat' 116 | - '*.cmd' 117 | sources: 118 | - type: file 119 | url: http://archive.apache.org/dist/ant/binaries/apache-ant-1.10.15-bin.tar.gz 120 | dest-filename: apache-ant-bin.tar.gz 121 | sha512: d78427aff207592c024ff1552dc04f7b57065a195c42d398fcffe7a0145e8d00cd46786f5aa52e77ab0fdf81334f065eb8011eecd2b48f7228e97ff4cb20d16c 122 | x-checker-data: 123 | type: anitya 124 | project-id: 50 125 | stable-only: true 126 | url-template: http://archive.apache.org/dist/ant/binaries/apache-ant-$version-bin.tar.gz 127 | build-commands: 128 | - mkdir -p $FLATPAK_DEST/ant 129 | - tar xf apache-ant-bin.tar.gz --strip-components=1 --directory=$FLATPAK_DEST/ant 130 | - ln -s $FLATPAK_DEST/ant/bin/ant $FLATPAK_DEST/bin 131 | - name: maven 132 | buildsystem: simple 133 | cleanup: 134 | - '*.bat' 135 | - '*.cmd' 136 | sources: 137 | - type: file 138 | url: http://archive.apache.org/dist/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz 139 | dest-filename: apache-maven-bin.tar.gz 140 | sha512: bcfe4fe305c962ace56ac7b5fc7a08b87d5abd8b7e89027ab251069faebee516b0ded8961445d6d91ec1985dfe30f8153268843c89aa392733d1a3ec956c9978 141 | x-checker-data: 142 | type: anitya 143 | project-id: 1894 144 | stable-only: true 145 | url-template: http://archive.apache.org/dist/maven/maven-3/$version/binaries/apache-maven-$version-bin.tar.gz 146 | build-commands: 147 | - mkdir -p $FLATPAK_DEST/maven 148 | - tar xf apache-maven-bin.tar.gz --strip-components=1 --exclude=jansi-native 149 | --directory=$FLATPAK_DEST/maven 150 | - ln -s $FLATPAK_DEST/maven/bin/mvn $FLATPAK_DEST/maven/bin/mvnDebug $FLATPAK_DEST/bin 151 | - name: gradle 152 | buildsystem: simple 153 | cleanup: 154 | - '*.bat' 155 | sources: 156 | - type: file 157 | url: https://services.gradle.org/distributions/gradle-9.0.0-bin.zip 158 | dest-filename: gradle-bin.zip 159 | sha512: 7558c0bd914a2a4fabb12fe92283e197b8cc308292c7c90fb90dc7e9b880b38168c9406272611be30d63860a9143538ee69309c251471d2ab2dfd2238c5904a6 160 | x-checker-data: 161 | type: json 162 | url: https://api.github.com/repos/gradle/gradle/releases 163 | version-query: map(select(.prerelease == false)) | first | .name 164 | url-query: '["https://services.gradle.org/distributions/gradle-" + $version 165 | + "-bin.zip"][0]' 166 | build-commands: 167 | - unzip -q gradle-bin.zip -d $FLATPAK_DEST 168 | - mv $FLATPAK_DEST/gradle-* $FLATPAK_DEST/gradle 169 | - ln -s $FLATPAK_DEST/gradle/bin/gradle $FLATPAK_DEST/bin 170 | - name: scripts 171 | buildsystem: simple 172 | sources: 173 | - type: script 174 | commands: 175 | - mkdir -p /app/jre/bin 176 | - cd /usr/lib/sdk/openjdk/jvm/openjdk-24 177 | - cp -ra conf lib release /app/jre/ 178 | - rm /app/jre/lib/src.zip /app/jre/lib/ct.sym 179 | - cp -ra bin/{java,keytool,rmiregistry} /app/jre/bin 180 | dest-filename: install.sh 181 | - type: script 182 | commands: 183 | - mkdir -p /app/jdk/ 184 | - cd /usr/lib/sdk/openjdk/jvm/openjdk-24 185 | - cp -ra bin conf include jmods lib release /app/jdk/ 186 | dest-filename: installjdk.sh 187 | - type: script 188 | commands: 189 | - export JAVA_HOME=/usr/lib/sdk/openjdk/jvm/openjdk-24 190 | - export PATH=$PATH:/usr/lib/sdk/openjdk/bin 191 | dest-filename: enable.sh 192 | build-commands: 193 | - cp enable.sh install.sh installjdk.sh /usr/lib/sdk/openjdk/ 194 | - name: appdata 195 | buildsystem: simple 196 | sources: 197 | - type: file 198 | path: org.freedesktop.Sdk.Extension.openjdk.appdata.xml 199 | build-commands: 200 | - mkdir -p ${FLATPAK_DEST}/share/metainfo 201 | - cp org.freedesktop.Sdk.Extension.openjdk.appdata.xml ${FLATPAK_DEST}/share/metainfo 202 | --------------------------------------------------------------------------------