diff --git a/packages/openjdk-17/0042-Fix-hardcoded-paths-in-jdk.attach.patch b/packages/openjdk-17/0042-Fix-hardcoded-paths-in-jdk.attach.patch new file mode 100644 index 00000000000000..d96f00f2895ebe --- /dev/null +++ b/packages/openjdk-17/0042-Fix-hardcoded-paths-in-jdk.attach.patch @@ -0,0 +1,22 @@ +From e7570675c4db70ea7314ae342def2445b0eea3c8 Mon Sep 17 00:00:00 2001 +From: Chongyun Lee <45286352+licy183@users.noreply.github.com> +Date: Tue, 3 Sep 2024 12:34:31 +0800 +Subject: [PATCH] Fix: hardcoded paths in jdk.attach + +--- + .../linux/classes/sun/tools/attach/VirtualMachineImpl.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java b/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java +index a5d743a2635..3d32c514f54 100644 +--- a/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java ++++ b/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java +@@ -46,7 +46,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine { + // location is the same for all processes, otherwise the tools + // will not be able to find all Hotspot processes. + // Any changes to this needs to be synchronized with HotSpot. +- private static final String tmpdir = "/tmp"; ++ private static final String tmpdir = "@TERMUX_PREFIX@/tmp"; + String socket_path; + /** + * Attaches to the target VM diff --git a/packages/openjdk-17/build.sh b/packages/openjdk-17/build.sh index 9c4359c948b16a..3b9f2f543384fa 100644 --- a/packages/openjdk-17/build.sh +++ b/packages/openjdk-17/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Java development kit and runtime" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=17.0 -TERMUX_PKG_REVISION=34 +TERMUX_PKG_REVISION=35 _COMMIT=82234f890786d49c49cf4ecbcb09c47bd9bea7ed TERMUX_PKG_SRCURL=https://github.com/openjdk/mobile/archive/$_COMMIT.tar.gz TERMUX_PKG_SHA256=5b298148a26e754120c6dfe699056d0609fc6ed92bfc858dc2ba4909ef6e791b