Skip to content

Commit

Permalink
openjdk-17: fix hardcoded paths in jdk.attach
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Sep 3, 2024
1 parent 8a96aac commit 94fd264
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions packages/openjdk-17/0042-Fix-hardcoded-paths-in-jdk.attach.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From e7570675c4db70ea7314ae342def2445b0eea3c8 Mon Sep 17 00:00:00 2001
From: Chongyun Lee <[email protected]>
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
2 changes: 1 addition & 1 deletion packages/openjdk-17/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94fd264

Please sign in to comment.