Update to use jdk 11+ to run:

* Use javaPathHelper to set default value for JAVA_HOME and remove
requirement that this be pre-set in the environment.

okay ajacoutot@ ian@
This commit is contained in:
kurt
2025-12-24 15:48:17 +00:00
parent c54e4bab34
commit 2777b03683
3 changed files with 16 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
COMMENT= API tools for Amazon EC2 web service
DISTNAME= ec2-api-tools-1.7.5.1
REVISION= 6
REVISION= 7
EXTRACT_SUFX= .zip
@@ -18,7 +18,7 @@ PERMIT_PACKAGE= Yes
SITES= http://s3.amazonaws.com/ec2-downloads/
MODULES= java
MODJAVA_VER= 1.8+
MODJAVA_VER= 11+
RUN_DEPENDS= java/javaPathHelper \
shells/bash
@@ -0,0 +1,14 @@
Use javaPathHelper for JAVA_HOME default value
Index: bin/ec2-cmd
--- bin/ec2-cmd.orig
+++ bin/ec2-cmd
@@ -15,7 +15,7 @@ __RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline
LIBDIR="${EC2_HOME}/lib"
# Check our Java env
-JAVA_HOME=${JAVA_HOME:?JAVA_HOME is not set}
+JAVA_HOME=$(javaPathHelper -h ec2-api-tools)
# If a classpath exists preserve it
CP="${CLASSPATH}"
-1
View File
@@ -4,5 +4,4 @@
Running the EC2 API tools requires the following to be set in the environment:
export EC2_HOME=${TRUEPREFIX}/ec2-api-tools
export JAVA_HOME=$(javaPathHelper -h ec2-api-tools)
export PATH=${PATH}:${EC2_HOME}/bin