Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/jdk/17/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jdk/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-17-openjdk.${_arch}
Expand Down
4 changes: 0 additions & 4 deletions modules/jdk/17/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jdk
5 changes: 5 additions & 0 deletions modules/jdk/21/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jdk/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
alternatives --set java java-21-openjdk.${_arch}
Expand Down
4 changes: 0 additions & 4 deletions modules/jdk/21/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jdk
8 changes: 1 addition & 7 deletions modules/jdk/8/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ set -e
SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

chown -R $USER: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
install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jdk/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
Expand Down
9 changes: 7 additions & 2 deletions modules/jre/17/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jre/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
Expand Down
4 changes: 0 additions & 4 deletions modules/jre/17/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jre
9 changes: 7 additions & 2 deletions modules/jre/21/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jre/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
Expand Down
4 changes: 0 additions & 4 deletions modules/jre/21/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,3 @@ modules:

execute:
- script: configure.sh

artifacts:
- path: artifacts/jvm-options
dest: /opt/jboss/container/openjdk/jre
13 changes: 3 additions & 10 deletions modules/jre/8/configure.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
#!/bin/sh
# Configure module
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

chown -R $USER:root $SCRIPT_DIR
chmod -R ug+rwX $SCRIPT_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/openjdk/jre/*

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd
install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/openjdk/jre/jvm-options

# Set this JDK as the alternative in use
_arch="$(uname -i)"
Expand Down
7 changes: 5 additions & 2 deletions modules/jvm/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
set -euo pipefail

# OPENJDK-3695: force +x for scripts
chmod 0755 /opt/jboss/container/java/jvm/*
SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -D -t /opt/jboss/container/java/jvm \
${ARTIFACTS_DIR}/opt/jboss/container/java/jvm/*
5 changes: 2 additions & 3 deletions modules/jvm/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ description: ^
Provides support for configuring Java JVM, e.g. GC settings, etc. Basic usage
is opts=$($JBOSS_CONTAINER_JAVA_JVM_MODULE/java-default-options)

artifacts:
- path: artifacts/jvm
dest: /opt/jboss/container/java/jvm
execute:
- script: configure.sh

execute:
- script: configure.sh
Expand Down
12 changes: 8 additions & 4 deletions modules/maven/default/configure.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/sh
# Configure module
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D -t /opt/jboss/container/maven/default \
${ARTIFACTS_DIR}/opt/jboss/container/maven/default/*

MAVEN_VERSION_SQUASHED=${MAVEN_VERSION/./}

# pull in specific maven version to serve as default
ln -s /opt/jboss/container/maven/${MAVEN_VERSION_SQUASHED}/* /opt/jboss/container/maven/default
chown -h $USER:root /opt/jboss/container/maven/default/*

# install default settings.xml file in user home
mkdir -p $HOME/.m2
Expand Down
4 changes: 0 additions & 4 deletions modules/maven/default/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ description: ^
execute:
- script: configure.sh

artifacts:
- path: artifacts/default
dest: /opt/jboss/container/maven/default

modules:
install:
- name: jboss.container.user
Expand Down
7 changes: 7 additions & 0 deletions modules/maven/module/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

cp ${ARTIFACTS_DIR}/maven.module /etc/dnf/modules.d/maven.module
5 changes: 2 additions & 3 deletions modules/maven/module/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ version: '3.8'
description: ^
Enables the AppStream RPM Module for Maven 3.8 packages.

artifacts:
- path: artifacts/maven.module
dest: /etc/dnf/modules.d
execute:
- script: configure.sh
9 changes: 9 additions & 0 deletions modules/maven/s2i/artifacts/usr/local/s2i/assemble
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

source "${JBOSS_CONTAINER_UTIL_LOGGING_MODULE}/logging.sh"
source "${JBOSS_CONTAINER_MAVEN_S2I_MODULE}/maven-s2i"

# invoke the build
maven_s2i_build
File renamed without changes.
8 changes: 6 additions & 2 deletions modules/maven/s2i/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash
set -euo pipefail

# OPENJDK-3695: force +x for scripts
chmod 0755 /usr/libexec/s2i/save-artifacts
SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -D ${ARTIFACTS_DIR}/usr/local/s2i/* /usr/local/s2i
install -m 0644 -D -t /opt/jboss/container/maven/s2i \
${ARTIFACTS_DIR}/opt/jboss/container/maven/s2i/*
9 changes: 3 additions & 6 deletions modules/maven/s2i/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ envs:
- name: JBOSS_CONTAINER_MAVEN_S2I_MODULE
value: /opt/jboss/container/maven/s2i

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.user
Expand All @@ -36,9 +39,3 @@ execute:
packages:
install:
- tar

artifacts:
- path: artifacts/s2i
dest: /opt/jboss/container/maven/s2i
- path: artifacts/save-artifacts
dest: /usr/libexec/s2i
8 changes: 8 additions & 0 deletions modules/proxy/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D -t /opt/jboss/container/java/proxy \
${ARTIFACTS_DIR}/opt/jboss/container/java/proxy/*
5 changes: 2 additions & 3 deletions modules/proxy/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ modules:
install:
- name: jboss.container.user

artifacts:
- path: artifacts/proxy
dest: /opt/jboss/container/java/proxy
execute:
- script: configure.sh
9 changes: 7 additions & 2 deletions modules/run/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -D {${ARTIFACTS_DIR},}/opt/jboss/container/java/run/run-java.sh

mkdir -p /deployments/data \
&& chmod -R "ug+rwX" /deployments/data \
Expand Down
4 changes: 0 additions & 4 deletions modules/run/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,3 @@ modules:
- name: jboss.container.user
- name: jboss.container.java.jvm
- name: jboss.container.util.logging

artifacts:
- path: artifacts/run-java.sh
dest: /opt/jboss/container/java/run
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions modules/s2i/bash/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash
set -euo pipefail

# OPENJDK-3695: force +x for scripts
chmod 0755 /usr/local/s2i/{assemble,run,usage}
SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -D ${ARTIFACTS_DIR}/usr/local/s2i/* /usr/local/s2i
install -m 0644 -D -t /opt/jboss/container/java/s2i \
${ARTIFACTS_DIR}/opt/jboss/container/java/s2i/*
12 changes: 3 additions & 9 deletions modules/s2i/bash/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ envs:
- name: JBOSS_CONTAINER_JAVA_S2I_MODULE
value: /opt/jboss/container/java/s2i

execute:
- script: configure.sh

modules:
install:
- name: jboss.container.user
Expand All @@ -17,12 +20,3 @@ modules:
packages:
install:
- rsync

artifacts:
- path: artifacts/local
dest: /usr/local/s2i
- path: artifacts/opt
dest: /opt/jboss/container/java/s2i

execute:
- script: configure.sh
17 changes: 15 additions & 2 deletions modules/s2i/core/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/sh
set -e
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/s2i/core/s2i-core

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

mkdir -p /usr/local/s2i \
&& chmod 775 /usr/local/s2i \
&& chown -R $USER:root /usr/local/s2i

# OPENJDK-2805
ln -s /usr/local/s2i /usr/libexec/s2i
Expand Down
4 changes: 0 additions & 4 deletions modules/s2i/core/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,3 @@ run:
modules:
install:
- name: jboss.container.user

artifacts:
- path: artifacts/s2i-core
dest: /opt/jboss/container/s2i/core
7 changes: 7 additions & 0 deletions modules/util/logging/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -euo pipefail

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

install -m 0644 -D {${ARTIFACTS_DIR},}/opt/jboss/container/util/logging/logging.sh
5 changes: 2 additions & 3 deletions modules/util/logging/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ modules:
install:
- name: jboss.container.user

artifacts:
- path: artifacts/logging.sh
dest: /opt/jboss/container/util/logging
execute:
- script: configure.sh
Loading