From dcbcf4d5794cd025c1ece2ec40f6a100b5ab4ae8 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 12 Oct 2021 10:58:14 -0400 Subject: [PATCH] Adding IBM semeru 11 module (#409) (#411) * Adding semeru jdk 11 module * Update jvm-options Remove the blank first line. Co-authored-by: Lei Zhang Co-authored-by: Lei Zhang --- .../jboss/container/openjdk/jdk/jvm-options | 9 ++++++ .../openjdk/jdk/semeru-11-open/configure.sh | 26 +++++++++++++++ .../openjdk/jdk/semeru-11-open/module.yaml | 32 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 jboss/container/openjdk/jdk/semeru-11-open/artifacts/opt/jboss/container/openjdk/jdk/jvm-options create mode 100755 jboss/container/openjdk/jdk/semeru-11-open/configure.sh create mode 100644 jboss/container/openjdk/jdk/semeru-11-open/module.yaml diff --git a/jboss/container/openjdk/jdk/semeru-11-open/artifacts/opt/jboss/container/openjdk/jdk/jvm-options b/jboss/container/openjdk/jdk/semeru-11-open/artifacts/opt/jboss/container/openjdk/jdk/jvm-options new file mode 100644 index 00000000..4484251d --- /dev/null +++ b/jboss/container/openjdk/jdk/semeru-11-open/artifacts/opt/jboss/container/openjdk/jdk/jvm-options @@ -0,0 +1,9 @@ +#!/bin/sh +# ============================================================================== +# JDK specific customizations +# +# ============================================================================== + +function jvm_specific_diagnostics() { + echo "" +} diff --git a/jboss/container/openjdk/jdk/semeru-11-open/configure.sh b/jboss/container/openjdk/jdk/semeru-11-open/configure.sh new file mode 100755 index 00000000..5efe86f4 --- /dev/null +++ b/jboss/container/openjdk/jdk/semeru-11-open/configure.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# Configure module +set -e + +SCRIPT_DIR=$(dirname $0) +ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts + +chown -R jboss:root $SCRIPT_DIR +chmod -R ug+rwX $SCRIPT_DIR +chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jdk/* + +pushd ${ARTIFACTS_DIR} +cp -pr * / +popd + +alternatives --set java /usr/lib/jvm/ibm-semeru-open-11-jdk/bin/java +alternatives --set javac /usr/lib/jvm/ibm-semeru-open-11-jdk/bin/javac + +# Update securerandom.source for quicker starts +JAVA_SECURITY_FILE=/usr/lib/jvm/ibm-semeru-open-11-jdk/conf/security/java.security +SECURERANDOM=securerandom.source +if grep -q "^$SECURERANDOM=.*" $JAVA_SECURITY_FILE; then + sed -i "s|^$SECURERANDOM=.*|$SECURERANDOM=file:/dev/urandom|" $JAVA_SECURITY_FILE +else + echo $SECURERANDOM=file:/dev/urandom >> $JAVA_SECURITY_FILE +fi diff --git a/jboss/container/openjdk/jdk/semeru-11-open/module.yaml b/jboss/container/openjdk/jdk/semeru-11-open/module.yaml new file mode 100644 index 00000000..100929ff --- /dev/null +++ b/jboss/container/openjdk/jdk/semeru-11-open/module.yaml @@ -0,0 +1,32 @@ +schema_version: 1 + +name: "jboss.container.openjdk.jdk" +description: "Installs the JDK for OpenJ9 11." +version: "semeru-11-open" + +labels: +- name: "org.jboss.product" + value: "openjdk" +- name: "org.jboss.product.version" + value: "11" +- name: "org.jboss.product.openjdk.version" + value: "11" + +envs: +- name: "JAVA_HOME" + value: "/usr/lib/jvm/ibm-semeru-open-11-jdk" +- name: "JAVA_VENDOR" + value: "IBM" +- name: "JAVA_VERSION" + value: "11" + +packages: + install: + - ibm-semeru-open-11-jdk + +modules: + install: + - name: jboss.container.user + +execute: +- script: configure.sh